diff --git a/examples/default/android-sourcemap.json b/examples/default/android-sourcemap.json new file mode 100644 index 000000000..1f3c3c379 --- /dev/null +++ b/examples/default/android-sourcemap.json @@ -0,0 +1 @@ +{"version":3,"sources":["__prelude__","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/metro-runtime/src/polyfills/require.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/js-polyfills/console.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/js-polyfills/error-guard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/interopRequireDefault.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/GestureButtons.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/objectWithoutProperties.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/classCallCheck.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/createClass.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/toPropertyKey.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/toPrimitive.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/typeof.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/assertThisInitialized.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/getPrototypeOf.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/inherits.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/setPrototypeOf.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react/cjs/react.production.min.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/registerCallableModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/BatchedBridge/BatchedBridge.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/toConsumableArray.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/arrayLikeToArray.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/iterableToArray.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/nonIterableSpread.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Performance/Systrace.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/vendor/core/ErrorUtils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/stringifySafe.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/invariant/browser.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/EventEmitter/RCTDeviceEventEmitter.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/get.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/superPropBase.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/vendor/emitter/EventEmitter.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/Platform.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/NativePlatformConstantsAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativePlatformConstantsAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/TurboModule/TurboModuleRegistry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/BatchedBridge/NativeModules.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/slicedToArray.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/arrayWithHoles.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/nonIterableRest.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/defineLazyObjectProperty.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/UIManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/nullthrows/nullthrows.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/BridgelessUIManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/FabricUIManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeComponent/NativeComponentRegistryUnstable.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/PaperUIManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/NativeUIManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeUIManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/UIManagerProperties.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeAccessibilityInfo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeAccessibilityManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/RendererProxy.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/RendererImplementation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Renderer/shims/ReactFabric.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/InitializeCore.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpGlobals.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/core/setUpDOM.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/geometry/DOMRect.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/geometry/DOMRectReadOnly.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpPerformance.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/Performance.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/readOnlyError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/warnOnce.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/EventCounts.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/specs/NativePerformanceObserver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/PerformanceObserver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/PerformanceEntry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/PerformanceEventTiming.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/RawPerformanceEntry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/MemoryInfo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/ReactNativeStartupTiming.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/specs/NativePerformance.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/performance/UserTiming.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpErrorHandling.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/ExceptionsManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/wrapNativeSuper.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/isNativeFunction.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/construct.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/Devtools/parseErrorStack.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/stacktrace-parser/dist/stack-trace-parser.cjs.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/Devtools/parseHermesStack.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/NativeExceptionsManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeExceptionsManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/polyfillPromise.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/PolyfillFunctions.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Promise.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/promise/setimmediate/finally.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/promise/setimmediate/core.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/promise/setimmediate/es6-extensions.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpRegeneratorRuntime.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/FeatureDetection.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/regenerator-runtime/runtime.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpTimers.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/Timers/JSTimers.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/Timers/NativeTiming.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeTiming.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/featureflags/ReactNativeFeatureFlags.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/featureflags/ReactNativeFeatureFlagsBase.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/microtasks/specs/NativeMicrotasks.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/Timers/immediateShim.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/Timers/queueMicrotask.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpXHR.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Network/XMLHttpRequest.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/event-target-shim/dist/event-target-shim.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Blob/BlobManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Blob/NativeBlobModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeBlobModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Blob/Blob.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Blob/BlobRegistry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/GlobalPerformanceLogger.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/createPerformanceLogger.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/infoLog.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/base64-js/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Network/RCTNetworking.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/EventEmitter/NativeEventEmitter.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Network/convertRequestBody.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Network/FormData.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/binaryToBase64.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Network/NativeNetworkingAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeNetworkingAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Network/fetch.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/whatwg-fetch/dist/fetch.umd.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/WebSocket/WebSocket.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/WebSocket/NativeWebSocketModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeWebSocketModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/WebSocket/WebSocketEvent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Blob/File.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Blob/FileReader.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Blob/NativeFileReaderModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeFileReaderModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Blob/URL.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/abort-controller/dist/abort-controller.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpAlert.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Alert/Alert.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Alert/RCTAlertManager.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeDialogManagerAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpNavigator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpBatchedBridge.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/HeapCapture/HeapCapture.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/HeapCapture/NativeJSCHeapCapture.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeJSCHeapCapture.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Performance/SamplingProfiler.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Performance/NativeJSCSamplingProfiler.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeJSCSamplingProfiler.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/RCTLog.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/HMRClientProdShim.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/setUpSegmentFetcher.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeSegmentFetcher.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/AppRegistry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/BugReporting/BugReporting.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeModules/specs/NativeRedBox.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeRedBox.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/BugReporting/NativeBugReporting.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeBugReporting.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/BugReporting/dumpReactTree.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/SceneTracker.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/HeadlessJsTaskError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeHeadlessJsTaskSupport.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/renderApplication.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/PerformanceLoggerContext.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/AppContainer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/AppContainer-prod.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/View/View.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Text/TextAncestor.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/View/ViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeComponent/NativeComponentRegistry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/getNativeComponentAttributes.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/View/ReactNativeStyleAttributes.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/processAspectRatio.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/processColor.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/normalizeColor.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/normalize-colors/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/PlatformColorValueTypes.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/processFilter.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/processFontVariant.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/processTransform.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/defineProperty.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/processTransformOrigin.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/differ/sizesDiffer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/differ/matricesDiffer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/differ/pointsDiffer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/differ/insetsDiffer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/processColorArray.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/resolveAssetSource.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeModules/specs/NativeSourceCode.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeSourceCode.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/assets-registry/registry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/AssetSourceResolver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/AssetUtils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/PixelRatio.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/Dimensions.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/NativeDeviceInfo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeDeviceInfo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/assets-registry/path-support.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/verifyComponentAttributeEquivalence.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeComponent/PlatformBaseViewConfig.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeComponent/BaseViewConfig.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeComponent/ViewConfigIgnore.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeComponent/StaticViewConfigValidator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeComponent/ViewConfig.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/codegenNativeCommands.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react/jsx-runtime.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react/cjs/react-jsx-runtime.production.min.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/StyleSheet.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/core/composeStyles.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/flattenStyle.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/RootTag.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/DisplayMode.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/getCachedComponentWithDebugName.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/BackHandler.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeModules/specs/NativeDeviceEventManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeDeviceEventManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/EventEmitter/RCTEventEmitter.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/TextInput/TextInputState.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/differ/deepDiffer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/ReactFiberErrorDialog.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/RawEventEmitter.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Events/CustomEvent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Events/EventPolyfill.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/nodes/ReactNativeElement.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/nodes/ReadOnlyElement.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/nodes/ReadOnlyNode.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/nodes/specs/NativeDOM.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/oldstylecollections/NodeList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/oldstylecollections/ArrayLikeUtils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/oldstylecollections/HTMLCollection.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/nodes/utilities/Traversal.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/nodes/ReadOnlyText.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/scheduler/index.native.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/scheduler/cjs/scheduler.native.production.min.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Core/ErrorHandlers.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Renderer/shims/ReactNative.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/ProgressBarAndroidNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/codegenNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/requireNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Renderer/shims/createReactNativeComponentClass.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/ActivityIndicatorViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Button.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Text/Text.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Pressability/PressabilityDebug.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Pressability/usePressability.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Pressability/Pressability.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Sound/SoundManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Sound/NativeSoundManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeSoundManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Pressability/PressabilityPerformanceEventEmitter.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Pressability/HoverState.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/Rect.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Text/TextNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/Animated.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/AnimatedImplementation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/animations/DecayAnimation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/NativeAnimatedHelper.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/NativeAnimatedModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeAnimatedModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/shouldUseTurboAnimatedModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/NativeAnimatedTurboModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeAnimatedTurboModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/animations/Animation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedProps.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedNode.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedObject.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedWithChildren.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedStyle.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedTransform.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/AnimatedEvent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedValue.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Interaction/InteractionManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Interaction/TaskQueue.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedInterpolation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/Easing.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/bezier.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedValueXY.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/animations/SpringAnimation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedColor.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/SpringConfig.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/animations/TimingAnimation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/createAnimatedComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/useMergeRefs.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/useAnimatedProps.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/useRefEffect.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedAddition.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedDiffClamp.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedDivision.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedModulo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedMultiplication.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedSubtraction.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/nodes/AnimatedTracking.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/AnimatedMock.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/components/AnimatedFlatList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Lists/FlatList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/memoize-one/dist/memoize-one.cjs.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/VirtualizeUtils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/VirtualizedList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Interaction/Batchinator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Utilities/clamp.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Utilities/infoLog.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/ChildListCollection.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/FillRateHelper.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/ListMetricsAggregator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/StateSafePureComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/ViewabilityHelper.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/VirtualizedListCellRenderer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/VirtualizedListContext.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/VirtualizedListProps.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/CellRenderMask.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native/virtualized-lists/Lists/VirtualizedSectionList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/components/AnimatedImage.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/Image.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/asyncToGenerator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/ImageAnalyticsTagContext.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/ImageViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/NativeImageLoaderAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeImageLoaderAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/TextInlineImageNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/ImageSourceUtils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/ImageUtils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/ImageInjection.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/components/AnimatedScrollView.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/RefreshControl/RefreshControl.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/AndroidSwipeRefreshLayoutNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/PullToRefreshViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Interaction/FrameRateLogger.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Interaction/NativeFrameRateLogger.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeFrameRateLogger.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/splitLayoutProps.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/dismissKeyboard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Keyboard/Keyboard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/LayoutAnimation/LayoutAnimation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Keyboard/NativeKeyboardObserver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeKeyboardObserver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/processDecelerationRate.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/ScrollViewCommands.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/ScrollViewContext.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/ScrollViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ScrollView/ScrollViewStickyHeader.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/components/AnimatedSectionList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Lists/SectionList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/components/AnimatedText.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/components/AnimatedView.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/StatusBar/StatusBar.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeStatusBarManagerAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeStatusBarManagerIOS.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/AndroidDrawerLayoutNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/ImageBackground.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/TextInput/InputAccessoryView.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/SafeAreaView/SafeAreaView.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/RCTSafeAreaViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/useWindowDimensions.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/RCTInputAccessoryViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Modal/Modal.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Modal/ModalInjection.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Modal/NativeModalManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeModalManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Modal/RCTModalHostViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/RCTModalHostViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/I18nManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ReactNative/NativeI18nManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeI18nManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Pressable/Pressable.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Pressable/useAndroidRippleForView.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Switch/Switch.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Switch/AndroidSwitchNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/AndroidSwitchNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Switch/SwitchNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/components/SwitchNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/TextInput/TextInput.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Touchable/Touchable.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Touchable/BoundingDimensions.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Touchable/PooledClass.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Touchable/Position.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Touchable/TouchableHighlight.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Lists/VirtualizedList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/ActionSheetIOS/NativeActionSheetManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeActionSheetManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/Appearance.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/NativeAppearance.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeAppearance.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/AppState/AppState.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/logError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/AppState/NativeAppState.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeAppState.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Clipboard/Clipboard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/Clipboard/NativeClipboard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeClipboard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/DeviceInfo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/DevSettings.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/NativeModules/specs/NativeDevSettings.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeDevSettings.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Linking/Linking.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Linking/NativeIntentAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeIntentAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Linking/NativeLinkingManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeLinkingManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/LogBox/LogBox.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Interaction/PanResponder.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Interaction/TouchHistoryMath.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/PermissionsAndroid/NativePermissionsAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativePermissionsAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/PushNotificationIOS/PushNotificationIOS.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativePushNotificationManagerIOS.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Settings/Settings.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Share/Share.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Share/NativeShareModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeShareModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ToastAndroid/ToastAndroid.android.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Components/ToastAndroid/NativeToastAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeToastAndroid.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Animated/useAnimatedValue.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Utilities/useColorScheme.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/UTFSequence.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Vibration/Vibration.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Vibration/NativeVibration.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/src/private/specs/modules/NativeVibration.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/YellowBox/YellowBoxDeprecated.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/StyleSheet/PlatformColorValueTypesIOS.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/createNativeWrapper.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/NativeViewGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/createHandler.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/RNGestureHandlerModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/specs/NativeRNGestureHandlerModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/GestureHandlerRootViewContext.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/customDirectEventTypes.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/State.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/ActionType.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/handlersRegistry.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/ghQueueMicrotask.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/getNextHandlerTag.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestureHandlerCommon.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/GestureHandlerButton.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/specs/RNGestureHandlerButtonNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/Directions.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/GestureComponents.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/FlingGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/ForceTouchGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/PlatformConstants.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/gestureObjects.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/tapGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/gesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/panGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/pinchGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/rotationGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/flingGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/longPressGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/forceTouchGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/nativeGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/manualGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/hoverGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/gestureComposition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/TapGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/PanGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/LongPressGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/reanimatedWrapper.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/animationsManager.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/animationBuilder/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/animationBuilder/BaseAnimationBuilder.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/commonTypes.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/errors.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/util.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/PlatformChecker.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/ReducedMotion.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/mutables.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/logger/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/logger/logger.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/logger/LogBox.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/valueSetter.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/shareables.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/NativeReanimated/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/js-reanimated/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/js-reanimated/JSReanimated.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/mockedRequestAnimationFrame.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/js-reanimated/webUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/propsAllowlists.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/NativeReanimated/NativeReanimated.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/specs/NativeReanimatedModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platform-specific/jsVersion.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/valueUnpacker.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/fabricUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/shareableMappingCache.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/threads.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/transformationMatrix/matrixUtils.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/Colors.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/core.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/runtimes.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/initializers.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/mappers.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/isSharedValue.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/SensorContainer.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/Sensor.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/clamp.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/decay/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/decay/decay.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/decay/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/decay/rubberBandDecay.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/decay/rigidDecay.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/delay.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/repeat.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/sequence.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/spring.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/springUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/styleAnimation.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animation/timing.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/Easing.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/Bezier.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/animationBuilder/Keyframe.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/animationBuilder/commonTypes.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Flip.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Stretch.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Fade.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Slide.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Zoom.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Bounce.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Lightspeed.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Pinwheel.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Rotate.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultAnimations/Roll.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultTransitions/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultTransitions/LinearTransition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultTransitions/FadingTransition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultTransitions/SequencedTransition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultTransitions/JumpingTransition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultTransitions/CurvedTransition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/defaultTransitions/EntryExitTransition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/sharedTransitions/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/sharedTransitions/SharedTransition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/UpdateLayoutAnimations.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/sharedTransitions/ProgressTransitionManager.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/interpolateColor.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/interpolation.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useSharedValue.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/component/LayoutAnimationConfig.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platformFunctions/findNodeHandle.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/component/PerformanceMonitor.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/ConfigHelper.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/createAnimatedComponent.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/JSPropsUpdater.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/setAndForwardRef.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/domUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/config.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Fade.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animationParser.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/Easing.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Bounce.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Flip.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Stretch.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Zoom.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Slide.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Lightspeed.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Pinwheel.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Rotate.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animation/Roll.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/componentStyle.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/componentUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/createAnimation.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/transition/Linear.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/transition/Sequenced.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/transition/Fading.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/transition/Jumping.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/transition/Curved.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/transition/EntryExit.web.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/layoutReanimation/web/animationsManager.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/InlinePropManager.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/UpdateProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/ViewDescriptorsSet.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/PropsFilter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/WorkletEventHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/animationBuilder.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/NativeEventsManager.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/PropsRegistry.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platform-specific/RNRenderer.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/createAnimatedComponent/getViewInfo.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useAnimatedGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useEvent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useAnimatedKeyboard.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useAnimatedProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useAnimatedStyle.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useAnimatedReaction.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useAnimatedRef.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useAnimatedScrollHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useAnimatedSensor.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useComposedEventHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useDerivedValue.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useFrameCallback.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/frameCallback/FrameCallbackRegistryJS.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/frameCallback/FrameCallbackRegistryUI.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useReducedMotion.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useScrollViewOffset.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/hook/useWorkletCallback.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/component/ReducedMotionConfig.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/screenTransition/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/screenTransition/presets.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/screenTransition/animationManager.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/screenTransition/styleUpdater.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/screenTransition/swipeSimulator.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/screenTransition/RNScreensTurboModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/jestUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/PropAdapters.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platformFunctions/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platformFunctions/dispatchCommand.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platformFunctions/getRelativeCoords.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platformFunctions/measure.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platformFunctions/scrollTo.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platformFunctions/setGestureState.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/platformFunctions/setNativeProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/pluginUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/publicGlobals.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/Animated.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/component/FlatList.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/component/View.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/component/Image.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/component/ScrollView.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-reanimated/src/component/Text.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/eventReceiver.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/gestureStateManager.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/TouchEventType.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/EnableNewWebImplementation.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/useDetectorUpdater.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/needsToReattach.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/dropHandlers.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/attachHandlers.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/updateHandlers.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/useViewRefHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/useAnimatedGesture.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector/Wrap.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/PinchGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/PointerType.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/handlers/RotationGestureHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/touchables/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/touchables/TouchableNativeFeedback.android.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/touchables/GenericTouchable.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/touchables/TouchableWithoutFeedback.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/touchables/TouchableOpacity.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/touchables/TouchableHighlight.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/gestureHandlerRootHOC.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-is/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-is/cjs/react-is.production.min.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/GestureHandlerRootView.android.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/specs/RNGestureHandlerRootViewNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/init.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/Swipeable.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/Pressable/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/Pressable/Pressable.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/Pressable/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-gesture-handler/src/components/DrawerLayout.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/app.json","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/App.tsx","/Users/salmayasser/Documents/Instabug-React-Native/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/models/Report.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeInstabug.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativePackage.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/models/Trace.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeAPM.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/APM.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/BugReporting.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeBugReporting.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/CrashReporting.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/InstabugUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/NetworkLogger.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/InstabugConstants.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/XhrNetworkInterceptor.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/FeatureFlags.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/Instabug.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeNetworkLogger.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/AppStatesHandler.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/UnhandledRejectionTracking.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/promise/setimmediate/rejection-tracking.js","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeCrashReporting.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/Enums.ts","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/index.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/node_modules/ansi-styles/index.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/collections.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/plugins/DOMCollection.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/plugins/DOMElement.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/plugins/lib/markup.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/plugins/lib/escapeHTML.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/plugins/Immutable.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/plugins/ReactElement.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/node_modules/react-is/index.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/node_modules/react-is/cjs/react-is.production.min.js","/Users/salmayasser/Documents/Instabug-React-Native/node_modules/pretty-format/build/plugins/ReactTestComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/logger.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/utils/config.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/FeatureRequests.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeFeatureRequests.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/Replies.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeReplies.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/Surveys.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeSurveys.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/modules/SessionReplay.ts","/Users/salmayasser/Documents/Instabug-React-Native/src/native/NativeSessionReplay.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/retryer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/utils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/extends.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/focusManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/inheritsLoose.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/subscribable.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/onlineManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/queryCache.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/query.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/logger.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/notifyManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/queryClient.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/mutationCache.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/mutation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/infiniteQueryBehavior.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/queryObserver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/queriesObserver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/infiniteQueryObserver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/mutationObserver.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/hydration.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/core/types.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/setBatchUpdatesFn.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/reactBatchedUpdates.native.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/setLogger.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/logger.native.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/QueryClientProvider.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/QueryErrorResetBoundary.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/useIsFetching.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/useIsMutating.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/useMutation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/utils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/useQuery.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/useBaseQuery.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/useQueries.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/interopRequireWildcard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/useInfiniteQuery.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/Hydrate.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-query/lib/react/types.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/Link.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/useLinkProps.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/LinkingContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/useLinkTo.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/BaseNavigationContainer.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/checkDuplicateRouteNames.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/checkSerializable.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/EnsureSingleNavigator.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/findFocusedRoute.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/NavigationBuilderContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/NavigationContainerRefContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/NavigationContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/NavigationRouteContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/NavigationStateContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/UnhandledActionContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useChildListeners.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useEventEmitter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useKeyedChildListeners.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useOptionsGetters.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useSyncState.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/createNavigationContainerRef.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/routers/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/routers/src/CommonActions.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/routers/src/BaseRouter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/nanoid/non-secure/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/routers/src/DrawerRouter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/routers/src/TabRouter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/routers/src/StackRouter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/routers/src/types.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useScheduleUpdate.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/createNavigatorFactory.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/Group.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/Screen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/CurrentRenderContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/getActionFromState.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/getFocusedRouteNameFromRoute.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useRouteCache.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/getPathFromState.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/query-string/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/strict-uri-encode/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/decode-uri-component/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/split-on-first/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/filter-obj/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/fromEntries.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/validatePathConfig.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/getStateFromPath.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/escape-string-regexp/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/NavigationHelpersContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/PreventRemoveContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/PreventRemoveProvider.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/use-latest-callback/lib/src/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/use-latest-callback/lib/src/useIsomorphicLayoutEffect.native.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/types.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useFocusEffect.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useNavigation.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useIsFocused.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useNavigationBuilder.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/isArrayEqual.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/isRecordEqual.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useComponent.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useCurrentRender.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useDescriptors.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/SceneView.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/StaticContainer.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useNavigationCache.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useFocusedListenersChildrenAdapter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useFocusEvents.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useNavigationHelpers.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useOnAction.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useOnPreventRemove.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useOnGetState.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useOnRouteFocus.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useRegisterNavigator.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useNavigationContainerRef.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useNavigationState.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/usePreventRemove.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/usePreventRemoveContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/core/src/useRoute.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/NavigationContainer.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/theming/DefaultTheme.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/theming/ThemeProvider.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/theming/ThemeContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/useBackButton.native.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/useDocumentTitle.native.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/useLinking.native.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/extractPathFromURL.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/useThenable.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/ServerContainer.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/ServerContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/theming/DarkTheme.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/theming/useTheme.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/types.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/useLinkBuilder.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native/src/useScrollToTop.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Accordion/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Accordion/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Accordion/Accordion.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Box/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/styled.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useKeyboardDismissable.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useBreakpointResolvedProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/core/NativeBaseContext.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/createContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useTheme.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useThemeProps/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.get/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.isnil/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.mergewith/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.clonedeep/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/borders.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/breakpoints.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/colors.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/radius.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/shadows.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/sizes.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/space.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/typography.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/base/opacity.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/tools/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/tools/colors.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.isempty/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/tinycolor2/cjs/tinycolor.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/tools/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.omitby/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.pick/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.omit/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useContrastText.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useToken.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/core/color-mode/hooks.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/core/hybrid-overlay/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/use-sync-external-store/shim/index.native.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useBreakpointValue.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useClipboard.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useControllableProp.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useDisclose.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useLayout.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useMediaQuery.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useNativeBase.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/core/color-mode/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/usePlatformProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.merge/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useThemeProps/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useThemeProps/usePropsResolution.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useThemeProps/propsFlattener.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useResponsiveSSRProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/useResponsiveQuery/ResponsiveQueryProvider.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useThemeProps/usePropsWithComponentTheme.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useThemeProps/useProps.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/filterShadowProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useThemeProps/usePropsResolutionTest.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useThemeProps/propsFlattenerTest.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useSafeArea/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/SafeAreaContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/NativeSafeAreaProvider.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/specs/NativeSafeAreaProvider.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/SafeAreaView.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/specs/NativeSafeAreaView.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/InitialWindow.native.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/specs/NativeSafeAreaContext.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-safe-area-context/src/SafeArea.types.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useSafeArea/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/styled-system.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/convertStringNumberToNumber.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/getStyledFromProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/getRNKeyAndStyleValue.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/aspect-ratio.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/avatar.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/avatar-badge.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/avatar-group.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/badge.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/button.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/card.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/center.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/checkbox.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/checkbox-group.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/box.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/flatList.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/keyboardAvoidingView.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/scrollView.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/sectionList.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/statusBar.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/circular-progress.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/code.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/container.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/hstack.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/vstack.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/divider.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/circle.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/simple-grid.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/heading.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/icon.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/icon-button.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/kbd.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/link.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/menu.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/popover.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/number-input.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/pin-input.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/pressable.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/progress.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/radio.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/radio-group.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/spinner.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/stat.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/switch.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/tabs.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/tag.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/text.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/app-bar.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/textarea.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/stack.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/square.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/view.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/zstack.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/fab.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/inputleftaddon.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/inputrightaddon.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/accordion.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/actionsheet.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/alert.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/breadcrumb.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/transitions.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/flex.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/form-control.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/image.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/input.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/list.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/modal.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/alert-dialog.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/select.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/skeleton.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/slider.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/textField.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/toast.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/typeahead.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/wrap.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/components/tooltip.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/borders.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/breakpoints.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/colors.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/radius.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/shadows.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/sizes.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/space.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/typography.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/base/opacity.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/aspect-ratio.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/avatar.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/tools/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/tools/colors.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/tools/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/avatar-badge.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/avatar-group.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/badge.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/button.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/card.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/center.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/checkbox.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/checkbox-group.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/box.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/flatList.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/keyboardAvoidingView.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/scrollView.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/sectionList.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/statusBar.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/circular-progress.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/code.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/container.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/hstack.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/vstack.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/divider.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/circle.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/simple-grid.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/heading.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/icon.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/icon-button.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/kbd.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/link.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/menu.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/popover.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/number-input.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/pin-input.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/pressable.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/progress.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/radio.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/radio-group.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/spinner.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/stat.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/switch.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/tabs.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/tag.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/text.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/app-bar.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/textarea.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/stack.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/square.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/view.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/zstack.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/fab.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/inputleftaddon.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/inputrightaddon.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/accordion.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/actionsheet.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/alert.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/breadcrumb.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/transitions.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/flex.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/form-control.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/image.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/input.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/list.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/modal.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/alert-dialog.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/select.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/skeleton.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/slider.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/textField.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/toast.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/typeahead.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/wrap.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v33x-theme/components/tooltip.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useScreenReaderEnabled.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useStyledSystemPropsResolver.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/stable-hash/dist/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/useResponsiveQuery/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/useResponsiveQuery/useResponsiveQuery.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/useResponsiveQuery/useStableMemo.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/useResponsiveQuery/common.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/useResponsiveQuery/types.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/getStyledSystemPropsAndRestProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useSx/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useHasResponsiveProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/wrapStringChild.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Text/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/interactions/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/interactions/src/usePress.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useId.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/ssr/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/ssr/dist/SSRProvider.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useLayoutEffect.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useValueEffect.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useEffectEvent.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/chain.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/domHelpers.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/mergeProps.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/clsx/dist/clsx.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/mergeRefs.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/filterDOMProps.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/focusWithoutScrolling.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/getOffset.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/openLink.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/platform.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/runAfterTransition.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useDrag1D.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useGlobalListeners.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useLabels.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useObjectRef.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useUpdateEffect.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useResizeObserver.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useSyncRef.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/getScrollParent.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/isScrollable.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/getScrollParents.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useViewportSize.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useDescription.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useEvent.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/scrollIntoView.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/utils/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/utils/dist/useControlledState.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/utils/dist/number.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/isVirtualEvent.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useDeepMemo.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useFormReset.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/utils/dist/useLoadMore.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/interactions/src/useKeyboardDismisssable.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/interactions/src/useHover.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/hooks/useResolvedFontFamily.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/mergeRefs.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/getIndexedChildren.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Accordion/AccordionItem.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Accordion/AccordionSummary.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/addTextAndPropsToStrings.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/accessibilityUtils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/canUseDom.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/combineContextAndProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/isEmptyObj.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/resolveStackStyleInput.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/useKeyboardBottomInset.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/getSpacedChildren.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/getAbsoluteChildren.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/utils/getAttachedChildren.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Accordion/AccordionDetails.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Collapse/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Button/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Button/Button.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Spinner/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Stack/HStack.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Stack/Stack.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Pressable/Pressable.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/focus/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/focus/src/FocusScope.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/focus/src/useFocus.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/focus/src/useFocusRing.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Pressable/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Button/ButtonGroup.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Stack/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Stack/VStack.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Checkbox/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Checkbox/Checkbox.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Checkbox/SizedIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Add.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/createIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/SVGIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/nbSvg.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/ReactNativeSVG.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/deprecated.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/CircleNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/ClipPathNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/DefsNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/EllipseNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/ForeignObjectNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/GroupNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/ImageNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/LinearGradientNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/LineNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/MarkerNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/MaskNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/PathNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/PatternNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/RadialGradientNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/RectNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/AndroidSvgViewNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/IOSSvgViewNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/SymbolNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/TextNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/TextPathNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/TSpanNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/UseNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/FilterNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/FeBlendNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/FeColorMatrixNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/FeFloodNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/FeGaussianBlurNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/FeMergeNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/FeOffsetNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/xml.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/xmlTags.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeComponentTransferFunction.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FilterPrimitive.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/util.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/warn-once/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Circle.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Shape.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/SvgTouchableMixin.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractBrush.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/utils/convertPercentageColor.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/colors.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/NativeSvgRenderableModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractProps.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractFill.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractOpacity.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractStroke.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractLengthList.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractTransform.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/Matrix2D.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/transform.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/transformToRn.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractResponder.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/ClipPath.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Defs.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Ellipse.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/ForeignObject.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/G.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractText.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Image.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractViewBox.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Line.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/LinearGradient.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractGradient.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/units.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Marker.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Mask.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/maskType.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Path.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Pattern.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Polygon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractPolyPoints.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Polyline.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/RadialGradient.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Rect.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Stop.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Svg.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/fabric/NativeSvgViewModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Symbol.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/TSpan.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Text.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/TextPath.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/Use.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeBlend.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/extractFilter.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeColorMatrix.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeComponentTransfer.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeComposite.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeConvolveMatrix.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeDiffuseLighting.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeDisplacementMap.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeDistantLight.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeDropShadow.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeFlood.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeGaussianBlur.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeImage.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeMerge.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeMergeNode.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeMorphology.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeOffset.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FePointLight.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeSpecularLighting.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeSpotLight.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeTile.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/FeTurbulence.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/elements/filters/Filter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/utils/fetchData.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/buffer/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/ieee754/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-svg/src/lib/extract/types.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/questionIconPath.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Arrow.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Check.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Chevron.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Circle.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Close.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Hamburger.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Info.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Minus.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Moon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Question.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Search.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Sun.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Warning.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/WarningOutline.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/ThreeDots.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Share.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Play.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Delete.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icons/Favourite.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/FormControl/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/FormControl/useFormControl.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.uniqueid/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/utils/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/utils/src/ariaToAccessibilityMap.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/FormControl/FormControl.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/FormControl/FormControlLabel.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/FormControl/FormControlErrorMessage.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/FormControl/FormControlHelperText.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Checkbox/CheckboxGroup.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/checkbox/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/checkbox/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/checkbox/src/useCheckbox.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/toggle/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/toggle/src/useToggle.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/checkbox/src/useCheckboxGroup.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/checkbox/src/useCheckboxGroupItem.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/toggle/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/toggle/dist/useToggleState.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/node_modules/@react-stately/toggle/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Center/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Center/Center.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Center/Circle.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Center/Square.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Column/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Hidden/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Hidden/HiddenSSR.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Icon/Icon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/factory/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/factory/component.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Input/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Input/InputGroup.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Input/InputAddons.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Input/Input.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/List/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/List/List.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/List/ListItem.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/List/ListIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/List/Ordered.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/List/Unordered.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Overlay/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Overlay/Overlay.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Overlay/ExitAnimationContext.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/overlays/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/overlays/src/useOverlayPosition.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/overlays/src/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/overlays/src/useOverlayTrigger.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/overlays/src/Portal.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/overlays/src/useOverlay.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/overlays/src/usePreventScroll.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Radio/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Radio/Radio.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Radio/RadioGroup.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/node_modules/@react-stately/radio/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/radio/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/radio/src/useRadio.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/radio/src/useRadioGroup.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Row/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Slider/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Slider/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Slider/Slider.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/node_modules/@react-stately/slider/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/slider/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/slider/src/useSlider.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/label/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/label/dist/useField.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/label/dist/useLabel.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/slider/src/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/slider/src/useSliderThumb.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/slider/src/useMove.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Slider/SliderThumb.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/visually-hidden/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/Pressable.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/usePress.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/context.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@swc/helpers/cjs/_class_private_field_init.cjs","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@swc/helpers/cjs/_check_private_redeclaration.cjs","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@swc/helpers/cjs/_class_private_field_set.cjs","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@swc/helpers/cjs/_class_extract_field_descriptor.cjs","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@swc/helpers/cjs/_class_apply_descriptor_set.cjs","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@swc/helpers/cjs/_class_private_field_get.cjs","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@swc/helpers/cjs/_class_apply_descriptor_get.cjs","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/textSelection.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/PressResponder.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useFocus.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/utils.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useFocusVisible.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useFocusWithin.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useHover.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useInteractOutside.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useKeyboard.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/createEventHandler.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useMove.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useScrollWheel.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-aria/interactions/dist/useLongPress.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Slider/SliderTrack.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Slider/SliderFilledTrack.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/VisuallyHidden/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Image/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Select/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Select/SelectItem.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Select/Select.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Actionsheet/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Actionsheet/Actionsheet.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Modal/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Modal/Modal.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Backdrop/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Modal/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Transitions/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Transitions/Fade.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Transitions/PresenceTransition.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Transitions/Transition.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Transitions/ScaleFade.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Transitions/Slide.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Transitions/SlideFade.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Transitions/Stagger.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Modal/ModalContent.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Modal/ModalBody.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/ScrollView/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/ScrollView/ScrollView.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Modal/ModalCloseButton.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Modal/ModalFooter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Modal/ModalHeader.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Actionsheet/ActionSheetContext.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Actionsheet/ActionsheetItem.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Actionsheet/ActionsheetContent.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/FlatList/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/FlatList/FlatList.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Heading/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Flex/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Switch/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/TextArea/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Link/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/Link/useLink.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/primitives/ZStack/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Accordion/AccordionIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Alert/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Alert/AlertIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Alert/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Alert/Alert.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AlertDialog/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AlertDialog/AlertDialog.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AlertDialog/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AlertDialog/AlertDialogContent.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AlertDialog/AlertDialogBody.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AlertDialog/AlertDialogCloseButton.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AlertDialog/AlertDialogFooter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AlertDialog/AlertDialogHeader.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Avatar/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Avatar/Avatar.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/lodash.has/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Avatar/Badge.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Avatar/Group.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Breadcrumb/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Breadcrumb/Breadcrumb.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Breadcrumb/BreadcrumbLink.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Breadcrumb/BreadcrumbItem.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Breadcrumb/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Breadcrumb/BreadcrumbText.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Breadcrumb/BreadcrumbIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Fab/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Fab/Fab.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Menu/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Menu/Menu.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Menu/useMenu.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popper/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popper/Popper.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Menu/MenuContext.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Menu/MenuGroup.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Menu/MenuItem.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Menu/MenuItemOption.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Menu/MenuOptionGroup.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/NumberInput/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/NumberInput/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/NumberInput/NumberDecrementStepper.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/NumberInput/NumberInputStepper.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/NumberInput/NumberIncrementStepper.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/NumberInput/NumberInput.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/NumberInput/NumberInputField.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/PinInput/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/PinInput/PinInputField.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/PinInput/Context.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/PinInput/PinInput.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/Popover.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/PopoverContext.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/PopoverBody.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/PopoverCloseButton.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/PopoverFooter.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/PopoverHeader.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/PopoverArrow.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Popover/PopoverContent.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/SimpleGrid/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/SimpleGrid/SimpleGrid.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Skeleton/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Skeleton/Skeleton.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Skeleton/SkeletonText.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/TextField/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/TextField/TextField.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Toast/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Toast/Toast.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Toast/types.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Tooltip/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Tooltip/Tooltip.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Typeahead/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Typeahead/Typeahead.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/node_modules/@react-stately/collections/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Typeahead/types.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/combobox/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/list/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/list/dist/useListState.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/selection/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/selection/dist/useMultipleSelectionState.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/selection/dist/Selection.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/selection/dist/SelectionManager.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/collections/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/collections/dist/Item.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/collections/dist/Section.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/collections/dist/useCollection.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/collections/dist/CollectionBuilder.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/collections/dist/getItemCount.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/collections/dist/getChildNodes.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/list/dist/ListCollection.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/list/dist/useSingleSelectListState.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/menu/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/menu/dist/useMenuTriggerState.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/overlays/dist/main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-stately/menu/dist/useSubmenuTriggerState.main.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/combobox/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/combobox/src/useComboBox.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/button/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/button/src/useButton.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/button/src/useToggleButton.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/listbox/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/listbox/src/useListBox.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-aria/listbox/src/useOption.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Typeahead/useTypeahead/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Typeahead/useTypeahead/useTypeahead.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Typeahead/useTypeahead/types.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Typeahead/useTypeahead/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Typeahead/useTypeahead/reducer.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/AspectRatio/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Badge/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Card/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Card/Card.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/IconButton/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Container/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Drawer/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Divider/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Progress/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Tag/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/KBD/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Code/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/Wrap/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/CircularProgress/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/composites/CircularProgress/CircularProgress.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/KeyboardAvoidingView/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/KeyboardAvoidingView/KeyboardAvoidingView.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/SectionList/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/SectionList/SectionList.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/StatusBar/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/StatusBar/StatusBar.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/View/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/components/basic/View/View.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/core/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/core/NativeBaseProvider.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/core/hybrid-overlay/HybridProvider.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/core/extendTheme.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/native-base/src/theme/v3-compatible-theme/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/theme/nativeBaseTheme.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/theme/navigationTheme.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/navigation/RootTab.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-vector-icons/Ionicons.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-vector-icons/lib/create-icon-set.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/prop-types/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/prop-types/factoryWithThrowingShims.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/prop-types/lib/ReactPropTypesSecret.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-vector-icons/lib/ensure-native-module-available.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-vector-icons/lib/NativeRNVectorIcons.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-vector-icons/lib/create-icon-source-cache.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-vector-icons/lib/icon-button.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-vector-icons/lib/object-utils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-vector-icons/glyphmaps/Ionicons.json","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/navigators/createBottomTabNavigator.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabView.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightCallbackContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/utils/BottomTabBarHeightContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/utils/useIsKeyboardShown.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabItem.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/color/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/color-convert/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/color-convert/conversions.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/color-name/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/color-convert/route.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/color-string/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/simple-swizzle/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/simple-swizzle/node_modules/is-arrayish/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/views/TabBarIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/views/Badge.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Background.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/getDefaultHeaderHeight.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/getHeaderTitle.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/Header.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/HeaderBackground.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/HeaderShownContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/getNamedContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/HeaderTitle.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/HeaderBackButton.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/MaskedView.android.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/MaskedViewNative.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/PlatformPressable.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/assets/back-icon.png","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native/Libraries/Image/AssetRegistry.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/assets/back-icon-mask.png","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/HeaderBackContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/HeaderHeightContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Header/useHeaderHeight.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/MissingIcon.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/ResourceSavingView.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/SafeAreaProviderCompat.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/Screen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/elements/src/types.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/views/ScreenFallback.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/native-stack/contexts/GHContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/components/ScreenStackHeaderConfig.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/ScreenStackHeaderConfigNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/core.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/utils.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/types.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/components/Screen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/TransitionProgressContext.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/components/helpers/DelayedFreeze.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-freeze/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/ScreenNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/ModalScreenNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/components/ScreenContainer.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/ScreenContainerNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/ScreenNavigationContainerNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/components/ScreenStack.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/ScreenStackNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/components/SearchBar.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/SearchBarNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/components/FullWindowOverlay.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/FullWindowOverlayNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/fabric/NativeScreensModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-screens/src/useTransitionProgress.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/bottom-tabs/src/utils/useBottomTabBarHeight.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/navigation/HomeStack.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native-stack/src/index.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native-stack/src/navigators/createNativeStackNavigator.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native-stack/src/utils/useDismissedRouteError.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native-stack/src/utils/useInvalidPreventRemoveError.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native-stack/src/views/DebugContainer.native.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native-stack/src/views/HeaderConfig.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-navigation/native-stack/src/views/FontProcessor.native.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/HomeScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/Screen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/ListTile.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/BugReportingScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/Section.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/CrashReportingScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/utils/showNotification.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/native/NativeCrashReporting.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/native/NativePackage.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/VerticalListTile.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/InputField.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/Select.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/PlatformListTile.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/FeatureRequestsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/RepliesScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/SurveysScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/SessionReplayScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/UserStepsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/BackAndForthScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/GoogleMapsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapView.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/ProviderConstants.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapViewNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/decorateMapComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapMarker.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapMarkerNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapOverlay.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapPolyline.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapHeatmap.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapPolygon.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapCircle.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapUrlTile.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapWMSTile.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapLocalTile.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapCallout.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapCalloutSubview.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/AnimatedRegion.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/Geojson.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapView.types.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/MapPolygon.types.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-maps/lib/sharedTypes.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/BasicComponentsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/slider/dist/Slider.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/slider/dist/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/slider/dist/RNCSliderNativeComponent.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/slider/dist/utils/constants.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/slider/dist/utils/styles.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/slider/dist/components/StepsIndicator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/slider/dist/components/TrackMark.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/slider/dist/components/StepNumber.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/images/logo.png","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/ComplexViewsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/NestedView.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/ScrollViewScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/utils/useDelayedRefresh.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/utils/createList.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/FlatListScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/SectionListScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/LargeImageListScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/user-steps/GesturesScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/apm/APMScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/CustomGap.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/apm/NetworkScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/axios.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/utils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/bind.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/Axios.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/buildURL.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/AxiosURLSearchParams.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/toFormData.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/AxiosError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/null.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/InterceptorManager.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/dispatchRequest.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/transformData.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/defaults/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/defaults/transitional.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/toURLEncodedForm.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/platform/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/platform/browser/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/platform/browser/classes/FormData.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/platform/browser/classes/Blob.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/platform/common/utils.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/formDataToJSON.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/AxiosHeaders.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/parseHeaders.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/cancel/isCancel.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/cancel/CanceledError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/adapters/adapters.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/adapters/xhr.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/settle.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/parseProtocol.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/resolveConfig.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/toArray.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/isURLSameOrigin.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/cookies.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/buildFullPath.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/isAbsoluteURL.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/combineURLs.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/core/mergeConfig.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/progressEventReducer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/speedometer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/throttle.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/adapters/fetch.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/composeSignals.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/trackStream.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/OverloadYield.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/validator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/env/data.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/cancel/CancelToken.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/spread.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/isAxiosError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/axios/lib/helpers/HttpStatusCode.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/netinfo/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/netinfo/src/internal/defaultConfiguration.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/netinfo/src/internal/nativeInterface.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/netinfo/src/internal/nativeModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/netinfo/src/internal/state.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/netinfo/src/internal/privateTypes.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-community/netinfo/src/internal/types.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql-request/build/cjs/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql-request/build/cjs/types.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/cross-fetch/dist/react-native-ponyfill.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql-request/build/cjs/helpers.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql-request/build/cjs/defaultJsonSerializer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql-request/build/cjs/parseArgs.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql-request/build/cjs/resolveRequestDocument.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/visitor.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/ast.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/kinds.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/devAssert.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/inspect.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/directiveLocation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/lexer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/tokenKind.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/characterClasses.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/error/syntaxError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/error/GraphQLError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/location.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/invariant.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/isObjectLike.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/printLocation.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/blockString.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/source.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/instanceOf.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/predicates.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/parser.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/printer.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/language/printString.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/findBreakingChanges.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/type/definition.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/identityFunc.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/type/assertName.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/valueFromASTUntyped.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/keyValMap.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/toObjMap.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/mapValue.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/keyMap.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/suggestionList.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/naturalCompare.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/didYouMean.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/type/scalars.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/astFromValue.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/isIterableObject.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/sortValueNode.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/TypeInfo.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/typeFromAST.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/type/introspection.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/assertValidName.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/buildASTSchema.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/validate.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/specifiedRules.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/execution/collectFields.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/execution/values.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/valueFromAST.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/coerceInputValue.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/printPathArray.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/Path.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/type/directives.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/KnownTypeNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/ScalarLeafsRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/typeComparators.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/groupBy.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/KnownDirectivesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/type/validate.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/type/schema.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/ValidationContext.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/extendSchema.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/buildClientSchema.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/concatAST.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/getIntrospectionQuery.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/getOperationAST.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/getOperationRootType.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/introspectionFromSchema.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/execution/execute.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/memoize3.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/isPromise.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/promiseReduce.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/promiseForObject.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/error/locatedError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/toError.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/lexicographicSortSchema.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/printSchema.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/separateOperations.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/utilities/stripIgnoredCharacters.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/type/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/error/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/execution/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/execution/subscribe.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/jsutils/isAsyncIterable.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/execution/mapAsyncIterator.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/graphql.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql/version.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/graphql-request/build/cjs/graphql-ws.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/ClipboardTextInput.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/PasteFromClipboardButton.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-clipboard/clipboard/dist/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-clipboard/clipboard/dist/useClipboard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-clipboard/clipboard/dist/Clipboard.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/@react-native-clipboard/clipboard/dist/NativeClipboardModule.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/CustomButton.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/components/CustomText.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/apm/TracesScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-background-timer/index.js","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/apm/FlowsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/LegacyModeScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/apm/HttpScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/apm/webViews/WebViewsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/apm/webViews/FullWebViewsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-webview/src/index.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-webview/src/WebView.android.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-webview/src/RNCWebViewNativeComponent.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-webview/src/NativeRNCWebViewModule.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-webview/src/WebView.styles.ts","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/node_modules/react-native-webview/src/WebViewShared.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/apm/webViews/PartialWebViewsScreen.tsx","/Users/salmayasser/Documents/Instabug-React-Native/examples/default/src/screens/SettingsScreen.tsx"],"sourcesContent":["var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now(),__DEV__=false,process=this.process||{},__METRO_GLOBAL_PREFIX__='';process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||\"production\";","\"use strict\";\n\nglobal.__r = metroRequire;\nglobal[`${__METRO_GLOBAL_PREFIX__}__d`] = define;\nglobal.__c = clear;\nglobal.__registerSegment = registerSegment;\nvar modules = clear();\nconst EMPTY = {};\nconst CYCLE_DETECTED = {};\nconst { hasOwnProperty } = {};\nif (__DEV__) {\n global.$RefreshReg$ = () => {};\n global.$RefreshSig$ = () => (type) => type;\n}\nfunction clear() {\n modules = new Map();\n return modules;\n}\nif (__DEV__) {\n var verboseNamesToModuleIds = new Map();\n var getModuleIdForVerboseName = (verboseName) => {\n const moduleId = verboseNamesToModuleIds.get(verboseName);\n if (moduleId == null) {\n throw new Error(`Unknown named module: \"${verboseName}\"`);\n }\n return moduleId;\n };\n var initializingModuleIds = [];\n}\nfunction define(factory, moduleId, dependencyMap) {\n if (modules.has(moduleId)) {\n if (__DEV__) {\n const inverseDependencies = arguments[4];\n if (inverseDependencies) {\n global.__accept(moduleId, factory, dependencyMap, inverseDependencies);\n }\n }\n return;\n }\n const mod = {\n dependencyMap,\n factory,\n hasError: false,\n importedAll: EMPTY,\n importedDefault: EMPTY,\n isInitialized: false,\n publicModule: {\n exports: {},\n },\n };\n modules.set(moduleId, mod);\n if (__DEV__) {\n mod.hot = createHotReloadingObject();\n const verboseName = arguments[3];\n if (verboseName) {\n mod.verboseName = verboseName;\n verboseNamesToModuleIds.set(verboseName, moduleId);\n }\n }\n}\nfunction metroRequire(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n console.warn(\n `Requiring module \"${verboseName}\" by name is only supported for ` +\n \"debugging purposes and will BREAK IN PRODUCTION!\"\n );\n }\n const moduleIdReallyIsNumber = moduleId;\n if (__DEV__) {\n const initializingIndex = initializingModuleIds.indexOf(\n moduleIdReallyIsNumber\n );\n if (initializingIndex !== -1) {\n const cycle = initializingModuleIds\n .slice(initializingIndex)\n .map((id) => modules.get(id)?.verboseName ?? \"[unknown]\");\n if (shouldPrintRequireCycle(cycle)) {\n cycle.push(cycle[0]);\n console.warn(\n `Require cycle: ${cycle.join(\" -> \")}\\n\\n` +\n \"Require cycles are allowed, but can result in uninitialized values. \" +\n \"Consider refactoring to remove the need for a cycle.\"\n );\n }\n }\n }\n const module = modules.get(moduleIdReallyIsNumber);\n return module && module.isInitialized\n ? module.publicModule.exports\n : guardedLoadModule(moduleIdReallyIsNumber, module);\n}\nfunction shouldPrintRequireCycle(modules) {\n const regExps =\n global[__METRO_GLOBAL_PREFIX__ + \"__requireCycleIgnorePatterns\"];\n if (!Array.isArray(regExps)) {\n return true;\n }\n const isIgnored = (module) =>\n module != null && regExps.some((regExp) => regExp.test(module));\n return modules.every((module) => !isIgnored(module));\n}\nfunction metroImportDefault(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n }\n const moduleIdReallyIsNumber = moduleId;\n const maybeInitializedModule = modules.get(moduleIdReallyIsNumber);\n if (\n maybeInitializedModule &&\n maybeInitializedModule.importedDefault !== EMPTY\n ) {\n return maybeInitializedModule.importedDefault;\n }\n const exports = metroRequire(moduleIdReallyIsNumber);\n const importedDefault =\n exports && exports.__esModule ? exports.default : exports;\n const initializedModule = modules.get(moduleIdReallyIsNumber);\n return (initializedModule.importedDefault = importedDefault);\n}\nmetroRequire.importDefault = metroImportDefault;\nfunction metroImportAll(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n }\n const moduleIdReallyIsNumber = moduleId;\n const maybeInitializedModule = modules.get(moduleIdReallyIsNumber);\n if (maybeInitializedModule && maybeInitializedModule.importedAll !== EMPTY) {\n return maybeInitializedModule.importedAll;\n }\n const exports = metroRequire(moduleIdReallyIsNumber);\n let importedAll;\n if (exports && exports.__esModule) {\n importedAll = exports;\n } else {\n importedAll = {};\n if (exports) {\n for (const key in exports) {\n if (hasOwnProperty.call(exports, key)) {\n importedAll[key] = exports[key];\n }\n }\n }\n importedAll.default = exports;\n }\n const initializedModule = modules.get(moduleIdReallyIsNumber);\n return (initializedModule.importedAll = importedAll);\n}\nmetroRequire.importAll = metroImportAll;\nmetroRequire.context = function fallbackRequireContext() {\n if (__DEV__) {\n throw new Error(\n \"The experimental Metro feature `require.context` is not enabled in your project.\\nThis can be enabled by setting the `transformer.unstable_allowRequireContext` property to `true` in your Metro configuration.\"\n );\n }\n throw new Error(\n \"The experimental Metro feature `require.context` is not enabled in your project.\"\n );\n};\nmetroRequire.resolveWeak = function fallbackRequireResolveWeak() {\n if (__DEV__) {\n throw new Error(\n \"require.resolveWeak cannot be called dynamically. Ensure you are using the same version of `metro` and `metro-runtime`.\"\n );\n }\n throw new Error(\"require.resolveWeak cannot be called dynamically.\");\n};\nlet inGuard = false;\nfunction guardedLoadModule(moduleId, module) {\n if (!inGuard && global.ErrorUtils) {\n inGuard = true;\n let returnValue;\n try {\n returnValue = loadModuleImplementation(moduleId, module);\n } catch (e) {\n global.ErrorUtils.reportFatalError(e);\n }\n inGuard = false;\n return returnValue;\n } else {\n return loadModuleImplementation(moduleId, module);\n }\n}\nconst ID_MASK_SHIFT = 16;\nconst LOCAL_ID_MASK = ~0 >>> ID_MASK_SHIFT;\nfunction unpackModuleId(moduleId) {\n const segmentId = moduleId >>> ID_MASK_SHIFT;\n const localId = moduleId & LOCAL_ID_MASK;\n return {\n segmentId,\n localId,\n };\n}\nmetroRequire.unpackModuleId = unpackModuleId;\nfunction packModuleId(value) {\n return (value.segmentId << ID_MASK_SHIFT) + value.localId;\n}\nmetroRequire.packModuleId = packModuleId;\nconst moduleDefinersBySegmentID = [];\nconst definingSegmentByModuleID = new Map();\nfunction registerSegment(segmentId, moduleDefiner, moduleIds) {\n moduleDefinersBySegmentID[segmentId] = moduleDefiner;\n if (__DEV__) {\n if (segmentId === 0 && moduleIds) {\n throw new Error(\n \"registerSegment: Expected moduleIds to be null for main segment\"\n );\n }\n if (segmentId !== 0 && !moduleIds) {\n throw new Error(\n \"registerSegment: Expected moduleIds to be passed for segment #\" +\n segmentId\n );\n }\n }\n if (moduleIds) {\n moduleIds.forEach((moduleId) => {\n if (!modules.has(moduleId) && !definingSegmentByModuleID.has(moduleId)) {\n definingSegmentByModuleID.set(moduleId, segmentId);\n }\n });\n }\n}\nfunction loadModuleImplementation(moduleId, module) {\n if (!module && moduleDefinersBySegmentID.length > 0) {\n const segmentId = definingSegmentByModuleID.get(moduleId) ?? 0;\n const definer = moduleDefinersBySegmentID[segmentId];\n if (definer != null) {\n definer(moduleId);\n module = modules.get(moduleId);\n definingSegmentByModuleID.delete(moduleId);\n }\n }\n const nativeRequire = global.nativeRequire;\n if (!module && nativeRequire) {\n const { segmentId, localId } = unpackModuleId(moduleId);\n nativeRequire(localId, segmentId);\n module = modules.get(moduleId);\n }\n if (!module) {\n throw unknownModuleError(moduleId);\n }\n if (module.hasError) {\n throw module.error;\n }\n if (__DEV__) {\n var Systrace = requireSystrace();\n var Refresh = requireRefresh();\n }\n module.isInitialized = true;\n const { factory, dependencyMap } = module;\n if (__DEV__) {\n initializingModuleIds.push(moduleId);\n }\n try {\n if (__DEV__) {\n Systrace.beginEvent(\"JS_require_\" + (module.verboseName || moduleId));\n }\n const moduleObject = module.publicModule;\n if (__DEV__) {\n moduleObject.hot = module.hot;\n var prevRefreshReg = global.$RefreshReg$;\n var prevRefreshSig = global.$RefreshSig$;\n if (Refresh != null) {\n const RefreshRuntime = Refresh;\n global.$RefreshReg$ = (type, id) => {\n RefreshRuntime.register(type, moduleId + \" \" + id);\n };\n global.$RefreshSig$ =\n RefreshRuntime.createSignatureFunctionForTransform;\n }\n }\n moduleObject.id = moduleId;\n factory(\n global,\n metroRequire,\n metroImportDefault,\n metroImportAll,\n moduleObject,\n moduleObject.exports,\n dependencyMap\n );\n if (!__DEV__) {\n module.factory = undefined;\n module.dependencyMap = undefined;\n }\n if (__DEV__) {\n Systrace.endEvent();\n if (Refresh != null) {\n registerExportsForReactRefresh(Refresh, moduleObject.exports, moduleId);\n }\n }\n return moduleObject.exports;\n } catch (e) {\n module.hasError = true;\n module.error = e;\n module.isInitialized = false;\n module.publicModule.exports = undefined;\n throw e;\n } finally {\n if (__DEV__) {\n if (initializingModuleIds.pop() !== moduleId) {\n throw new Error(\n \"initializingModuleIds is corrupt; something is terribly wrong\"\n );\n }\n global.$RefreshReg$ = prevRefreshReg;\n global.$RefreshSig$ = prevRefreshSig;\n }\n }\n}\nfunction unknownModuleError(id) {\n let message = 'Requiring unknown module \"' + id + '\".';\n if (__DEV__) {\n message +=\n \" If you are sure the module exists, try restarting Metro. \" +\n \"You may also want to run `yarn` or `npm install`.\";\n }\n return Error(message);\n}\nif (__DEV__) {\n metroRequire.Systrace = {\n beginEvent: () => {},\n endEvent: () => {},\n };\n metroRequire.getModules = () => {\n return modules;\n };\n var createHotReloadingObject = function () {\n const hot = {\n _acceptCallback: null,\n _disposeCallback: null,\n _didAccept: false,\n accept: (callback) => {\n hot._didAccept = true;\n hot._acceptCallback = callback;\n },\n dispose: (callback) => {\n hot._disposeCallback = callback;\n },\n };\n return hot;\n };\n let reactRefreshTimeout = null;\n const metroHotUpdateModule = function (\n id,\n factory,\n dependencyMap,\n inverseDependencies\n ) {\n const mod = modules.get(id);\n if (!mod) {\n if (factory) {\n return;\n }\n throw unknownModuleError(id);\n }\n if (!mod.hasError && !mod.isInitialized) {\n mod.factory = factory;\n mod.dependencyMap = dependencyMap;\n return;\n }\n const Refresh = requireRefresh();\n const refreshBoundaryIDs = new Set();\n let didBailOut = false;\n let updatedModuleIDs;\n try {\n updatedModuleIDs = topologicalSort(\n [id],\n (pendingID) => {\n const pendingModule = modules.get(pendingID);\n if (pendingModule == null) {\n return [];\n }\n const pendingHot = pendingModule.hot;\n if (pendingHot == null) {\n throw new Error(\n \"[Refresh] Expected module.hot to always exist in DEV.\"\n );\n }\n let canAccept = pendingHot._didAccept;\n if (!canAccept && Refresh != null) {\n const isBoundary = isReactRefreshBoundary(\n Refresh,\n pendingModule.publicModule.exports\n );\n if (isBoundary) {\n canAccept = true;\n refreshBoundaryIDs.add(pendingID);\n }\n }\n if (canAccept) {\n return [];\n }\n const parentIDs = inverseDependencies[pendingID];\n if (parentIDs.length === 0) {\n performFullRefresh(\"No root boundary\", {\n source: mod,\n failed: pendingModule,\n });\n didBailOut = true;\n return [];\n }\n return parentIDs;\n },\n () => didBailOut\n ).reverse();\n } catch (e) {\n if (e === CYCLE_DETECTED) {\n performFullRefresh(\"Dependency cycle\", {\n source: mod,\n });\n return;\n }\n throw e;\n }\n if (didBailOut) {\n return;\n }\n const seenModuleIDs = new Set();\n for (let i = 0; i < updatedModuleIDs.length; i++) {\n const updatedID = updatedModuleIDs[i];\n if (seenModuleIDs.has(updatedID)) {\n continue;\n }\n seenModuleIDs.add(updatedID);\n const updatedMod = modules.get(updatedID);\n if (updatedMod == null) {\n throw new Error(\"[Refresh] Expected to find the updated module.\");\n }\n const prevExports = updatedMod.publicModule.exports;\n const didError = runUpdatedModule(\n updatedID,\n updatedID === id ? factory : undefined,\n updatedID === id ? dependencyMap : undefined\n );\n const nextExports = updatedMod.publicModule.exports;\n if (didError) {\n return;\n }\n if (refreshBoundaryIDs.has(updatedID)) {\n const isNoLongerABoundary = !isReactRefreshBoundary(\n Refresh,\n nextExports\n );\n const didInvalidate = shouldInvalidateReactRefreshBoundary(\n Refresh,\n prevExports,\n nextExports\n );\n if (isNoLongerABoundary || didInvalidate) {\n const parentIDs = inverseDependencies[updatedID];\n if (parentIDs.length === 0) {\n performFullRefresh(\n isNoLongerABoundary\n ? \"No longer a boundary\"\n : \"Invalidated boundary\",\n {\n source: mod,\n failed: updatedMod,\n }\n );\n return;\n }\n for (let j = 0; j < parentIDs.length; j++) {\n const parentID = parentIDs[j];\n const parentMod = modules.get(parentID);\n if (parentMod == null) {\n throw new Error(\"[Refresh] Expected to find parent module.\");\n }\n const canAcceptParent = isReactRefreshBoundary(\n Refresh,\n parentMod.publicModule.exports\n );\n if (canAcceptParent) {\n refreshBoundaryIDs.add(parentID);\n updatedModuleIDs.push(parentID);\n } else {\n performFullRefresh(\"Invalidated boundary\", {\n source: mod,\n failed: parentMod,\n });\n return;\n }\n }\n }\n }\n }\n if (Refresh != null) {\n if (reactRefreshTimeout == null) {\n reactRefreshTimeout = setTimeout(() => {\n reactRefreshTimeout = null;\n Refresh.performReactRefresh();\n }, 30);\n }\n }\n };\n const topologicalSort = function (roots, getEdges, earlyStop) {\n const result = [];\n const visited = new Set();\n const stack = new Set();\n function traverseDependentNodes(node) {\n if (stack.has(node)) {\n throw CYCLE_DETECTED;\n }\n if (visited.has(node)) {\n return;\n }\n visited.add(node);\n stack.add(node);\n const dependentNodes = getEdges(node);\n if (earlyStop(node)) {\n stack.delete(node);\n return;\n }\n dependentNodes.forEach((dependent) => {\n traverseDependentNodes(dependent);\n });\n stack.delete(node);\n result.push(node);\n }\n roots.forEach((root) => {\n traverseDependentNodes(root);\n });\n return result;\n };\n const runUpdatedModule = function (id, factory, dependencyMap) {\n const mod = modules.get(id);\n if (mod == null) {\n throw new Error(\"[Refresh] Expected to find the module.\");\n }\n const { hot } = mod;\n if (!hot) {\n throw new Error(\"[Refresh] Expected module.hot to always exist in DEV.\");\n }\n if (hot._disposeCallback) {\n try {\n hot._disposeCallback();\n } catch (error) {\n console.error(\n `Error while calling dispose handler for module ${id}: `,\n error\n );\n }\n }\n if (factory) {\n mod.factory = factory;\n }\n if (dependencyMap) {\n mod.dependencyMap = dependencyMap;\n }\n mod.hasError = false;\n mod.error = undefined;\n mod.importedAll = EMPTY;\n mod.importedDefault = EMPTY;\n mod.isInitialized = false;\n const prevExports = mod.publicModule.exports;\n mod.publicModule.exports = {};\n hot._didAccept = false;\n hot._acceptCallback = null;\n hot._disposeCallback = null;\n metroRequire(id);\n if (mod.hasError) {\n mod.hasError = false;\n mod.isInitialized = true;\n mod.error = null;\n mod.publicModule.exports = prevExports;\n return true;\n }\n if (hot._acceptCallback) {\n try {\n hot._acceptCallback();\n } catch (error) {\n console.error(\n `Error while calling accept handler for module ${id}: `,\n error\n );\n }\n }\n return false;\n };\n const performFullRefresh = (reason, modules) => {\n if (\n typeof window !== \"undefined\" &&\n window.location != null &&\n typeof window.location.reload === \"function\"\n ) {\n window.location.reload();\n } else {\n const Refresh = requireRefresh();\n if (Refresh != null) {\n const sourceName = modules.source?.verboseName ?? \"unknown\";\n const failedName = modules.failed?.verboseName ?? \"unknown\";\n Refresh.performFullRefresh(\n `Fast Refresh - ${reason} <${sourceName}> <${failedName}>`\n );\n } else {\n console.warn(\"Could not reload the application after an edit.\");\n }\n }\n };\n var isReactRefreshBoundary = function (Refresh, moduleExports) {\n if (Refresh.isLikelyComponentType(moduleExports)) {\n return true;\n }\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return false;\n }\n let hasExports = false;\n let areAllExportsComponents = true;\n for (const key in moduleExports) {\n hasExports = true;\n if (key === \"__esModule\") {\n continue;\n }\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n return false;\n }\n const exportValue = moduleExports[key];\n if (!Refresh.isLikelyComponentType(exportValue)) {\n areAllExportsComponents = false;\n }\n }\n return hasExports && areAllExportsComponents;\n };\n var shouldInvalidateReactRefreshBoundary = (\n Refresh,\n prevExports,\n nextExports\n ) => {\n const prevSignature = getRefreshBoundarySignature(Refresh, prevExports);\n const nextSignature = getRefreshBoundarySignature(Refresh, nextExports);\n if (prevSignature.length !== nextSignature.length) {\n return true;\n }\n for (let i = 0; i < nextSignature.length; i++) {\n if (prevSignature[i] !== nextSignature[i]) {\n return true;\n }\n }\n return false;\n };\n var getRefreshBoundarySignature = (Refresh, moduleExports) => {\n const signature = [];\n signature.push(Refresh.getFamilyByType(moduleExports));\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return signature;\n }\n for (const key in moduleExports) {\n if (key === \"__esModule\") {\n continue;\n }\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n continue;\n }\n const exportValue = moduleExports[key];\n signature.push(key);\n signature.push(Refresh.getFamilyByType(exportValue));\n }\n return signature;\n };\n var registerExportsForReactRefresh = (Refresh, moduleExports, moduleID) => {\n Refresh.register(moduleExports, moduleID + \" %exports%\");\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return;\n }\n for (const key in moduleExports) {\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n continue;\n }\n const exportValue = moduleExports[key];\n const typeID = moduleID + \" %exports% \" + key;\n Refresh.register(exportValue, typeID);\n }\n };\n global.__accept = metroHotUpdateModule;\n}\nif (__DEV__) {\n var requireSystrace = function requireSystrace() {\n return (\n global[__METRO_GLOBAL_PREFIX__ + \"__SYSTRACE\"] || metroRequire.Systrace\n );\n };\n var requireRefresh = function requireRefresh() {\n return (\n global[__METRO_GLOBAL_PREFIX__ + \"__ReactRefresh\"] || metroRequire.Refresh\n );\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @polyfill\n * @nolint\n * @format\n */\n\n/* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void, no-control-regex */\n\n/**\n * This pipes all of our console logging functions to native logging so that\n * JavaScript errors in required modules show up in Xcode via NSLog.\n */\nconst inspect = (function () {\n // Copyright Joyent, Inc. and other Node contributors.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a\n // copy of this software and associated documentation files (the\n // \"Software\"), to deal in the Software without restriction, including\n // without limitation the rights to use, copy, modify, merge, publish,\n // distribute, sublicense, and/or sell copies of the Software, and to permit\n // persons to whom the Software is furnished to do so, subject to the\n // following conditions:\n //\n // The above copyright notice and this permission notice shall be included\n // in all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n // USE OR OTHER DEALINGS IN THE SOFTWARE.\n //\n // https://github.com/joyent/node/blob/master/lib/util.js\n\n function inspect(obj, opts) {\n var ctx = {\n seen: [],\n formatValueCalls: 0,\n stylize: stylizeNoColor,\n };\n return formatValue(ctx, obj, opts.depth);\n }\n\n function stylizeNoColor(str, styleType) {\n return str;\n }\n\n function arrayToHash(array) {\n var hash = {};\n\n array.forEach(function (val, idx) {\n hash[val] = true;\n });\n\n return hash;\n }\n\n function formatValue(ctx, value, recurseTimes) {\n ctx.formatValueCalls++;\n if (ctx.formatValueCalls > 200) {\n return `[TOO BIG formatValueCalls ${ctx.formatValueCalls} exceeded limit of 200]`;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (\n isError(value) &&\n (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)\n ) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '',\n array = false,\n braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function (key) {\n return formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n key,\n array,\n );\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n }\n\n function formatPrimitive(ctx, value) {\n if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple =\n \"'\" +\n JSON.stringify(value)\n .replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') +\n \"'\";\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value)) return ctx.stylize('' + value, 'number');\n if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value)) return ctx.stylize('null', 'null');\n }\n\n function formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n }\n\n function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(\n formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n String(i),\n true,\n ),\n );\n } else {\n output.push('');\n }\n }\n keys.forEach(function (key) {\n if (!key.match(/^\\d+$/)) {\n output.push(\n formatProperty(ctx, value, recurseTimes, visibleKeys, key, true),\n );\n }\n });\n return output;\n }\n\n function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || {value: value[key]};\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str\n .split('\\n')\n .map(function (line) {\n return ' ' + line;\n })\n .join('\\n')\n .slice(2);\n } else {\n str =\n '\\n' +\n str\n .split('\\n')\n .map(function (line) {\n return ' ' + line;\n })\n .join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, name.length - 1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n }\n\n function reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function (prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return (\n braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1]\n );\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n }\n\n // NOTE: These type checking functions intentionally don't use `instanceof`\n // because it is fragile and can be easily faked with `Object.create()`.\n function isArray(ar) {\n return Array.isArray(ar);\n }\n\n function isBoolean(arg) {\n return typeof arg === 'boolean';\n }\n\n function isNull(arg) {\n return arg === null;\n }\n\n function isNullOrUndefined(arg) {\n return arg == null;\n }\n\n function isNumber(arg) {\n return typeof arg === 'number';\n }\n\n function isString(arg) {\n return typeof arg === 'string';\n }\n\n function isSymbol(arg) {\n return typeof arg === 'symbol';\n }\n\n function isUndefined(arg) {\n return arg === void 0;\n }\n\n function isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n }\n\n function isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n }\n\n function isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n }\n\n function isError(e) {\n return (\n isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error)\n );\n }\n\n function isFunction(arg) {\n return typeof arg === 'function';\n }\n\n function objectToString(o) {\n return Object.prototype.toString.call(o);\n }\n\n function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n\n return inspect;\n})();\n\nconst OBJECT_COLUMN_NAME = '(index)';\nconst LOG_LEVELS = {\n trace: 0,\n info: 1,\n warn: 2,\n error: 3,\n};\nconst INSPECTOR_LEVELS = [];\nINSPECTOR_LEVELS[LOG_LEVELS.trace] = 'debug';\nINSPECTOR_LEVELS[LOG_LEVELS.info] = 'log';\nINSPECTOR_LEVELS[LOG_LEVELS.warn] = 'warning';\nINSPECTOR_LEVELS[LOG_LEVELS.error] = 'error';\n\n// Strip the inner function in getNativeLogFunction(), if in dev also\n// strip method printing to originalConsole.\nconst INSPECTOR_FRAMES_TO_SKIP = __DEV__ ? 2 : 1;\n\nfunction getNativeLogFunction(level) {\n return function () {\n let str;\n if (arguments.length === 1 && typeof arguments[0] === 'string') {\n str = arguments[0];\n } else {\n str = Array.prototype.map\n .call(arguments, function (arg) {\n return inspect(arg, {depth: 10});\n })\n .join(', ');\n }\n\n // TRICKY\n // If more than one argument is provided, the code above collapses them all\n // into a single formatted string. This transform wraps string arguments in\n // single quotes (e.g. \"foo\" -> \"'foo'\") which then breaks the \"Warning:\"\n // check below. So it's important that we look at the first argument, rather\n // than the formatted argument string.\n const firstArg = arguments[0];\n\n let logLevel = level;\n if (\n typeof firstArg === 'string' &&\n firstArg.slice(0, 9) === 'Warning: ' &&\n logLevel >= LOG_LEVELS.error\n ) {\n // React warnings use console.error so that a stack trace is shown,\n // but we don't (currently) want these to show a redbox\n // (Note: Logic duplicated in ExceptionsManager.js.)\n logLevel = LOG_LEVELS.warn;\n }\n if (global.__inspectorLog) {\n global.__inspectorLog(\n INSPECTOR_LEVELS[logLevel],\n str,\n [].slice.call(arguments),\n INSPECTOR_FRAMES_TO_SKIP,\n );\n }\n if (groupStack.length) {\n str = groupFormat('', str);\n }\n global.nativeLoggingHook(str, logLevel);\n };\n}\n\nfunction repeat(element, n) {\n return Array.apply(null, Array(n)).map(function () {\n return element;\n });\n}\n\nfunction consoleTablePolyfill(rows) {\n // convert object -> array\n if (!Array.isArray(rows)) {\n var data = rows;\n rows = [];\n for (var key in data) {\n if (data.hasOwnProperty(key)) {\n var row = data[key];\n row[OBJECT_COLUMN_NAME] = key;\n rows.push(row);\n }\n }\n }\n if (rows.length === 0) {\n global.nativeLoggingHook('', LOG_LEVELS.info);\n return;\n }\n\n var columns = Object.keys(rows[0]).sort();\n var stringRows = [];\n var columnWidths = [];\n\n // Convert each cell to a string. Also\n // figure out max cell width for each column\n columns.forEach(function (k, i) {\n columnWidths[i] = k.length;\n for (var j = 0; j < rows.length; j++) {\n var cellStr = (rows[j][k] || '?').toString();\n stringRows[j] = stringRows[j] || [];\n stringRows[j][i] = cellStr;\n columnWidths[i] = Math.max(columnWidths[i], cellStr.length);\n }\n });\n\n // Join all elements in the row into a single string with | separators\n // (appends extra spaces to each cell to make separators | aligned)\n function joinRow(row, space) {\n var cells = row.map(function (cell, i) {\n var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');\n return cell + extraSpaces;\n });\n space = space || ' ';\n return cells.join(space + '|' + space);\n }\n\n var separators = columnWidths.map(function (columnWidth) {\n return repeat('-', columnWidth).join('');\n });\n var separatorRow = joinRow(separators, '-');\n var header = joinRow(columns);\n var table = [header, separatorRow];\n\n for (var i = 0; i < rows.length; i++) {\n table.push(joinRow(stringRows[i]));\n }\n\n // Notice extra empty line at the beginning.\n // Native logging hook adds \"RCTLog >\" at the front of every\n // logged string, which would shift the header and screw up\n // the table\n global.nativeLoggingHook('\\n' + table.join('\\n'), LOG_LEVELS.info);\n}\n\nconst GROUP_PAD = '\\u2502'; // Box light vertical\nconst GROUP_OPEN = '\\u2510'; // Box light down+left\nconst GROUP_CLOSE = '\\u2518'; // Box light up+left\n\nconst groupStack = [];\n\nfunction groupFormat(prefix, msg) {\n // Insert group formatting before the console message\n return groupStack.join('') + prefix + ' ' + (msg || '');\n}\n\nfunction consoleGroupPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_OPEN, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupCollapsedPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupEndPolyfill() {\n groupStack.pop();\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE), LOG_LEVELS.info);\n}\n\nfunction consoleAssertPolyfill(expression, label) {\n if (!expression) {\n global.nativeLoggingHook('Assertion failed: ' + label, LOG_LEVELS.error);\n }\n}\n\nif (global.nativeLoggingHook) {\n const originalConsole = global.console;\n // Preserve the original `console` as `originalConsole`\n if (__DEV__ && originalConsole) {\n const descriptor = Object.getOwnPropertyDescriptor(global, 'console');\n if (descriptor) {\n Object.defineProperty(global, 'originalConsole', descriptor);\n }\n }\n\n global.console = {\n ...(originalConsole ?? {}),\n error: getNativeLogFunction(LOG_LEVELS.error),\n info: getNativeLogFunction(LOG_LEVELS.info),\n log: getNativeLogFunction(LOG_LEVELS.info),\n warn: getNativeLogFunction(LOG_LEVELS.warn),\n trace: getNativeLogFunction(LOG_LEVELS.trace),\n debug: getNativeLogFunction(LOG_LEVELS.trace),\n table: consoleTablePolyfill,\n group: consoleGroupPolyfill,\n groupEnd: consoleGroupEndPolyfill,\n groupCollapsed: consoleGroupCollapsedPolyfill,\n assert: consoleAssertPolyfill,\n };\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n\n // If available, also call the original `console` method since that is\n // sometimes useful. Ex: on OS X, this will let you see rich output in\n // the Safari Web Inspector console.\n if (__DEV__ && originalConsole) {\n Object.keys(console).forEach(methodName => {\n const reactNativeMethod = console[methodName];\n if (\n originalConsole[methodName] &&\n reactNativeMethod !== originalConsole[methodName]\n ) {\n console[methodName] = function () {\n originalConsole[methodName](...arguments);\n reactNativeMethod.apply(console, arguments);\n };\n }\n });\n\n // The following methods are not supported by this polyfill but\n // we still should pass them to original console if they are\n // supported by it.\n ['clear', 'dir', 'dirxml', 'profile', 'profileEnd'].forEach(methodName => {\n if (typeof originalConsole[methodName] === 'function') {\n console[methodName] = function () {\n originalConsole[methodName](...arguments);\n };\n }\n });\n }\n} else if (!global.console) {\n function stub() {}\n const log = global.print || stub;\n\n global.console = {\n debug: log,\n error: log,\n info: log,\n log: log,\n trace: log,\n warn: log,\n assert(expression, label) {\n if (!expression) {\n log('Assertion failed: ' + label);\n }\n },\n clear: stub,\n dir: stub,\n dirxml: stub,\n group: stub,\n groupCollapsed: stub,\n groupEnd: stub,\n profile: stub,\n profileEnd: stub,\n table: stub,\n };\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n * @polyfill\n */\n\nlet _inGuard = 0;\n\ntype ErrorHandler = (error: mixed, isFatal: boolean) => void;\ntype Fn = (...Args) => Return;\n\n/**\n * This is the error handler that is called when we encounter an exception\n * when loading a module. This will report any errors encountered before\n * ExceptionsManager is configured.\n */\nlet _globalHandler: ErrorHandler = function onError(\n e: mixed,\n isFatal: boolean,\n) {\n throw e;\n};\n\n/**\n * The particular require runtime that we are using looks for a global\n * `ErrorUtils` object and if it exists, then it requires modules with the\n * error handler specified via ErrorUtils.setGlobalHandler by calling the\n * require function with applyWithGuard. Since the require module is loaded\n * before any of the modules, this ErrorUtils must be defined (and the handler\n * set) globally before requiring anything.\n */\nconst ErrorUtils = {\n setGlobalHandler(fun: ErrorHandler): void {\n _globalHandler = fun;\n },\n getGlobalHandler(): ErrorHandler {\n return _globalHandler;\n },\n reportError(error: mixed): void {\n _globalHandler && _globalHandler(error, false);\n },\n reportFatalError(error: mixed): void {\n // NOTE: This has an untyped call site in Metro.\n _globalHandler && _globalHandler(error, true);\n },\n applyWithGuard, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n // Unused, but some code synced from www sets it to null.\n unused_onError?: null,\n // Some callers pass a name here, which we ignore.\n unused_name?: ?string,\n ): ?TOut {\n try {\n _inGuard++;\n /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n return fun.apply(context, args);\n } catch (e) {\n ErrorUtils.reportError(e);\n } finally {\n _inGuard--;\n }\n return null;\n },\n applyWithGuardIfNeeded, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n ): ?TOut {\n if (ErrorUtils.inGuard()) {\n /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n return fun.apply(context, args);\n } else {\n ErrorUtils.applyWithGuard(fun, context, args);\n }\n return null;\n },\n inGuard(): boolean {\n return !!_inGuard;\n },\n guard, TOut>(\n fun: Fn,\n name?: ?string,\n context?: ?mixed,\n ): ?(...TArgs) => ?TOut {\n // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types\n // should be sufficient.\n if (typeof fun !== 'function') {\n console.warn('A function must be passed to ErrorUtils.guard, got ', fun);\n return null;\n }\n const guardName = name ?? fun.name ?? '';\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n function guarded(...args: TArgs): ?TOut {\n return ErrorUtils.applyWithGuard(\n fun,\n context ?? this,\n args,\n null,\n guardName,\n );\n }\n\n return guarded;\n },\n};\n\nglobal.ErrorUtils = ErrorUtils;\n\nexport type ErrorUtilsT = typeof ErrorUtils;\n","import 'react-native-gesture-handler';\nimport { AppRegistry } from 'react-native';\n\nimport { name as appName } from './app.json';\nimport { App } from './src/App';\n\nAppRegistry.registerComponent(appName, () => App);\n","import { initialize } from './init';\n\nexport { Directions } from './Directions';\nexport { State } from './State';\nexport { PointerType } from './PointerType';\nexport { default as gestureHandlerRootHOC } from './components/gestureHandlerRootHOC';\nexport { default as GestureHandlerRootView } from './components/GestureHandlerRootView';\nexport type {\n // Event types\n GestureEvent,\n HandlerStateChangeEvent,\n // Event payloads types\n GestureEventPayload,\n HandlerStateChangeEventPayload,\n // Pointer events\n GestureTouchEvent,\n TouchData,\n // New api event types\n GestureUpdateEvent,\n GestureStateChangeEvent,\n} from './handlers/gestureHandlerCommon';\nexport { MouseButton } from './handlers/gestureHandlerCommon';\nexport type { GestureType } from './handlers/gestures/gesture';\nexport type {\n TapGestureHandlerEventPayload,\n ForceTouchGestureHandlerEventPayload,\n LongPressGestureHandlerEventPayload,\n PanGestureHandlerEventPayload,\n PinchGestureHandlerEventPayload,\n RotationGestureHandlerEventPayload,\n NativeViewGestureHandlerPayload,\n FlingGestureHandlerEventPayload,\n} from './handlers/GestureHandlerEventPayload';\nexport type { TapGestureHandlerProps } from './handlers/TapGestureHandler';\nexport type { ForceTouchGestureHandlerProps } from './handlers/ForceTouchGestureHandler';\nexport type { ForceTouchGestureChangeEventPayload } from './handlers/gestures/forceTouchGesture';\nexport type { LongPressGestureHandlerProps } from './handlers/LongPressGestureHandler';\nexport type { PanGestureHandlerProps } from './handlers/PanGestureHandler';\nexport type { PanGestureChangeEventPayload } from './handlers/gestures/panGesture';\nexport type { PinchGestureHandlerProps } from './handlers/PinchGestureHandler';\nexport type { PinchGestureChangeEventPayload } from './handlers/gestures/pinchGesture';\nexport type { RotationGestureHandlerProps } from './handlers/RotationGestureHandler';\nexport type { FlingGestureHandlerProps } from './handlers/FlingGestureHandler';\nexport { TapGestureHandler } from './handlers/TapGestureHandler';\nexport { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';\nexport { LongPressGestureHandler } from './handlers/LongPressGestureHandler';\nexport { PanGestureHandler } from './handlers/PanGestureHandler';\nexport { PinchGestureHandler } from './handlers/PinchGestureHandler';\nexport { RotationGestureHandler } from './handlers/RotationGestureHandler';\nexport { FlingGestureHandler } from './handlers/FlingGestureHandler';\nexport { default as createNativeWrapper } from './handlers/createNativeWrapper';\nexport type { NativeViewGestureHandlerProps } from './handlers/NativeViewGestureHandler';\nexport { GestureDetector } from './handlers/gestures/GestureDetector';\nexport { GestureObjects as Gesture } from './handlers/gestures/gestureObjects';\nexport type { TapGestureType as TapGesture } from './handlers/gestures/tapGesture';\nexport type { PanGestureType as PanGesture } from './handlers/gestures/panGesture';\nexport type { FlingGestureType as FlingGesture } from './handlers/gestures/flingGesture';\nexport type { LongPressGestureType as LongPressGesture } from './handlers/gestures/longPressGesture';\nexport type { PinchGestureType as PinchGesture } from './handlers/gestures/pinchGesture';\nexport type { RotationGestureType as RotationGesture } from './handlers/gestures/rotationGesture';\nexport type { ForceTouchGestureType as ForceTouchGesture } from './handlers/gestures/forceTouchGesture';\nexport type { NativeGestureType as NativeGesture } from './handlers/gestures/nativeGesture';\nexport type { ManualGestureType as ManualGesture } from './handlers/gestures/manualGesture';\nexport type { HoverGestureType as HoverGesture } from './handlers/gestures/hoverGesture';\nexport type {\n ComposedGestureType as ComposedGesture,\n RaceGestureType as RaceGesture,\n SimultaneousGestureType as SimultaneousGesture,\n ExclusiveGestureType as ExclusiveGesture,\n} from './handlers/gestures/gestureComposition';\nexport type { GestureStateManagerType as GestureStateManager } from './handlers/gestures/gestureStateManager';\nexport { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';\nexport type {\n RawButtonProps,\n BaseButtonProps,\n RectButtonProps,\n BorderlessButtonProps,\n} from './components/GestureButtonsProps';\nexport {\n RawButton,\n BaseButton,\n RectButton,\n BorderlessButton,\n PureNativeButton,\n} from './components/GestureButtons';\nexport type {\n TouchableHighlightProps,\n TouchableOpacityProps,\n TouchableWithoutFeedbackProps,\n} from './components/touchables';\nexport {\n TouchableHighlight,\n TouchableNativeFeedback,\n TouchableOpacity,\n TouchableWithoutFeedback,\n} from './components/touchables';\nexport {\n ScrollView,\n Switch,\n TextInput,\n DrawerLayoutAndroid,\n FlatList,\n RefreshControl,\n} from './components/GestureComponents';\nexport { HoverEffect } from './handlers/gestures/hoverGesture';\nexport type {\n // Events\n GestureHandlerGestureEvent,\n GestureHandlerStateChangeEvent,\n // Event payloads\n GestureHandlerGestureEventNativeEvent,\n GestureHandlerStateChangeNativeEvent,\n NativeViewGestureHandlerGestureEvent,\n NativeViewGestureHandlerStateChangeEvent,\n TapGestureHandlerGestureEvent,\n TapGestureHandlerStateChangeEvent,\n ForceTouchGestureHandlerGestureEvent,\n ForceTouchGestureHandlerStateChangeEvent,\n LongPressGestureHandlerGestureEvent,\n LongPressGestureHandlerStateChangeEvent,\n PanGestureHandlerGestureEvent,\n PanGestureHandlerStateChangeEvent,\n PinchGestureHandlerGestureEvent,\n PinchGestureHandlerStateChangeEvent,\n RotationGestureHandlerGestureEvent,\n RotationGestureHandlerStateChangeEvent,\n FlingGestureHandlerGestureEvent,\n FlingGestureHandlerStateChangeEvent,\n // Handlers props\n NativeViewGestureHandlerProperties,\n TapGestureHandlerProperties,\n LongPressGestureHandlerProperties,\n PanGestureHandlerProperties,\n PinchGestureHandlerProperties,\n RotationGestureHandlerProperties,\n FlingGestureHandlerProperties,\n ForceTouchGestureHandlerProperties,\n // Buttons props\n RawButtonProperties,\n BaseButtonProperties,\n RectButtonProperties,\n BorderlessButtonProperties,\n} from './handlers/gestureHandlerTypesCompat';\n\nexport type { SwipeableProps } from './components/Swipeable';\nexport { default as Swipeable } from './components/Swipeable';\nexport type { PressableProps } from './components/Pressable';\nexport { default as Pressable } from './components/Pressable';\n\nexport type {\n DrawerLayoutProps,\n DrawerPosition,\n DrawerState,\n DrawerType,\n DrawerLockMode,\n DrawerKeyboardDismissMode,\n} from './components/DrawerLayout';\nexport { default as DrawerLayout } from './components/DrawerLayout';\n\nexport {\n enableExperimentalWebImplementation,\n enableLegacyWebImplementation,\n} from './EnableNewWebImplementation';\n\ninitialize();\n","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import * as React from 'react';\nimport { Animated, Platform, processColor, StyleSheet } from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\nimport GestureHandlerButton from './GestureHandlerButton';\nimport { State } from '../State';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport type { NativeViewGestureHandlerPayload } from '../handlers/GestureHandlerEventPayload';\nimport type {\n BaseButtonWithRefProps,\n BaseButtonProps,\n RectButtonWithRefProps,\n RectButtonProps,\n BorderlessButtonWithRefProps,\n BorderlessButtonProps,\n} from './GestureButtonsProps';\n\nexport const RawButton = createNativeWrapper(GestureHandlerButton, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: false,\n});\n\nclass InnerBaseButton extends React.Component {\n static defaultProps = {\n delayLongPress: 600,\n };\n\n private lastActive: boolean;\n private longPressTimeout: ReturnType | undefined;\n private longPressDetected: boolean;\n\n constructor(props: BaseButtonProps) {\n super(props);\n this.lastActive = false;\n this.longPressDetected = false;\n }\n\n private handleEvent = ({\n nativeEvent,\n }: HandlerStateChangeEvent) => {\n const { state, oldState, pointerInside } = nativeEvent;\n const active = pointerInside && state === State.ACTIVE;\n\n if (active !== this.lastActive && this.props.onActiveStateChange) {\n this.props.onActiveStateChange(active);\n }\n\n if (\n !this.longPressDetected &&\n oldState === State.ACTIVE &&\n state !== State.CANCELLED &&\n this.lastActive &&\n this.props.onPress\n ) {\n this.props.onPress(pointerInside);\n }\n\n if (\n !this.lastActive &&\n // NativeViewGestureHandler sends different events based on platform\n state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) &&\n pointerInside\n ) {\n this.longPressDetected = false;\n if (this.props.onLongPress) {\n this.longPressTimeout = setTimeout(\n this.onLongPress,\n this.props.delayLongPress\n );\n }\n } else if (\n // Cancel longpress timeout if it's set and the finger moved out of the view\n state === State.ACTIVE &&\n !pointerInside &&\n this.longPressTimeout !== undefined\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n } else if (\n // Cancel longpress timeout if it's set and the gesture has finished\n this.longPressTimeout !== undefined &&\n (state === State.END ||\n state === State.CANCELLED ||\n state === State.FAILED)\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n }\n\n this.lastActive = active;\n };\n\n private onLongPress = () => {\n this.longPressDetected = true;\n this.props.onLongPress?.();\n };\n\n // Normally, the parent would execute it's handler first, then forward the\n // event to listeners. However, here our handler is virtually only forwarding\n // events to listeners, so we reverse the order to keep the proper order of\n // the callbacks (from \"raw\" ones to \"processed\").\n private onHandlerStateChange = (\n e: HandlerStateChangeEvent\n ) => {\n this.props.onHandlerStateChange?.(e);\n this.handleEvent(e);\n };\n\n private onGestureEvent = (\n e: GestureEvent\n ) => {\n this.props.onGestureEvent?.(e);\n this.handleEvent(\n e as HandlerStateChangeEvent\n ); // TODO: maybe it is not correct\n };\n\n render() {\n const { rippleColor, style, ...rest } = this.props;\n\n return (\n \n );\n }\n}\n\nexport const BaseButton = React.forwardRef<\n any,\n Omit\n>((props, ref) => );\n\nconst AnimatedBaseButton = Animated.createAnimatedComponent(BaseButton);\n\nconst btnStyles = StyleSheet.create({\n underlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n top: 0,\n },\n});\n\nclass InnerRectButton extends React.Component {\n static defaultProps = {\n activeOpacity: 0.105,\n underlayColor: 'black',\n };\n\n private opacity: Animated.Value;\n\n constructor(props: RectButtonProps) {\n super(props);\n this.opacity = new Animated.Value(0);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 0);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, ...rest } = this.props;\n\n const resolvedStyle = StyleSheet.flatten(style ?? {});\n\n return (\n \n \n {children}\n \n );\n }\n}\n\nexport const RectButton = React.forwardRef<\n any,\n Omit\n>((props, ref) => );\n\nclass InnerBorderlessButton extends React.Component {\n static defaultProps = {\n activeOpacity: 0.3,\n borderless: true,\n };\n\n private opacity: Animated.Value;\n\n constructor(props: BorderlessButtonProps) {\n super(props);\n this.opacity = new Animated.Value(1);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 1);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, innerRef, ...rest } = this.props;\n\n return (\n \n {children}\n \n );\n }\n}\n\nexport const BorderlessButton = React.forwardRef<\n any,\n Omit\n>((props, ref) => );\n\nexport { default as PureNativeButton } from './GestureHandlerButton';\n","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(e);\n for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return assertThisInitialized(t);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(t) {\n return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _getPrototypeOf(t);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && setPrototypeOf(t, e);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(t, e) {\n return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _setPrototypeOf(t, e);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1 = _HostComponentInternal;\n\nmodule.exports = {\n get registerCallableModule(): RegisterCallableModule {\n return require('./Libraries/Core/registerCallableModule').default;\n },\n // Components\n get AccessibilityInfo(): AccessibilityInfo {\n return require('./Libraries/Components/AccessibilityInfo/AccessibilityInfo')\n .default;\n },\n get ActivityIndicator(): ActivityIndicator {\n return require('./Libraries/Components/ActivityIndicator/ActivityIndicator')\n .default;\n },\n get Button(): Button {\n return require('./Libraries/Components/Button').default;\n },\n // $FlowFixMe[value-as-type]\n get DrawerLayoutAndroid(): DrawerLayoutAndroid {\n return require('./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid');\n },\n get FlatList(): FlatList {\n return require('./Libraries/Lists/FlatList');\n },\n get Image(): Image {\n return require('./Libraries/Image/Image');\n },\n get ImageBackground(): ImageBackground {\n return require('./Libraries/Image/ImageBackground');\n },\n get InputAccessoryView(): InputAccessoryView {\n return require('./Libraries/Components/TextInput/InputAccessoryView')\n .default;\n },\n get KeyboardAvoidingView(): KeyboardAvoidingView {\n return require('./Libraries/Components/Keyboard/KeyboardAvoidingView')\n .default;\n },\n get Modal(): Modal {\n return require('./Libraries/Modal/Modal');\n },\n get Pressable(): Pressable {\n return require('./Libraries/Components/Pressable/Pressable').default;\n },\n // $FlowFixMe[value-as-type]\n get ProgressBarAndroid(): ProgressBarAndroid {\n warnOnce(\n 'progress-bar-android-moved',\n 'ProgressBarAndroid has been extracted from react-native core and will be removed in a future release. ' +\n \"It can now be installed and imported from '@react-native-community/progress-bar-android' instead of 'react-native'. \" +\n 'See https://github.com/react-native-progress-view/progress-bar-android',\n );\n return require('./Libraries/Components/ProgressBarAndroid/ProgressBarAndroid');\n },\n get RefreshControl(): RefreshControl {\n return require('./Libraries/Components/RefreshControl/RefreshControl');\n },\n get SafeAreaView(): SafeAreaView {\n return require('./Libraries/Components/SafeAreaView/SafeAreaView').default;\n },\n get ScrollView(): ScrollView {\n return require('./Libraries/Components/ScrollView/ScrollView');\n },\n get SectionList(): SectionList {\n return require('./Libraries/Lists/SectionList').default;\n },\n get StatusBar(): StatusBar {\n return require('./Libraries/Components/StatusBar/StatusBar');\n },\n get Switch(): Switch {\n return require('./Libraries/Components/Switch/Switch').default;\n },\n get Text(): Text {\n return require('./Libraries/Text/Text');\n },\n get TextInput(): TextInput {\n return require('./Libraries/Components/TextInput/TextInput');\n },\n get Touchable(): Touchable {\n return require('./Libraries/Components/Touchable/Touchable').default;\n },\n get TouchableHighlight(): TouchableHighlight {\n return require('./Libraries/Components/Touchable/TouchableHighlight');\n },\n get TouchableNativeFeedback(): TouchableNativeFeedback {\n return require('./Libraries/Components/Touchable/TouchableNativeFeedback');\n },\n get TouchableOpacity(): TouchableOpacity {\n return require('./Libraries/Components/Touchable/TouchableOpacity');\n },\n get TouchableWithoutFeedback(): TouchableWithoutFeedback {\n return require('./Libraries/Components/Touchable/TouchableWithoutFeedback');\n },\n get View(): View {\n return require('./Libraries/Components/View/View');\n },\n get VirtualizedList(): VirtualizedList {\n return require('./Libraries/Lists/VirtualizedList');\n },\n get VirtualizedSectionList(): VirtualizedSectionList {\n return require('./Libraries/Lists/VirtualizedSectionList');\n },\n\n // APIs\n get ActionSheetIOS(): ActionSheetIOS {\n return require('./Libraries/ActionSheetIOS/ActionSheetIOS');\n },\n get Alert(): Alert {\n return require('./Libraries/Alert/Alert');\n },\n // Include any types exported in the Animated module together with its default export, so\n // you can references types such as Animated.Numeric\n get Animated(): {...$Diff, ...Animated} {\n // $FlowExpectedError[prop-missing]: we only return the default export, all other exports are types\n return require('./Libraries/Animated/Animated').default;\n },\n get Appearance(): Appearance {\n return require('./Libraries/Utilities/Appearance');\n },\n get AppRegistry(): AppRegistry {\n return require('./Libraries/ReactNative/AppRegistry');\n },\n get AppState(): AppState {\n return require('./Libraries/AppState/AppState');\n },\n get BackHandler(): BackHandler {\n return require('./Libraries/Utilities/BackHandler');\n },\n get Clipboard(): Clipboard {\n warnOnce(\n 'clipboard-moved',\n 'Clipboard has been extracted from react-native core and will be removed in a future release. ' +\n \"It can now be installed and imported from '@react-native-clipboard/clipboard' instead of 'react-native'. \" +\n 'See https://github.com/react-native-clipboard/clipboard',\n );\n return require('./Libraries/Components/Clipboard/Clipboard');\n },\n get DeviceInfo(): DeviceInfo {\n return require('./Libraries/Utilities/DeviceInfo');\n },\n get DevSettings(): DevSettings {\n return require('./Libraries/Utilities/DevSettings');\n },\n get Dimensions(): Dimensions {\n return require('./Libraries/Utilities/Dimensions').default;\n },\n get Easing(): Easing {\n return require('./Libraries/Animated/Easing').default;\n },\n get findNodeHandle(): $PropertyType {\n return require('./Libraries/ReactNative/RendererProxy').findNodeHandle;\n },\n get I18nManager(): I18nManager {\n return require('./Libraries/ReactNative/I18nManager');\n },\n get InteractionManager(): InteractionManager {\n return require('./Libraries/Interaction/InteractionManager');\n },\n get Keyboard(): Keyboard {\n return require('./Libraries/Components/Keyboard/Keyboard');\n },\n get LayoutAnimation(): LayoutAnimation {\n return require('./Libraries/LayoutAnimation/LayoutAnimation');\n },\n get Linking(): Linking {\n return require('./Libraries/Linking/Linking');\n },\n get LogBox(): LogBox {\n return require('./Libraries/LogBox/LogBox').default;\n },\n get NativeDialogManagerAndroid(): NativeDialogManagerAndroid {\n return require('./Libraries/NativeModules/specs/NativeDialogManagerAndroid')\n .default;\n },\n get NativeEventEmitter(): NativeEventEmitter {\n return require('./Libraries/EventEmitter/NativeEventEmitter').default;\n },\n get Networking(): Networking {\n return require('./Libraries/Network/RCTNetworking').default;\n },\n get PanResponder(): PanResponder {\n return require('./Libraries/Interaction/PanResponder').default;\n },\n get PermissionsAndroid(): PermissionsAndroid {\n return require('./Libraries/PermissionsAndroid/PermissionsAndroid');\n },\n get PixelRatio(): PixelRatio {\n return require('./Libraries/Utilities/PixelRatio').default;\n },\n get PushNotificationIOS(): PushNotificationIOS {\n warnOnce(\n 'pushNotificationIOS-moved',\n 'PushNotificationIOS has been extracted from react-native core and will be removed in a future release. ' +\n \"It can now be installed and imported from '@react-native-community/push-notification-ios' instead of 'react-native'. \" +\n 'See https://github.com/react-native-push-notification/ios',\n );\n return require('./Libraries/PushNotificationIOS/PushNotificationIOS');\n },\n get Settings(): Settings {\n return require('./Libraries/Settings/Settings');\n },\n get Share(): Share {\n return require('./Libraries/Share/Share');\n },\n get StyleSheet(): StyleSheet {\n return require('./Libraries/StyleSheet/StyleSheet');\n },\n get Systrace(): Systrace {\n return require('./Libraries/Performance/Systrace');\n },\n // $FlowFixMe[value-as-type]\n get ToastAndroid(): ToastAndroid {\n return require('./Libraries/Components/ToastAndroid/ToastAndroid');\n },\n get TurboModuleRegistry(): TurboModuleRegistry {\n return require('./Libraries/TurboModule/TurboModuleRegistry');\n },\n get UIManager(): UIManager {\n return require('./Libraries/ReactNative/UIManager');\n },\n get unstable_batchedUpdates(): $PropertyType<\n ReactNative,\n 'unstable_batchedUpdates',\n > {\n return require('./Libraries/ReactNative/RendererProxy')\n .unstable_batchedUpdates;\n },\n get useAnimatedValue(): useAnimatedValue {\n return require('./Libraries/Animated/useAnimatedValue').default;\n },\n get useColorScheme(): useColorScheme {\n return require('./Libraries/Utilities/useColorScheme').default;\n },\n get useWindowDimensions(): useWindowDimensions {\n return require('./Libraries/Utilities/useWindowDimensions').default;\n },\n get UTFSequence(): UTFSequence {\n return require('./Libraries/UTFSequence').default;\n },\n get Vibration(): Vibration {\n return require('./Libraries/Vibration/Vibration');\n },\n get YellowBox(): YellowBox {\n return require('./Libraries/YellowBox/YellowBoxDeprecated');\n },\n\n // Plugins\n get DeviceEventEmitter(): RCTDeviceEventEmitter {\n return require('./Libraries/EventEmitter/RCTDeviceEventEmitter').default;\n },\n get DynamicColorIOS(): DynamicColorIOS {\n return require('./Libraries/StyleSheet/PlatformColorValueTypesIOS')\n .DynamicColorIOS;\n },\n get NativeAppEventEmitter(): RCTNativeAppEventEmitter {\n return require('./Libraries/EventEmitter/RCTNativeAppEventEmitter');\n },\n get NativeModules(): NativeModules {\n return require('./Libraries/BatchedBridge/NativeModules');\n },\n get Platform(): Platform {\n return require('./Libraries/Utilities/Platform');\n },\n get PlatformColor(): PlatformColor {\n return require('./Libraries/StyleSheet/PlatformColorValueTypes')\n .PlatformColor;\n },\n get processColor(): processColor {\n return require('./Libraries/StyleSheet/processColor').default;\n },\n get requireNativeComponent(): (\n uiViewClassName: string,\n ) => HostComponent {\n return require('./Libraries/ReactNative/requireNativeComponent').default;\n },\n get RootTagContext(): RootTagContext {\n return require('./Libraries/ReactNative/RootTag').RootTagContext;\n },\n get unstable_enableLogBox(): () => void {\n return () =>\n console.warn(\n 'LogBox is enabled by default so there is no need to call unstable_enableLogBox() anymore. This is a no op and will be removed in the next version.',\n );\n },\n};\n\nif (__DEV__) {\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access ART. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access ART. */\n Object.defineProperty(module.exports, 'ART', {\n configurable: true,\n get() {\n invariant(\n false,\n 'ART has been removed from React Native. ' +\n \"Please upgrade to use either 'react-native-svg' or a similar package. \" +\n \"If you cannot upgrade to a different library, please install the deprecated '@react-native-community/art' package. \" +\n 'See https://github.com/react-native-art/art',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access ListView. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access ListView. */\n Object.defineProperty(module.exports, 'ListView', {\n configurable: true,\n get() {\n invariant(\n false,\n 'ListView has been removed from React Native. ' +\n 'See https://fb.me/nolistview for more information or use ' +\n '`deprecated-react-native-listview`.',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access SwipeableListView. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access SwipeableListView. */\n Object.defineProperty(module.exports, 'SwipeableListView', {\n configurable: true,\n get() {\n invariant(\n false,\n 'SwipeableListView has been removed from React Native. ' +\n 'See https://fb.me/nolistview for more information or use ' +\n '`deprecated-react-native-swipeable-listview`.',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access WebView. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access WebView. */\n Object.defineProperty(module.exports, 'WebView', {\n configurable: true,\n get() {\n invariant(\n false,\n 'WebView has been removed from React Native. ' +\n \"It can now be installed and imported from 'react-native-webview' instead of 'react-native'. \" +\n 'See https://github.com/react-native-webview/react-native-webview',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access NetInfo. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access NetInfo. */\n Object.defineProperty(module.exports, 'NetInfo', {\n configurable: true,\n get() {\n invariant(\n false,\n 'NetInfo has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-community/netinfo' instead of 'react-native'. \" +\n 'See https://github.com/react-native-netinfo/react-native-netinfo',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access CameraRoll. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access CameraRoll. */\n Object.defineProperty(module.exports, 'CameraRoll', {\n configurable: true,\n get() {\n invariant(\n false,\n 'CameraRoll has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-camera-roll/camera-roll' instead of 'react-native'. \" +\n 'See https://github.com/react-native-cameraroll/react-native-cameraroll',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access ImageStore. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access ImageStore. */\n Object.defineProperty(module.exports, 'ImageStore', {\n configurable: true,\n get() {\n invariant(\n false,\n 'ImageStore has been removed from React Native. ' +\n 'To get a base64-encoded string from a local image use either of the following third-party libraries:' +\n \"* expo-file-system: `readAsStringAsync(filepath, 'base64')`\" +\n \"* react-native-fs: `readFile(filepath, 'base64')`\",\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access ImageEditor. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access ImageEditor. */\n Object.defineProperty(module.exports, 'ImageEditor', {\n configurable: true,\n get() {\n invariant(\n false,\n 'ImageEditor has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-community/image-editor' instead of 'react-native'. \" +\n 'See https://github.com/callstack/react-native-image-editor',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access TimePickerAndroid. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access TimePickerAndroid. */\n Object.defineProperty(module.exports, 'TimePickerAndroid', {\n configurable: true,\n get() {\n invariant(\n false,\n 'TimePickerAndroid has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. \" +\n 'See https://github.com/react-native-datetimepicker/datetimepicker',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access ToolbarAndroid. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access ToolbarAndroid. */\n Object.defineProperty(module.exports, 'ToolbarAndroid', {\n configurable: true,\n get() {\n invariant(\n false,\n 'ToolbarAndroid has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-community/toolbar-android' instead of 'react-native'. \" +\n 'See https://github.com/react-native-toolbar-android/toolbar-android',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access ViewPagerAndroid. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access ViewPagerAndroid. */\n Object.defineProperty(module.exports, 'ViewPagerAndroid', {\n configurable: true,\n get() {\n invariant(\n false,\n 'ViewPagerAndroid has been removed from React Native. ' +\n \"It can now be installed and imported from 'react-native-pager-view' instead of 'react-native'. \" +\n 'See https://github.com/callstack/react-native-pager-view',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access CheckBox. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access CheckBox. */\n Object.defineProperty(module.exports, 'CheckBox', {\n configurable: true,\n get() {\n invariant(\n false,\n 'CheckBox has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-community/checkbox' instead of 'react-native'. \" +\n 'See https://github.com/react-native-checkbox/react-native-checkbox',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access SegmentedControlIOS. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access SegmentedControlIOS. */\n Object.defineProperty(module.exports, 'SegmentedControlIOS', {\n configurable: true,\n get() {\n invariant(\n false,\n 'SegmentedControlIOS has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-segmented-control/segmented-control' instead of 'react-native'.\" +\n 'See https://github.com/react-native-segmented-control/segmented-control',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access StatusBarIOS. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access StatusBarIOS. */\n Object.defineProperty(module.exports, 'StatusBarIOS', {\n configurable: true,\n get() {\n invariant(\n false,\n 'StatusBarIOS has been removed from React Native. ' +\n 'Has been merged with StatusBar. ' +\n 'See https://reactnative.dev/docs/statusbar',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access PickerIOS. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access PickerIOS. */\n Object.defineProperty(module.exports, 'PickerIOS', {\n configurable: true,\n get() {\n invariant(\n false,\n 'PickerIOS has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. \" +\n 'See https://github.com/react-native-picker/picker',\n );\n },\n });\n\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access Picker. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access Picker. */\n Object.defineProperty(module.exports, 'Picker', {\n configurable: true,\n get() {\n invariant(\n false,\n 'Picker has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. \" +\n 'See https://github.com/react-native-picker/picker',\n );\n },\n });\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access DatePickerAndroid. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access DatePickerAndroid. */\n Object.defineProperty(module.exports, 'DatePickerAndroid', {\n configurable: true,\n get() {\n invariant(\n false,\n 'DatePickerAndroid has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. \" +\n 'See https://github.com/react-native-datetimepicker/datetimepicker',\n );\n },\n });\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access MaskedViewIOS. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access MaskedViewIOS. */\n Object.defineProperty(module.exports, 'MaskedViewIOS', {\n configurable: true,\n get() {\n invariant(\n false,\n 'MaskedViewIOS has been removed from React Native. ' +\n \"It can now be installed and imported from '@react-native-masked-view/masked-view' instead of 'react-native'. \" +\n 'See https://github.com/react-native-masked-view/masked-view',\n );\n },\n });\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access AsyncStorage. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access AsyncStorage. */\n Object.defineProperty(module.exports, 'AsyncStorage', {\n configurable: true,\n get() {\n invariant(\n false,\n 'AsyncStorage has been removed from react-native core. ' +\n \"It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. \" +\n 'See https://github.com/react-native-async-storage/async-storage',\n );\n },\n });\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access ImagePickerIOS. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access ImagePickerIOS. */\n Object.defineProperty(module.exports, 'ImagePickerIOS', {\n configurable: true,\n get() {\n invariant(\n false,\n 'ImagePickerIOS has been removed from React Native. ' +\n \"Please upgrade to use either 'react-native-image-picker' or 'expo-image-picker'. \" +\n \"If you cannot upgrade to a different library, please install the deprecated '@react-native-community/image-picker-ios' package. \" +\n 'See https://github.com/rnc-archive/react-native-image-picker-ios',\n );\n },\n });\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access ProgressViewIOS. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access ProgressViewIOS. */\n Object.defineProperty(module.exports, 'ProgressViewIOS', {\n configurable: true,\n get() {\n invariant(\n false,\n 'ProgressViewIOS has been removed from react-native core. ' +\n \"It can now be installed and imported from '@react-native-community/progress-view' instead of 'react-native'. \" +\n 'See https://github.com/react-native-progress-view/progress-view',\n );\n },\n });\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access DatePickerIOS. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access DatePickerIOS. */\n Object.defineProperty(module.exports, 'DatePickerIOS', {\n configurable: true,\n get() {\n invariant(\n false,\n 'DatePickerIOS has been removed from react-native core. ' +\n \"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. \" +\n 'See https://github.com/react-native-datetimepicker/datetimepicker',\n );\n },\n });\n /* $FlowFixMe[prop-missing] This is intentional: Flow will error when\n * attempting to access Slider. */\n /* $FlowFixMe[invalid-export] This is intentional: Flow will error when\n * attempting to access Slider. */\n Object.defineProperty(module.exports, 'Slider', {\n configurable: true,\n get() {\n invariant(\n false,\n 'Slider has been removed from react-native core. ' +\n \"It can now be installed and imported from '@react-native-community/slider' instead of 'react-native'. \" +\n 'See https://github.com/callstack/react-native-slider',\n );\n },\n });\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\ntype Module = {...};\ntype RegisterCallableModule = (\n name: string,\n moduleOrFactory: Module | (void => Module),\n) => void;\n\nconst registerCallableModule: RegisterCallableModule = (function () {\n if (global.RN$Bridgeless === true) {\n return (name, moduleOrFactory) => {\n if (typeof moduleOrFactory === 'function') {\n global.RN$registerCallableModule(name, moduleOrFactory);\n return;\n }\n\n global.RN$registerCallableModule(name, () => moduleOrFactory);\n };\n }\n\n const BatchedBridge = require('../BatchedBridge/BatchedBridge');\n return (name, moduleOrFactory) => {\n if (typeof moduleOrFactory === 'function') {\n BatchedBridge.registerLazyCallableModule(name, moduleOrFactory);\n return;\n }\n\n BatchedBridge.registerCallableModule(name, moduleOrFactory);\n };\n})();\n\nexport default registerCallableModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nconst MessageQueue = require('./MessageQueue');\n\nconst BatchedBridge: MessageQueue = new MessageQueue();\n\n// Wire up the batched bridge on the global object so that we can call into it.\n// Ideally, this would be the inverse relationship. I.e. the native environment\n// provides this global directly with its script embedded. Then this module\n// would export it. A possible fix would be to trim the dependencies in\n// MessageQueue to its minimal features and embed that in the native runtime.\n\nObject.defineProperty(global, '__fbBatchedBridge', {\n configurable: true,\n value: BatchedBridge,\n});\n\nmodule.exports = BatchedBridge;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nconst Systrace = require('../Performance/Systrace');\nconst deepFreezeAndThrowOnMutationInDev = require('../Utilities/deepFreezeAndThrowOnMutationInDev');\nconst stringifySafe = require('../Utilities/stringifySafe').default;\nconst warnOnce = require('../Utilities/warnOnce');\nconst ErrorUtils = require('../vendor/core/ErrorUtils');\nconst invariant = require('invariant');\n\nexport type SpyData = {\n type: number,\n module: ?string,\n method: string | number,\n args: mixed[],\n ...\n};\n\nconst TO_JS = 0;\nconst TO_NATIVE = 1;\n\nconst MODULE_IDS = 0;\nconst METHOD_IDS = 1;\nconst PARAMS = 2;\nconst MIN_TIME_BETWEEN_FLUSHES_MS = 5;\n\n// eslint-disable-next-line no-bitwise\nconst TRACE_TAG_REACT_APPS = 1 << 17;\n\nconst DEBUG_INFO_LIMIT = 32;\n\nclass MessageQueue {\n _lazyCallableModules: {[key: string]: (void) => {...}, ...};\n _queue: [number[], number[], mixed[], number];\n _successCallbacks: Map void>;\n _failureCallbacks: Map void>;\n _callID: number;\n _lastFlush: number;\n _eventLoopStartTime: number;\n _reactNativeMicrotasksCallback: ?() => void;\n\n _debugInfo: {[number]: [number, number], ...};\n _remoteModuleTable: {[number]: string, ...};\n _remoteMethodTable: {[number]: $ReadOnlyArray, ...};\n\n __spy: ?(data: SpyData) => void;\n\n constructor() {\n this._lazyCallableModules = {};\n this._queue = [[], [], [], 0];\n this._successCallbacks = new Map();\n this._failureCallbacks = new Map();\n this._callID = 0;\n this._lastFlush = 0;\n this._eventLoopStartTime = Date.now();\n this._reactNativeMicrotasksCallback = null;\n\n if (__DEV__) {\n this._debugInfo = {};\n this._remoteModuleTable = {};\n this._remoteMethodTable = {};\n }\n\n // $FlowFixMe[cannot-write]\n this.callFunctionReturnFlushedQueue =\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.callFunctionReturnFlushedQueue.bind(this);\n // $FlowFixMe[cannot-write]\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.flushedQueue = this.flushedQueue.bind(this);\n\n // $FlowFixMe[cannot-write]\n this.invokeCallbackAndReturnFlushedQueue =\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.invokeCallbackAndReturnFlushedQueue.bind(this);\n }\n\n /**\n * Public APIs\n */\n\n static spy(spyOrToggle: boolean | ((data: SpyData) => void)) {\n if (spyOrToggle === true) {\n MessageQueue.prototype.__spy = info => {\n console.log(\n `${info.type === TO_JS ? 'N->JS' : 'JS->N'} : ` +\n `${info.module != null ? info.module + '.' : ''}${info.method}` +\n `(${JSON.stringify(info.args)})`,\n );\n };\n } else if (spyOrToggle === false) {\n MessageQueue.prototype.__spy = null;\n } else {\n MessageQueue.prototype.__spy = spyOrToggle;\n }\n }\n\n callFunctionReturnFlushedQueue(\n module: string,\n method: string,\n args: mixed[],\n ): null | [Array, Array, Array, number] {\n this.__guard(() => {\n this.__callFunction(module, method, args);\n });\n\n return this.flushedQueue();\n }\n\n invokeCallbackAndReturnFlushedQueue(\n cbID: number,\n args: mixed[],\n ): null | [Array, Array, Array, number] {\n this.__guard(() => {\n this.__invokeCallback(cbID, args);\n });\n\n return this.flushedQueue();\n }\n\n flushedQueue(): null | [Array, Array, Array, number] {\n this.__guard(() => {\n this.__callReactNativeMicrotasks();\n });\n\n const queue = this._queue;\n this._queue = [[], [], [], this._callID];\n return queue[0].length ? queue : null;\n }\n\n getEventLoopRunningTime(): number {\n return Date.now() - this._eventLoopStartTime;\n }\n\n registerCallableModule(name: string, module: {...}) {\n this._lazyCallableModules[name] = () => module;\n }\n\n registerLazyCallableModule(name: string, factory: void => interface {}) {\n let module: interface {};\n let getValue: ?(void) => interface {} = factory;\n this._lazyCallableModules[name] = () => {\n if (getValue) {\n module = getValue();\n getValue = null;\n }\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n return module;\n };\n }\n\n getCallableModule(name: string): {...} | null {\n const getValue = this._lazyCallableModules[name];\n return getValue ? getValue() : null;\n }\n\n callNativeSyncHook(\n moduleID: number,\n methodID: number,\n params: mixed[],\n onFail: ?(...mixed[]) => void,\n onSucc: ?(...mixed[]) => void,\n ): mixed {\n if (__DEV__) {\n invariant(\n global.nativeCallSyncHook,\n 'Calling synchronous methods on native ' +\n 'modules is not supported in Chrome.\\n\\n Consider providing alternative ' +\n 'methods to expose this method in debug mode, e.g. by exposing constants ' +\n 'ahead-of-time.',\n );\n }\n this.processCallbacks(moduleID, methodID, params, onFail, onSucc);\n return global.nativeCallSyncHook(moduleID, methodID, params);\n }\n\n processCallbacks(\n moduleID: number,\n methodID: number,\n params: mixed[],\n onFail: ?(...mixed[]) => void,\n onSucc: ?(...mixed[]) => void,\n ): void {\n if (onFail || onSucc) {\n if (__DEV__) {\n this._debugInfo[this._callID] = [moduleID, methodID];\n if (this._callID > DEBUG_INFO_LIMIT) {\n delete this._debugInfo[this._callID - DEBUG_INFO_LIMIT];\n }\n if (this._successCallbacks.size > 500) {\n const info: {[number]: {method: string, module: string}} = {};\n this._successCallbacks.forEach((_, callID) => {\n const debug = this._debugInfo[callID];\n const module = debug && this._remoteModuleTable[debug[0]];\n const method = debug && this._remoteMethodTable[debug[0]][debug[1]];\n info[callID] = {module, method};\n });\n warnOnce(\n 'excessive-number-of-pending-callbacks',\n `Excessive number of pending callbacks: ${\n this._successCallbacks.size\n }. Some pending callbacks that might have leaked by never being called from native code: ${stringifySafe(\n info,\n )}`,\n );\n }\n }\n // Encode callIDs into pairs of callback identifiers by shifting left and using the rightmost bit\n // to indicate fail (0) or success (1)\n // eslint-disable-next-line no-bitwise\n onFail && params.push(this._callID << 1);\n // eslint-disable-next-line no-bitwise\n onSucc && params.push((this._callID << 1) | 1);\n this._successCallbacks.set(this._callID, onSucc);\n this._failureCallbacks.set(this._callID, onFail);\n }\n if (__DEV__) {\n global.nativeTraceBeginAsyncFlow &&\n global.nativeTraceBeginAsyncFlow(\n TRACE_TAG_REACT_APPS,\n 'native',\n this._callID,\n );\n }\n this._callID++;\n }\n\n enqueueNativeCall(\n moduleID: number,\n methodID: number,\n params: mixed[],\n onFail: ?(...mixed[]) => void,\n onSucc: ?(...mixed[]) => void,\n ): void {\n this.processCallbacks(moduleID, methodID, params, onFail, onSucc);\n\n this._queue[MODULE_IDS].push(moduleID);\n this._queue[METHOD_IDS].push(methodID);\n\n if (__DEV__) {\n // Validate that parameters passed over the bridge are\n // folly-convertible. As a special case, if a prop value is a\n // function it is permitted here, and special-cased in the\n // conversion.\n const isValidArgument = (val: mixed): boolean => {\n switch (typeof val) {\n case 'undefined':\n case 'boolean':\n case 'string':\n return true;\n case 'number':\n return isFinite(val);\n case 'object':\n if (val == null) {\n return true;\n }\n\n if (Array.isArray(val)) {\n return val.every(isValidArgument);\n }\n\n for (const k in val) {\n if (typeof val[k] !== 'function' && !isValidArgument(val[k])) {\n return false;\n }\n }\n\n return true;\n case 'function':\n return false;\n default:\n return false;\n }\n };\n\n // Replacement allows normally non-JSON-convertible values to be\n // seen. There is ambiguity with string values, but in context,\n // it should at least be a strong hint.\n const replacer = (key: string, val: $FlowFixMe) => {\n const t = typeof val;\n if (t === 'function') {\n return '<>';\n } else if (t === 'number' && !isFinite(val)) {\n return '<<' + val.toString() + '>>';\n } else {\n return val;\n }\n };\n\n // Note that JSON.stringify\n invariant(\n isValidArgument(params),\n '%s is not usable as a native method argument',\n JSON.stringify(params, replacer),\n );\n\n // The params object should not be mutated after being queued\n deepFreezeAndThrowOnMutationInDev(params);\n }\n this._queue[PARAMS].push(params);\n\n const now = Date.now();\n if (\n global.nativeFlushQueueImmediate &&\n now - this._lastFlush >= MIN_TIME_BETWEEN_FLUSHES_MS\n ) {\n const queue = this._queue;\n this._queue = [[], [], [], this._callID];\n this._lastFlush = now;\n global.nativeFlushQueueImmediate(queue);\n }\n Systrace.counterEvent('pending_js_to_native_queue', this._queue[0].length);\n if (__DEV__ && this.__spy && isFinite(moduleID)) {\n // $FlowFixMe[not-a-function]\n this.__spy({\n type: TO_NATIVE,\n module: this._remoteModuleTable[moduleID],\n method: this._remoteMethodTable[moduleID][methodID],\n args: params,\n });\n } else if (this.__spy) {\n this.__spy({\n type: TO_NATIVE,\n module: moduleID + '',\n method: methodID,\n args: params,\n });\n }\n }\n\n createDebugLookup(\n moduleID: number,\n name: string,\n methods: ?$ReadOnlyArray,\n ) {\n if (__DEV__) {\n this._remoteModuleTable[moduleID] = name;\n this._remoteMethodTable[moduleID] = methods || [];\n }\n }\n\n // For JSTimers to register its callback. Otherwise a circular dependency\n // between modules is introduced. Note that only one callback may be\n // registered at a time.\n setReactNativeMicrotasksCallback(fn: () => void) {\n this._reactNativeMicrotasksCallback = fn;\n }\n\n /**\n * Private methods\n */\n\n __guard(fn: () => void) {\n if (this.__shouldPauseOnThrow()) {\n fn();\n } else {\n try {\n fn();\n } catch (error) {\n ErrorUtils.reportFatalError(error);\n }\n }\n }\n\n // MessageQueue installs a global handler to catch all exceptions where JS users can register their own behavior\n // This handler makes all exceptions to be propagated from inside MessageQueue rather than by the VM at their origin\n // This makes stacktraces to be placed at MessageQueue rather than at where they were launched\n // The parameter DebuggerInternal.shouldPauseOnThrow is used to check before catching all exceptions and\n // can be configured by the VM or any Inspector\n __shouldPauseOnThrow(): boolean {\n return (\n // $FlowFixMe[cannot-resolve-name]\n typeof DebuggerInternal !== 'undefined' &&\n // $FlowFixMe[cannot-resolve-name]\n DebuggerInternal.shouldPauseOnThrow === true\n );\n }\n\n __callReactNativeMicrotasks() {\n Systrace.beginEvent('JSTimers.callReactNativeMicrotasks()');\n try {\n if (this._reactNativeMicrotasksCallback != null) {\n this._reactNativeMicrotasksCallback();\n }\n } finally {\n Systrace.endEvent();\n }\n }\n\n __callFunction(module: string, method: string, args: mixed[]): void {\n this._lastFlush = Date.now();\n this._eventLoopStartTime = this._lastFlush;\n if (__DEV__ || this.__spy) {\n Systrace.beginEvent(`${module}.${method}(${stringifySafe(args)})`);\n } else {\n Systrace.beginEvent(`${module}.${method}(...)`);\n }\n try {\n if (this.__spy) {\n this.__spy({type: TO_JS, module, method, args});\n }\n const moduleMethods = this.getCallableModule(module);\n if (!moduleMethods) {\n const callableModuleNames = Object.keys(this._lazyCallableModules);\n const n = callableModuleNames.length;\n const callableModuleNameList = callableModuleNames.join(', ');\n\n // TODO(T122225939): Remove after investigation: Why are we getting to this line in bridgeless mode?\n const isBridgelessMode =\n global.RN$Bridgeless === true ? 'true' : 'false';\n invariant(\n false,\n `Failed to call into JavaScript module method ${module}.${method}(). Module has not been registered as callable. Bridgeless Mode: ${isBridgelessMode}. Registered callable JavaScript modules (n = ${n}): ${callableModuleNameList}.\n A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.`,\n );\n }\n // $FlowFixMe[invalid-computed-prop]\n if (!moduleMethods[method]) {\n invariant(\n false,\n `Failed to call into JavaScript module method ${module}.${method}(). Module exists, but the method is undefined.`,\n );\n }\n moduleMethods[method].apply(moduleMethods, args);\n } finally {\n Systrace.endEvent();\n }\n }\n\n __invokeCallback(cbID: number, args: mixed[]): void {\n this._lastFlush = Date.now();\n this._eventLoopStartTime = this._lastFlush;\n\n // The rightmost bit of cbID indicates fail (0) or success (1), the other bits are the callID shifted left.\n // eslint-disable-next-line no-bitwise\n const callID = cbID >>> 1;\n // eslint-disable-next-line no-bitwise\n const isSuccess = cbID & 1;\n const callback = isSuccess\n ? this._successCallbacks.get(callID)\n : this._failureCallbacks.get(callID);\n\n if (__DEV__) {\n const debug = this._debugInfo[callID];\n const module = debug && this._remoteModuleTable[debug[0]];\n const method = debug && this._remoteMethodTable[debug[0]][debug[1]];\n invariant(\n callback,\n `No callback found with cbID ${cbID} and callID ${callID} for ` +\n (method\n ? ` ${module}.${method} - most likely the callback was already invoked`\n : `module ${module || ''}`) +\n `. Args: '${stringifySafe(args)}'`,\n );\n const profileName = debug\n ? ''\n : cbID;\n if (callback && this.__spy) {\n this.__spy({type: TO_JS, module: null, method: profileName, args});\n }\n Systrace.beginEvent(\n `MessageQueue.invokeCallback(${profileName}, ${stringifySafe(args)})`,\n );\n }\n\n try {\n if (!callback) {\n return;\n }\n\n this._successCallbacks.delete(callID);\n this._failureCallbacks.delete(callID);\n callback(...args);\n } finally {\n if (__DEV__) {\n Systrace.endEvent();\n }\n }\n }\n}\n\nmodule.exports = MessageQueue;\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport typeof * as SystraceModule from './Systrace';\n\nconst TRACE_TAG_REACT_APPS = 1 << 17; // eslint-disable-line no-bitwise\n\nlet _asyncCookie = 0;\n\ntype EventName = string | (() => string);\ntype EventArgs = ?{[string]: string};\n\n/**\n * Indicates if the application is currently being traced.\n *\n * Calling methods on this module when the application isn't being traced is\n * cheap, but this method can be used to avoid computing expensive values for\n * those functions.\n *\n * @example\n * if (Systrace.isEnabled()) {\n * const expensiveArgs = computeExpensiveArgs();\n * Systrace.beginEvent('myEvent', expensiveArgs);\n * }\n */\nexport function isEnabled(): boolean {\n return global.nativeTraceIsTracing\n ? global.nativeTraceIsTracing(TRACE_TAG_REACT_APPS)\n : Boolean(global.__RCTProfileIsProfiling);\n}\n\n/**\n * @deprecated This function is now a no-op but it's left for backwards\n * compatibility. `isEnabled` will now synchronously check if we're actively\n * profiling or not. This is necessary because we don't have callbacks to know\n * when profiling has started/stopped on Android APIs.\n */\nexport function setEnabled(_doEnable: boolean): void {}\n\n/**\n * Marks the start of a synchronous event that should end in the same stack\n * frame. The end of this event should be marked using the `endEvent` function.\n */\nexport function beginEvent(eventName: EventName, args?: EventArgs): void {\n if (isEnabled()) {\n const eventNameString =\n typeof eventName === 'function' ? eventName() : eventName;\n global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, eventNameString, args);\n }\n}\n\n/**\n * Marks the end of a synchronous event started in the same stack frame.\n */\nexport function endEvent(args?: EventArgs): void {\n if (isEnabled()) {\n global.nativeTraceEndSection(TRACE_TAG_REACT_APPS, args);\n }\n}\n\n/**\n * Marks the start of a potentially asynchronous event. The end of this event\n * should be marked calling the `endAsyncEvent` function with the cookie\n * returned by this function.\n */\nexport function beginAsyncEvent(\n eventName: EventName,\n args?: EventArgs,\n): number {\n const cookie = _asyncCookie;\n if (isEnabled()) {\n _asyncCookie++;\n const eventNameString =\n typeof eventName === 'function' ? eventName() : eventName;\n global.nativeTraceBeginAsyncSection(\n TRACE_TAG_REACT_APPS,\n eventNameString,\n cookie,\n args,\n );\n }\n return cookie;\n}\n\n/**\n * Marks the end of a potentially asynchronous event, which was started with\n * the given cookie.\n */\nexport function endAsyncEvent(\n eventName: EventName,\n cookie: number,\n args?: EventArgs,\n): void {\n if (isEnabled()) {\n const eventNameString =\n typeof eventName === 'function' ? eventName() : eventName;\n global.nativeTraceEndAsyncSection(\n TRACE_TAG_REACT_APPS,\n eventNameString,\n cookie,\n args,\n );\n }\n}\n\n/**\n * Registers a new value for a counter event.\n */\nexport function counterEvent(eventName: EventName, value: number): void {\n if (isEnabled()) {\n const eventNameString =\n typeof eventName === 'function' ? eventName() : eventName;\n global.nativeTraceCounter &&\n global.nativeTraceCounter(TRACE_TAG_REACT_APPS, eventNameString, value);\n }\n}\n\nif (__DEV__) {\n const Systrace: SystraceModule = {\n isEnabled,\n setEnabled,\n beginEvent,\n endEvent,\n beginAsyncEvent,\n endAsyncEvent,\n counterEvent,\n };\n\n // The metro require polyfill can not have dependencies (true for all polyfills).\n // Ensure that `Systrace` is available in polyfill by exposing it globally.\n global[(global.__METRO_GLOBAL_PREFIX__ || '') + '__SYSTRACE'] = Systrace;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {ErrorUtilsT} from '@react-native/js-polyfills/error-guard';\n\n/**\n * The particular require runtime that we are using looks for a global\n * `ErrorUtils` object and if it exists, then it requires modules with the\n * error handler specified via ErrorUtils.setGlobalHandler by calling the\n * require function with applyWithGuard. Since the require module is loaded\n * before any of the modules, this ErrorUtils must be defined (and the handler\n * set) globally before requiring anything.\n *\n * However, we still want to treat ErrorUtils as a module so that other modules\n * that use it aren't just using a global variable, so simply export the global\n * variable here. ErrorUtils is originally defined in a file named error-guard.js.\n */\nmodule.exports = (global.ErrorUtils: ErrorUtilsT);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport invariant from 'invariant';\n\n/**\n * Tries to stringify with JSON.stringify and toString, but catches exceptions\n * (e.g. from circular objects) and always returns a string and never throws.\n */\nexport function createStringifySafeWithLimits(limits: {|\n maxDepth?: number,\n maxStringLimit?: number,\n maxArrayLimit?: number,\n maxObjectKeysLimit?: number,\n|}): mixed => string {\n const {\n maxDepth = Number.POSITIVE_INFINITY,\n maxStringLimit = Number.POSITIVE_INFINITY,\n maxArrayLimit = Number.POSITIVE_INFINITY,\n maxObjectKeysLimit = Number.POSITIVE_INFINITY,\n } = limits;\n const stack: Array = [];\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n function replacer(key: string, value: mixed): mixed {\n while (stack.length && this !== stack[0]) {\n stack.shift();\n }\n\n if (typeof value === 'string') {\n const truncatedString = '...(truncated)...';\n if (value.length > maxStringLimit + truncatedString.length) {\n return value.substring(0, maxStringLimit) + truncatedString;\n }\n return value;\n }\n if (typeof value !== 'object' || value === null) {\n return value;\n }\n\n let retval: mixed = value;\n if (Array.isArray(value)) {\n if (stack.length >= maxDepth) {\n retval = `[ ... array with ${value.length} values ... ]`;\n } else if (value.length > maxArrayLimit) {\n retval = value\n .slice(0, maxArrayLimit)\n .concat([\n `... extra ${value.length - maxArrayLimit} values truncated ...`,\n ]);\n }\n } else {\n // Add refinement after Array.isArray call.\n invariant(typeof value === 'object', 'This was already found earlier');\n let keys = Object.keys(value);\n if (stack.length >= maxDepth) {\n retval = `{ ... object with ${keys.length} keys ... }`;\n } else if (keys.length > maxObjectKeysLimit) {\n // Return a sample of the keys.\n retval = ({}: {[string]: mixed});\n for (let k of keys.slice(0, maxObjectKeysLimit)) {\n retval[k] = value[k];\n }\n const truncatedKey = '...(truncated keys)...';\n retval[truncatedKey] = keys.length - maxObjectKeysLimit;\n }\n }\n stack.unshift(retval);\n return retval;\n }\n\n return function stringifySafe(arg: mixed): string {\n if (arg === undefined) {\n return 'undefined';\n } else if (arg === null) {\n return 'null';\n } else if (typeof arg === 'function') {\n try {\n return arg.toString();\n } catch (e) {\n return '[function unknown]';\n }\n } else if (arg instanceof Error) {\n return arg.name + ': ' + arg.message;\n } else {\n // Perform a try catch, just in case the object has a circular\n // reference or stringify throws for some other reason.\n try {\n const ret = JSON.stringify(arg, replacer);\n if (ret === undefined) {\n return '[\"' + typeof arg + '\" failed to stringify]';\n }\n return ret;\n } catch (e) {\n if (typeof arg.toString === 'function') {\n try {\n // $FlowFixMe[incompatible-use] : toString shouldn't take any arguments in general.\n return arg.toString();\n } catch (E) {}\n }\n }\n }\n return '[\"' + typeof arg + '\" failed to stringify]';\n };\n}\n\nconst stringifySafe: mixed => string = createStringifySafeWithLimits({\n maxDepth: 10,\n maxStringLimit: 100,\n maxArrayLimit: 50,\n maxObjectKeysLimit: 50,\n});\n\nexport default stringifySafe;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';\nimport type {EventSubscription} from '../../vendor/emitter/EventEmitter';\nimport type {ElementRef} from 'react';\n\nimport RCTDeviceEventEmitter from '../../EventEmitter/RCTDeviceEventEmitter';\nimport {sendAccessibilityEvent} from '../../ReactNative/RendererProxy';\nimport Platform from '../../Utilities/Platform';\nimport legacySendAccessibilityEvent from './legacySendAccessibilityEvent';\nimport NativeAccessibilityInfoAndroid from './NativeAccessibilityInfo';\nimport NativeAccessibilityManagerIOS from './NativeAccessibilityManager';\n\n// Events that are only supported on Android.\ntype AccessibilityEventDefinitionsAndroid = {\n accessibilityServiceChanged: [boolean],\n};\n\n// Events that are only supported on iOS.\ntype AccessibilityEventDefinitionsIOS = {\n announcementFinished: [{announcement: string, success: boolean}],\n boldTextChanged: [boolean],\n grayscaleChanged: [boolean],\n invertColorsChanged: [boolean],\n reduceTransparencyChanged: [boolean],\n};\n\ntype AccessibilityEventDefinitions = {\n ...AccessibilityEventDefinitionsAndroid,\n ...AccessibilityEventDefinitionsIOS,\n change: [boolean], // screenReaderChanged\n reduceMotionChanged: [boolean],\n screenReaderChanged: [boolean],\n};\n\ntype AccessibilityEventTypes = 'click' | 'focus' | 'viewHoverEnter';\n\n// Mapping of public event names to platform-specific event names.\nconst EventNames: Map<\n $Keys,\n string,\n> = Platform.OS === 'android'\n ? new Map([\n ['change', 'touchExplorationDidChange'],\n ['reduceMotionChanged', 'reduceMotionDidChange'],\n ['screenReaderChanged', 'touchExplorationDidChange'],\n ['accessibilityServiceChanged', 'accessibilityServiceDidChange'],\n ])\n : new Map([\n ['announcementFinished', 'announcementFinished'],\n ['boldTextChanged', 'boldTextChanged'],\n ['change', 'screenReaderChanged'],\n ['grayscaleChanged', 'grayscaleChanged'],\n ['invertColorsChanged', 'invertColorsChanged'],\n ['reduceMotionChanged', 'reduceMotionChanged'],\n ['reduceTransparencyChanged', 'reduceTransparencyChanged'],\n ['screenReaderChanged', 'screenReaderChanged'],\n ]);\n\n/**\n * Sometimes it's useful to know whether or not the device has a screen reader\n * that is currently active. The `AccessibilityInfo` API is designed for this\n * purpose. You can use it to query the current state of the screen reader as\n * well as to register to be notified when the state of the screen reader\n * changes.\n *\n * See https://reactnative.dev/docs/accessibilityinfo\n */\nconst AccessibilityInfo = {\n /**\n * Query whether bold text is currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when bold text is enabled and `false` otherwise.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#isBoldTextEnabled\n */\n isBoldTextEnabled(): Promise {\n if (Platform.OS === 'android') {\n return Promise.resolve(false);\n } else {\n return new Promise((resolve, reject) => {\n if (NativeAccessibilityManagerIOS != null) {\n NativeAccessibilityManagerIOS.getCurrentBoldTextState(\n resolve,\n reject,\n );\n } else {\n reject(null);\n }\n });\n }\n },\n\n /**\n * Query whether grayscale is currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when grayscale is enabled and `false` otherwise.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#isGrayscaleEnabled\n */\n isGrayscaleEnabled(): Promise {\n if (Platform.OS === 'android') {\n return Promise.resolve(false);\n } else {\n return new Promise((resolve, reject) => {\n if (NativeAccessibilityManagerIOS != null) {\n NativeAccessibilityManagerIOS.getCurrentGrayscaleState(\n resolve,\n reject,\n );\n } else {\n reject(null);\n }\n });\n }\n },\n\n /**\n * Query whether inverted colors are currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when invert color is enabled and `false` otherwise.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#isInvertColorsEnabled\n */\n isInvertColorsEnabled(): Promise {\n if (Platform.OS === 'android') {\n return Promise.resolve(false);\n } else {\n return new Promise((resolve, reject) => {\n if (NativeAccessibilityManagerIOS != null) {\n NativeAccessibilityManagerIOS.getCurrentInvertColorsState(\n resolve,\n reject,\n );\n } else {\n reject(null);\n }\n });\n }\n },\n\n /**\n * Query whether reduced motion is currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when a reduce motion is enabled and `false` otherwise.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#isReduceMotionEnabled\n */\n isReduceMotionEnabled(): Promise {\n return new Promise((resolve, reject) => {\n if (Platform.OS === 'android') {\n if (NativeAccessibilityInfoAndroid != null) {\n NativeAccessibilityInfoAndroid.isReduceMotionEnabled(resolve);\n } else {\n reject(null);\n }\n } else {\n if (NativeAccessibilityManagerIOS != null) {\n NativeAccessibilityManagerIOS.getCurrentReduceMotionState(\n resolve,\n reject,\n );\n } else {\n reject(null);\n }\n }\n });\n },\n\n /**\n * Query whether reduce motion and prefer cross-fade transitions settings are currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when prefer cross-fade transitions is enabled and `false` otherwise.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#prefersCrossFadeTransitions\n */\n prefersCrossFadeTransitions(): Promise {\n return new Promise((resolve, reject) => {\n if (Platform.OS === 'android') {\n return Promise.resolve(false);\n } else {\n if (\n NativeAccessibilityManagerIOS?.getCurrentPrefersCrossFadeTransitionsState !=\n null\n ) {\n NativeAccessibilityManagerIOS.getCurrentPrefersCrossFadeTransitionsState(\n resolve,\n reject,\n );\n } else {\n reject(null);\n }\n }\n });\n },\n\n /**\n * Query whether reduced transparency is currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when a reduce transparency is enabled and `false` otherwise.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#isReduceTransparencyEnabled\n */\n isReduceTransparencyEnabled(): Promise {\n if (Platform.OS === 'android') {\n return Promise.resolve(false);\n } else {\n return new Promise((resolve, reject) => {\n if (NativeAccessibilityManagerIOS != null) {\n NativeAccessibilityManagerIOS.getCurrentReduceTransparencyState(\n resolve,\n reject,\n );\n } else {\n reject(null);\n }\n });\n }\n },\n\n /**\n * Query whether a screen reader is currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when a screen reader is enabled and `false` otherwise.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#isScreenReaderEnabled\n */\n isScreenReaderEnabled(): Promise {\n return new Promise((resolve, reject) => {\n if (Platform.OS === 'android') {\n if (NativeAccessibilityInfoAndroid != null) {\n NativeAccessibilityInfoAndroid.isTouchExplorationEnabled(resolve);\n } else {\n reject(null);\n }\n } else {\n if (NativeAccessibilityManagerIOS != null) {\n NativeAccessibilityManagerIOS.getCurrentVoiceOverState(\n resolve,\n reject,\n );\n } else {\n reject(null);\n }\n }\n });\n },\n\n /**\n * Query whether Accessibility Service is currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when any service is enabled and `false` otherwise.\n *\n * @platform android\n *\n * See https://reactnative.dev/docs/accessibilityinfo/#isaccessibilityserviceenabled-android\n */\n isAccessibilityServiceEnabled(): Promise {\n return new Promise((resolve, reject) => {\n if (Platform.OS === 'android') {\n if (\n NativeAccessibilityInfoAndroid != null &&\n NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled != null\n ) {\n NativeAccessibilityInfoAndroid.isAccessibilityServiceEnabled(resolve);\n } else {\n reject(null);\n }\n } else {\n reject(null);\n }\n });\n },\n\n /**\n * Add an event handler. Supported events:\n *\n * - `reduceMotionChanged`: Fires when the state of the reduce motion toggle changes.\n * The argument to the event handler is a boolean. The boolean is `true` when a reduce\n * motion is enabled (or when \"Transition Animation Scale\" in \"Developer options\" is\n * \"Animation off\") and `false` otherwise.\n * - `screenReaderChanged`: Fires when the state of the screen reader changes. The argument\n * to the event handler is a boolean. The boolean is `true` when a screen\n * reader is enabled and `false` otherwise.\n *\n * These events are only supported on iOS:\n *\n * - `boldTextChanged`: iOS-only event. Fires when the state of the bold text toggle changes.\n * The argument to the event handler is a boolean. The boolean is `true` when a bold text\n * is enabled and `false` otherwise.\n * - `grayscaleChanged`: iOS-only event. Fires when the state of the gray scale toggle changes.\n * The argument to the event handler is a boolean. The boolean is `true` when a gray scale\n * is enabled and `false` otherwise.\n * - `invertColorsChanged`: iOS-only event. Fires when the state of the invert colors toggle\n * changes. The argument to the event handler is a boolean. The boolean is `true` when a invert\n * colors is enabled and `false` otherwise.\n * - `reduceTransparencyChanged`: iOS-only event. Fires when the state of the reduce transparency\n * toggle changes. The argument to the event handler is a boolean. The boolean is `true`\n * when a reduce transparency is enabled and `false` otherwise.\n * - `announcementFinished`: iOS-only event. Fires when the screen reader has\n * finished making an announcement. The argument to the event handler is a\n * dictionary with these keys:\n * - `announcement`: The string announced by the screen reader.\n * - `success`: A boolean indicating whether the announcement was\n * successfully made.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#addeventlistener\n */\n addEventListener>(\n eventName: K,\n // $FlowIssue[incompatible-type] - Flow bug with unions and generics (T128099423)\n handler: (...$ElementType) => void,\n ): EventSubscription {\n const deviceEventName = EventNames.get(eventName);\n return deviceEventName == null\n ? {remove(): void {}}\n : // $FlowFixMe[incompatible-call]\n RCTDeviceEventEmitter.addListener(deviceEventName, handler);\n },\n\n /**\n * Set accessibility focus to a React component.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#setaccessibilityfocus\n */\n setAccessibilityFocus(reactTag: number): void {\n legacySendAccessibilityEvent(reactTag, 'focus');\n },\n\n /**\n * Send a named accessibility event to a HostComponent.\n */\n sendAccessibilityEvent(\n handle: ElementRef>,\n eventType: AccessibilityEventTypes,\n ) {\n // iOS only supports 'focus' event types\n if (Platform.OS === 'ios' && eventType === 'click') {\n return;\n }\n // route through React renderer to distinguish between Fabric and non-Fabric handles\n sendAccessibilityEvent(handle, eventType);\n },\n\n /**\n * Post a string to be announced by the screen reader.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#announceforaccessibility\n */\n announceForAccessibility(announcement: string): void {\n if (Platform.OS === 'android') {\n NativeAccessibilityInfoAndroid?.announceForAccessibility(announcement);\n } else {\n NativeAccessibilityManagerIOS?.announceForAccessibility(announcement);\n }\n },\n\n /**\n * Post a string to be announced by the screen reader.\n * - `announcement`: The string announced by the screen reader.\n * - `options`: An object that configures the reading options.\n * - `queue`: The announcement will be queued behind existing announcements. iOS only.\n */\n announceForAccessibilityWithOptions(\n announcement: string,\n options: {queue?: boolean},\n ): void {\n if (Platform.OS === 'android') {\n NativeAccessibilityInfoAndroid?.announceForAccessibility(announcement);\n } else {\n if (NativeAccessibilityManagerIOS?.announceForAccessibilityWithOptions) {\n NativeAccessibilityManagerIOS?.announceForAccessibilityWithOptions(\n announcement,\n options,\n );\n } else {\n NativeAccessibilityManagerIOS?.announceForAccessibility(announcement);\n }\n }\n },\n\n /**\n * Get the recommended timeout for changes to the UI needed by this user.\n *\n * See https://reactnative.dev/docs/accessibilityinfo#getrecommendedtimeoutmillis\n */\n getRecommendedTimeoutMillis(originalTimeout: number): Promise {\n if (Platform.OS === 'android') {\n return new Promise((resolve, reject) => {\n if (NativeAccessibilityInfoAndroid?.getRecommendedTimeoutMillis) {\n NativeAccessibilityInfoAndroid.getRecommendedTimeoutMillis(\n originalTimeout,\n resolve,\n );\n } else {\n resolve(originalTimeout);\n }\n });\n } else {\n return Promise.resolve(originalTimeout);\n }\n },\n};\n\nexport default AccessibilityInfo;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {IEventEmitter} from '../vendor/emitter/EventEmitter';\n\nimport {beginEvent, endEvent} from '../Performance/Systrace';\nimport EventEmitter from '../vendor/emitter/EventEmitter';\n\n// FIXME: use typed events\ntype RCTDeviceEventDefinitions = $FlowFixMe;\n\n/**\n * Global EventEmitter used by the native platform to emit events to JavaScript.\n * Events are identified by globally unique event names.\n *\n * NativeModules that emit events should instead subclass `NativeEventEmitter`.\n */\nclass RCTDeviceEventEmitter extends EventEmitter {\n // Add systrace to RCTDeviceEventEmitter.emit method for debugging\n emit>(\n eventType: TEvent,\n ...args: RCTDeviceEventDefinitions[TEvent]\n ): void {\n beginEvent(() => `RCTDeviceEventEmitter.emit#${eventType}`);\n super.emit(eventType, ...args);\n endEvent();\n }\n}\nconst instance = new RCTDeviceEventEmitter();\n\nObject.defineProperty(global, '__rctDeviceEventEmitter', {\n configurable: true,\n value: instance,\n});\n\nexport default (instance: IEventEmitter);\n","var superPropBase = require(\"./superPropBase.js\");\nfunction _get() {\n return module.exports = _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n var p = superPropBase(e, t);\n if (p) {\n var n = Object.getOwnPropertyDescriptor(p, t);\n return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n }\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _get.apply(null, arguments);\n}\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var getPrototypeOf = require(\"./getPrototypeOf.js\");\nfunction _superPropBase(t, o) {\n for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t)););\n return t;\n}\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport interface EventSubscription {\n remove(): void;\n}\n\nexport interface IEventEmitter {\n addListener>(\n eventType: TEvent,\n listener: (...args: TEventToArgsMap[TEvent]) => mixed,\n context?: mixed,\n ): EventSubscription;\n\n emit>(\n eventType: TEvent,\n ...args: TEventToArgsMap[TEvent]\n ): void;\n\n removeAllListeners>(eventType?: ?TEvent): void;\n\n listenerCount>(eventType: TEvent): number;\n}\n\ninterface Registration {\n +context: mixed;\n +listener: (...args: TArgs) => mixed;\n +remove: () => void;\n}\n\n// $FlowFixMe[deprecated-type]\ntype Registry = $ObjMap<\n TEventToArgsMap,\n (TArgs) => Set>,\n>;\n\n/**\n * EventEmitter manages listeners and publishes events to them.\n *\n * EventEmitter accepts a single type parameter that defines the valid events\n * and associated listener argument(s).\n *\n * @example\n *\n * const emitter = new EventEmitter<{\n * success: [number, string],\n * error: [Error],\n * }>();\n *\n * emitter.on('success', (statusCode, responseText) => {...});\n * emitter.emit('success', 200, '...');\n *\n * emitter.on('error', error => {...});\n * emitter.emit('error', new Error('Resource not found'));\n *\n */\nexport default class EventEmitter\n implements IEventEmitter\n{\n #registry: Registry = {};\n\n /**\n * Registers a listener that is called when the supplied event is emitted.\n * Returns a subscription that has a `remove` method to undo registration.\n */\n addListener>(\n eventType: TEvent,\n listener: (...args: TEventToArgsMap[TEvent]) => mixed,\n context: mixed,\n ): EventSubscription {\n if (typeof listener !== 'function') {\n throw new TypeError(\n 'EventEmitter.addListener(...): 2nd argument must be a function.',\n );\n }\n const registrations = allocate<\n TEventToArgsMap,\n TEvent,\n TEventToArgsMap[TEvent],\n >(this.#registry, eventType);\n const registration: Registration = {\n context,\n listener,\n remove(): void {\n registrations.delete(registration);\n },\n };\n registrations.add(registration);\n return registration;\n }\n\n /**\n * Emits the supplied event. Additional arguments supplied to `emit` will be\n * passed through to each of the registered listeners.\n *\n * If a listener modifies the listeners registered for the same event, those\n * changes will not be reflected in the current invocation of `emit`.\n */\n emit>(\n eventType: TEvent,\n ...args: TEventToArgsMap[TEvent]\n ): void {\n const registrations: ?Set> =\n this.#registry[eventType];\n if (registrations != null) {\n // Copy `registrations` to take a snapshot when we invoke `emit`, in case\n // registrations are added or removed when listeners are invoked.\n for (const registration of Array.from(registrations)) {\n registration.listener.apply(registration.context, args);\n }\n }\n }\n\n /**\n * Removes all registered listeners.\n */\n removeAllListeners>(\n eventType?: ?TEvent,\n ): void {\n if (eventType == null) {\n this.#registry = {};\n } else {\n delete this.#registry[eventType];\n }\n }\n\n /**\n * Returns the number of registered listeners for the supplied event.\n */\n listenerCount>(eventType: TEvent): number {\n const registrations: ?Set> = this.#registry[eventType];\n return registrations == null ? 0 : registrations.size;\n }\n}\n\nfunction allocate<\n TEventToArgsMap: {...},\n TEvent: $Keys,\n TEventArgs: TEventToArgsMap[TEvent],\n>(\n registry: Registry,\n eventType: TEvent,\n): Set> {\n let registrations: ?Set> = registry[eventType];\n if (registrations == null) {\n registrations = new Set();\n registry[eventType] = registrations;\n }\n return registrations;\n}\n","function _classPrivateFieldBase(e, t) {\n if (!{}.hasOwnProperty.call(e, t)) throw new TypeError(\"attempted to use private field on non-instance\");\n return e;\n}\nmodule.exports = _classPrivateFieldBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var id = 0;\nfunction _classPrivateFieldKey(e) {\n return \"__private_\" + id++ + \"_\" + e;\n}\nmodule.exports = _classPrivateFieldKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {\n Platform as PlatformType,\n PlatformSelectSpec,\n} from './Platform.flow';\n\nimport NativePlatformConstantsAndroid from './NativePlatformConstantsAndroid';\n\nconst Platform: PlatformType = {\n __constants: null,\n OS: 'android',\n // $FlowFixMe[unsafe-getters-setters]\n get Version(): number {\n // $FlowFixMe[object-this-reference]\n return this.constants.Version;\n },\n // $FlowFixMe[unsafe-getters-setters]\n get constants(): {|\n isTesting: boolean,\n isDisableAnimations?: boolean,\n reactNativeVersion: {|\n major: number,\n minor: number,\n patch: number,\n prerelease: ?string,\n |},\n Version: number,\n Release: string,\n Serial: string,\n Fingerprint: string,\n Model: string,\n ServerHost?: string,\n uiMode: string,\n Brand: string,\n Manufacturer: string,\n |} {\n // $FlowFixMe[object-this-reference]\n if (this.__constants == null) {\n // $FlowFixMe[object-this-reference]\n this.__constants = NativePlatformConstantsAndroid.getConstants();\n }\n // $FlowFixMe[object-this-reference]\n return this.__constants;\n },\n // $FlowFixMe[unsafe-getters-setters]\n get isTesting(): boolean {\n if (__DEV__) {\n // $FlowFixMe[object-this-reference]\n return this.constants.isTesting;\n }\n return false;\n },\n // $FlowFixMe[unsafe-getters-setters]\n get isDisableAnimations(): boolean {\n // $FlowFixMe[object-this-reference]\n return this.constants.isDisableAnimations ?? this.isTesting;\n },\n // $FlowFixMe[unsafe-getters-setters]\n get isTV(): boolean {\n // $FlowFixMe[object-this-reference]\n return this.constants.uiMode === 'tv';\n },\n // $FlowFixMe[unsafe-getters-setters]\n get isVision(): boolean {\n return false;\n },\n select: (spec: PlatformSelectSpec): T =>\n 'android' in spec\n ? // $FlowFixMe[incompatible-return]\n spec.android\n : 'native' in spec\n ? // $FlowFixMe[incompatible-return]\n spec.native\n : // $FlowFixMe[incompatible-return]\n spec.default,\n};\n\nmodule.exports = Platform;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativePlatformConstantsAndroid';\nimport NativePlatformConstantsAndroid from '../../src/private/specs/modules/NativePlatformConstantsAndroid';\nexport default NativePlatformConstantsAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type ReactNativeVersionAndroid = {|\n major: number,\n minor: number,\n patch: number,\n prerelease: ?string,\n|};\n\nexport type PlatformConstantsAndroid = {|\n isTesting: boolean,\n isDisableAnimations?: boolean,\n reactNativeVersion: ReactNativeVersionAndroid,\n Version: number,\n Release: string,\n Serial: string,\n Fingerprint: string,\n Model: string,\n ServerHost?: string,\n uiMode: string,\n Brand: string,\n Manufacturer: string,\n|};\n\nexport interface Spec extends TurboModule {\n +getConstants: () => PlatformConstantsAndroid;\n +getAndroidID: () => string;\n}\n\nexport default (TurboModuleRegistry.getEnforcing(\n 'PlatformConstants',\n): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from './RCTExport';\n\nimport invariant from 'invariant';\n\nconst NativeModules = require('../BatchedBridge/NativeModules');\n\nconst turboModuleProxy = global.__turboModuleProxy;\n\nconst moduleLoadHistory = {\n NativeModules: ([]: Array),\n TurboModules: ([]: Array),\n NotFound: ([]: Array),\n};\n\nfunction isBridgeless() {\n return global.RN$Bridgeless === true;\n}\n\nfunction isTurboModuleInteropEnabled() {\n return global.RN$TurboInterop === true;\n}\n\n// TODO(154308585): Remove \"module not found\" debug info logging\nfunction shouldReportDebugInfo() {\n return true;\n}\n\n// TODO(148943970): Consider reversing the lookup here:\n// Lookup on __turboModuleProxy, then lookup on nativeModuleProxy\nfunction requireModule(name: string): ?T {\n if (!isBridgeless() || isTurboModuleInteropEnabled()) {\n // Backward compatibility layer during migration.\n const legacyModule = NativeModules[name];\n if (legacyModule != null) {\n if (shouldReportDebugInfo()) {\n moduleLoadHistory.NativeModules.push(name);\n }\n return ((legacyModule: $FlowFixMe): T);\n }\n }\n\n if (turboModuleProxy != null) {\n const module: ?T = turboModuleProxy(name);\n if (module != null) {\n if (shouldReportDebugInfo()) {\n moduleLoadHistory.TurboModules.push(name);\n }\n return module;\n }\n }\n\n if (shouldReportDebugInfo() && !moduleLoadHistory.NotFound.includes(name)) {\n moduleLoadHistory.NotFound.push(name);\n }\n return null;\n}\n\nexport function get(name: string): ?T {\n return requireModule(name);\n}\n\nexport function getEnforcing(name: string): T {\n const module = requireModule(name);\n let message =\n `TurboModuleRegistry.getEnforcing(...): '${name}' could not be found. ` +\n 'Verify that a module by this name is registered in the native binary.';\n\n if (shouldReportDebugInfo()) {\n message +=\n ' Bridgeless mode: ' + (isBridgeless() ? 'true' : 'false') + '. ';\n message +=\n 'TurboModule interop: ' +\n (isTurboModuleInteropEnabled() ? 'true' : 'false') +\n '. ';\n message += 'Modules loaded: ' + JSON.stringify(moduleLoadHistory);\n }\n\n invariant(module != null, message);\n return module;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nimport type {ExtendedError} from '../Core/ExtendedError';\n\nconst BatchedBridge = require('./BatchedBridge');\nconst invariant = require('invariant');\n\nexport type ModuleConfig = [\n string /* name */,\n ?{...} /* constants */,\n ?$ReadOnlyArray /* functions */,\n ?$ReadOnlyArray /* promise method IDs */,\n ?$ReadOnlyArray /* sync method IDs */,\n];\n\nexport type MethodType = 'async' | 'promise' | 'sync';\n\nfunction genModule(\n config: ?ModuleConfig,\n moduleID: number,\n): ?{\n name: string,\n module?: {...},\n ...\n} {\n if (!config) {\n return null;\n }\n\n const [moduleName, constants, methods, promiseMethods, syncMethods] = config;\n invariant(\n !moduleName.startsWith('RCT') && !moduleName.startsWith('RK'),\n \"Module name prefixes should've been stripped by the native side \" +\n \"but wasn't for \" +\n moduleName,\n );\n\n if (!constants && !methods) {\n // Module contents will be filled in lazily later\n return {name: moduleName};\n }\n\n const module: {[string]: mixed} = {};\n methods &&\n methods.forEach((methodName, methodID) => {\n const isPromise =\n (promiseMethods && arrayContains(promiseMethods, methodID)) || false;\n const isSync =\n (syncMethods && arrayContains(syncMethods, methodID)) || false;\n invariant(\n !isPromise || !isSync,\n 'Cannot have a method that is both async and a sync hook',\n );\n const methodType = isPromise ? 'promise' : isSync ? 'sync' : 'async';\n module[methodName] = genMethod(moduleID, methodID, methodType);\n });\n\n Object.assign(module, constants);\n\n if (module.getConstants == null) {\n module.getConstants = () => constants || Object.freeze({});\n } else {\n console.warn(\n `Unable to define method 'getConstants()' on NativeModule '${moduleName}'. NativeModule '${moduleName}' already has a constant or method called 'getConstants'. Please remove it.`,\n );\n }\n\n if (__DEV__) {\n BatchedBridge.createDebugLookup(moduleID, moduleName, methods);\n }\n\n return {name: moduleName, module};\n}\n\n// export this method as a global so we can call it from native\nglobal.__fbGenNativeModule = genModule;\n\nfunction loadModule(name: string, moduleID: number): ?{...} {\n invariant(\n global.nativeRequireModuleConfig,\n \"Can't lazily create module without nativeRequireModuleConfig\",\n );\n const config = global.nativeRequireModuleConfig(name);\n const info = genModule(config, moduleID);\n return info && info.module;\n}\n\nfunction genMethod(moduleID: number, methodID: number, type: MethodType) {\n let fn = null;\n if (type === 'promise') {\n fn = function promiseMethodWrapper(...args: Array) {\n // In case we reject, capture a useful stack trace here.\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n const enqueueingFrameError: ExtendedError = new Error();\n return new Promise((resolve, reject) => {\n BatchedBridge.enqueueNativeCall(\n moduleID,\n methodID,\n args,\n data => resolve(data),\n errorData =>\n reject(\n updateErrorWithErrorData(\n (errorData: $FlowFixMe),\n enqueueingFrameError,\n ),\n ),\n );\n });\n };\n } else {\n fn = function nonPromiseMethodWrapper(...args: Array) {\n const lastArg = args.length > 0 ? args[args.length - 1] : null;\n const secondLastArg = args.length > 1 ? args[args.length - 2] : null;\n const hasSuccessCallback = typeof lastArg === 'function';\n const hasErrorCallback = typeof secondLastArg === 'function';\n hasErrorCallback &&\n invariant(\n hasSuccessCallback,\n 'Cannot have a non-function arg after a function arg.',\n );\n // $FlowFixMe[incompatible-type]\n const onSuccess: ?(mixed) => void = hasSuccessCallback ? lastArg : null;\n // $FlowFixMe[incompatible-type]\n const onFail: ?(mixed) => void = hasErrorCallback ? secondLastArg : null;\n // $FlowFixMe[unsafe-addition]\n const callbackCount = hasSuccessCallback + hasErrorCallback;\n const newArgs = args.slice(0, args.length - callbackCount);\n if (type === 'sync') {\n return BatchedBridge.callNativeSyncHook(\n moduleID,\n methodID,\n newArgs,\n onFail,\n onSuccess,\n );\n } else {\n BatchedBridge.enqueueNativeCall(\n moduleID,\n methodID,\n newArgs,\n onFail,\n onSuccess,\n );\n }\n };\n }\n // $FlowFixMe[prop-missing]\n fn.type = type;\n return fn;\n}\n\nfunction arrayContains(array: $ReadOnlyArray, value: T): boolean {\n return array.indexOf(value) !== -1;\n}\n\nfunction updateErrorWithErrorData(\n errorData: {message: string, ...},\n error: ExtendedError,\n): ExtendedError {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for this\n * parameters */\n return Object.assign(error, errorData || {});\n}\n\nlet NativeModules: {[moduleName: string]: $FlowFixMe, ...} = {};\nif (global.nativeModuleProxy) {\n NativeModules = global.nativeModuleProxy;\n} else {\n const bridgeConfig = global.__fbBatchedBridgeConfig;\n invariant(\n bridgeConfig,\n '__fbBatchedBridgeConfig is not set, cannot invoke native modules',\n );\n\n const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty');\n (bridgeConfig.remoteModuleConfig || []).forEach(\n (config: ModuleConfig, moduleID: number) => {\n // Initially this config will only contain the module name when running in JSC. The actual\n // configuration of the module will be lazily loaded.\n const info = genModule(config, moduleID);\n if (!info) {\n return;\n }\n\n if (info.module) {\n NativeModules[info.name] = info.module;\n }\n // If there's no module config, define a lazy getter\n else {\n defineLazyObjectProperty(NativeModules, info.name, {\n get: () => loadModule(info.name, moduleID),\n });\n }\n },\n );\n}\n\nmodule.exports = NativeModules;\n","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\n/**\n * Defines a lazily evaluated property on the supplied `object`.\n */\nfunction defineLazyObjectProperty(\n object: interface {},\n name: string,\n descriptor: {\n get: () => T,\n enumerable?: boolean,\n writable?: boolean,\n ...\n },\n): void {\n const {get} = descriptor;\n const enumerable = descriptor.enumerable !== false;\n const writable = descriptor.writable !== false;\n\n let value;\n let valueSet = false;\n function getValue(): T {\n // WORKAROUND: A weird infinite loop occurs where calling `getValue` calls\n // `setValue` which calls `Object.defineProperty` which somehow triggers\n // `getValue` again. Adding `valueSet` breaks this loop.\n if (!valueSet) {\n // Calling `get()` here can trigger an infinite loop if it fails to\n // remove the getter on the property, which can happen when executing\n // JS in a V8 context. `valueSet = true` will break this loop, and\n // sets the value of the property to undefined, until the code in `get()`\n // finishes, at which point the property is set to the correct value.\n valueSet = true;\n setValue(get());\n }\n return value;\n }\n function setValue(newValue: T): void {\n value = newValue;\n valueSet = true;\n Object.defineProperty(object, name, {\n value: newValue,\n configurable: true,\n enumerable,\n writable,\n });\n }\n\n Object.defineProperty(object, name, {\n get: getValue,\n set: setValue,\n configurable: true,\n enumerable,\n });\n}\n\nmodule.exports = defineLazyObjectProperty;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport UIManager from '../../ReactNative/UIManager';\nimport nullthrows from 'nullthrows';\n\n/**\n * This is a function exposed to the React Renderer that can be used by the\n * pre-Fabric renderer to emit accessibility events to pre-Fabric nodes.\n */\nfunction legacySendAccessibilityEvent(\n reactTag: number,\n eventType: string,\n): void {\n if (eventType === 'focus') {\n nullthrows(UIManager.sendAccessibilityEvent)(\n reactTag,\n UIManager.getConstants().AccessibilityEventTypes.typeViewFocused,\n );\n }\n if (eventType === 'click') {\n nullthrows(UIManager.sendAccessibilityEvent)(\n reactTag,\n UIManager.getConstants().AccessibilityEventTypes.typeViewClicked,\n );\n }\n}\n\nmodule.exports = legacySendAccessibilityEvent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {UIManagerJSInterface} from '../Types/UIManagerJSInterface';\n\nimport {getFabricUIManager} from './FabricUIManager';\nimport nullthrows from 'nullthrows';\n\nfunction isFabricReactTag(reactTag: number): boolean {\n // React reserves even numbers for Fabric.\n return reactTag % 2 === 0;\n}\n\nconst UIManagerImpl: UIManagerJSInterface =\n global.RN$Bridgeless === true\n ? require('./BridgelessUIManager')\n : require('./PaperUIManager');\n\n// $FlowFixMe[cannot-spread-interface]\nconst UIManager: UIManagerJSInterface = {\n ...UIManagerImpl,\n measure(\n reactTag: number,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n pageX: number,\n pageY: number,\n ) => void,\n ): void {\n if (isFabricReactTag(reactTag)) {\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n if (shadowNode) {\n FabricUIManager.measure(shadowNode, callback);\n } else {\n console.warn(`measure cannot find view with tag #${reactTag}`);\n // $FlowFixMe[incompatible-call]\n callback();\n }\n } else {\n // Paper\n UIManagerImpl.measure(reactTag, callback);\n }\n },\n\n measureInWindow(\n reactTag: number,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ): void {\n if (isFabricReactTag(reactTag)) {\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n if (shadowNode) {\n FabricUIManager.measureInWindow(shadowNode, callback);\n } else {\n console.warn(`measure cannot find view with tag #${reactTag}`);\n // $FlowFixMe[incompatible-call]\n callback();\n }\n } else {\n // Paper\n UIManagerImpl.measureInWindow(reactTag, callback);\n }\n },\n\n measureLayout(\n reactTag: number,\n ancestorReactTag: number,\n errorCallback: (error: Object) => void,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ): void {\n if (isFabricReactTag(reactTag)) {\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n const ancestorShadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(ancestorReactTag);\n\n if (!shadowNode || !ancestorShadowNode) {\n return;\n }\n\n FabricUIManager.measureLayout(\n shadowNode,\n ancestorShadowNode,\n errorCallback,\n callback,\n );\n } else {\n // Paper\n UIManagerImpl.measureLayout(\n reactTag,\n ancestorReactTag,\n errorCallback,\n callback,\n );\n }\n },\n\n measureLayoutRelativeToParent(\n reactTag: number,\n errorCallback: (error: Object) => void,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ): void {\n if (isFabricReactTag(reactTag)) {\n console.warn(\n 'RCTUIManager.measureLayoutRelativeToParent method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450',\n );\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n if (shadowNode) {\n FabricUIManager.measure(\n shadowNode,\n (left, top, width, height, pageX, pageY) => {\n callback(left, top, width, height);\n },\n );\n }\n } else {\n // Paper\n UIManagerImpl.measureLayoutRelativeToParent(\n reactTag,\n errorCallback,\n callback,\n );\n }\n },\n\n dispatchViewManagerCommand(\n reactTag: number,\n commandName: number | string,\n commandArgs: any[],\n ) {\n // Sometimes, libraries directly pass in the output of `findNodeHandle` to\n // this function without checking if it's null. This guards against that\n // case. We throw early here in Javascript so we can get a JS stacktrace\n // instead of a harder-to-debug native Java or Objective-C stacktrace.\n if (typeof reactTag !== 'number') {\n throw new Error('dispatchViewManagerCommand: found null reactTag');\n }\n\n if (isFabricReactTag(reactTag)) {\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n if (shadowNode) {\n // Transform the accidental CommandID into a CommandName which is the stringified number.\n // The interop layer knows how to convert this number into the right method name.\n // Stringify a string is a no-op, so it's safe.\n commandName = `${commandName}`;\n FabricUIManager.dispatchCommand(shadowNode, commandName, commandArgs);\n }\n } else {\n UIManagerImpl.dispatchViewManagerCommand(\n reactTag,\n // We have some legacy components that are actually already using strings. ¯\\_(ツ)_/¯\n // $FlowFixMe[incompatible-call]\n commandName,\n commandArgs,\n );\n }\n },\n};\n\nmodule.exports = UIManager;\n","'use strict';\n\nfunction nullthrows(x, message) {\n if (x != null) {\n return x;\n }\n var error = new Error(message !== undefined ? message : 'Got unexpected ' + x);\n error.framesToPop = 1; // Skip nullthrows's own stack frame.\n throw error;\n}\n\nmodule.exports = nullthrows;\nmodule.exports.default = nullthrows;\n\nObject.defineProperty(module.exports, '__esModule', {value: true});\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {RootTag} from '../Types/RootTagTypes';\nimport type {UIManagerJSInterface} from '../Types/UIManagerJSInterface';\n\nimport {unstable_hasComponent} from '../NativeComponent/NativeComponentRegistryUnstable';\nimport defineLazyObjectProperty from '../Utilities/defineLazyObjectProperty';\nimport Platform from '../Utilities/Platform';\nimport {getFabricUIManager} from './FabricUIManager';\nimport nullthrows from 'nullthrows';\n\nfunction raiseSoftError(methodName: string, details?: string): void {\n console.error(\n `[ReactNative Architecture][JS] '${methodName}' is not available in the new React Native architecture.` +\n (details ? ` ${details}` : ''),\n );\n}\n\nconst getUIManagerConstants: ?() => {[viewManagerName: string]: Object} =\n global.RN$LegacyInterop_UIManager_getConstants;\n\nconst getUIManagerConstantsCached = (function () {\n let wasCalledOnce = false;\n let result = {};\n return (): {[viewManagerName: string]: Object} => {\n if (!wasCalledOnce) {\n result = nullthrows(getUIManagerConstants)();\n wasCalledOnce = true;\n }\n return result;\n };\n})();\n\nconst getConstantsForViewManager: ?(viewManagerName: string) => ?Object =\n global.RN$LegacyInterop_UIManager_getConstantsForViewManager;\n\nconst getDefaultEventTypes: ?() => Object =\n global.RN$LegacyInterop_UIManager_getDefaultEventTypes;\n\nconst getDefaultEventTypesCached = (function () {\n let wasCalledOnce = false;\n let result = null;\n return (): Object => {\n if (!wasCalledOnce) {\n result = nullthrows(getDefaultEventTypes)();\n wasCalledOnce = true;\n }\n return result;\n };\n})();\n\n/**\n * UIManager.js overrides these APIs.\n * Pull them out from the BridgelessUIManager implementation. So, we can ignore them.\n */\nconst UIManagerJSOverridenAPIs = {\n measure: (\n reactTag: number,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n pageX: number,\n pageY: number,\n ) => void,\n ): void => {\n raiseSoftError('measure');\n },\n measureInWindow: (\n reactTag: number,\n callback: (x: number, y: number, width: number, height: number) => void,\n ): void => {\n raiseSoftError('measureInWindow');\n },\n measureLayout: (\n reactTag: number,\n ancestorReactTag: number,\n errorCallback: (error: Object) => void,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ): void => {\n raiseSoftError('measureLayout');\n },\n measureLayoutRelativeToParent: (\n reactTag: number,\n errorCallback: (error: Object) => void,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ): void => {\n raiseSoftError('measureLayoutRelativeToParent');\n },\n dispatchViewManagerCommand: (\n reactTag: number,\n commandID: number,\n commandArgs: ?Array,\n ): void => {\n raiseSoftError('dispatchViewManagerCommand');\n },\n};\n\n/**\n * Leave Unimplemented: The only thing that called these methods was the paper renderer.\n * In OSS, the New Architecture will just use the Fabric renderer, which uses\n * different APIs.\n */\nconst UIManagerJSUnusedInNewArchAPIs = {\n createView: (\n reactTag: number,\n viewName: string,\n rootTag: RootTag,\n props: Object,\n ): void => {\n raiseSoftError('createView');\n },\n updateView: (reactTag: number, viewName: string, props: Object): void => {\n raiseSoftError('updateView');\n },\n setChildren: (containerTag: number, reactTags: Array): void => {\n raiseSoftError('setChildren');\n },\n manageChildren: (\n containerTag: number,\n moveFromIndices: Array,\n moveToIndices: Array,\n addChildReactTags: Array,\n addAtIndices: Array,\n removeAtIndices: Array,\n ): void => {\n raiseSoftError('manageChildren');\n },\n setJSResponder: (reactTag: number, blockNativeResponder: boolean): void => {\n raiseSoftError('setJSResponder');\n },\n clearJSResponder: (): void => {\n raiseSoftError('clearJSResponder');\n },\n};\n\n/**\n * Leave unimplemented: These APIs are deprecated in UIManager. We will eventually remove\n * them from React Native.\n */\nconst UIManagerJSDeprecatedPlatformAPIs = Platform.select({\n android: {},\n});\n\nconst UIManagerJSPlatformAPIs = Platform.select({\n android: {\n getConstantsForViewManager: (viewManagerName: string): ?Object => {\n if (getConstantsForViewManager) {\n return getConstantsForViewManager(viewManagerName);\n }\n\n raiseSoftError('getConstantsForViewManager');\n return {};\n },\n getDefaultEventTypes: (): Array => {\n if (getDefaultEventTypes) {\n return getDefaultEventTypesCached();\n }\n\n raiseSoftError('getDefaultEventTypes');\n return [];\n },\n setLayoutAnimationEnabledExperimental: (enabled: boolean): void => {\n /**\n * Layout animations are always enabled in the New Architecture.\n * They cannot be turned off.\n */\n if (!enabled) {\n raiseSoftError(\n 'setLayoutAnimationEnabledExperimental(false)',\n 'Layout animations are always enabled in the New Architecture.',\n );\n }\n },\n sendAccessibilityEvent: (reactTag: number, eventType: number): void => {\n // Keep this in sync with java:FabricUIManager.sendAccessibilityEventFromJS\n // and legacySendAccessibilityEvent.android.js\n const AccessibilityEvent = {\n TYPE_VIEW_FOCUSED: 0x00000008,\n TYPE_WINDOW_STATE_CHANGED: 0x00000020,\n TYPE_VIEW_CLICKED: 0x00000001,\n TYPE_VIEW_HOVER_ENTER: 0x00000080,\n };\n\n let eventName = null;\n if (eventType === AccessibilityEvent.TYPE_VIEW_FOCUSED) {\n eventName = 'focus';\n } else if (eventType === AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {\n eventName = 'windowStateChange';\n } else if (eventType === AccessibilityEvent.TYPE_VIEW_CLICKED) {\n eventName = 'click';\n } else if (eventType === AccessibilityEvent.TYPE_VIEW_HOVER_ENTER) {\n eventName = 'viewHoverEnter';\n } else {\n console.error(\n `sendAccessibilityEvent() dropping event: Called with unsupported eventType: ${eventType}`,\n );\n return;\n }\n\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n if (!shadowNode) {\n console.error(\n `sendAccessibilityEvent() dropping event: Cannot find view with tag #${reactTag}`,\n );\n return;\n }\n\n FabricUIManager.sendAccessibilityEvent(shadowNode, eventName);\n },\n },\n ios: {\n /**\n * TODO(T174674274): Implement lazy loading of legacy view managers in the new architecture.\n *\n * Leave this unimplemented until we implement lazy loading of legacy modules and view managers in the new architecture.\n */\n lazilyLoadView: (name: string): Object => {\n raiseSoftError('lazilyLoadView');\n return {};\n },\n focus: (reactTag: number): void => {\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n if (!shadowNode) {\n console.error(`focus() noop: Cannot find view with tag #${reactTag}`);\n return;\n }\n FabricUIManager.dispatchCommand(shadowNode, 'focus', []);\n },\n blur: (reactTag: number): void => {\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n if (!shadowNode) {\n console.error(`blur() noop: Cannot find view with tag #${reactTag}`);\n return;\n }\n FabricUIManager.dispatchCommand(shadowNode, 'blur', []);\n },\n },\n});\n\nconst UIManagerJS: UIManagerJSInterface & {[string]: any} = {\n ...UIManagerJSOverridenAPIs,\n ...UIManagerJSDeprecatedPlatformAPIs,\n ...UIManagerJSPlatformAPIs,\n ...UIManagerJSUnusedInNewArchAPIs,\n getViewManagerConfig: (viewManagerName: string): mixed => {\n if (getUIManagerConstants) {\n const constants = getUIManagerConstantsCached();\n if (\n !constants[viewManagerName] &&\n UIManagerJS.getConstantsForViewManager\n ) {\n constants[viewManagerName] =\n UIManagerJS.getConstantsForViewManager(viewManagerName);\n }\n return constants[viewManagerName];\n } else {\n raiseSoftError(\n `getViewManagerConfig('${viewManagerName}')`,\n `If '${viewManagerName}' has a ViewManager and you want to retrieve its native ViewConfig, please turn on the native ViewConfig interop layer. If you want to see if this component is registered with React Native, please call hasViewManagerConfig('${viewManagerName}') instead.`,\n );\n return null;\n }\n },\n hasViewManagerConfig: (viewManagerName: string): boolean => {\n return unstable_hasComponent(viewManagerName);\n },\n getConstants: (): Object => {\n if (getUIManagerConstants) {\n return getUIManagerConstantsCached();\n } else {\n raiseSoftError('getConstants');\n return null;\n }\n },\n findSubviewIn: (\n reactTag: number,\n point: Array,\n callback: (\n nativeViewTag: number,\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ): void => {\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode = FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n\n if (!shadowNode) {\n console.error(\n `findSubviewIn() noop: Cannot find view with reactTag ${reactTag}`,\n );\n return;\n }\n\n FabricUIManager.findNodeAtPoint(\n shadowNode,\n point[0],\n point[1],\n function (internalInstanceHandle) {\n if (internalInstanceHandle == null) {\n console.error('findSubviewIn(): Cannot find node at point');\n return;\n }\n\n let instanceHandle: Object = internalInstanceHandle;\n let node = instanceHandle.stateNode.node;\n\n if (!node) {\n console.error('findSubviewIn(): Cannot find node at point');\n return;\n }\n\n let nativeViewTag: number =\n instanceHandle.stateNode.canonical.nativeTag;\n\n FabricUIManager.measure(\n node,\n function (x, y, width, height, pageX, pageY) {\n callback(nativeViewTag, pageX, pageY, width, height);\n },\n );\n },\n );\n },\n viewIsDescendantOf: (\n reactTag: number,\n ancestorReactTag: number,\n callback: (result: Array) => void,\n ): void => {\n const FabricUIManager = nullthrows(getFabricUIManager());\n const shadowNode = FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);\n if (!shadowNode) {\n console.error(\n `viewIsDescendantOf() noop: Cannot find view with reactTag ${reactTag}`,\n );\n return;\n }\n\n const ancestorShadowNode =\n FabricUIManager.findShadowNodeByTag_DEPRECATED(ancestorReactTag);\n if (!ancestorShadowNode) {\n console.error(\n `viewIsDescendantOf() noop: Cannot find view with ancestorReactTag ${ancestorReactTag}`,\n );\n return;\n }\n\n // Keep this in sync with ReadOnlyNode.js\n const DOCUMENT_POSITION_CONTAINED_BY = 16;\n\n let result = FabricUIManager.compareDocumentPosition(\n ancestorShadowNode,\n shadowNode,\n );\n\n let isAncestor = (result & DOCUMENT_POSITION_CONTAINED_BY) !== 0;\n\n callback([isAncestor]);\n },\n configureNextLayoutAnimation: (\n config: Object,\n callback: () => void,\n errorCallback: (error: Object) => void,\n ): void => {\n const FabricUIManager = nullthrows(getFabricUIManager());\n FabricUIManager.configureNextLayoutAnimation(\n config,\n callback,\n errorCallback,\n );\n },\n};\n\nif (getUIManagerConstants) {\n Object.keys(getUIManagerConstantsCached()).forEach(viewConfigName => {\n UIManagerJS[viewConfigName] = getUIManagerConstantsCached()[viewConfigName];\n });\n\n if (UIManagerJS.getConstants().ViewManagerNames) {\n UIManagerJS.getConstants().ViewManagerNames.forEach(viewManagerName => {\n defineLazyObjectProperty(UIManagerJS, viewManagerName, {\n get: () =>\n nullthrows(UIManagerJS.getConstantsForViewManager)(viewManagerName),\n });\n });\n }\n}\n\nmodule.exports = UIManagerJS;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nimport type {\n InternalInstanceHandle,\n LayoutAnimationConfig,\n MeasureInWindowOnSuccessCallback,\n MeasureLayoutOnSuccessCallback,\n MeasureOnSuccessCallback,\n Node,\n} from '../Renderer/shims/ReactNativeTypes';\nimport type {RootTag} from '../Types/RootTagTypes';\n\nimport defineLazyObjectProperty from '../Utilities/defineLazyObjectProperty';\n\nexport type NodeSet = Array;\nexport type NodeProps = {...};\nexport interface Spec {\n +createNode: (\n reactTag: number,\n viewName: string,\n rootTag: RootTag,\n props: NodeProps,\n instanceHandle: InternalInstanceHandle,\n ) => Node;\n +cloneNode: (node: Node) => Node;\n +cloneNodeWithNewChildren: (node: Node) => Node;\n +cloneNodeWithNewProps: (node: Node, newProps: NodeProps) => Node;\n +cloneNodeWithNewChildrenAndProps: (node: Node, newProps: NodeProps) => Node;\n +createChildSet: (rootTag: RootTag) => NodeSet;\n +appendChild: (parentNode: Node, child: Node) => Node;\n +appendChildToSet: (childSet: NodeSet, child: Node) => void;\n +completeRoot: (rootTag: RootTag, childSet: NodeSet) => void;\n +measure: (node: Node, callback: MeasureOnSuccessCallback) => void;\n +measureInWindow: (\n node: Node,\n callback: MeasureInWindowOnSuccessCallback,\n ) => void;\n +measureLayout: (\n node: Node,\n relativeNode: Node,\n onFail: () => void,\n onSuccess: MeasureLayoutOnSuccessCallback,\n ) => void;\n +configureNextLayoutAnimation: (\n config: LayoutAnimationConfig,\n callback: () => void, // check what is returned here\n errorCallback: () => void,\n ) => void;\n +sendAccessibilityEvent: (node: Node, eventType: string) => void;\n +findShadowNodeByTag_DEPRECATED: (reactTag: number) => ?Node;\n +setNativeProps: (node: Node, newProps: NodeProps) => void;\n +dispatchCommand: (\n node: Node,\n commandName: string,\n args: Array,\n ) => void;\n +findNodeAtPoint: (\n node: Node,\n locationX: number,\n locationY: number,\n callback: (instanceHandle: ?InternalInstanceHandle) => void,\n ) => void;\n +compareDocumentPosition: (node: Node, otherNode: Node) => number;\n +getBoundingClientRect: (\n node: Node,\n includeTransform: boolean,\n ) => ?[\n /* x: */ number,\n /* y: */ number,\n /* width: */ number,\n /* height: */ number,\n ];\n}\n\nlet nativeFabricUIManagerProxy: ?Spec;\n\n// This is a list of all the methods in global.nativeFabricUIManager that we'll\n// cache in JavaScript, as the current implementation of the binding\n// creates a new host function every time methods are accessed.\nconst CACHED_PROPERTIES = [\n 'createNode',\n 'cloneNode',\n 'cloneNodeWithNewChildren',\n 'cloneNodeWithNewProps',\n 'cloneNodeWithNewChildrenAndProps',\n 'createChildSet',\n 'appendChild',\n 'appendChildToSet',\n 'completeRoot',\n 'measure',\n 'measureInWindow',\n 'measureLayout',\n 'configureNextLayoutAnimation',\n 'sendAccessibilityEvent',\n 'findShadowNodeByTag_DEPRECATED',\n 'setNativeProps',\n 'dispatchCommand',\n 'compareDocumentPosition',\n 'getBoundingClientRect',\n];\n\n// This is exposed as a getter because apps using the legacy renderer AND\n// Fabric can define the binding lazily. If we evaluated the global and cached\n// it in the module we might be caching an `undefined` value before it is set.\nexport function getFabricUIManager(): ?Spec {\n if (\n nativeFabricUIManagerProxy == null &&\n global.nativeFabricUIManager != null\n ) {\n nativeFabricUIManagerProxy = createProxyWithCachedProperties(\n global.nativeFabricUIManager,\n CACHED_PROPERTIES,\n );\n }\n return nativeFabricUIManagerProxy;\n}\n\n/**\n *\n * Returns an object that caches the specified properties the first time they\n * are accessed, and falls back to the original object for other properties.\n */\nfunction createProxyWithCachedProperties(\n implementation: Spec,\n propertiesToCache: $ReadOnlyArray,\n): Spec {\n const proxy = Object.create(implementation);\n for (const propertyName of propertiesToCache) {\n defineLazyObjectProperty(proxy, propertyName, {\n // $FlowExpectedError[prop-missing]\n get: () => implementation[propertyName],\n });\n }\n return proxy;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nlet componentNameToExists: Map = new Map();\n\n/**\n * Unstable API. Do not use!\n *\n * This method returns if the component with name received as a parameter\n * is registered in the native platform.\n */\nexport function unstable_hasComponent(name: string): boolean {\n let hasNativeComponent = componentNameToExists.get(name);\n if (hasNativeComponent == null) {\n if (global.__nativeComponentRegistry__hasComponent) {\n hasNativeComponent = global.__nativeComponentRegistry__hasComponent(name);\n componentNameToExists.set(name, hasNativeComponent);\n } else {\n throw `unstable_hasComponent('${name}'): Global function is not registered`;\n }\n }\n return hasNativeComponent;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {RootTag} from '../Types/RootTagTypes';\nimport type {UIManagerJSInterface} from '../Types/UIManagerJSInterface';\n\nimport NativeUIManager from './NativeUIManager';\nimport nullthrows from 'nullthrows';\n\nconst NativeModules = require('../BatchedBridge/NativeModules');\nconst defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty');\nconst Platform = require('../Utilities/Platform');\nconst UIManagerProperties = require('./UIManagerProperties');\n\nconst viewManagerConfigs: {[string]: any | null} = {};\n\nconst triedLoadingConfig = new Set();\n\nlet NativeUIManagerConstants = {};\nlet isNativeUIManagerConstantsSet = false;\nfunction getConstants(): Object {\n if (!isNativeUIManagerConstantsSet) {\n NativeUIManagerConstants = NativeUIManager.getConstants();\n isNativeUIManagerConstantsSet = true;\n }\n return NativeUIManagerConstants;\n}\n\nfunction getViewManagerConfig(viewManagerName: string): any {\n if (\n viewManagerConfigs[viewManagerName] === undefined &&\n global.nativeCallSyncHook && // If we're in the Chrome Debugger, let's not even try calling the sync method\n NativeUIManager.getConstantsForViewManager\n ) {\n try {\n viewManagerConfigs[viewManagerName] =\n NativeUIManager.getConstantsForViewManager(viewManagerName);\n } catch (e) {\n console.error(\n \"NativeUIManager.getConstantsForViewManager('\" +\n viewManagerName +\n \"') threw an exception.\",\n e,\n );\n viewManagerConfigs[viewManagerName] = null;\n }\n }\n\n const config = viewManagerConfigs[viewManagerName];\n if (config) {\n return config;\n }\n\n // If we're in the Chrome Debugger, let's not even try calling the sync\n // method.\n if (!global.nativeCallSyncHook) {\n return config;\n }\n\n if (\n NativeUIManager.lazilyLoadView &&\n !triedLoadingConfig.has(viewManagerName)\n ) {\n const result = nullthrows(NativeUIManager.lazilyLoadView)(viewManagerName);\n triedLoadingConfig.add(viewManagerName);\n if (result != null && result.viewConfig != null) {\n getConstants()[viewManagerName] = result.viewConfig;\n lazifyViewManagerConfig(viewManagerName);\n }\n }\n\n return viewManagerConfigs[viewManagerName];\n}\n\n// $FlowFixMe[cannot-spread-interface]\nconst UIManagerJS: UIManagerJSInterface = {\n ...NativeUIManager,\n createView(\n reactTag: number,\n viewName: string,\n rootTag: RootTag,\n props: Object,\n ): void {\n if (Platform.OS === 'ios' && viewManagerConfigs[viewName] === undefined) {\n // This is necessary to force the initialization of native viewManager\n // classes in iOS when using static ViewConfigs\n getViewManagerConfig(viewName);\n }\n\n NativeUIManager.createView(reactTag, viewName, rootTag, props);\n },\n getConstants(): Object {\n return getConstants();\n },\n getViewManagerConfig(viewManagerName: string): any {\n return getViewManagerConfig(viewManagerName);\n },\n hasViewManagerConfig(viewManagerName: string): boolean {\n return getViewManagerConfig(viewManagerName) != null;\n },\n};\n\n// TODO (T45220498): Remove this.\n// 3rd party libs may be calling `NativeModules.UIManager.getViewManagerConfig()`\n// instead of `UIManager.getViewManagerConfig()` off UIManager.js.\n// This is a workaround for now.\n// $FlowFixMe[prop-missing]\nNativeUIManager.getViewManagerConfig = UIManagerJS.getViewManagerConfig;\n\nfunction lazifyViewManagerConfig(viewName: string) {\n const viewConfig = getConstants()[viewName];\n viewManagerConfigs[viewName] = viewConfig;\n if (viewConfig.Manager) {\n defineLazyObjectProperty(viewConfig, 'Constants', {\n get: () => {\n const viewManager = NativeModules[viewConfig.Manager];\n const constants: {[string]: mixed} = {};\n viewManager &&\n Object.keys(viewManager).forEach(key => {\n const value = viewManager[key];\n if (typeof value !== 'function') {\n constants[key] = value;\n }\n });\n return constants;\n },\n });\n defineLazyObjectProperty(viewConfig, 'Commands', {\n get: () => {\n const viewManager = NativeModules[viewConfig.Manager];\n const commands: {[string]: number} = {};\n let index = 0;\n viewManager &&\n Object.keys(viewManager).forEach(key => {\n const value = viewManager[key];\n if (typeof value === 'function') {\n commands[key] = index++;\n }\n });\n return commands;\n },\n });\n }\n}\n\n/**\n * Copies the ViewManager constants and commands into UIManager. This is\n * only needed for iOS, which puts the constants in the ViewManager\n * namespace instead of UIManager, unlike Android.\n */\nif (Platform.OS === 'ios') {\n Object.keys(getConstants()).forEach(viewName => {\n lazifyViewManagerConfig(viewName);\n });\n} else if (getConstants().ViewManagerNames) {\n NativeUIManager.getConstants().ViewManagerNames.forEach(viewManagerName => {\n defineLazyObjectProperty(NativeUIManager, viewManagerName, {\n get: () =>\n nullthrows(NativeUIManager.getConstantsForViewManager)(viewManagerName),\n });\n });\n}\n\nif (!global.nativeCallSyncHook) {\n Object.keys(getConstants()).forEach(viewManagerName => {\n if (!UIManagerProperties.includes(viewManagerName)) {\n if (!viewManagerConfigs[viewManagerName]) {\n viewManagerConfigs[viewManagerName] = getConstants()[viewManagerName];\n }\n defineLazyObjectProperty(NativeUIManager, viewManagerName, {\n get: () => {\n console.warn(\n `Accessing view manager configs directly off UIManager via UIManager['${viewManagerName}'] ` +\n `is no longer supported. Use UIManager.getViewManagerConfig('${viewManagerName}') instead.`,\n );\n\n return UIManagerJS.getViewManagerConfig(viewManagerName);\n },\n });\n }\n });\n}\n\nmodule.exports = UIManagerJS;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeUIManager';\nimport NativeUIManager from '../../src/private/specs/modules/NativeUIManager';\nexport default NativeUIManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {RootTag} from '../../../../Libraries/TurboModule/RCTExport';\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getConstants: () => Object;\n +createView: (\n reactTag: number,\n viewName: string,\n rootTag: RootTag,\n props: Object,\n ) => void;\n +updateView: (reactTag: number, viewName: string, props: Object) => void;\n +findSubviewIn: (\n reactTag: number,\n point: Array,\n callback: (\n nativeViewTag: number,\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ) => void;\n +dispatchViewManagerCommand: (\n reactTag: number,\n commandID: number, // number || string\n commandArgs: ?Array,\n ) => void;\n +measure: (\n reactTag: number,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n pageX: number,\n pageY: number,\n ) => void,\n ) => void;\n +measureInWindow: (\n reactTag: number,\n callback: (x: number, y: number, width: number, height: number) => void,\n ) => void;\n +viewIsDescendantOf: (\n reactTag: number,\n ancestorReactTag: number,\n callback: (result: Array) => void,\n ) => void;\n +measureLayout: (\n reactTag: number,\n ancestorReactTag: number,\n errorCallback: (error: Object) => void,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ) => void;\n +measureLayoutRelativeToParent: (\n reactTag: number,\n errorCallback: (error: Object) => void,\n callback: (\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void,\n ) => void;\n +setJSResponder: (reactTag: number, blockNativeResponder: boolean) => void;\n +clearJSResponder: () => void;\n +configureNextLayoutAnimation: (\n config: Object,\n callback: () => void, // check what is returned here\n errorCallback: (error: Object) => void,\n ) => void;\n +setChildren: (containerTag: number, reactTags: Array) => void;\n +manageChildren: (\n containerTag: number,\n moveFromIndices: Array,\n moveToIndices: Array,\n addChildReactTags: Array,\n addAtIndices: Array,\n removeAtIndices: Array,\n ) => void;\n\n // Android only\n +getConstantsForViewManager?: (viewManagerName: string) => ?Object;\n +getDefaultEventTypes?: () => Array;\n +setLayoutAnimationEnabledExperimental?: (enabled: boolean) => void;\n +sendAccessibilityEvent?: (reactTag: number, eventType: number) => void;\n\n // ios only\n +lazilyLoadView?: (name: string) => Object; // revisit return\n +focus?: (reactTag: number) => void;\n +blur?: (reactTag: number) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('UIManager'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\n/**\n * The list of non-ViewManager related UIManager properties.\n *\n * In an effort to improve startup performance by lazily loading view managers,\n * the interface to access view managers will change from\n * UIManager['viewManagerName'] to UIManager.getViewManagerConfig('viewManagerName').\n * By using a function call instead of a property access, the UIManager will\n * be able to initialize and load the required view manager from native\n * synchronously. All of React Native's core components have been updated to\n * use getViewManagerConfig(). For the next few releases, any usage of\n * UIManager['viewManagerName'] will result in a warning. Because React Native\n * does not support Proxy objects, a view manager access is implied if any of\n * UIManager's properties that are not one of the properties below is being\n * accessed. Once UIManager property accesses for view managers has been fully\n * deprecated, this file will also be removed.\n */\nmodule.exports = [\n 'clearJSResponder',\n 'configureNextLayoutAnimation',\n 'createView',\n 'dispatchViewManagerCommand',\n 'findSubviewIn',\n 'getConstantsForViewManager',\n 'getDefaultEventTypes',\n 'manageChildren',\n 'measure',\n 'measureInWindow',\n 'measureLayout',\n 'measureLayoutRelativeToParent',\n 'removeRootView',\n 'sendAccessibilityEvent',\n 'setChildren',\n 'setJSResponder',\n 'setLayoutAnimationEnabledExperimental',\n 'updateView',\n 'viewIsDescendantOf',\n 'LazyViewManagersEnabled',\n 'ViewManagerNames',\n 'StyleConstants',\n 'AccessibilityEventTypes',\n 'UIView',\n 'getViewManagerConfig',\n 'hasViewManagerConfig',\n 'blur',\n 'focus',\n 'genericBubblingEventTypes',\n 'genericDirectEventTypes',\n 'lazilyLoadView',\n];\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeAccessibilityInfo';\nimport NativeAccessibilityInfo from '../../../src/private/specs/modules/NativeAccessibilityInfo';\nexport default NativeAccessibilityInfo;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +isReduceMotionEnabled: (\n onSuccess: (isReduceMotionEnabled: boolean) => void,\n ) => void;\n +isTouchExplorationEnabled: (\n onSuccess: (isScreenReaderEnabled: boolean) => void,\n ) => void;\n +isAccessibilityServiceEnabled?: ?(\n onSuccess: (isAccessibilityServiceEnabled: boolean) => void,\n ) => void;\n +setAccessibilityFocus: (reactTag: number) => void;\n +announceForAccessibility: (announcement: string) => void;\n +getRecommendedTimeoutMillis?: (\n mSec: number,\n onSuccess: (recommendedTimeoutMillis: number) => void,\n ) => void;\n}\n\nexport default (TurboModuleRegistry.get('AccessibilityInfo'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeAccessibilityManager';\nimport NativeAccessibilityManager from '../../../src/private/specs/modules/NativeAccessibilityManager';\nexport default NativeAccessibilityManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getCurrentBoldTextState: (\n onSuccess: (isBoldTextEnabled: boolean) => void,\n onError: (error: Object) => void,\n ) => void;\n +getCurrentGrayscaleState: (\n onSuccess: (isGrayscaleEnabled: boolean) => void,\n onError: (error: Object) => void,\n ) => void;\n +getCurrentInvertColorsState: (\n onSuccess: (isInvertColorsEnabled: boolean) => void,\n onError: (error: Object) => void,\n ) => void;\n +getCurrentReduceMotionState: (\n onSuccess: (isReduceMotionEnabled: boolean) => void,\n onError: (error: Object) => void,\n ) => void;\n +getCurrentPrefersCrossFadeTransitionsState?: (\n onSuccess: (prefersCrossFadeTransitions: boolean) => void,\n onError: (error: Object) => void,\n ) => void;\n +getCurrentReduceTransparencyState: (\n onSuccess: (isReduceTransparencyEnabled: boolean) => void,\n onError: (error: Object) => void,\n ) => void;\n +getCurrentVoiceOverState: (\n onSuccess: (isScreenReaderEnabled: boolean) => void,\n onError: (error: Object) => void,\n ) => void;\n +setAccessibilityContentSizeMultipliers: (JSMultipliers: {|\n +extraSmall?: ?number,\n +small?: ?number,\n +medium?: ?number,\n +large?: ?number,\n +extraLarge?: ?number,\n +extraExtraLarge?: ?number,\n +extraExtraExtraLarge?: ?number,\n +accessibilityMedium?: ?number,\n +accessibilityLarge?: ?number,\n +accessibilityExtraLarge?: ?number,\n +accessibilityExtraExtraLarge?: ?number,\n +accessibilityExtraExtraExtraLarge?: ?number,\n |}) => void;\n +setAccessibilityFocus: (reactTag: number) => void;\n +announceForAccessibility: (announcement: string) => void;\n +announceForAccessibilityWithOptions?: (\n announcement: string,\n options: {queue?: boolean},\n ) => void;\n}\n\nexport default (TurboModuleRegistry.get('AccessibilityManager'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n/**\n * This module exists to allow apps to select their renderer implementation\n * (e.g.: Fabric-only, Paper-only) without having to pull all the renderer\n * implementations into their app bundle, which affects app size.\n *\n * By default, the setup will be:\n * -> RendererProxy\n * -> RendererImplementation (which uses Fabric or Paper depending on a flag at runtime)\n *\n * But this will allow a setup like this without duplicating logic:\n * -> RendererProxy (fork)\n * -> RendererImplementation (which uses Fabric or Paper depending on a flag at runtime)\n * or -> OtherImplementation (which uses Fabric only)\n */\n\nexport * from './RendererImplementation';\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {HostComponent} from '../Renderer/shims/ReactNativeTypes';\nimport type ReactFabricHostComponent from './ReactFabricPublicInstance/ReactFabricHostComponent';\nimport type {Element, ElementRef, ElementType} from 'react';\n\nimport {\n onCaughtError,\n onRecoverableError,\n onUncaughtError,\n} from '../Core/ErrorHandlers';\nimport {type RootTag} from './RootTag';\nexport function renderElement({\n element,\n rootTag,\n useFabric,\n useConcurrentRoot,\n}: {\n element: Element,\n rootTag: number,\n useFabric: boolean,\n useConcurrentRoot: boolean,\n}): void {\n if (useFabric) {\n require('../Renderer/shims/ReactFabric').render(\n element,\n rootTag,\n null,\n useConcurrentRoot,\n {\n onCaughtError,\n onUncaughtError,\n onRecoverableError,\n },\n );\n } else {\n require('../Renderer/shims/ReactNative').render(\n element,\n rootTag,\n undefined,\n {\n onCaughtError,\n onUncaughtError,\n onRecoverableError,\n },\n );\n }\n}\n\nexport function findHostInstance_DEPRECATED(\n componentOrHandle: ?(ElementRef | number),\n): ?ElementRef> {\n return require('../Renderer/shims/ReactNative').findHostInstance_DEPRECATED(\n componentOrHandle,\n );\n}\n\nexport function findNodeHandle(\n componentOrHandle: ?(ElementRef | number),\n): ?number {\n return require('../Renderer/shims/ReactNative').findNodeHandle(\n componentOrHandle,\n );\n}\n\nexport function dispatchCommand(\n handle: ElementRef>,\n command: string,\n args: Array,\n): void {\n if (global.RN$Bridgeless === true) {\n // Note: this function has the same implementation in the legacy and new renderer.\n // However, evaluating the old renderer comes with some side effects.\n return require('../Renderer/shims/ReactFabric').dispatchCommand(\n handle,\n command,\n args,\n );\n } else {\n return require('../Renderer/shims/ReactNative').dispatchCommand(\n handle,\n command,\n args,\n );\n }\n}\n\nexport function sendAccessibilityEvent(\n handle: ElementRef>,\n eventType: string,\n): void {\n return require('../Renderer/shims/ReactNative').sendAccessibilityEvent(\n handle,\n eventType,\n );\n}\n\n/**\n * This method is used by AppRegistry to unmount a root when using the old\n * React Native renderer (Paper).\n */\nexport function unmountComponentAtNodeAndRemoveContainer(rootTag: RootTag) {\n // $FlowExpectedError[incompatible-type] rootTag is an opaque type so we can't really cast it as is.\n const rootTagAsNumber: number = rootTag;\n require('../Renderer/shims/ReactNative').unmountComponentAtNodeAndRemoveContainer(\n rootTagAsNumber,\n );\n}\n\nexport function unstable_batchedUpdates(\n fn: T => void,\n bookkeeping: T,\n): void {\n // This doesn't actually do anything when batching updates for a Fabric root.\n return require('../Renderer/shims/ReactNative').unstable_batchedUpdates(\n fn,\n bookkeeping,\n );\n}\n\nexport function isProfilingRenderer(): boolean {\n return Boolean(__DEV__);\n}\n\nexport function isChildPublicInstance(\n parentInstance: ReactFabricHostComponent | HostComponent,\n childInstance: ReactFabricHostComponent | HostComponent,\n): boolean {\n return require('../Renderer/shims/ReactNative').isChildPublicInstance(\n parentInstance,\n childInstance,\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @noformat\n * @nolint\n * @flow\n * @generated SignedSource<>\n */\n\n'use strict';\n\nimport {BatchedBridge} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface';\n\nimport type {ReactFabricType} from './ReactNativeTypes';\n\nlet ReactFabric;\n\nif (__DEV__) {\n ReactFabric = require('../implementations/ReactFabric-dev');\n} else {\n ReactFabric = require('../implementations/ReactFabric-prod');\n}\n\nglobal.RN$stopSurface = ReactFabric.stopSurface;\n\nif (global.RN$Bridgeless !== true) {\n BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);\n}\n\nmodule.exports = (ReactFabric: ReactFabricType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @noflow\n * @nolint\n * @providesModule ReactFabric-prod\n * @preventMunge\n * @generated SignedSource<<9a40170807089a671035525b144e9dcd>>\n */\n\n\"use strict\";\nrequire(\"react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore\");\nvar ReactNativePrivateInterface = require(\"react-native/Libraries/ReactPrivate/ReactNativePrivateInterface\"),\n React = require(\"react\"),\n Scheduler = require(\"scheduler\"),\n isArrayImpl = Array.isArray,\n hasError = !1,\n caughtError = null,\n getFiberCurrentPropsFromNode$1 = null,\n getInstanceFromNode$1 = null,\n getNodeFromInstance$1 = null;\nfunction executeDispatch(event, listener, inst) {\n event.currentTarget = getNodeFromInstance$1(inst);\n try {\n listener(event);\n } catch (error) {\n hasError || ((hasError = !0), (caughtError = error));\n }\n event.currentTarget = null;\n}\nfunction executeDirectDispatch(event) {\n var dispatchListener = event._dispatchListeners,\n dispatchInstance = event._dispatchInstances;\n if (isArrayImpl(dispatchListener)) throw Error(\"Invalid `event`.\");\n event.currentTarget = dispatchListener\n ? getNodeFromInstance$1(dispatchInstance)\n : null;\n dispatchListener = dispatchListener ? dispatchListener(event) : null;\n event.currentTarget = null;\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n return dispatchListener;\n}\nvar assign = Object.assign;\nfunction functionThatReturnsTrue() {\n return !0;\n}\nfunction functionThatReturnsFalse() {\n return !1;\n}\nfunction SyntheticEvent(\n dispatchConfig,\n targetInst,\n nativeEvent,\n nativeEventTarget\n) {\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n this._dispatchInstances = this._dispatchListeners = null;\n dispatchConfig = this.constructor.Interface;\n for (var propName in dispatchConfig)\n dispatchConfig.hasOwnProperty(propName) &&\n ((targetInst = dispatchConfig[propName])\n ? (this[propName] = targetInst(nativeEvent))\n : \"target\" === propName\n ? (this.target = nativeEventTarget)\n : (this[propName] = nativeEvent[propName]));\n this.isDefaultPrevented = (\n null != nativeEvent.defaultPrevented\n ? nativeEvent.defaultPrevented\n : !1 === nativeEvent.returnValue\n )\n ? functionThatReturnsTrue\n : functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n}\nassign(SyntheticEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = !0;\n var event = this.nativeEvent;\n event &&\n (event.preventDefault\n ? event.preventDefault()\n : \"unknown\" !== typeof event.returnValue && (event.returnValue = !1),\n (this.isDefaultPrevented = functionThatReturnsTrue));\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n event &&\n (event.stopPropagation\n ? event.stopPropagation()\n : \"unknown\" !== typeof event.cancelBubble && (event.cancelBubble = !0),\n (this.isPropagationStopped = functionThatReturnsTrue));\n },\n persist: function () {\n this.isPersistent = functionThatReturnsTrue;\n },\n isPersistent: functionThatReturnsFalse,\n destructor: function () {\n var Interface = this.constructor.Interface,\n propName;\n for (propName in Interface) this[propName] = null;\n this.nativeEvent = this._targetInst = this.dispatchConfig = null;\n this.isPropagationStopped = this.isDefaultPrevented =\n functionThatReturnsFalse;\n this._dispatchInstances = this._dispatchListeners = null;\n }\n});\nSyntheticEvent.Interface = {\n type: null,\n target: null,\n currentTarget: function () {\n return null;\n },\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\nSyntheticEvent.extend = function (Interface) {\n function E() {}\n function Class() {\n return Super.apply(this, arguments);\n }\n var Super = this;\n E.prototype = Super.prototype;\n var prototype = new E();\n assign(prototype, Class.prototype);\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n Class.Interface = assign({}, Super.Interface, Interface);\n Class.extend = Super.extend;\n addEventPoolingTo(Class);\n return Class;\n};\naddEventPoolingTo(SyntheticEvent);\nfunction createOrGetPooledEvent(\n dispatchConfig,\n targetInst,\n nativeEvent,\n nativeInst\n) {\n if (this.eventPool.length) {\n var instance = this.eventPool.pop();\n this.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);\n return instance;\n }\n return new this(dispatchConfig, targetInst, nativeEvent, nativeInst);\n}\nfunction releasePooledEvent(event) {\n if (!(event instanceof this))\n throw Error(\n \"Trying to release an event instance into a pool of a different type.\"\n );\n event.destructor();\n 10 > this.eventPool.length && this.eventPool.push(event);\n}\nfunction addEventPoolingTo(EventConstructor) {\n EventConstructor.getPooled = createOrGetPooledEvent;\n EventConstructor.eventPool = [];\n EventConstructor.release = releasePooledEvent;\n}\nvar ResponderSyntheticEvent = SyntheticEvent.extend({\n touchHistory: function () {\n return null;\n }\n});\nfunction isStartish(topLevelType) {\n return \"topTouchStart\" === topLevelType;\n}\nfunction isMoveish(topLevelType) {\n return \"topTouchMove\" === topLevelType;\n}\nvar startDependencies = [\"topTouchStart\"],\n moveDependencies = [\"topTouchMove\"],\n endDependencies = [\"topTouchCancel\", \"topTouchEnd\"],\n touchBank = [],\n touchHistory = {\n touchBank: touchBank,\n numberActiveTouches: 0,\n indexOfSingleActiveTouch: -1,\n mostRecentTimeStamp: 0\n };\nfunction timestampForTouch(touch) {\n return touch.timeStamp || touch.timestamp;\n}\nfunction getTouchIdentifier(_ref) {\n _ref = _ref.identifier;\n if (null == _ref) throw Error(\"Touch object is missing identifier.\");\n return _ref;\n}\nfunction recordTouchStart(touch) {\n var identifier = getTouchIdentifier(touch),\n touchRecord = touchBank[identifier];\n touchRecord\n ? ((touchRecord.touchActive = !0),\n (touchRecord.startPageX = touch.pageX),\n (touchRecord.startPageY = touch.pageY),\n (touchRecord.startTimeStamp = timestampForTouch(touch)),\n (touchRecord.currentPageX = touch.pageX),\n (touchRecord.currentPageY = touch.pageY),\n (touchRecord.currentTimeStamp = timestampForTouch(touch)),\n (touchRecord.previousPageX = touch.pageX),\n (touchRecord.previousPageY = touch.pageY),\n (touchRecord.previousTimeStamp = timestampForTouch(touch)))\n : ((touchRecord = {\n touchActive: !0,\n startPageX: touch.pageX,\n startPageY: touch.pageY,\n startTimeStamp: timestampForTouch(touch),\n currentPageX: touch.pageX,\n currentPageY: touch.pageY,\n currentTimeStamp: timestampForTouch(touch),\n previousPageX: touch.pageX,\n previousPageY: touch.pageY,\n previousTimeStamp: timestampForTouch(touch)\n }),\n (touchBank[identifier] = touchRecord));\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n}\nfunction recordTouchMove(touch) {\n var touchRecord = touchBank[getTouchIdentifier(touch)];\n touchRecord &&\n ((touchRecord.touchActive = !0),\n (touchRecord.previousPageX = touchRecord.currentPageX),\n (touchRecord.previousPageY = touchRecord.currentPageY),\n (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),\n (touchRecord.currentPageX = touch.pageX),\n (touchRecord.currentPageY = touch.pageY),\n (touchRecord.currentTimeStamp = timestampForTouch(touch)),\n (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));\n}\nfunction recordTouchEnd(touch) {\n var touchRecord = touchBank[getTouchIdentifier(touch)];\n touchRecord &&\n ((touchRecord.touchActive = !1),\n (touchRecord.previousPageX = touchRecord.currentPageX),\n (touchRecord.previousPageY = touchRecord.currentPageY),\n (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),\n (touchRecord.currentPageX = touch.pageX),\n (touchRecord.currentPageY = touch.pageY),\n (touchRecord.currentTimeStamp = timestampForTouch(touch)),\n (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));\n}\nvar instrumentationCallback,\n ResponderTouchHistoryStore = {\n instrument: function (callback) {\n instrumentationCallback = callback;\n },\n recordTouchTrack: function (topLevelType, nativeEvent) {\n null != instrumentationCallback &&\n instrumentationCallback(topLevelType, nativeEvent);\n if (isMoveish(topLevelType))\n nativeEvent.changedTouches.forEach(recordTouchMove);\n else if (isStartish(topLevelType))\n nativeEvent.changedTouches.forEach(recordTouchStart),\n (touchHistory.numberActiveTouches = nativeEvent.touches.length),\n 1 === touchHistory.numberActiveTouches &&\n (touchHistory.indexOfSingleActiveTouch =\n nativeEvent.touches[0].identifier);\n else if (\n \"topTouchEnd\" === topLevelType ||\n \"topTouchCancel\" === topLevelType\n )\n if (\n (nativeEvent.changedTouches.forEach(recordTouchEnd),\n (touchHistory.numberActiveTouches = nativeEvent.touches.length),\n 1 === touchHistory.numberActiveTouches)\n )\n for (\n topLevelType = 0;\n topLevelType < touchBank.length;\n topLevelType++\n )\n if (\n ((nativeEvent = touchBank[topLevelType]),\n null != nativeEvent && nativeEvent.touchActive)\n ) {\n touchHistory.indexOfSingleActiveTouch = topLevelType;\n break;\n }\n },\n touchHistory: touchHistory\n };\nfunction accumulate(current, next) {\n if (null == next)\n throw Error(\"Accumulated items must not be null or undefined.\");\n return null == current\n ? next\n : isArrayImpl(current)\n ? current.concat(next)\n : isArrayImpl(next)\n ? [current].concat(next)\n : [current, next];\n}\nfunction accumulateInto(current, next) {\n if (null == next)\n throw Error(\"Accumulated items must not be null or undefined.\");\n if (null == current) return next;\n if (isArrayImpl(current)) {\n if (isArrayImpl(next)) return current.push.apply(current, next), current;\n current.push(next);\n return current;\n }\n return isArrayImpl(next) ? [current].concat(next) : [current, next];\n}\nfunction forEachAccumulated(arr, cb, scope) {\n Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);\n}\nvar responderInst = null,\n trackedTouchCount = 0;\nfunction changeResponder(nextResponderInst, blockHostResponder) {\n var oldResponderInst = responderInst;\n responderInst = nextResponderInst;\n if (null !== ResponderEventPlugin.GlobalResponderHandler)\n ResponderEventPlugin.GlobalResponderHandler.onChange(\n oldResponderInst,\n nextResponderInst,\n blockHostResponder\n );\n}\nvar eventTypes = {\n startShouldSetResponder: {\n phasedRegistrationNames: {\n bubbled: \"onStartShouldSetResponder\",\n captured: \"onStartShouldSetResponderCapture\"\n },\n dependencies: startDependencies\n },\n scrollShouldSetResponder: {\n phasedRegistrationNames: {\n bubbled: \"onScrollShouldSetResponder\",\n captured: \"onScrollShouldSetResponderCapture\"\n },\n dependencies: [\"topScroll\"]\n },\n selectionChangeShouldSetResponder: {\n phasedRegistrationNames: {\n bubbled: \"onSelectionChangeShouldSetResponder\",\n captured: \"onSelectionChangeShouldSetResponderCapture\"\n },\n dependencies: [\"topSelectionChange\"]\n },\n moveShouldSetResponder: {\n phasedRegistrationNames: {\n bubbled: \"onMoveShouldSetResponder\",\n captured: \"onMoveShouldSetResponderCapture\"\n },\n dependencies: moveDependencies\n },\n responderStart: {\n registrationName: \"onResponderStart\",\n dependencies: startDependencies\n },\n responderMove: {\n registrationName: \"onResponderMove\",\n dependencies: moveDependencies\n },\n responderEnd: {\n registrationName: \"onResponderEnd\",\n dependencies: endDependencies\n },\n responderRelease: {\n registrationName: \"onResponderRelease\",\n dependencies: endDependencies\n },\n responderTerminationRequest: {\n registrationName: \"onResponderTerminationRequest\",\n dependencies: []\n },\n responderGrant: { registrationName: \"onResponderGrant\", dependencies: [] },\n responderReject: { registrationName: \"onResponderReject\", dependencies: [] },\n responderTerminate: {\n registrationName: \"onResponderTerminate\",\n dependencies: []\n }\n};\nfunction getParent$1(inst) {\n do inst = inst.return;\n while (inst && 5 !== inst.tag);\n return inst ? inst : null;\n}\nfunction traverseTwoPhase$1(inst, fn, arg) {\n for (var path = []; inst; ) path.push(inst), (inst = getParent$1(inst));\n for (inst = path.length; 0 < inst--; ) fn(path[inst], \"captured\", arg);\n for (inst = 0; inst < path.length; inst++) fn(path[inst], \"bubbled\", arg);\n}\nfunction getListener$1(inst, registrationName) {\n inst = inst.stateNode;\n if (null === inst) return null;\n inst = getFiberCurrentPropsFromNode$1(inst);\n if (null === inst) return null;\n if ((inst = inst[registrationName]) && \"function\" !== typeof inst)\n throw Error(\n \"Expected `\" +\n registrationName +\n \"` listener to be a function, instead got a value of `\" +\n typeof inst +\n \"` type.\"\n );\n return inst;\n}\nfunction accumulateDirectionalDispatches$1(inst, phase, event) {\n if (\n (phase = getListener$1(\n inst,\n event.dispatchConfig.phasedRegistrationNames[phase]\n ))\n )\n (event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n phase\n )),\n (event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst\n ));\n}\nfunction accumulateDirectDispatchesSingle$1(event) {\n if (event && event.dispatchConfig.registrationName) {\n var inst = event._targetInst;\n if (inst && event && event.dispatchConfig.registrationName) {\n var listener = getListener$1(inst, event.dispatchConfig.registrationName);\n listener &&\n ((event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n listener\n )),\n (event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst\n )));\n }\n }\n}\nfunction accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n targetInst = targetInst ? getParent$1(targetInst) : null;\n traverseTwoPhase$1(targetInst, accumulateDirectionalDispatches$1, event);\n }\n}\nfunction accumulateTwoPhaseDispatchesSingle$1(event) {\n event &&\n event.dispatchConfig.phasedRegistrationNames &&\n traverseTwoPhase$1(\n event._targetInst,\n accumulateDirectionalDispatches$1,\n event\n );\n}\nvar ResponderEventPlugin = {\n _getResponder: function () {\n return responderInst;\n },\n eventTypes: eventTypes,\n extractEvents: function (\n topLevelType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n ) {\n if (isStartish(topLevelType)) trackedTouchCount += 1;\n else if (\n \"topTouchEnd\" === topLevelType ||\n \"topTouchCancel\" === topLevelType\n )\n if (0 <= trackedTouchCount) --trackedTouchCount;\n else return null;\n ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);\n if (\n targetInst &&\n ((\"topScroll\" === topLevelType && !nativeEvent.responderIgnoreScroll) ||\n (0 < trackedTouchCount && \"topSelectionChange\" === topLevelType) ||\n isStartish(topLevelType) ||\n isMoveish(topLevelType))\n ) {\n var shouldSetEventType = isStartish(topLevelType)\n ? eventTypes.startShouldSetResponder\n : isMoveish(topLevelType)\n ? eventTypes.moveShouldSetResponder\n : \"topSelectionChange\" === topLevelType\n ? eventTypes.selectionChangeShouldSetResponder\n : eventTypes.scrollShouldSetResponder;\n if (responderInst)\n b: {\n var JSCompiler_temp = responderInst;\n for (\n var depthA = 0, tempA = JSCompiler_temp;\n tempA;\n tempA = getParent$1(tempA)\n )\n depthA++;\n tempA = 0;\n for (var tempB = targetInst; tempB; tempB = getParent$1(tempB))\n tempA++;\n for (; 0 < depthA - tempA; )\n (JSCompiler_temp = getParent$1(JSCompiler_temp)), depthA--;\n for (; 0 < tempA - depthA; )\n (targetInst = getParent$1(targetInst)), tempA--;\n for (; depthA--; ) {\n if (\n JSCompiler_temp === targetInst ||\n JSCompiler_temp === targetInst.alternate\n )\n break b;\n JSCompiler_temp = getParent$1(JSCompiler_temp);\n targetInst = getParent$1(targetInst);\n }\n JSCompiler_temp = null;\n }\n else JSCompiler_temp = targetInst;\n targetInst = JSCompiler_temp;\n JSCompiler_temp = targetInst === responderInst;\n shouldSetEventType = ResponderSyntheticEvent.getPooled(\n shouldSetEventType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n );\n shouldSetEventType.touchHistory =\n ResponderTouchHistoryStore.touchHistory;\n JSCompiler_temp\n ? forEachAccumulated(\n shouldSetEventType,\n accumulateTwoPhaseDispatchesSingleSkipTarget\n )\n : forEachAccumulated(\n shouldSetEventType,\n accumulateTwoPhaseDispatchesSingle$1\n );\n b: {\n JSCompiler_temp = shouldSetEventType._dispatchListeners;\n targetInst = shouldSetEventType._dispatchInstances;\n if (isArrayImpl(JSCompiler_temp))\n for (\n depthA = 0;\n depthA < JSCompiler_temp.length &&\n !shouldSetEventType.isPropagationStopped();\n depthA++\n ) {\n if (\n JSCompiler_temp[depthA](shouldSetEventType, targetInst[depthA])\n ) {\n JSCompiler_temp = targetInst[depthA];\n break b;\n }\n }\n else if (\n JSCompiler_temp &&\n JSCompiler_temp(shouldSetEventType, targetInst)\n ) {\n JSCompiler_temp = targetInst;\n break b;\n }\n JSCompiler_temp = null;\n }\n shouldSetEventType._dispatchInstances = null;\n shouldSetEventType._dispatchListeners = null;\n shouldSetEventType.isPersistent() ||\n shouldSetEventType.constructor.release(shouldSetEventType);\n if (JSCompiler_temp && JSCompiler_temp !== responderInst)\n if (\n ((shouldSetEventType = ResponderSyntheticEvent.getPooled(\n eventTypes.responderGrant,\n JSCompiler_temp,\n nativeEvent,\n nativeEventTarget\n )),\n (shouldSetEventType.touchHistory =\n ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(\n shouldSetEventType,\n accumulateDirectDispatchesSingle$1\n ),\n (targetInst = !0 === executeDirectDispatch(shouldSetEventType)),\n responderInst)\n )\n if (\n ((depthA = ResponderSyntheticEvent.getPooled(\n eventTypes.responderTerminationRequest,\n responderInst,\n nativeEvent,\n nativeEventTarget\n )),\n (depthA.touchHistory = ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1),\n (tempA =\n !depthA._dispatchListeners || executeDirectDispatch(depthA)),\n depthA.isPersistent() || depthA.constructor.release(depthA),\n tempA)\n ) {\n depthA = ResponderSyntheticEvent.getPooled(\n eventTypes.responderTerminate,\n responderInst,\n nativeEvent,\n nativeEventTarget\n );\n depthA.touchHistory = ResponderTouchHistoryStore.touchHistory;\n forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1);\n var JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n [shouldSetEventType, depthA]\n );\n changeResponder(JSCompiler_temp, targetInst);\n } else\n (shouldSetEventType = ResponderSyntheticEvent.getPooled(\n eventTypes.responderReject,\n JSCompiler_temp,\n nativeEvent,\n nativeEventTarget\n )),\n (shouldSetEventType.touchHistory =\n ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(\n shouldSetEventType,\n accumulateDirectDispatchesSingle$1\n ),\n (JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n shouldSetEventType\n ));\n else\n (JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n shouldSetEventType\n )),\n changeResponder(JSCompiler_temp, targetInst);\n else JSCompiler_temp$jscomp$0 = null;\n } else JSCompiler_temp$jscomp$0 = null;\n shouldSetEventType = responderInst && isStartish(topLevelType);\n JSCompiler_temp = responderInst && isMoveish(topLevelType);\n targetInst =\n responderInst &&\n (\"topTouchEnd\" === topLevelType || \"topTouchCancel\" === topLevelType);\n if (\n (shouldSetEventType = shouldSetEventType\n ? eventTypes.responderStart\n : JSCompiler_temp\n ? eventTypes.responderMove\n : targetInst\n ? eventTypes.responderEnd\n : null)\n )\n (shouldSetEventType = ResponderSyntheticEvent.getPooled(\n shouldSetEventType,\n responderInst,\n nativeEvent,\n nativeEventTarget\n )),\n (shouldSetEventType.touchHistory =\n ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(\n shouldSetEventType,\n accumulateDirectDispatchesSingle$1\n ),\n (JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n shouldSetEventType\n ));\n shouldSetEventType = responderInst && \"topTouchCancel\" === topLevelType;\n if (\n (topLevelType =\n responderInst &&\n !shouldSetEventType &&\n (\"topTouchEnd\" === topLevelType || \"topTouchCancel\" === topLevelType))\n )\n a: {\n if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length)\n for (\n JSCompiler_temp = 0;\n JSCompiler_temp < topLevelType.length;\n JSCompiler_temp++\n )\n if (\n ((targetInst = topLevelType[JSCompiler_temp].target),\n null !== targetInst &&\n void 0 !== targetInst &&\n 0 !== targetInst)\n ) {\n depthA = getInstanceFromNode$1(targetInst);\n b: {\n for (targetInst = responderInst; depthA; ) {\n if (\n targetInst === depthA ||\n targetInst === depthA.alternate\n ) {\n targetInst = !0;\n break b;\n }\n depthA = getParent$1(depthA);\n }\n targetInst = !1;\n }\n if (targetInst) {\n topLevelType = !1;\n break a;\n }\n }\n topLevelType = !0;\n }\n if (\n (topLevelType = shouldSetEventType\n ? eventTypes.responderTerminate\n : topLevelType\n ? eventTypes.responderRelease\n : null)\n )\n (nativeEvent = ResponderSyntheticEvent.getPooled(\n topLevelType,\n responderInst,\n nativeEvent,\n nativeEventTarget\n )),\n (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle$1),\n (JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n nativeEvent\n )),\n changeResponder(null);\n return JSCompiler_temp$jscomp$0;\n },\n GlobalResponderHandler: null,\n injection: {\n injectGlobalResponderHandler: function (GlobalResponderHandler) {\n ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;\n }\n }\n },\n eventPluginOrder = null,\n namesToPlugins = {};\nfunction recomputePluginOrdering() {\n if (eventPluginOrder)\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName],\n pluginIndex = eventPluginOrder.indexOf(pluginName);\n if (-1 >= pluginIndex)\n throw Error(\n \"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" +\n (pluginName + \"`.\")\n );\n if (!plugins[pluginIndex]) {\n if (!pluginModule.extractEvents)\n throw Error(\n \"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" +\n (pluginName + \"` does not.\")\n );\n plugins[pluginIndex] = pluginModule;\n pluginIndex = pluginModule.eventTypes;\n for (var eventName in pluginIndex) {\n var JSCompiler_inline_result = void 0;\n var dispatchConfig = pluginIndex[eventName];\n if (eventNameDispatchConfigs.hasOwnProperty(eventName))\n throw Error(\n \"EventPluginRegistry: More than one plugin attempted to publish the same event name, `\" +\n (eventName + \"`.\")\n );\n eventNameDispatchConfigs[eventName] = dispatchConfig;\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n if (phasedRegistrationNames) {\n for (JSCompiler_inline_result in phasedRegistrationNames)\n phasedRegistrationNames.hasOwnProperty(\n JSCompiler_inline_result\n ) &&\n publishRegistrationName(\n phasedRegistrationNames[JSCompiler_inline_result],\n pluginModule\n );\n JSCompiler_inline_result = !0;\n } else\n dispatchConfig.registrationName\n ? (publishRegistrationName(\n dispatchConfig.registrationName,\n pluginModule\n ),\n (JSCompiler_inline_result = !0))\n : (JSCompiler_inline_result = !1);\n if (!JSCompiler_inline_result)\n throw Error(\n \"EventPluginRegistry: Failed to publish event `\" +\n eventName +\n \"` for plugin `\" +\n pluginName +\n \"`.\"\n );\n }\n }\n }\n}\nfunction publishRegistrationName(registrationName, pluginModule) {\n if (registrationNameModules[registrationName])\n throw Error(\n \"EventPluginRegistry: More than one plugin attempted to publish the same registration name, `\" +\n (registrationName + \"`.\")\n );\n registrationNameModules[registrationName] = pluginModule;\n}\nvar plugins = [],\n eventNameDispatchConfigs = {},\n registrationNameModules = {};\nfunction getListener(inst, registrationName) {\n inst = inst.stateNode;\n if (null === inst) return null;\n inst = getFiberCurrentPropsFromNode$1(inst);\n if (null === inst) return null;\n if ((inst = inst[registrationName]) && \"function\" !== typeof inst)\n throw Error(\n \"Expected `\" +\n registrationName +\n \"` listener to be a function, instead got a value of `\" +\n typeof inst +\n \"` type.\"\n );\n return inst;\n}\nvar customBubblingEventTypes =\n ReactNativePrivateInterface.ReactNativeViewConfigRegistry\n .customBubblingEventTypes,\n customDirectEventTypes =\n ReactNativePrivateInterface.ReactNativeViewConfigRegistry\n .customDirectEventTypes;\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n if (\n (phase = getListener(\n inst,\n event.dispatchConfig.phasedRegistrationNames[phase]\n ))\n )\n (event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n phase\n )),\n (event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst\n ));\n}\nfunction traverseTwoPhase(inst, fn, arg, skipBubbling) {\n for (var path = []; inst; ) {\n path.push(inst);\n do inst = inst.return;\n while (inst && 5 !== inst.tag);\n inst = inst ? inst : null;\n }\n for (inst = path.length; 0 < inst--; ) fn(path[inst], \"captured\", arg);\n if (skipBubbling) fn(path[0], \"bubbled\", arg);\n else\n for (inst = 0; inst < path.length; inst++) fn(path[inst], \"bubbled\", arg);\n}\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n event &&\n event.dispatchConfig.phasedRegistrationNames &&\n traverseTwoPhase(\n event._targetInst,\n accumulateDirectionalDispatches,\n event,\n !1\n );\n}\nfunction accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n var inst = event._targetInst;\n if (inst && event && event.dispatchConfig.registrationName) {\n var listener = getListener(inst, event.dispatchConfig.registrationName);\n listener &&\n ((event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n listener\n )),\n (event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst\n )));\n }\n }\n}\nif (eventPluginOrder)\n throw Error(\n \"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.\"\n );\neventPluginOrder = Array.prototype.slice.call([\n \"ResponderEventPlugin\",\n \"ReactNativeBridgeEventPlugin\"\n]);\nrecomputePluginOrdering();\nvar injectedNamesToPlugins$jscomp$inline_227 = {\n ResponderEventPlugin: ResponderEventPlugin,\n ReactNativeBridgeEventPlugin: {\n eventTypes: {},\n extractEvents: function (\n topLevelType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n ) {\n if (null == targetInst) return null;\n var bubbleDispatchConfig = customBubblingEventTypes[topLevelType],\n directDispatchConfig = customDirectEventTypes[topLevelType];\n if (!bubbleDispatchConfig && !directDispatchConfig)\n throw Error(\n 'Unsupported top level event type \"' + topLevelType + '\" dispatched'\n );\n topLevelType = SyntheticEvent.getPooled(\n bubbleDispatchConfig || directDispatchConfig,\n targetInst,\n nativeEvent,\n nativeEventTarget\n );\n if (bubbleDispatchConfig)\n null != topLevelType &&\n null != topLevelType.dispatchConfig.phasedRegistrationNames &&\n topLevelType.dispatchConfig.phasedRegistrationNames.skipBubbling\n ? topLevelType &&\n topLevelType.dispatchConfig.phasedRegistrationNames &&\n traverseTwoPhase(\n topLevelType._targetInst,\n accumulateDirectionalDispatches,\n topLevelType,\n !0\n )\n : forEachAccumulated(\n topLevelType,\n accumulateTwoPhaseDispatchesSingle\n );\n else if (directDispatchConfig)\n forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle);\n else return null;\n return topLevelType;\n }\n }\n },\n isOrderingDirty$jscomp$inline_228 = !1,\n pluginName$jscomp$inline_229;\nfor (pluginName$jscomp$inline_229 in injectedNamesToPlugins$jscomp$inline_227)\n if (\n injectedNamesToPlugins$jscomp$inline_227.hasOwnProperty(\n pluginName$jscomp$inline_229\n )\n ) {\n var pluginModule$jscomp$inline_230 =\n injectedNamesToPlugins$jscomp$inline_227[pluginName$jscomp$inline_229];\n if (\n !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_229) ||\n namesToPlugins[pluginName$jscomp$inline_229] !==\n pluginModule$jscomp$inline_230\n ) {\n if (namesToPlugins[pluginName$jscomp$inline_229])\n throw Error(\n \"EventPluginRegistry: Cannot inject two different event plugins using the same name, `\" +\n (pluginName$jscomp$inline_229 + \"`.\")\n );\n namesToPlugins[pluginName$jscomp$inline_229] =\n pluginModule$jscomp$inline_230;\n isOrderingDirty$jscomp$inline_228 = !0;\n }\n }\nisOrderingDirty$jscomp$inline_228 && recomputePluginOrdering();\nvar emptyObject = {},\n removedKeys = null,\n removedKeyCount = 0,\n deepDifferOptions = { unsafelyIgnoreFunctions: !0 };\nfunction defaultDiffer(prevProp, nextProp) {\n return \"object\" !== typeof nextProp || null === nextProp\n ? !0\n : ReactNativePrivateInterface.deepDiffer(\n prevProp,\n nextProp,\n deepDifferOptions\n );\n}\nfunction restoreDeletedValuesInNestedArray(\n updatePayload,\n node,\n validAttributes\n) {\n if (isArrayImpl(node))\n for (var i = node.length; i-- && 0 < removedKeyCount; )\n restoreDeletedValuesInNestedArray(\n updatePayload,\n node[i],\n validAttributes\n );\n else if (node && 0 < removedKeyCount)\n for (i in removedKeys)\n if (removedKeys[i]) {\n var nextProp = node[i];\n if (void 0 !== nextProp) {\n var attributeConfig = validAttributes[i];\n if (attributeConfig) {\n \"function\" === typeof nextProp && (nextProp = !0);\n \"undefined\" === typeof nextProp && (nextProp = null);\n if (\"object\" !== typeof attributeConfig)\n updatePayload[i] = nextProp;\n else if (\n \"function\" === typeof attributeConfig.diff ||\n \"function\" === typeof attributeConfig.process\n )\n (nextProp =\n \"function\" === typeof attributeConfig.process\n ? attributeConfig.process(nextProp)\n : nextProp),\n (updatePayload[i] = nextProp);\n removedKeys[i] = !1;\n removedKeyCount--;\n }\n }\n }\n}\nfunction diffNestedProperty(\n updatePayload,\n prevProp,\n nextProp,\n validAttributes\n) {\n if (!updatePayload && prevProp === nextProp) return updatePayload;\n if (!prevProp || !nextProp)\n return nextProp\n ? addNestedProperty(updatePayload, nextProp, validAttributes)\n : prevProp\n ? clearNestedProperty(updatePayload, prevProp, validAttributes)\n : updatePayload;\n if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp))\n return diffProperties(updatePayload, prevProp, nextProp, validAttributes);\n if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) {\n var minLength =\n prevProp.length < nextProp.length ? prevProp.length : nextProp.length,\n i;\n for (i = 0; i < minLength; i++)\n updatePayload = diffNestedProperty(\n updatePayload,\n prevProp[i],\n nextProp[i],\n validAttributes\n );\n for (; i < prevProp.length; i++)\n updatePayload = clearNestedProperty(\n updatePayload,\n prevProp[i],\n validAttributes\n );\n for (; i < nextProp.length; i++)\n updatePayload = addNestedProperty(\n updatePayload,\n nextProp[i],\n validAttributes\n );\n return updatePayload;\n }\n return isArrayImpl(prevProp)\n ? diffProperties(\n updatePayload,\n ReactNativePrivateInterface.flattenStyle(prevProp),\n nextProp,\n validAttributes\n )\n : diffProperties(\n updatePayload,\n prevProp,\n ReactNativePrivateInterface.flattenStyle(nextProp),\n validAttributes\n );\n}\nfunction addNestedProperty(updatePayload, nextProp, validAttributes) {\n if (!nextProp) return updatePayload;\n if (!isArrayImpl(nextProp))\n return diffProperties(\n updatePayload,\n emptyObject,\n nextProp,\n validAttributes\n );\n for (var i = 0; i < nextProp.length; i++)\n updatePayload = addNestedProperty(\n updatePayload,\n nextProp[i],\n validAttributes\n );\n return updatePayload;\n}\nfunction clearNestedProperty(updatePayload, prevProp, validAttributes) {\n if (!prevProp) return updatePayload;\n if (!isArrayImpl(prevProp))\n return diffProperties(\n updatePayload,\n prevProp,\n emptyObject,\n validAttributes\n );\n for (var i = 0; i < prevProp.length; i++)\n updatePayload = clearNestedProperty(\n updatePayload,\n prevProp[i],\n validAttributes\n );\n return updatePayload;\n}\nfunction diffProperties(updatePayload, prevProps, nextProps, validAttributes) {\n var attributeConfig, propKey;\n for (propKey in nextProps)\n if ((attributeConfig = validAttributes[propKey])) {\n var prevProp = prevProps[propKey];\n var nextProp = nextProps[propKey];\n \"function\" === typeof nextProp &&\n ((nextProp = !0), \"function\" === typeof prevProp && (prevProp = !0));\n \"undefined\" === typeof nextProp &&\n ((nextProp = null),\n \"undefined\" === typeof prevProp && (prevProp = null));\n removedKeys && (removedKeys[propKey] = !1);\n if (updatePayload && void 0 !== updatePayload[propKey])\n if (\"object\" !== typeof attributeConfig)\n updatePayload[propKey] = nextProp;\n else {\n if (\n \"function\" === typeof attributeConfig.diff ||\n \"function\" === typeof attributeConfig.process\n )\n (attributeConfig =\n \"function\" === typeof attributeConfig.process\n ? attributeConfig.process(nextProp)\n : nextProp),\n (updatePayload[propKey] = attributeConfig);\n }\n else if (prevProp !== nextProp)\n if (\"object\" !== typeof attributeConfig)\n defaultDiffer(prevProp, nextProp) &&\n ((updatePayload || (updatePayload = {}))[propKey] = nextProp);\n else if (\n \"function\" === typeof attributeConfig.diff ||\n \"function\" === typeof attributeConfig.process\n ) {\n if (\n void 0 === prevProp ||\n (\"function\" === typeof attributeConfig.diff\n ? attributeConfig.diff(prevProp, nextProp)\n : defaultDiffer(prevProp, nextProp))\n )\n (attributeConfig =\n \"function\" === typeof attributeConfig.process\n ? attributeConfig.process(nextProp)\n : nextProp),\n ((updatePayload || (updatePayload = {}))[propKey] =\n attributeConfig);\n } else\n (removedKeys = null),\n (removedKeyCount = 0),\n (updatePayload = diffNestedProperty(\n updatePayload,\n prevProp,\n nextProp,\n attributeConfig\n )),\n 0 < removedKeyCount &&\n updatePayload &&\n (restoreDeletedValuesInNestedArray(\n updatePayload,\n nextProp,\n attributeConfig\n ),\n (removedKeys = null));\n }\n for (var propKey$1 in prevProps)\n void 0 === nextProps[propKey$1] &&\n (!(attributeConfig = validAttributes[propKey$1]) ||\n (updatePayload && void 0 !== updatePayload[propKey$1]) ||\n ((prevProp = prevProps[propKey$1]),\n void 0 !== prevProp &&\n (\"object\" !== typeof attributeConfig ||\n \"function\" === typeof attributeConfig.diff ||\n \"function\" === typeof attributeConfig.process\n ? (((updatePayload || (updatePayload = {}))[propKey$1] = null),\n removedKeys || (removedKeys = {}),\n removedKeys[propKey$1] ||\n ((removedKeys[propKey$1] = !0), removedKeyCount++))\n : (updatePayload = clearNestedProperty(\n updatePayload,\n prevProp,\n attributeConfig\n )))));\n return updatePayload;\n}\nfunction batchedUpdatesImpl(fn, bookkeeping) {\n return fn(bookkeeping);\n}\nvar isInsideEventHandler = !1;\nfunction batchedUpdates$1(fn, bookkeeping) {\n if (isInsideEventHandler) return fn(bookkeeping);\n isInsideEventHandler = !0;\n try {\n return batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n isInsideEventHandler = !1;\n }\n}\nvar eventQueue = null;\nfunction executeDispatchesAndReleaseTopLevel(e) {\n if (e) {\n var dispatchListeners = e._dispatchListeners,\n dispatchInstances = e._dispatchInstances;\n if (isArrayImpl(dispatchListeners))\n for (\n var i = 0;\n i < dispatchListeners.length && !e.isPropagationStopped();\n i++\n )\n executeDispatch(e, dispatchListeners[i], dispatchInstances[i]);\n else\n dispatchListeners &&\n executeDispatch(e, dispatchListeners, dispatchInstances);\n e._dispatchListeners = null;\n e._dispatchInstances = null;\n e.isPersistent() || e.constructor.release(e);\n }\n}\nfunction dispatchEvent(target, topLevelType, nativeEvent) {\n var eventTarget = null;\n if (null != target) {\n var stateNode = target.stateNode;\n null != stateNode && (eventTarget = getPublicInstance(stateNode));\n }\n batchedUpdates$1(function () {\n var event = { eventName: topLevelType, nativeEvent: nativeEvent };\n ReactNativePrivateInterface.RawEventEmitter.emit(topLevelType, event);\n ReactNativePrivateInterface.RawEventEmitter.emit(\"*\", event);\n event = eventTarget;\n for (\n var events = null, legacyPlugins = plugins, i = 0;\n i < legacyPlugins.length;\n i++\n ) {\n var possiblePlugin = legacyPlugins[i];\n possiblePlugin &&\n (possiblePlugin = possiblePlugin.extractEvents(\n topLevelType,\n target,\n nativeEvent,\n event\n )) &&\n (events = accumulateInto(events, possiblePlugin));\n }\n event = events;\n null !== event && (eventQueue = accumulateInto(eventQueue, event));\n event = eventQueue;\n eventQueue = null;\n if (event) {\n forEachAccumulated(event, executeDispatchesAndReleaseTopLevel);\n if (eventQueue)\n throw Error(\n \"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.\"\n );\n if (hasError)\n throw (\n ((event = caughtError), (hasError = !1), (caughtError = null), event)\n );\n }\n });\n}\nvar scheduleCallback$2 = Scheduler.unstable_scheduleCallback,\n cancelCallback$1 = Scheduler.unstable_cancelCallback,\n shouldYield = Scheduler.unstable_shouldYield,\n requestPaint = Scheduler.unstable_requestPaint,\n now = Scheduler.unstable_now,\n ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n NormalPriority = Scheduler.unstable_NormalPriority,\n IdlePriority = Scheduler.unstable_IdlePriority,\n ReactSharedInternals =\n React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,\n rendererID = null,\n injectedHook = null;\nfunction onCommitRoot(root) {\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberRoot)\n try {\n injectedHook.onCommitFiberRoot(\n rendererID,\n root,\n void 0,\n 128 === (root.current.flags & 128)\n );\n } catch (err) {}\n}\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n log = Math.log,\n LN2 = Math.LN2;\nfunction clz32Fallback(x) {\n x >>>= 0;\n return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n}\nvar nextTransitionLane = 128,\n nextRetryLane = 4194304;\nfunction getHighestPriorityLanes(lanes) {\n var pendingSyncLanes = lanes & 42;\n if (0 !== pendingSyncLanes) return pendingSyncLanes;\n switch (lanes & -lanes) {\n case 1:\n return 1;\n case 2:\n return 2;\n case 4:\n return 4;\n case 8:\n return 8;\n case 16:\n return 16;\n case 32:\n return 32;\n case 64:\n return 64;\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return lanes & 4194176;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return lanes & 62914560;\n case 67108864:\n return 67108864;\n case 134217728:\n return 134217728;\n case 268435456:\n return 268435456;\n case 536870912:\n return 536870912;\n case 1073741824:\n return 0;\n default:\n return lanes;\n }\n}\nfunction getNextLanes(root, wipLanes) {\n var pendingLanes = root.pendingLanes;\n if (0 === pendingLanes) return 0;\n var nextLanes = 0,\n suspendedLanes = root.suspendedLanes;\n root = root.pingedLanes;\n var nonIdlePendingLanes = pendingLanes & 134217727;\n 0 !== nonIdlePendingLanes\n ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),\n 0 !== pendingLanes\n ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n : ((root &= nonIdlePendingLanes),\n 0 !== root && (nextLanes = getHighestPriorityLanes(root))))\n : ((pendingLanes &= ~suspendedLanes),\n 0 !== pendingLanes\n ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n : 0 !== root && (nextLanes = getHighestPriorityLanes(root)));\n return 0 === nextLanes\n ? 0\n : 0 !== wipLanes &&\n wipLanes !== nextLanes &&\n 0 === (wipLanes & suspendedLanes) &&\n ((suspendedLanes = nextLanes & -nextLanes),\n (root = wipLanes & -wipLanes),\n suspendedLanes >= root ||\n (32 === suspendedLanes && 0 !== (root & 4194176)))\n ? wipLanes\n : nextLanes;\n}\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case 1:\n case 2:\n case 4:\n case 8:\n return currentTime + 250;\n case 16:\n case 32:\n case 64:\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return currentTime + 5e3;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return -1;\n case 67108864:\n case 134217728:\n case 268435456:\n case 536870912:\n case 1073741824:\n return -1;\n default:\n return -1;\n }\n}\nfunction getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) {\n if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0;\n root = root.pendingLanes & -536870913;\n return 0 !== root ? root : root & 536870912 ? 536870912 : 0;\n}\nfunction claimNextTransitionLane() {\n var lane = nextTransitionLane;\n nextTransitionLane <<= 1;\n 0 === (nextTransitionLane & 4194176) && (nextTransitionLane = 128);\n return lane;\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);\n return lane;\n}\nfunction createLaneMap(initial) {\n for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);\n return laneMap;\n}\nfunction markRootUpdated$1(root, updateLane) {\n root.pendingLanes |= updateLane;\n 268435456 !== updateLane &&\n ((root.suspendedLanes = 0), (root.pingedLanes = 0));\n}\nfunction markRootFinished(root, remainingLanes, spawnedLane) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes;\n root.suspendedLanes = 0;\n root.pingedLanes = 0;\n root.expiredLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n root.errorRecoveryDisabledLanes &= remainingLanes;\n root.shellSuspendCounter = 0;\n remainingLanes = root.entanglements;\n for (\n var expirationTimes = root.expirationTimes,\n hiddenUpdates = root.hiddenUpdates;\n 0 < noLongerPendingLanes;\n\n ) {\n var index$5 = 31 - clz32(noLongerPendingLanes),\n lane = 1 << index$5;\n remainingLanes[index$5] = 0;\n expirationTimes[index$5] = -1;\n var hiddenUpdatesForLane = hiddenUpdates[index$5];\n if (null !== hiddenUpdatesForLane)\n for (\n hiddenUpdates[index$5] = null, index$5 = 0;\n index$5 < hiddenUpdatesForLane.length;\n index$5++\n ) {\n var update = hiddenUpdatesForLane[index$5];\n null !== update && (update.lane &= -536870913);\n }\n noLongerPendingLanes &= ~lane;\n }\n 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);\n}\nfunction markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {\n root.pendingLanes |= spawnedLane;\n root.suspendedLanes &= ~spawnedLane;\n var spawnedLaneIndex = 31 - clz32(spawnedLane);\n root.entangledLanes |= spawnedLane;\n root.entanglements[spawnedLaneIndex] =\n root.entanglements[spawnedLaneIndex] |\n 1073741824 |\n (entangledLanes & 4194218);\n}\nfunction markRootEntangled(root, entangledLanes) {\n var rootEntangledLanes = (root.entangledLanes |= entangledLanes);\n for (root = root.entanglements; rootEntangledLanes; ) {\n var index$6 = 31 - clz32(rootEntangledLanes),\n lane = 1 << index$6;\n (lane & entangledLanes) | (root[index$6] & entangledLanes) &&\n (root[index$6] |= entangledLanes);\n rootEntangledLanes &= ~lane;\n }\n}\nvar currentUpdatePriority = 0;\nfunction lanesToEventPriority(lanes) {\n lanes &= -lanes;\n return 2 < lanes\n ? 8 < lanes\n ? 0 !== (lanes & 134217727)\n ? 32\n : 268435456\n : 8\n : 2;\n}\nfunction shim$1() {\n throw Error(\n \"The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.\"\n );\n}\nvar _nativeFabricUIManage = nativeFabricUIManager,\n createNode = _nativeFabricUIManage.createNode,\n cloneNodeWithNewChildren = _nativeFabricUIManage.cloneNodeWithNewChildren,\n cloneNodeWithNewChildrenAndProps =\n _nativeFabricUIManage.cloneNodeWithNewChildrenAndProps,\n cloneNodeWithNewProps = _nativeFabricUIManage.cloneNodeWithNewProps,\n createChildNodeSet = _nativeFabricUIManage.createChildSet,\n appendChildNode = _nativeFabricUIManage.appendChild,\n appendChildNodeToSet = _nativeFabricUIManage.appendChildToSet,\n completeRoot = _nativeFabricUIManage.completeRoot,\n registerEventHandler = _nativeFabricUIManage.registerEventHandler,\n FabricDiscretePriority = _nativeFabricUIManage.unstable_DiscreteEventPriority,\n fabricGetCurrentEventPriority =\n _nativeFabricUIManage.unstable_getCurrentEventPriority,\n getViewConfigForType =\n ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,\n nextReactTag = 2;\nregisterEventHandler && registerEventHandler(dispatchEvent);\nfunction createTextInstance(\n text,\n rootContainerInstance,\n hostContext,\n internalInstanceHandle\n) {\n hostContext = nextReactTag;\n nextReactTag += 2;\n return {\n node: createNode(\n hostContext,\n \"RCTRawText\",\n rootContainerInstance,\n { text: text },\n internalInstanceHandle\n )\n };\n}\nfunction getPublicInstance(instance) {\n return null != instance.canonical && null != instance.canonical.publicInstance\n ? instance.canonical.publicInstance\n : null != instance._nativeTag\n ? instance\n : null;\n}\nvar scheduleTimeout = setTimeout,\n cancelTimeout = clearTimeout;\nfunction cloneHiddenInstance(instance) {\n var node = instance.node;\n var JSCompiler_inline_result = diffProperties(\n null,\n emptyObject,\n { style: { display: \"none\" } },\n instance.canonical.viewConfig.validAttributes\n );\n return {\n node: cloneNodeWithNewProps(node, JSCompiler_inline_result),\n canonical: instance.canonical\n };\n}\nvar supportsMicrotasks =\n \"undefined\" !== typeof RN$enableMicrotasksInReact &&\n !!RN$enableMicrotasksInReact,\n scheduleMicrotask =\n \"function\" === typeof queueMicrotask ? queueMicrotask : scheduleTimeout;\nfunction getInstanceFromNode(node) {\n return null != node.canonical && null != node.canonical.internalInstanceHandle\n ? node.canonical.internalInstanceHandle\n : node;\n}\ngetFiberCurrentPropsFromNode$1 = function (instance) {\n return instance.canonical.currentProps;\n};\ngetInstanceFromNode$1 = getInstanceFromNode;\ngetNodeFromInstance$1 = function (fiber) {\n fiber = getPublicInstance(fiber.stateNode);\n if (null == fiber) throw Error(\"Could not find host instance from fiber\");\n return fiber;\n};\nResponderEventPlugin.injection.injectGlobalResponderHandler({\n onChange: function (from, to, blockNativeResponder) {\n from &&\n from.stateNode &&\n nativeFabricUIManager.setIsJSResponder(\n from.stateNode.node,\n !1,\n blockNativeResponder || !1\n );\n to &&\n to.stateNode &&\n nativeFabricUIManager.setIsJSResponder(\n to.stateNode.node,\n !0,\n blockNativeResponder || !1\n );\n }\n});\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_PROVIDER_TYPE = Symbol.for(\"react.provider\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nSymbol.for(\"react.scope\");\nSymbol.for(\"react.debug_trace_mode\");\nvar REACT_OFFSCREEN_TYPE = Symbol.for(\"react.offscreen\");\nSymbol.for(\"react.legacy_hidden\");\nSymbol.for(\"react.cache\");\nSymbol.for(\"react.tracing_marker\");\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nSymbol.for(\"react.client.reference\");\nfunction getNearestMountedFiber(fiber) {\n var node = fiber,\n nearestMounted = fiber;\n if (fiber.alternate) for (; node.return; ) node = node.return;\n else {\n fiber = node;\n do\n (node = fiber),\n 0 !== (node.flags & 4098) && (nearestMounted = node.return),\n (fiber = node.return);\n while (fiber);\n }\n return 3 === node.tag ? nearestMounted : null;\n}\nfunction assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber)\n throw Error(\"Unable to find node on an unmounted component.\");\n}\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n if (!alternate) {\n alternate = getNearestMountedFiber(fiber);\n if (null === alternate)\n throw Error(\"Unable to find node on an unmounted component.\");\n return alternate !== fiber ? null : fiber;\n }\n for (var a = fiber, b = alternate; ; ) {\n var parentA = a.return;\n if (null === parentA) break;\n var parentB = parentA.alternate;\n if (null === parentB) {\n b = parentA.return;\n if (null !== b) {\n a = b;\n continue;\n }\n break;\n }\n if (parentA.child === parentB.child) {\n for (parentB = parentA.child; parentB; ) {\n if (parentB === a) return assertIsMounted(parentA), fiber;\n if (parentB === b) return assertIsMounted(parentA), alternate;\n parentB = parentB.sibling;\n }\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n if (a.return !== b.return) (a = parentA), (b = parentB);\n else {\n for (var didFindChild = !1, child$7 = parentA.child; child$7; ) {\n if (child$7 === a) {\n didFindChild = !0;\n a = parentA;\n b = parentB;\n break;\n }\n if (child$7 === b) {\n didFindChild = !0;\n b = parentA;\n a = parentB;\n break;\n }\n child$7 = child$7.sibling;\n }\n if (!didFindChild) {\n for (child$7 = parentB.child; child$7; ) {\n if (child$7 === a) {\n didFindChild = !0;\n a = parentB;\n b = parentA;\n break;\n }\n if (child$7 === b) {\n didFindChild = !0;\n b = parentB;\n a = parentA;\n break;\n }\n child$7 = child$7.sibling;\n }\n if (!didFindChild)\n throw Error(\n \"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\"\n );\n }\n }\n if (a.alternate !== b)\n throw Error(\n \"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\"\n );\n }\n if (3 !== a.tag)\n throw Error(\"Unable to find node on an unmounted component.\");\n return a.stateNode.current === a ? fiber : alternate;\n}\nfunction findCurrentHostFiber(parent) {\n parent = findCurrentFiberUsingSlowPath(parent);\n return null !== parent ? findCurrentHostFiberImpl(parent) : null;\n}\nfunction findCurrentHostFiberImpl(node) {\n var tag = node.tag;\n if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;\n for (node = node.child; null !== node; ) {\n tag = findCurrentHostFiberImpl(node);\n if (null !== tag) return tag;\n node = node.sibling;\n }\n return null;\n}\nvar valueStack = [],\n index = -1;\nfunction createCursor(defaultValue) {\n return { current: defaultValue };\n}\nfunction pop(cursor) {\n 0 > index ||\n ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);\n}\nfunction push(cursor, value) {\n index++;\n valueStack[index] = cursor.current;\n cursor.current = value;\n}\nvar emptyContextObject = {};\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n contextStackCursor = createCursor(null),\n contextFiberStackCursor = createCursor(null),\n rootInstanceStackCursor = createCursor(null);\nfunction pushHostContainer(fiber, nextRootInstance) {\n push(rootInstanceStackCursor, nextRootInstance);\n push(contextFiberStackCursor, fiber);\n push(contextStackCursor, null);\n pop(contextStackCursor);\n push(contextStackCursor, { isInAParentText: !1 });\n}\nfunction popHostContainer() {\n pop(contextStackCursor);\n pop(contextFiberStackCursor);\n pop(rootInstanceStackCursor);\n}\nfunction pushHostContext(fiber) {\n var context = contextStackCursor.current;\n var JSCompiler_inline_result = fiber.type;\n JSCompiler_inline_result =\n \"AndroidTextInput\" === JSCompiler_inline_result ||\n \"RCTMultilineTextInputView\" === JSCompiler_inline_result ||\n \"RCTSinglelineTextInputView\" === JSCompiler_inline_result ||\n \"RCTText\" === JSCompiler_inline_result ||\n \"RCTVirtualText\" === JSCompiler_inline_result;\n JSCompiler_inline_result =\n context.isInAParentText !== JSCompiler_inline_result\n ? { isInAParentText: JSCompiler_inline_result }\n : context;\n context !== JSCompiler_inline_result &&\n (push(contextFiberStackCursor, fiber),\n push(contextStackCursor, JSCompiler_inline_result));\n}\nfunction popHostContext(fiber) {\n contextFiberStackCursor.current === fiber &&\n (pop(contextStackCursor), pop(contextFiberStackCursor));\n}\nvar hydrationErrors = null,\n concurrentQueues = [],\n concurrentQueuesIndex = 0,\n concurrentlyUpdatedLanes = 0;\nfunction finishQueueingConcurrentUpdates() {\n for (\n var endIndex = concurrentQueuesIndex,\n i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);\n i < endIndex;\n\n ) {\n var fiber = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var queue = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var update = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var lane = concurrentQueues[i];\n concurrentQueues[i++] = null;\n if (null !== queue && null !== update) {\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n }\n 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);\n }\n}\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n concurrentQueues[concurrentQueuesIndex++] = fiber;\n concurrentQueues[concurrentQueuesIndex++] = queue;\n concurrentQueues[concurrentQueuesIndex++] = update;\n concurrentQueues[concurrentQueuesIndex++] = lane;\n concurrentlyUpdatedLanes |= lane;\n fiber.lanes |= lane;\n fiber = fiber.alternate;\n null !== fiber && (fiber.lanes |= lane);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n enqueueUpdate$1(fiber, null, null, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n sourceFiber.lanes |= lane;\n var alternate = sourceFiber.alternate;\n null !== alternate && (alternate.lanes |= lane);\n for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )\n (parent.childLanes |= lane),\n (alternate = parent.alternate),\n null !== alternate && (alternate.childLanes |= lane),\n 22 === parent.tag &&\n ((sourceFiber = parent.stateNode),\n null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),\n (sourceFiber = parent),\n (parent = parent.return);\n isHidden &&\n null !== update &&\n 3 === sourceFiber.tag &&\n ((parent = sourceFiber.stateNode),\n (isHidden = 31 - clz32(lane)),\n (parent = parent.hiddenUpdates),\n (sourceFiber = parent[isHidden]),\n null === sourceFiber\n ? (parent[isHidden] = [update])\n : sourceFiber.push(update),\n (update.lane = lane | 536870912));\n}\nfunction getRootForUpdatedFiber(sourceFiber) {\n if (50 < nestedUpdateCount)\n throw (\n ((nestedUpdateCount = 0),\n (rootWithNestedUpdates = null),\n Error(\n \"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\"\n ))\n );\n for (var parent = sourceFiber.return; null !== parent; )\n (sourceFiber = parent), (parent = sourceFiber.return);\n return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;\n}\nvar firstScheduledRoot = null,\n lastScheduledRoot = null,\n didScheduleMicrotask = !1,\n mightHavePendingSyncWork = !1,\n isFlushingWork = !1,\n currentEventTransitionLane = 0;\nfunction ensureRootIsScheduled(root) {\n root !== lastScheduledRoot &&\n null === root.next &&\n (null === lastScheduledRoot\n ? (firstScheduledRoot = lastScheduledRoot = root)\n : (lastScheduledRoot = lastScheduledRoot.next = root));\n mightHavePendingSyncWork = !0;\n didScheduleMicrotask ||\n ((didScheduleMicrotask = !0),\n scheduleImmediateTask(processRootScheduleInMicrotask));\n scheduleTaskForRootDuringMicrotask(root, now());\n}\nfunction flushSyncWorkAcrossRoots_impl(onlyLegacy) {\n if (!isFlushingWork && mightHavePendingSyncWork) {\n var errors = null;\n isFlushingWork = !0;\n do {\n var didPerformSomeWork = !1;\n for (var root = firstScheduledRoot; null !== root; ) {\n if (!onlyLegacy || 0 === root.tag) {\n var workInProgressRootRenderLanes$9 = workInProgressRootRenderLanes,\n nextLanes = getNextLanes(\n root,\n root === workInProgressRoot ? workInProgressRootRenderLanes$9 : 0\n );\n if (0 !== (nextLanes & 3))\n try {\n didPerformSomeWork = !0;\n workInProgressRootRenderLanes$9 = root;\n if (0 !== (executionContext & 6))\n throw Error(\"Should not already be working.\");\n if (!flushPassiveEffects()) {\n var exitStatus = renderRootSync(\n workInProgressRootRenderLanes$9,\n nextLanes\n );\n if (\n 0 !== workInProgressRootRenderLanes$9.tag &&\n 2 === exitStatus\n ) {\n var originallyAttemptedLanes = nextLanes,\n errorRetryLanes = getLanesToRetrySynchronouslyOnError(\n workInProgressRootRenderLanes$9,\n originallyAttemptedLanes\n );\n 0 !== errorRetryLanes &&\n ((nextLanes = errorRetryLanes),\n (exitStatus = recoverFromConcurrentError(\n workInProgressRootRenderLanes$9,\n originallyAttemptedLanes,\n errorRetryLanes\n )));\n }\n if (1 === exitStatus)\n throw (\n ((originallyAttemptedLanes = workInProgressRootFatalError),\n prepareFreshStack(workInProgressRootRenderLanes$9, 0),\n markRootSuspended(\n workInProgressRootRenderLanes$9,\n nextLanes,\n 0\n ),\n ensureRootIsScheduled(workInProgressRootRenderLanes$9),\n originallyAttemptedLanes)\n );\n 6 === exitStatus\n ? markRootSuspended(\n workInProgressRootRenderLanes$9,\n nextLanes,\n workInProgressDeferredLane\n )\n : ((workInProgressRootRenderLanes$9.finishedWork =\n workInProgressRootRenderLanes$9.current.alternate),\n (workInProgressRootRenderLanes$9.finishedLanes = nextLanes),\n commitRoot(\n workInProgressRootRenderLanes$9,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n workInProgressDeferredLane\n ));\n }\n ensureRootIsScheduled(workInProgressRootRenderLanes$9);\n } catch (error) {\n null === errors ? (errors = [error]) : errors.push(error);\n }\n }\n root = root.next;\n }\n } while (didPerformSomeWork);\n isFlushingWork = !1;\n if (null !== errors) {\n if (1 < errors.length) {\n if (\"function\" === typeof AggregateError)\n throw new AggregateError(errors);\n for (onlyLegacy = 1; onlyLegacy < errors.length; onlyLegacy++)\n scheduleImmediateTask(throwError.bind(null, errors[onlyLegacy]));\n }\n throw errors[0];\n }\n }\n}\nfunction throwError(error) {\n throw error;\n}\nfunction processRootScheduleInMicrotask() {\n mightHavePendingSyncWork = didScheduleMicrotask = !1;\n for (\n var currentTime = now(), prev = null, root = firstScheduledRoot;\n null !== root;\n\n ) {\n var next = root.next,\n nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n 0 === nextLanes\n ? ((root.next = null),\n null === prev ? (firstScheduledRoot = next) : (prev.next = next),\n null === next && (lastScheduledRoot = prev))\n : ((prev = root),\n 0 !== (nextLanes & 3) && (mightHavePendingSyncWork = !0));\n root = next;\n }\n currentEventTransitionLane = 0;\n flushSyncWorkAcrossRoots_impl(!1);\n}\nfunction scheduleTaskForRootDuringMicrotask(root, currentTime) {\n for (\n var suspendedLanes = root.suspendedLanes,\n pingedLanes = root.pingedLanes,\n expirationTimes = root.expirationTimes,\n lanes = root.pendingLanes & -62914561;\n 0 < lanes;\n\n ) {\n var index$3 = 31 - clz32(lanes),\n lane = 1 << index$3,\n expirationTime = expirationTimes[index$3];\n if (-1 === expirationTime) {\n if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))\n expirationTimes[index$3] = computeExpirationTime(lane, currentTime);\n } else expirationTime <= currentTime && (root.expiredLanes |= lane);\n lanes &= ~lane;\n }\n currentTime = workInProgressRoot;\n suspendedLanes = workInProgressRootRenderLanes;\n suspendedLanes = getNextLanes(\n root,\n root === currentTime ? suspendedLanes : 0\n );\n pingedLanes = root.callbackNode;\n if (\n 0 === suspendedLanes ||\n (root === currentTime && 2 === workInProgressSuspendedReason) ||\n null !== root.cancelPendingCommit\n )\n return (\n null !== pingedLanes &&\n null !== pingedLanes &&\n cancelCallback$1(pingedLanes),\n (root.callbackNode = null),\n (root.callbackPriority = 0)\n );\n if (0 !== (suspendedLanes & 3))\n return (\n null !== pingedLanes &&\n null !== pingedLanes &&\n cancelCallback$1(pingedLanes),\n (root.callbackPriority = 2),\n (root.callbackNode = null),\n 2\n );\n currentTime = suspendedLanes & -suspendedLanes;\n if (currentTime === root.callbackPriority) return currentTime;\n null !== pingedLanes && cancelCallback$1(pingedLanes);\n switch (lanesToEventPriority(suspendedLanes)) {\n case 2:\n suspendedLanes = ImmediatePriority;\n break;\n case 8:\n suspendedLanes = UserBlockingPriority;\n break;\n case 32:\n suspendedLanes = NormalPriority;\n break;\n case 268435456:\n suspendedLanes = IdlePriority;\n break;\n default:\n suspendedLanes = NormalPriority;\n }\n pingedLanes = performConcurrentWorkOnRoot.bind(null, root);\n suspendedLanes = scheduleCallback$2(suspendedLanes, pingedLanes);\n root.callbackPriority = currentTime;\n root.callbackNode = suspendedLanes;\n return currentTime;\n}\nfunction scheduleImmediateTask(cb) {\n supportsMicrotasks\n ? scheduleMicrotask(function () {\n 0 !== (executionContext & 6)\n ? scheduleCallback$2(ImmediatePriority, cb)\n : cb();\n })\n : scheduleCallback$2(ImmediatePriority, cb);\n}\nvar hasForceUpdate = !1;\nfunction initializeUpdateQueue(fiber) {\n fiber.updateQueue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: { pending: null, lanes: 0, hiddenCallbacks: null },\n callbacks: null\n };\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n current = current.updateQueue;\n workInProgress.updateQueue === current &&\n (workInProgress.updateQueue = {\n baseState: current.baseState,\n firstBaseUpdate: current.firstBaseUpdate,\n lastBaseUpdate: current.lastBaseUpdate,\n shared: current.shared,\n callbacks: null\n });\n}\nfunction createUpdate(lane) {\n return { lane: lane, tag: 0, payload: null, callback: null, next: null };\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n if (null === updateQueue) return null;\n updateQueue = updateQueue.shared;\n if (0 !== (executionContext & 2)) {\n var pending = updateQueue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n updateQueue.pending = update;\n update = getRootForUpdatedFiber(fiber);\n markUpdateLaneFromFiberToRoot(fiber, null, lane);\n return update;\n }\n enqueueUpdate$1(fiber, updateQueue, update, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction entangleTransitions(root, fiber, lane) {\n fiber = fiber.updateQueue;\n if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) {\n var queueLanes = fiber.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n fiber.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n var queue = workInProgress.updateQueue,\n current = workInProgress.alternate;\n if (\n null !== current &&\n ((current = current.updateQueue), queue === current)\n ) {\n var newFirst = null,\n newLast = null;\n queue = queue.firstBaseUpdate;\n if (null !== queue) {\n do {\n var clone = {\n lane: queue.lane,\n tag: queue.tag,\n payload: queue.payload,\n callback: null,\n next: null\n };\n null === newLast\n ? (newFirst = newLast = clone)\n : (newLast = newLast.next = clone);\n queue = queue.next;\n } while (null !== queue);\n null === newLast\n ? (newFirst = newLast = capturedUpdate)\n : (newLast = newLast.next = capturedUpdate);\n } else newFirst = newLast = capturedUpdate;\n queue = {\n baseState: current.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: current.shared,\n callbacks: current.callbacks\n };\n workInProgress.updateQueue = queue;\n return;\n }\n workInProgress = queue.lastBaseUpdate;\n null === workInProgress\n ? (queue.firstBaseUpdate = capturedUpdate)\n : (workInProgress.next = capturedUpdate);\n queue.lastBaseUpdate = capturedUpdate;\n}\nfunction processUpdateQueue(\n workInProgress$jscomp$0,\n props,\n instance$jscomp$0,\n renderLanes\n) {\n var queue = workInProgress$jscomp$0.updateQueue;\n hasForceUpdate = !1;\n var firstBaseUpdate = queue.firstBaseUpdate,\n lastBaseUpdate = queue.lastBaseUpdate,\n pendingQueue = queue.shared.pending;\n if (null !== pendingQueue) {\n queue.shared.pending = null;\n var lastPendingUpdate = pendingQueue,\n firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null;\n null === lastBaseUpdate\n ? (firstBaseUpdate = firstPendingUpdate)\n : (lastBaseUpdate.next = firstPendingUpdate);\n lastBaseUpdate = lastPendingUpdate;\n var current = workInProgress$jscomp$0.alternate;\n null !== current &&\n ((current = current.updateQueue),\n (pendingQueue = current.lastBaseUpdate),\n pendingQueue !== lastBaseUpdate &&\n (null === pendingQueue\n ? (current.firstBaseUpdate = firstPendingUpdate)\n : (pendingQueue.next = firstPendingUpdate),\n (current.lastBaseUpdate = lastPendingUpdate)));\n }\n if (null !== firstBaseUpdate) {\n var newState = queue.baseState;\n lastBaseUpdate = 0;\n current = firstPendingUpdate = lastPendingUpdate = null;\n pendingQueue = firstBaseUpdate;\n do {\n var updateLane = pendingQueue.lane & -536870913,\n isHiddenUpdate = updateLane !== pendingQueue.lane;\n if (\n isHiddenUpdate\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n ) {\n null !== current &&\n (current = current.next =\n {\n lane: 0,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: null,\n next: null\n });\n a: {\n var workInProgress = workInProgress$jscomp$0,\n update = pendingQueue;\n updateLane = props;\n var instance = instance$jscomp$0;\n switch (update.tag) {\n case 1:\n workInProgress = update.payload;\n if (\"function\" === typeof workInProgress) {\n newState = workInProgress.call(instance, newState, updateLane);\n break a;\n }\n newState = workInProgress;\n break a;\n case 3:\n workInProgress.flags = (workInProgress.flags & -65537) | 128;\n case 0:\n workInProgress = update.payload;\n updateLane =\n \"function\" === typeof workInProgress\n ? workInProgress.call(instance, newState, updateLane)\n : workInProgress;\n if (null === updateLane || void 0 === updateLane) break a;\n newState = assign({}, newState, updateLane);\n break a;\n case 2:\n hasForceUpdate = !0;\n }\n }\n updateLane = pendingQueue.callback;\n null !== updateLane &&\n ((workInProgress$jscomp$0.flags |= 64),\n isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),\n (isHiddenUpdate = queue.callbacks),\n null === isHiddenUpdate\n ? (queue.callbacks = [updateLane])\n : isHiddenUpdate.push(updateLane));\n } else\n (isHiddenUpdate = {\n lane: updateLane,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: pendingQueue.callback,\n next: null\n }),\n null === current\n ? ((firstPendingUpdate = current = isHiddenUpdate),\n (lastPendingUpdate = newState))\n : (current = current.next = isHiddenUpdate),\n (lastBaseUpdate |= updateLane);\n pendingQueue = pendingQueue.next;\n if (null === pendingQueue)\n if (((pendingQueue = queue.shared.pending), null === pendingQueue))\n break;\n else\n (isHiddenUpdate = pendingQueue),\n (pendingQueue = isHiddenUpdate.next),\n (isHiddenUpdate.next = null),\n (queue.lastBaseUpdate = isHiddenUpdate),\n (queue.shared.pending = null);\n } while (1);\n null === current && (lastPendingUpdate = newState);\n queue.baseState = lastPendingUpdate;\n queue.firstBaseUpdate = firstPendingUpdate;\n queue.lastBaseUpdate = current;\n null === firstBaseUpdate && (queue.shared.lanes = 0);\n workInProgressRootSkippedLanes |= lastBaseUpdate;\n workInProgress$jscomp$0.lanes = lastBaseUpdate;\n workInProgress$jscomp$0.memoizedState = newState;\n }\n}\nfunction callCallback(callback, context) {\n if (\"function\" !== typeof callback)\n throw Error(\n \"Invalid argument passed as callback. Expected a function. Instead received: \" +\n callback\n );\n callback.call(context);\n}\nfunction commitCallbacks(updateQueue, context) {\n var callbacks = updateQueue.callbacks;\n if (null !== callbacks)\n for (\n updateQueue.callbacks = null, updateQueue = 0;\n updateQueue < callbacks.length;\n updateQueue++\n )\n callCallback(callbacks[updateQueue], context);\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) return !0;\n if (\n \"object\" !== typeof objA ||\n null === objA ||\n \"object\" !== typeof objB ||\n null === objB\n )\n return !1;\n var keysA = Object.keys(objA),\n keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return !1;\n for (keysB = 0; keysB < keysA.length; keysB++) {\n var currentKey = keysA[keysB];\n if (\n !hasOwnProperty.call(objB, currentKey) ||\n !objectIs(objA[currentKey], objB[currentKey])\n )\n return !1;\n }\n return !0;\n}\nfunction describeComponentFrame(name, ownerName) {\n var sourceInfo = \"\";\n ownerName && (sourceInfo = \" (created by \" + ownerName + \")\");\n return \"\\n in \" + (name || \"Unknown\") + sourceInfo;\n}\nfunction describeFunctionComponentFrame(fn) {\n return fn\n ? describeComponentFrame(fn.displayName || fn.name || null, null)\n : \"\";\n}\nfunction describeFiber(fiber) {\n switch (fiber.tag) {\n case 26:\n case 27:\n case 5:\n return describeComponentFrame(fiber.type, null);\n case 16:\n return describeComponentFrame(\"Lazy\", null);\n case 13:\n return describeComponentFrame(\"Suspense\", null);\n case 19:\n return describeComponentFrame(\"SuspenseList\", null);\n case 0:\n case 2:\n case 15:\n return describeFunctionComponentFrame(fiber.type);\n case 11:\n return describeFunctionComponentFrame(fiber.type.render);\n case 1:\n return (fiber = describeFunctionComponentFrame(fiber.type)), fiber;\n default:\n return \"\";\n }\n}\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = \"\";\n do\n (info += describeFiber(workInProgress)),\n (workInProgress = workInProgress.return);\n while (workInProgress);\n return info;\n } catch (x) {\n return \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n }\n}\nvar SuspenseException = Error(\n \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`\"\n ),\n SuspenseyCommitException = Error(\n \"Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.\"\n ),\n noopSuspenseyCommitThenable = { then: function () {} };\nfunction isThenableResolved(thenable) {\n thenable = thenable.status;\n return \"fulfilled\" === thenable || \"rejected\" === thenable;\n}\nfunction noop() {}\nfunction trackUsedThenable(thenableState, thenable, index) {\n index = thenableState[index];\n void 0 === index\n ? thenableState.push(thenable)\n : index !== thenable && (thenable.then(noop, noop), (thenable = index));\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n default:\n if (\"string\" === typeof thenable.status) thenable.then(noop, noop);\n else {\n thenableState = workInProgressRoot;\n if (null !== thenableState && 100 < thenableState.shellSuspendCounter)\n throw Error(\n \"async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\"\n );\n thenableState = thenable;\n thenableState.status = \"pending\";\n thenableState.then(\n function (fulfilledValue) {\n if (\"pending\" === thenable.status) {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = \"fulfilled\";\n fulfilledThenable.value = fulfilledValue;\n }\n },\n function (error) {\n if (\"pending\" === thenable.status) {\n var rejectedThenable = thenable;\n rejectedThenable.status = \"rejected\";\n rejectedThenable.reason = error;\n }\n }\n );\n }\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n }\n suspendedThenable = thenable;\n throw SuspenseException;\n }\n}\nvar suspendedThenable = null;\nfunction getSuspendedThenable() {\n if (null === suspendedThenable)\n throw Error(\n \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n );\n var thenable = suspendedThenable;\n suspendedThenable = null;\n return thenable;\n}\nfunction checkIfUseWrappedInAsyncCatch(rejectedReason) {\n if (rejectedReason === SuspenseException)\n throw Error(\n \"Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\"\n );\n}\nvar thenableState$1 = null,\n thenableIndexCounter$1 = 0;\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter$1;\n thenableIndexCounter$1 += 1;\n null === thenableState$1 && (thenableState$1 = []);\n return trackUsedThenable(thenableState$1, thenable, index);\n}\nfunction convertStringRefToCallbackRef(\n returnFiber,\n current,\n element,\n mixedRef\n) {\n function ref(value) {\n var refs = inst.refs;\n null === value ? delete refs[stringRef] : (refs[stringRef] = value);\n }\n var stringRef = \"\" + mixedRef;\n returnFiber = element._owner;\n if (!returnFiber)\n throw Error(\n \"Element ref was specified as a string (\" +\n stringRef +\n \") but no owner was set. This could happen for one of the following reasons:\\n1. You may be adding a ref to a function component\\n2. You may be adding a ref to a component that was not created inside a component's render method\\n3. You have multiple copies of React loaded\\nSee https://react.dev/link/refs-must-have-owner for more information.\"\n );\n if (1 !== returnFiber.tag)\n throw Error(\n \"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\"\n );\n var inst = returnFiber.stateNode;\n if (!inst)\n throw Error(\n \"Missing owner for string ref \" +\n stringRef +\n \". This error is likely caused by a bug in React. Please file an issue.\"\n );\n if (\n null !== current &&\n null !== current.ref &&\n \"function\" === typeof current.ref &&\n current.ref._stringRef === stringRef\n )\n return current.ref;\n ref._stringRef = stringRef;\n return ref;\n}\nfunction coerceRef(returnFiber, current, workInProgress, element) {\n var mixedRef = element.ref;\n returnFiber =\n \"string\" === typeof mixedRef ||\n \"number\" === typeof mixedRef ||\n \"boolean\" === typeof mixedRef\n ? convertStringRefToCallbackRef(returnFiber, current, element, mixedRef)\n : mixedRef;\n workInProgress.ref = returnFiber;\n}\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n returnFiber = Object.prototype.toString.call(newChild);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === returnFiber\n ? \"object with keys {\" + Object.keys(newChild).join(\", \") + \"}\"\n : returnFiber) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n}\nfunction resolveLazy(lazyType) {\n var init = lazyType._init;\n return init(lazyType._payload);\n}\nfunction createChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (shouldTrackSideEffects) {\n var deletions = returnFiber.deletions;\n null === deletions\n ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))\n : deletions.push(childToDelete);\n }\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) return null;\n for (; null !== currentFirstChild; )\n deleteChild(returnFiber, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return null;\n }\n function mapRemainingChildren(currentFirstChild) {\n for (var existingChildren = new Map(); null !== currentFirstChild; )\n null !== currentFirstChild.key\n ? existingChildren.set(currentFirstChild.key, currentFirstChild)\n : existingChildren.set(currentFirstChild.index, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n fiber = createWorkInProgress(fiber, pendingProps);\n fiber.index = 0;\n fiber.sibling = null;\n return fiber;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects)\n return (newFiber.flags |= 1048576), lastPlacedIndex;\n newIndex = newFiber.alternate;\n if (null !== newIndex)\n return (\n (newIndex = newIndex.index),\n newIndex < lastPlacedIndex\n ? ((newFiber.flags |= 33554434), lastPlacedIndex)\n : newIndex\n );\n newFiber.flags |= 33554434;\n return lastPlacedIndex;\n }\n function placeSingleChild(newFiber) {\n shouldTrackSideEffects &&\n null === newFiber.alternate &&\n (newFiber.flags |= 33554434);\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (null === current || 6 !== current.tag)\n return (\n (current = createFiberFromText(textContent, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, textContent);\n current.return = returnFiber;\n return current;\n }\n function updateElement(returnFiber, current, element, lanes) {\n var elementType = element.type;\n if (elementType === REACT_FRAGMENT_TYPE)\n return updateFragment(\n returnFiber,\n current,\n element.props.children,\n lanes,\n element.key\n );\n if (\n null !== current &&\n (current.elementType === elementType ||\n (\"object\" === typeof elementType &&\n null !== elementType &&\n elementType.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(elementType) === current.type))\n )\n return (\n (lanes = useFiber(current, element.props)),\n coerceRef(returnFiber, current, lanes, element),\n (lanes.return = returnFiber),\n lanes\n );\n lanes = createFiberFromTypeAndProps(\n element.type,\n element.key,\n element.props,\n null,\n returnFiber.mode,\n lanes\n );\n coerceRef(returnFiber, current, lanes, element);\n lanes.return = returnFiber;\n return lanes;\n }\n function updatePortal(returnFiber, current, portal, lanes) {\n if (\n null === current ||\n 4 !== current.tag ||\n current.stateNode.containerInfo !== portal.containerInfo ||\n current.stateNode.implementation !== portal.implementation\n )\n return (\n (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, portal.children || []);\n current.return = returnFiber;\n return current;\n }\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (null === current || 7 !== current.tag)\n return (\n (current = createFiberFromFragment(\n fragment,\n returnFiber.mode,\n lanes,\n key\n )),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, fragment);\n current.return = returnFiber;\n return current;\n }\n function createChild(returnFiber, newChild, lanes) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild\n )\n return (\n (newChild = createFiberFromText(\n \"\" + newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(returnFiber, null, lanes, newChild),\n (lanes.return = returnFiber),\n lanes\n );\n case REACT_PORTAL_TYPE:\n return (\n (newChild = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n case REACT_LAZY_TYPE:\n var init = newChild._init;\n return createChild(returnFiber, init(newChild._payload), lanes);\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (newChild = createFiberFromFragment(\n newChild,\n returnFiber.mode,\n lanes,\n null\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"function\" === typeof newChild.then)\n return createChild(returnFiber, unwrapThenable(newChild), lanes);\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return createChild(\n returnFiber,\n readContextDuringReconciliation(returnFiber, newChild, lanes),\n lanes\n );\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n var key = null !== oldFiber ? oldFiber.key : null;\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild\n )\n return null !== key\n ? null\n : updateTextNode(returnFiber, oldFiber, \"\" + newChild, lanes);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return newChild.key === key\n ? updateElement(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_PORTAL_TYPE:\n return newChild.key === key\n ? updatePortal(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_LAZY_TYPE:\n return (\n (key = newChild._init),\n updateSlot(returnFiber, oldFiber, key(newChild._payload), lanes)\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return null !== key\n ? null\n : updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n if (\"function\" === typeof newChild.then)\n return updateSlot(\n returnFiber,\n oldFiber,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateSlot(\n returnFiber,\n oldFiber,\n readContextDuringReconciliation(returnFiber, newChild, lanes),\n lanes\n );\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n return null;\n }\n function updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n lanes\n ) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild\n )\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateTextNode(returnFiber, existingChildren, \"\" + newChild, lanes)\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updateElement(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_PORTAL_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updatePortal(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_LAZY_TYPE:\n var init = newChild._init;\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n init(newChild._payload),\n lanes\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateFragment(returnFiber, existingChildren, newChild, lanes, null)\n );\n if (\"function\" === typeof newChild.then)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n readContextDuringReconciliation(returnFiber, newChild, lanes),\n lanes\n );\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n return null;\n }\n function reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChildren,\n lanes\n ) {\n for (\n var resultingFirstChild = null,\n previousNewFiber = null,\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null;\n null !== oldFiber && newIdx < newChildren.length;\n newIdx++\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n newChildren[newIdx],\n lanes\n );\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (resultingFirstChild = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length)\n return (\n deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild\n );\n if (null === oldFiber) {\n for (; newIdx < newChildren.length; newIdx++)\n (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),\n null !== oldFiber &&\n ((currentFirstChild = placeChild(\n oldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = oldFiber)\n : (previousNewFiber.sibling = oldFiber),\n (previousNewFiber = oldFiber));\n return resultingFirstChild;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n newIdx < newChildren.length;\n newIdx++\n )\n (nextOldFiber = updateFromMap(\n oldFiber,\n returnFiber,\n newIdx,\n newChildren[newIdx],\n lanes\n )),\n null !== nextOldFiber &&\n (shouldTrackSideEffects &&\n null !== nextOldFiber.alternate &&\n oldFiber.delete(\n null === nextOldFiber.key ? newIdx : nextOldFiber.key\n ),\n (currentFirstChild = placeChild(\n nextOldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = nextOldFiber)\n : (previousNewFiber.sibling = nextOldFiber),\n (previousNewFiber = nextOldFiber));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChildrenIterable,\n lanes\n ) {\n var iteratorFn = getIteratorFn(newChildrenIterable);\n if (\"function\" !== typeof iteratorFn)\n throw Error(\n \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"\n );\n newChildrenIterable = iteratorFn.call(newChildrenIterable);\n if (null == newChildrenIterable)\n throw Error(\"An iterable object provided no iterator.\");\n for (\n var previousNewFiber = (iteratorFn = null),\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null,\n step = newChildrenIterable.next();\n null !== oldFiber && !step.done;\n newIdx++, step = newChildrenIterable.next()\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (iteratorFn = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done)\n return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn;\n if (null === oldFiber) {\n for (; !step.done; newIdx++, step = newChildrenIterable.next())\n (step = createChild(returnFiber, step.value, lanes)),\n null !== step &&\n ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (iteratorFn = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n return iteratorFn;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n !step.done;\n newIdx++, step = newChildrenIterable.next()\n )\n (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),\n null !== step &&\n (shouldTrackSideEffects &&\n null !== step.alternate &&\n oldFiber.delete(null === step.key ? newIdx : step.key),\n (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (iteratorFn = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n return iteratorFn;\n }\n function reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n ) {\n \"object\" === typeof newChild &&\n null !== newChild &&\n newChild.type === REACT_FRAGMENT_TYPE &&\n null === newChild.key &&\n (newChild = newChild.props.children);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n a: {\n for (\n var key = newChild.key, child = currentFirstChild;\n null !== child;\n\n ) {\n if (child.key === key) {\n key = newChild.type;\n if (key === REACT_FRAGMENT_TYPE) {\n if (7 === child.tag) {\n deleteRemainingChildren(returnFiber, child.sibling);\n currentFirstChild = useFiber(\n child,\n newChild.props.children\n );\n currentFirstChild.return = returnFiber;\n returnFiber = currentFirstChild;\n break a;\n }\n } else if (\n child.elementType === key ||\n (\"object\" === typeof key &&\n null !== key &&\n key.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(key) === child.type)\n ) {\n deleteRemainingChildren(returnFiber, child.sibling);\n currentFirstChild = useFiber(child, newChild.props);\n coerceRef(returnFiber, child, currentFirstChild, newChild);\n currentFirstChild.return = returnFiber;\n returnFiber = currentFirstChild;\n break a;\n }\n deleteRemainingChildren(returnFiber, child);\n break;\n } else deleteChild(returnFiber, child);\n child = child.sibling;\n }\n newChild.type === REACT_FRAGMENT_TYPE\n ? ((currentFirstChild = createFiberFromFragment(\n newChild.props.children,\n returnFiber.mode,\n lanes,\n newChild.key\n )),\n (currentFirstChild.return = returnFiber),\n (returnFiber = currentFirstChild))\n : ((lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(returnFiber, currentFirstChild, lanes, newChild),\n (lanes.return = returnFiber),\n (returnFiber = lanes));\n }\n return placeSingleChild(returnFiber);\n case REACT_PORTAL_TYPE:\n a: {\n for (child = newChild.key; null !== currentFirstChild; ) {\n if (currentFirstChild.key === child)\n if (\n 4 === currentFirstChild.tag &&\n currentFirstChild.stateNode.containerInfo ===\n newChild.containerInfo &&\n currentFirstChild.stateNode.implementation ===\n newChild.implementation\n ) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n currentFirstChild = useFiber(\n currentFirstChild,\n newChild.children || []\n );\n currentFirstChild.return = returnFiber;\n returnFiber = currentFirstChild;\n break a;\n } else {\n deleteRemainingChildren(returnFiber, currentFirstChild);\n break;\n }\n else deleteChild(returnFiber, currentFirstChild);\n currentFirstChild = currentFirstChild.sibling;\n }\n currentFirstChild = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n lanes\n );\n currentFirstChild.return = returnFiber;\n returnFiber = currentFirstChild;\n }\n return placeSingleChild(returnFiber);\n case REACT_LAZY_TYPE:\n return (\n (child = newChild._init),\n reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n child(newChild._payload),\n lanes\n )\n );\n }\n if (isArrayImpl(newChild))\n return reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n if (getIteratorFn(newChild))\n return reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n if (\"function\" === typeof newChild.then)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n readContextDuringReconciliation(returnFiber, newChild, lanes),\n lanes\n );\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n return (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild\n ? ((newChild = \"\" + newChild),\n null !== currentFirstChild && 6 === currentFirstChild.tag\n ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),\n (currentFirstChild = useFiber(currentFirstChild, newChild)),\n (currentFirstChild.return = returnFiber),\n (returnFiber = currentFirstChild))\n : (deleteRemainingChildren(returnFiber, currentFirstChild),\n (currentFirstChild = createFiberFromText(\n newChild,\n returnFiber.mode,\n lanes\n )),\n (currentFirstChild.return = returnFiber),\n (returnFiber = currentFirstChild)),\n placeSingleChild(returnFiber))\n : deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return function (returnFiber, currentFirstChild, newChild, lanes) {\n thenableIndexCounter$1 = 0;\n returnFiber = reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n thenableState$1 = null;\n return returnFiber;\n };\n}\nvar reconcileChildFibers = createChildReconciler(!0),\n mountChildFibers = createChildReconciler(!1),\n currentTreeHiddenStackCursor = createCursor(null),\n prevEntangledRenderLanesCursor = createCursor(0);\nfunction pushHiddenContext(fiber, context) {\n fiber = entangledRenderLanes;\n push(prevEntangledRenderLanesCursor, fiber);\n push(currentTreeHiddenStackCursor, context);\n entangledRenderLanes = fiber | context.baseLanes;\n}\nfunction reuseHiddenContextOnStack() {\n push(prevEntangledRenderLanesCursor, entangledRenderLanes);\n push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);\n}\nfunction popHiddenContext() {\n entangledRenderLanes = prevEntangledRenderLanesCursor.current;\n pop(currentTreeHiddenStackCursor);\n pop(prevEntangledRenderLanesCursor);\n}\nvar suspenseHandlerStackCursor = createCursor(null),\n shellBoundary = null;\nfunction pushPrimaryTreeSuspenseHandler(handler) {\n var current = handler.alternate;\n push(suspenseStackCursor, suspenseStackCursor.current & 1);\n push(suspenseHandlerStackCursor, handler);\n null === shellBoundary &&\n (null === current || null !== currentTreeHiddenStackCursor.current\n ? (shellBoundary = handler)\n : null !== current.memoizedState && (shellBoundary = handler));\n}\nfunction pushOffscreenSuspenseHandler(fiber) {\n if (22 === fiber.tag) {\n if (\n (push(suspenseStackCursor, suspenseStackCursor.current),\n push(suspenseHandlerStackCursor, fiber),\n null === shellBoundary)\n ) {\n var current = fiber.alternate;\n null !== current &&\n null !== current.memoizedState &&\n (shellBoundary = fiber);\n }\n } else reuseSuspenseHandlerOnStack(fiber);\n}\nfunction reuseSuspenseHandlerOnStack() {\n push(suspenseStackCursor, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);\n}\nfunction popSuspenseHandler(fiber) {\n pop(suspenseHandlerStackCursor);\n shellBoundary === fiber && (shellBoundary = null);\n pop(suspenseStackCursor);\n}\nvar suspenseStackCursor = createCursor(0);\nfunction findFirstSuspended(row) {\n for (var node = row; null !== node; ) {\n if (13 === node.tag) {\n var state = node.memoizedState;\n if (null !== state && (null === state.dehydrated || shim$1() || shim$1()))\n return node;\n } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {\n if (0 !== (node.flags & 128)) return node;\n } else if (null !== node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === row) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === row) return null;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n return null;\n}\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,\n renderLanes = 0,\n currentlyRenderingFiber$1 = null,\n currentHook = null,\n workInProgressHook = null,\n didScheduleRenderPhaseUpdate = !1,\n didScheduleRenderPhaseUpdateDuringThisPass = !1,\n shouldDoubleInvokeUserFnsInHooksDEV = !1,\n thenableIndexCounter = 0,\n thenableState = null,\n globalClientIdCounter = 0;\nfunction throwInvalidHookError() {\n throw Error(\n \"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://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n}\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (null === prevDeps) return !1;\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)\n if (!objectIs(nextDeps[i], prevDeps[i])) return !1;\n return !0;\n}\nfunction renderWithHooks(\n current,\n workInProgress,\n Component,\n props,\n secondArg,\n nextRenderLanes\n) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber$1 = workInProgress;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = 0;\n ReactCurrentDispatcher$1.current =\n null === current || null === current.memoizedState\n ? HooksDispatcherOnMount\n : HooksDispatcherOnUpdate;\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n current = Component(props, secondArg);\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n didScheduleRenderPhaseUpdateDuringThisPass &&\n (current = renderWithHooksAgain(\n workInProgress,\n Component,\n props,\n secondArg\n ));\n finishRenderingHooks();\n return current;\n}\nfunction finishRenderingHooks() {\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;\n didScheduleRenderPhaseUpdate = !1;\n thenableIndexCounter = 0;\n thenableState = null;\n if (didRenderTooFewHooks)\n throw Error(\n \"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\"\n );\n}\nfunction renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n currentlyRenderingFiber$1 = workInProgress;\n var numberOfReRenders = 0;\n do {\n didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);\n thenableIndexCounter = 0;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n if (25 <= numberOfReRenders)\n throw Error(\n \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\"\n );\n numberOfReRenders += 1;\n workInProgressHook = currentHook = null;\n workInProgress.updateQueue = null;\n ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender;\n var children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n return children;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.flags &= -2053;\n current.lanes &= ~lanes;\n}\nfunction resetHooksOnUnwind(workInProgress) {\n if (didScheduleRenderPhaseUpdate) {\n for (\n workInProgress = workInProgress.memoizedState;\n null !== workInProgress;\n\n ) {\n var queue = workInProgress.queue;\n null !== queue && (queue.pending = null);\n workInProgress = workInProgress.next;\n }\n didScheduleRenderPhaseUpdate = !1;\n }\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n thenableIndexCounter = 0;\n thenableState = null;\n}\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook)\n : (workInProgressHook = workInProgressHook.next = hook);\n return workInProgressHook;\n}\nfunction updateWorkInProgressHook() {\n if (null === currentHook) {\n var nextCurrentHook = currentlyRenderingFiber$1.alternate;\n nextCurrentHook =\n null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;\n } else nextCurrentHook = currentHook.next;\n var nextWorkInProgressHook =\n null === workInProgressHook\n ? currentlyRenderingFiber$1.memoizedState\n : workInProgressHook.next;\n if (null !== nextWorkInProgressHook)\n (workInProgressHook = nextWorkInProgressHook),\n (currentHook = nextCurrentHook);\n else {\n if (null === nextCurrentHook) {\n if (null === currentlyRenderingFiber$1.alternate)\n throw Error(\n \"Update hook called on initial render. This is likely a bug in React. Please file an issue.\"\n );\n throw Error(\"Rendered more hooks than during the previous render.\");\n }\n currentHook = nextCurrentHook;\n nextCurrentHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook =\n nextCurrentHook)\n : (workInProgressHook = workInProgressHook.next = nextCurrentHook);\n }\n return workInProgressHook;\n}\nvar createFunctionComponentUpdateQueue;\ncreateFunctionComponentUpdateQueue = function () {\n return { lastEffect: null, events: null, stores: null };\n};\nfunction useThenable(thenable) {\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n null === thenableState && (thenableState = []);\n thenable = trackUsedThenable(thenableState, thenable, index);\n null === currentlyRenderingFiber$1.alternate &&\n (null === workInProgressHook\n ? null === currentlyRenderingFiber$1.memoizedState\n : null === workInProgressHook.next) &&\n (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount);\n return thenable;\n}\nfunction use(usable) {\n if (null !== usable && \"object\" === typeof usable) {\n if (\"function\" === typeof usable.then) return useThenable(usable);\n if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);\n }\n throw Error(\"An unsupported type was passed to use(): \" + String(usable));\n}\nfunction basicStateReducer(state, action) {\n return \"function\" === typeof action ? action(state) : action;\n}\nfunction updateReducer(reducer) {\n var hook = updateWorkInProgressHook(),\n current = currentHook,\n queue = hook.queue;\n if (null === queue)\n throw Error(\n \"Should have a queue. This is likely a bug in React. Please file an issue.\"\n );\n queue.lastRenderedReducer = reducer;\n var baseQueue = hook.baseQueue,\n pendingQueue = queue.pending;\n if (null !== pendingQueue) {\n if (null !== baseQueue) {\n var baseFirst = baseQueue.next;\n baseQueue.next = pendingQueue.next;\n pendingQueue.next = baseFirst;\n }\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n pendingQueue = hook.baseState;\n if (null === baseQueue) hook.memoizedState = pendingQueue;\n else {\n current = baseQueue.next;\n var newBaseQueueFirst = (baseFirst = null),\n newBaseQueueLast = null,\n update = current;\n do {\n var updateLane = update.lane & -536870913;\n if (\n updateLane !== update.lane\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n )\n null !== newBaseQueueLast &&\n (newBaseQueueLast = newBaseQueueLast.next =\n {\n lane: 0,\n revertLane: 0,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n (updateLane = update.action),\n shouldDoubleInvokeUserFnsInHooksDEV &&\n reducer(pendingQueue, updateLane),\n (pendingQueue = update.hasEagerState\n ? update.eagerState\n : reducer(pendingQueue, updateLane));\n else {\n var clone = {\n lane: updateLane,\n revertLane: update.revertLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n null === newBaseQueueLast\n ? ((newBaseQueueFirst = newBaseQueueLast = clone),\n (baseFirst = pendingQueue))\n : (newBaseQueueLast = newBaseQueueLast.next = clone);\n currentlyRenderingFiber$1.lanes |= updateLane;\n workInProgressRootSkippedLanes |= updateLane;\n }\n update = update.next;\n } while (null !== update && update !== current);\n null === newBaseQueueLast\n ? (baseFirst = pendingQueue)\n : (newBaseQueueLast.next = newBaseQueueFirst);\n objectIs(pendingQueue, hook.memoizedState) || (didReceiveUpdate = !0);\n hook.memoizedState = pendingQueue;\n hook.baseState = baseFirst;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = pendingQueue;\n }\n null === baseQueue && (queue.lanes = 0);\n return [hook.memoizedState, queue.dispatch];\n}\nfunction rerenderReducer(reducer) {\n var hook = updateWorkInProgressHook(),\n queue = hook.queue;\n if (null === queue)\n throw Error(\n \"Should have a queue. This is likely a bug in React. Please file an issue.\"\n );\n queue.lastRenderedReducer = reducer;\n var dispatch = queue.dispatch,\n lastRenderPhaseUpdate = queue.pending,\n newState = hook.memoizedState;\n if (null !== lastRenderPhaseUpdate) {\n queue.pending = null;\n var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);\n do (newState = reducer(newState, update.action)), (update = update.next);\n while (update !== lastRenderPhaseUpdate);\n objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);\n hook.memoizedState = newState;\n null === hook.baseQueue && (hook.baseState = newState);\n queue.lastRenderedState = newState;\n }\n return [newState, dispatch];\n}\nfunction updateSyncExternalStore(subscribe, getSnapshot) {\n var fiber = currentlyRenderingFiber$1,\n hook = updateWorkInProgressHook();\n var nextSnapshot = getSnapshot();\n var snapshotChanged = !objectIs(\n (currentHook || hook).memoizedState,\n nextSnapshot\n );\n snapshotChanged &&\n ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0));\n hook = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [\n subscribe\n ]);\n if (\n hook.getSnapshot !== getSnapshot ||\n snapshotChanged ||\n (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)\n ) {\n fiber.flags |= 2048;\n pushEffect(\n 9,\n updateStoreInstance.bind(null, fiber, hook, nextSnapshot, getSnapshot),\n { destroy: void 0 },\n null\n );\n if (null === workInProgressRoot)\n throw Error(\n \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\"\n );\n 0 !== (renderLanes & 60) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n return nextSnapshot;\n}\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= 16384;\n fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };\n getSnapshot = currentlyRenderingFiber$1.updateQueue;\n null === getSnapshot\n ? ((getSnapshot = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber$1.updateQueue = getSnapshot),\n (getSnapshot.stores = [fiber]))\n : ((renderedSnapshot = getSnapshot.stores),\n null === renderedSnapshot\n ? (getSnapshot.stores = [fiber])\n : renderedSnapshot.push(fiber));\n}\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n}\nfunction subscribeToStore(fiber, inst, subscribe) {\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n });\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root && scheduleUpdateOnFiber(root, fiber, 2);\n}\nfunction mountStateImpl(initialState) {\n var hook = mountWorkInProgressHook();\n if (\"function\" === typeof initialState) {\n var initialStateInitializer = initialState;\n initialState = initialStateInitializer();\n shouldDoubleInvokeUserFnsInHooksDEV && initialStateInitializer();\n }\n hook.memoizedState = hook.baseState = initialState;\n hook.queue = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n return hook;\n}\nfunction pushEffect(tag, create, inst, deps) {\n tag = { tag: tag, create: create, inst: inst, deps: deps, next: null };\n create = currentlyRenderingFiber$1.updateQueue;\n null === create\n ? ((create = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber$1.updateQueue = create),\n (create.lastEffect = tag.next = tag))\n : ((inst = create.lastEffect),\n null === inst\n ? (create.lastEffect = tag.next = tag)\n : ((deps = inst.next),\n (inst.next = tag),\n (tag.next = deps),\n (create.lastEffect = tag)));\n return tag;\n}\nfunction updateRef() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(\n 1 | hookFlags,\n create,\n { destroy: void 0 },\n void 0 === deps ? null : deps\n );\n}\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var inst = hook.memoizedState.inst;\n null !== currentHook &&\n null !== deps &&\n areHookInputsEqual(deps, currentHook.memoizedState.deps)\n ? (hook.memoizedState = pushEffect(hookFlags, create, inst, deps))\n : ((currentlyRenderingFiber$1.flags |= fiberFlags),\n (hook.memoizedState = pushEffect(1 | hookFlags, create, inst, deps)));\n}\nfunction mountEffect(create, deps) {\n mountEffectImpl(8390656, 8, create, deps);\n}\nfunction updateEffect(create, deps) {\n updateEffectImpl(2048, 8, create, deps);\n}\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(4, 2, create, deps);\n}\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(4, 4, create, deps);\n}\nfunction imperativeHandleEffect(create, ref) {\n if (\"function\" === typeof ref)\n return (\n (create = create()),\n ref(create),\n function () {\n ref(null);\n }\n );\n if (null !== ref && void 0 !== ref)\n return (\n (create = create()),\n (ref.current = create),\n function () {\n ref.current = null;\n }\n );\n}\nfunction updateImperativeHandle(ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);\n}\nfunction mountDebugValue() {}\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n hook.memoizedState = [callback, deps];\n return callback;\n}\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n prevState = nextCreate();\n shouldDoubleInvokeUserFnsInHooksDEV && nextCreate();\n hook.memoizedState = [prevState, deps];\n return prevState;\n}\nfunction mountDeferredValueImpl(hook, value, initialValue) {\n return void 0 !== initialValue && 0 === (renderLanes & 1073741824)\n ? ((hook.memoizedState = initialValue),\n (hook = requestDeferredLane()),\n (currentlyRenderingFiber$1.lanes |= hook),\n (workInProgressRootSkippedLanes |= hook),\n initialValue)\n : (hook.memoizedState = value);\n}\nfunction updateDeferredValueImpl(hook, prevValue, value, initialValue) {\n if (objectIs(value, prevValue)) return value;\n if (null !== currentTreeHiddenStackCursor.current)\n return (\n (hook = mountDeferredValueImpl(hook, value, initialValue)),\n objectIs(hook, prevValue) || (didReceiveUpdate = !0),\n hook\n );\n if (0 === (renderLanes & 42))\n return (didReceiveUpdate = !0), (hook.memoizedState = value);\n hook = requestDeferredLane();\n currentlyRenderingFiber$1.lanes |= hook;\n workInProgressRootSkippedLanes |= hook;\n return prevValue;\n}\nfunction startTransition(fiber, queue, pendingState, finishedState, callback) {\n var previousPriority = currentUpdatePriority;\n currentUpdatePriority =\n 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;\n var prevTransition = ReactCurrentBatchConfig$2.transition,\n currentTransition = { _callbacks: new Set() };\n ReactCurrentBatchConfig$2.transition = null;\n dispatchSetState(fiber, queue, pendingState);\n ReactCurrentBatchConfig$2.transition = currentTransition;\n try {\n dispatchSetState(fiber, queue, finishedState), callback();\n } catch (error) {\n throw error;\n } finally {\n (currentUpdatePriority = previousPriority),\n (ReactCurrentBatchConfig$2.transition = prevTransition);\n }\n}\nfunction updateId() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction dispatchReducerAction(fiber, queue, action) {\n var lane = requestUpdateLane(fiber);\n action = {\n lane: lane,\n revertLane: 0,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n isRenderPhaseUpdate(fiber)\n ? enqueueRenderPhaseUpdate(queue, action)\n : (enqueueUpdate$1(fiber, queue, action, lane),\n (action = getRootForUpdatedFiber(fiber)),\n null !== action &&\n (scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane)));\n}\nfunction dispatchSetState(fiber, queue, action) {\n var lane = requestUpdateLane(fiber),\n update = {\n lane: lane,\n revertLane: 0,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);\n else {\n var alternate = fiber.alternate;\n if (\n 0 === fiber.lanes &&\n (null === alternate || 0 === alternate.lanes) &&\n ((alternate = queue.lastRenderedReducer), null !== alternate)\n )\n try {\n var currentState = queue.lastRenderedState,\n eagerState = alternate(currentState, action);\n update.hasEagerState = !0;\n update.eagerState = eagerState;\n if (objectIs(eagerState, currentState)) {\n enqueueUpdate$1(fiber, queue, update, 0);\n null === workInProgressRoot && finishQueueingConcurrentUpdates();\n return;\n }\n } catch (error) {\n } finally {\n }\n enqueueUpdate$1(fiber, queue, update, lane);\n action = getRootForUpdatedFiber(fiber);\n null !== action &&\n (scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane));\n }\n}\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return (\n fiber === currentlyRenderingFiber$1 ||\n (null !== alternate && alternate === currentlyRenderingFiber$1)\n );\n}\nfunction enqueueRenderPhaseUpdate(queue, update) {\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =\n !0;\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n}\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (0 !== (lane & 4194176)) {\n var queueLanes = queue.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n queue.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n use: use,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError\n },\n HooksDispatcherOnMount = {\n readContext: readContext,\n use: use,\n useCallback: function (callback, deps) {\n mountWorkInProgressHook().memoizedState = [\n callback,\n void 0 === deps ? null : deps\n ];\n return callback;\n },\n useContext: readContext,\n useEffect: mountEffect,\n useImperativeHandle: function (ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n mountEffectImpl(\n 4194308,\n 4,\n imperativeHandleEffect.bind(null, create, ref),\n deps\n );\n },\n useLayoutEffect: function (create, deps) {\n return mountEffectImpl(4194308, 4, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n mountEffectImpl(4, 2, create, deps);\n },\n useMemo: function (nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var nextValue = nextCreate();\n shouldDoubleInvokeUserFnsInHooksDEV && nextCreate();\n hook.memoizedState = [nextValue, deps];\n return nextValue;\n },\n useReducer: function (reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n if (void 0 !== init) {\n var initialState = init(initialArg);\n shouldDoubleInvokeUserFnsInHooksDEV && init(initialArg);\n } else initialState = initialArg;\n hook.memoizedState = hook.baseState = initialState;\n reducer = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = reducer;\n reducer = reducer.dispatch = dispatchReducerAction.bind(\n null,\n currentlyRenderingFiber$1,\n reducer\n );\n return [hook.memoizedState, reducer];\n },\n useRef: function (initialValue) {\n var hook = mountWorkInProgressHook();\n initialValue = { current: initialValue };\n return (hook.memoizedState = initialValue);\n },\n useState: function (initialState) {\n initialState = mountStateImpl(initialState);\n var queue = initialState.queue,\n dispatch = dispatchSetState.bind(\n null,\n currentlyRenderingFiber$1,\n queue\n );\n queue.dispatch = dispatch;\n return [initialState.memoizedState, dispatch];\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = mountWorkInProgressHook();\n return mountDeferredValueImpl(hook, value, initialValue);\n },\n useTransition: function () {\n var stateHook = mountStateImpl(!1);\n stateHook = startTransition.bind(\n null,\n currentlyRenderingFiber$1,\n stateHook.queue,\n !0,\n !1\n );\n mountWorkInProgressHook().memoizedState = stateHook;\n return [!1, stateHook];\n },\n useSyncExternalStore: function (subscribe, getSnapshot) {\n var fiber = currentlyRenderingFiber$1,\n hook = mountWorkInProgressHook();\n var nextSnapshot = getSnapshot();\n if (null === workInProgressRoot)\n throw Error(\n \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\"\n );\n 0 !== (workInProgressRootRenderLanes & 60) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n hook.memoizedState = nextSnapshot;\n var inst = { value: nextSnapshot, getSnapshot: getSnapshot };\n hook.queue = inst;\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [\n subscribe\n ]);\n fiber.flags |= 2048;\n pushEffect(\n 9,\n updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot),\n { destroy: void 0 },\n null\n );\n return nextSnapshot;\n },\n useId: function () {\n var hook = mountWorkInProgressHook(),\n identifierPrefix = workInProgressRoot.identifierPrefix,\n globalClientId = globalClientIdCounter++;\n identifierPrefix =\n \":\" + identifierPrefix + \"r\" + globalClientId.toString(32) + \":\";\n return (hook.memoizedState = identifierPrefix);\n }\n },\n HooksDispatcherOnUpdate = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: updateReducer,\n useRef: updateRef,\n useState: function () {\n return updateReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = updateReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId\n },\n HooksDispatcherOnRerender = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: rerenderReducer,\n useRef: updateRef,\n useState: function () {\n return rerenderReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return null === currentHook\n ? mountDeferredValueImpl(hook, value, initialValue)\n : updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = rerenderReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId\n };\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n baseProps = assign({}, baseProps);\n Component = Component.defaultProps;\n for (var propName in Component)\n void 0 === baseProps[propName] &&\n (baseProps[propName] = Component[propName]);\n return baseProps;\n }\n return baseProps;\n}\nfunction applyDerivedStateFromProps(\n workInProgress,\n ctor,\n getDerivedStateFromProps,\n nextProps\n) {\n ctor = workInProgress.memoizedState;\n getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);\n getDerivedStateFromProps =\n null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps\n ? ctor\n : assign({}, ctor, getDerivedStateFromProps);\n workInProgress.memoizedState = getDerivedStateFromProps;\n 0 === workInProgress.lanes &&\n (workInProgress.updateQueue.baseState = getDerivedStateFromProps);\n}\nvar classComponentUpdater = {\n isMounted: function (component) {\n return (component = component._reactInternals)\n ? getNearestMountedFiber(component) === component\n : !1;\n },\n enqueueSetState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(inst),\n update = createUpdate(lane);\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueReplaceState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(inst),\n update = createUpdate(lane);\n update.tag = 1;\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueForceUpdate: function (inst, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(inst),\n update = createUpdate(lane);\n update.tag = 2;\n void 0 !== callback && null !== callback && (update.callback = callback);\n callback = enqueueUpdate(inst, update, lane);\n null !== callback &&\n (scheduleUpdateOnFiber(callback, inst, lane),\n entangleTransitions(callback, inst, lane));\n }\n};\nfunction checkShouldComponentUpdate(\n workInProgress,\n ctor,\n oldProps,\n newProps,\n oldState,\n newState,\n nextContext\n) {\n workInProgress = workInProgress.stateNode;\n return \"function\" === typeof workInProgress.shouldComponentUpdate\n ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)\n : ctor.prototype && ctor.prototype.isPureReactComponent\n ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)\n : !0;\n}\nfunction constructClassInstance(workInProgress, ctor, props) {\n var context = emptyContextObject,\n contextType = ctor.contextType;\n \"object\" === typeof contextType &&\n null !== contextType &&\n (context = readContext(contextType));\n ctor = new ctor(props, context);\n workInProgress.memoizedState =\n null !== ctor.state && void 0 !== ctor.state ? ctor.state : null;\n ctor.updater = classComponentUpdater;\n workInProgress.stateNode = ctor;\n ctor._reactInternals = workInProgress;\n return ctor;\n}\nfunction callComponentWillReceiveProps(\n workInProgress,\n instance,\n newProps,\n nextContext\n) {\n workInProgress = instance.state;\n \"function\" === typeof instance.componentWillReceiveProps &&\n instance.componentWillReceiveProps(newProps, nextContext);\n \"function\" === typeof instance.UNSAFE_componentWillReceiveProps &&\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n instance.state !== workInProgress &&\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n}\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = {};\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n instance.context =\n \"object\" === typeof contextType && null !== contextType\n ? readContext(contextType)\n : emptyContextObject;\n instance.state = workInProgress.memoizedState;\n contextType = ctor.getDerivedStateFromProps;\n \"function\" === typeof contextType &&\n (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps),\n (instance.state = workInProgress.memoizedState));\n \"function\" === typeof ctor.getDerivedStateFromProps ||\n \"function\" === typeof instance.getSnapshotBeforeUpdate ||\n (\"function\" !== typeof instance.UNSAFE_componentWillMount &&\n \"function\" !== typeof instance.componentWillMount) ||\n ((ctor = instance.state),\n \"function\" === typeof instance.componentWillMount &&\n instance.componentWillMount(),\n \"function\" === typeof instance.UNSAFE_componentWillMount &&\n instance.UNSAFE_componentWillMount(),\n ctor !== instance.state &&\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null),\n processUpdateQueue(workInProgress, newProps, instance, renderLanes),\n (instance.state = workInProgress.memoizedState));\n \"function\" === typeof instance.componentDidMount &&\n (workInProgress.flags |= 4194308);\n}\nvar CapturedStacks = new WeakMap();\nfunction createCapturedValueAtFiber(value, source) {\n if (\"object\" === typeof value && null !== value) {\n var stack = CapturedStacks.get(value);\n \"string\" !== typeof stack &&\n ((stack = getStackByFiberInDevAndProd(source)),\n CapturedStacks.set(value, stack));\n } else stack = getStackByFiberInDevAndProd(source);\n return { value: value, source: source, stack: stack, digest: null };\n}\nfunction createCapturedValueFromError(value, digest, stack) {\n \"string\" === typeof stack && CapturedStacks.set(value, stack);\n return {\n value: value,\n source: null,\n stack: null != stack ? stack : null,\n digest: null != digest ? digest : null\n };\n}\nif (\n \"function\" !==\n typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog\n)\n throw Error(\n \"Expected ReactFiberErrorDialog.showErrorDialog to be a function.\"\n );\nfunction logCapturedError(boundary, errorInfo) {\n try {\n !1 !==\n ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog({\n componentStack: null !== errorInfo.stack ? errorInfo.stack : \"\",\n error: errorInfo.value,\n errorBoundary:\n null !== boundary && 1 === boundary.tag ? boundary.stateNode : null\n }) && console.error(errorInfo.value);\n } catch (e) {\n setTimeout(function () {\n throw e;\n });\n }\n}\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n lane.payload = { element: null };\n var error = errorInfo.value;\n lane.callback = function () {\n hasUncaughtError || ((hasUncaughtError = !0), (firstUncaughtError = error));\n logCapturedError(fiber, errorInfo);\n };\n return lane;\n}\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n if (\"function\" === typeof getDerivedStateFromError) {\n var error = errorInfo.value;\n lane.payload = function () {\n return getDerivedStateFromError(error);\n };\n lane.callback = function () {\n logCapturedError(fiber, errorInfo);\n };\n }\n var inst = fiber.stateNode;\n null !== inst &&\n \"function\" === typeof inst.componentDidCatch &&\n (lane.callback = function () {\n logCapturedError(fiber, errorInfo);\n \"function\" !== typeof getDerivedStateFromError &&\n (null === legacyErrorBoundariesThatAlreadyFailed\n ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))\n : legacyErrorBoundariesThatAlreadyFailed.add(this));\n var stack = errorInfo.stack;\n this.componentDidCatch(errorInfo.value, {\n componentStack: null !== stack ? stack : \"\"\n });\n });\n return lane;\n}\nfunction throwException(\n root,\n returnFiber,\n sourceFiber,\n value,\n rootRenderLanes\n) {\n sourceFiber.flags |= 32768;\n if (\n null !== value &&\n \"object\" === typeof value &&\n \"function\" === typeof value.then\n ) {\n var tag = sourceFiber.tag;\n 0 !== (sourceFiber.mode & 1) ||\n (0 !== tag && 11 !== tag && 15 !== tag) ||\n ((tag = sourceFiber.alternate)\n ? ((sourceFiber.updateQueue = tag.updateQueue),\n (sourceFiber.memoizedState = tag.memoizedState),\n (sourceFiber.lanes = tag.lanes))\n : ((sourceFiber.updateQueue = null),\n (sourceFiber.memoizedState = null)));\n tag = suspenseHandlerStackCursor.current;\n if (null !== tag) {\n switch (tag.tag) {\n case 13:\n return (\n sourceFiber.mode & 1 &&\n (null === shellBoundary\n ? renderDidSuspendDelayIfPossible()\n : null === tag.alternate &&\n 0 === workInProgressRootExitStatus &&\n (workInProgressRootExitStatus = 3)),\n (tag.flags &= -257),\n 0 === (tag.mode & 1)\n ? tag === returnFiber\n ? (tag.flags |= 65536)\n : ((tag.flags |= 128),\n (sourceFiber.flags |= 131072),\n (sourceFiber.flags &= -52805),\n 1 === sourceFiber.tag &&\n (null === sourceFiber.alternate\n ? (sourceFiber.tag = 17)\n : ((returnFiber = createUpdate(2)),\n (returnFiber.tag = 2),\n enqueueUpdate(sourceFiber, returnFiber, 2))),\n (sourceFiber.lanes |= 2))\n : ((tag.flags |= 65536), (tag.lanes = rootRenderLanes)),\n value === noopSuspenseyCommitThenable\n ? (tag.flags |= 16384)\n : ((returnFiber = tag.updateQueue),\n null === returnFiber\n ? (tag.updateQueue = new Set([value]))\n : returnFiber.add(value),\n tag.mode & 1 &&\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n case 22:\n if (tag.mode & 1)\n return (\n (tag.flags |= 65536),\n value === noopSuspenseyCommitThenable\n ? (tag.flags |= 16384)\n : ((returnFiber = tag.updateQueue),\n null === returnFiber\n ? ((returnFiber = {\n transitions: null,\n markerInstances: null,\n retryQueue: new Set([value])\n }),\n (tag.updateQueue = returnFiber))\n : ((sourceFiber = returnFiber.retryQueue),\n null === sourceFiber\n ? (returnFiber.retryQueue = new Set([value]))\n : sourceFiber.add(value)),\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n }\n throw Error(\n \"Unexpected Suspense handler tag (\" +\n tag.tag +\n \"). This is a bug in React.\"\n );\n }\n if (1 === root.tag)\n return (\n attachPingListener(root, value, rootRenderLanes),\n renderDidSuspendDelayIfPossible(),\n !1\n );\n value = Error(\n \"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.\"\n );\n }\n root = value = createCapturedValueAtFiber(value, sourceFiber);\n 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);\n null === workInProgressRootConcurrentErrors\n ? (workInProgressRootConcurrentErrors = [root])\n : workInProgressRootConcurrentErrors.push(root);\n if (null === returnFiber) return !0;\n root = returnFiber;\n do {\n switch (root.tag) {\n case 3:\n return (\n (root.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (root.lanes |= rootRenderLanes),\n (rootRenderLanes = createRootErrorUpdate(\n root,\n value,\n rootRenderLanes\n )),\n enqueueCapturedUpdate(root, rootRenderLanes),\n !1\n );\n case 1:\n if (\n ((returnFiber = value),\n (sourceFiber = root.type),\n (tag = root.stateNode),\n 0 === (root.flags & 128) &&\n (\"function\" === typeof sourceFiber.getDerivedStateFromError ||\n (null !== tag &&\n \"function\" === typeof tag.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(tag)))))\n )\n return (\n (root.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (root.lanes |= rootRenderLanes),\n (rootRenderLanes = createClassErrorUpdate(\n root,\n returnFiber,\n rootRenderLanes\n )),\n enqueueCapturedUpdate(root, rootRenderLanes),\n !1\n );\n }\n root = root.return;\n } while (null !== root);\n return !1;\n}\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,\n SelectiveHydrationException = Error(\n \"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue.\"\n ),\n didReceiveUpdate = !1;\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n workInProgress.child =\n null === current\n ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)\n : reconcileChildFibers(\n workInProgress,\n current.child,\n nextChildren,\n renderLanes\n );\n}\nfunction updateForwardRef(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n Component = Component.render;\n var ref = workInProgress.ref;\n prepareToReadContext(workInProgress, renderLanes);\n nextProps = renderWithHooks(\n current,\n workInProgress,\n Component,\n nextProps,\n ref,\n renderLanes\n );\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null === current) {\n var type = Component.type;\n if (\n \"function\" === typeof type &&\n !shouldConstruct(type) &&\n void 0 === type.defaultProps &&\n null === Component.compare &&\n void 0 === Component.defaultProps\n )\n return (\n (workInProgress.tag = 15),\n (workInProgress.type = type),\n updateSimpleMemoComponent(\n current,\n workInProgress,\n type,\n nextProps,\n renderLanes\n )\n );\n current = createFiberFromTypeAndProps(\n Component.type,\n null,\n nextProps,\n workInProgress,\n workInProgress.mode,\n renderLanes\n );\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n }\n type = current.child;\n if (0 === (current.lanes & renderLanes)) {\n var prevProps = type.memoizedProps;\n Component = Component.compare;\n Component = null !== Component ? Component : shallowEqual;\n if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n workInProgress.flags |= 1;\n current = createWorkInProgress(type, nextProps);\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n}\nfunction updateSimpleMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null !== current) {\n var prevProps = current.memoizedProps;\n if (\n shallowEqual(prevProps, nextProps) &&\n current.ref === workInProgress.ref\n )\n if (\n ((didReceiveUpdate = !1),\n (workInProgress.pendingProps = nextProps = prevProps),\n 0 !== (current.lanes & renderLanes))\n )\n 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);\n else\n return (\n (workInProgress.lanes = current.lanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n }\n return updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n );\n}\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n nextChildren = nextProps.children,\n nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),\n prevState = null !== current ? current.memoizedState : null;\n markRef(current, workInProgress);\n if (\"hidden\" === nextProps.mode || nextIsDetached) {\n if (0 !== (workInProgress.flags & 128)) {\n renderLanes =\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;\n if (null !== current) {\n nextProps = workInProgress.child = current.child;\n for (nextChildren = 0; null !== nextProps; )\n (nextChildren =\n nextChildren | nextProps.lanes | nextProps.childLanes),\n (nextProps = nextProps.sibling);\n workInProgress.childLanes = nextChildren & ~renderLanes;\n } else (workInProgress.childLanes = 0), (workInProgress.child = null);\n return deferHiddenOffscreenComponent(\n current,\n workInProgress,\n renderLanes\n );\n }\n if (0 === (workInProgress.mode & 1))\n (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),\n reuseHiddenContextOnStack();\n else {\n if (0 === (renderLanes & 536870912))\n return (\n (workInProgress.lanes = workInProgress.childLanes = 536870912),\n deferHiddenOffscreenComponent(\n current,\n workInProgress,\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes\n )\n );\n workInProgress.memoizedState = { baseLanes: 0, cachePool: null };\n null !== prevState\n ? pushHiddenContext(workInProgress, prevState)\n : reuseHiddenContextOnStack();\n }\n pushOffscreenSuspenseHandler(workInProgress);\n } else\n null !== prevState\n ? (pushHiddenContext(workInProgress, prevState),\n reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.memoizedState = null))\n : (reuseHiddenContextOnStack(),\n reuseSuspenseHandlerOnStack(workInProgress));\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\nfunction deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes) {\n workInProgress.memoizedState = { baseLanes: nextBaseLanes, cachePool: null };\n reuseHiddenContextOnStack();\n pushOffscreenSuspenseHandler(workInProgress);\n return null;\n}\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n if (null === ref)\n null !== current &&\n null !== current.ref &&\n (workInProgress.flags |= 2097664);\n else {\n if (\"function\" !== typeof ref && \"object\" !== typeof ref)\n throw Error(\n \"Expected ref to be a function, an object returned by React.createRef(), or undefined/null.\"\n );\n if (null === current || current.ref !== ref)\n workInProgress.flags |= 2097664;\n }\n}\nfunction updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress, renderLanes);\n Component = renderWithHooks(\n current,\n workInProgress,\n Component,\n nextProps,\n void 0,\n renderLanes\n );\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, Component, renderLanes);\n return workInProgress.child;\n}\nfunction replayFunctionComponent(\n current,\n workInProgress,\n nextProps,\n Component,\n secondArg,\n renderLanes\n) {\n prepareToReadContext(workInProgress, renderLanes);\n nextProps = renderWithHooksAgain(\n workInProgress,\n Component,\n nextProps,\n secondArg\n );\n finishRenderingHooks();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateClassComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress, renderLanes);\n if (null === workInProgress.stateNode)\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),\n constructClassInstance(workInProgress, Component, nextProps),\n mountClassInstance(workInProgress, Component, nextProps, renderLanes),\n (nextProps = !0);\n else if (null === current) {\n var instance = workInProgress.stateNode,\n oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context,\n contextType = Component.contextType,\n nextContext = emptyContextObject;\n \"object\" === typeof contextType &&\n null !== contextType &&\n (nextContext = readContext(contextType));\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n (contextType =\n \"function\" === typeof getDerivedStateFromProps ||\n \"function\" === typeof instance.getSnapshotBeforeUpdate) ||\n (\"function\" !== typeof instance.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof instance.componentWillReceiveProps) ||\n ((oldProps !== nextProps || oldContext !== nextContext) &&\n callComponentWillReceiveProps(\n workInProgress,\n instance,\n nextProps,\n nextContext\n ));\n hasForceUpdate = !1;\n var oldState = workInProgress.memoizedState;\n instance.state = oldState;\n processUpdateQueue(workInProgress, nextProps, instance, renderLanes);\n oldContext = workInProgress.memoizedState;\n oldProps !== nextProps || oldState !== oldContext || hasForceUpdate\n ? (\"function\" === typeof getDerivedStateFromProps &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n getDerivedStateFromProps,\n nextProps\n ),\n (oldContext = workInProgress.memoizedState)),\n (oldProps =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n oldProps,\n nextProps,\n oldState,\n oldContext,\n nextContext\n ))\n ? (contextType ||\n (\"function\" !== typeof instance.UNSAFE_componentWillMount &&\n \"function\" !== typeof instance.componentWillMount) ||\n (\"function\" === typeof instance.componentWillMount &&\n instance.componentWillMount(),\n \"function\" === typeof instance.UNSAFE_componentWillMount &&\n instance.UNSAFE_componentWillMount()),\n \"function\" === typeof instance.componentDidMount &&\n (workInProgress.flags |= 4194308))\n : (\"function\" === typeof instance.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = oldContext)),\n (instance.props = nextProps),\n (instance.state = oldContext),\n (instance.context = nextContext),\n (nextProps = oldProps))\n : (\"function\" === typeof instance.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (nextProps = !1));\n } else {\n instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n nextContext = workInProgress.memoizedProps;\n contextType =\n workInProgress.type === workInProgress.elementType\n ? nextContext\n : resolveDefaultProps(workInProgress.type, nextContext);\n instance.props = contextType;\n getDerivedStateFromProps = workInProgress.pendingProps;\n var oldContext$jscomp$0 = instance.context;\n oldContext = Component.contextType;\n oldProps = emptyContextObject;\n \"object\" === typeof oldContext &&\n null !== oldContext &&\n (oldProps = readContext(oldContext));\n oldState = Component.getDerivedStateFromProps;\n (oldContext =\n \"function\" === typeof oldState ||\n \"function\" === typeof instance.getSnapshotBeforeUpdate) ||\n (\"function\" !== typeof instance.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof instance.componentWillReceiveProps) ||\n ((nextContext !== getDerivedStateFromProps ||\n oldContext$jscomp$0 !== oldProps) &&\n callComponentWillReceiveProps(\n workInProgress,\n instance,\n nextProps,\n oldProps\n ));\n hasForceUpdate = !1;\n oldContext$jscomp$0 = workInProgress.memoizedState;\n instance.state = oldContext$jscomp$0;\n processUpdateQueue(workInProgress, nextProps, instance, renderLanes);\n var newState = workInProgress.memoizedState;\n nextContext !== getDerivedStateFromProps ||\n oldContext$jscomp$0 !== newState ||\n hasForceUpdate\n ? (\"function\" === typeof oldState &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n oldState,\n nextProps\n ),\n (newState = workInProgress.memoizedState)),\n (contextType =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n contextType,\n nextProps,\n oldContext$jscomp$0,\n newState,\n oldProps\n ) ||\n !1)\n ? (oldContext ||\n (\"function\" !== typeof instance.UNSAFE_componentWillUpdate &&\n \"function\" !== typeof instance.componentWillUpdate) ||\n (\"function\" === typeof instance.componentWillUpdate &&\n instance.componentWillUpdate(nextProps, newState, oldProps),\n \"function\" === typeof instance.UNSAFE_componentWillUpdate &&\n instance.UNSAFE_componentWillUpdate(\n nextProps,\n newState,\n oldProps\n )),\n \"function\" === typeof instance.componentDidUpdate &&\n (workInProgress.flags |= 4),\n \"function\" === typeof instance.getSnapshotBeforeUpdate &&\n (workInProgress.flags |= 1024))\n : (\"function\" !== typeof instance.componentDidUpdate ||\n (nextContext === current.memoizedProps &&\n oldContext$jscomp$0 === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof instance.getSnapshotBeforeUpdate ||\n (nextContext === current.memoizedProps &&\n oldContext$jscomp$0 === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = newState)),\n (instance.props = nextProps),\n (instance.state = newState),\n (instance.context = oldProps),\n (nextProps = contextType))\n : (\"function\" !== typeof instance.componentDidUpdate ||\n (nextContext === current.memoizedProps &&\n oldContext$jscomp$0 === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof instance.getSnapshotBeforeUpdate ||\n (nextContext === current.memoizedProps &&\n oldContext$jscomp$0 === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (nextProps = !1));\n }\n return finishClassComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n !1,\n renderLanes\n );\n}\nfunction finishClassComponent(\n current,\n workInProgress,\n Component,\n shouldUpdate,\n hasContext,\n renderLanes\n) {\n markRef(current, workInProgress);\n hasContext = 0 !== (workInProgress.flags & 128);\n if (!shouldUpdate && !hasContext)\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n shouldUpdate = workInProgress.stateNode;\n ReactCurrentOwner$1.current = workInProgress;\n Component =\n hasContext && \"function\" !== typeof Component.getDerivedStateFromError\n ? null\n : shouldUpdate.render();\n workInProgress.flags |= 1;\n null !== current && hasContext\n ? ((workInProgress.child = reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n )),\n (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n Component,\n renderLanes\n )))\n : reconcileChildren(current, workInProgress, Component, renderLanes);\n workInProgress.memoizedState = shouldUpdate.state;\n return workInProgress.child;\n}\nvar SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 };\nfunction mountSuspenseOffscreenState(renderLanes) {\n return { baseLanes: renderLanes, cachePool: null };\n}\nfunction getRemainingWorkInPrimaryTree(\n current,\n primaryTreeDidDefer,\n renderLanes\n) {\n current = null !== current ? current.childLanes & ~renderLanes : 0;\n primaryTreeDidDefer && (current |= workInProgressDeferredLane);\n return current;\n}\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n showFallback = !1,\n didSuspend = 0 !== (workInProgress.flags & 128),\n JSCompiler_temp;\n (JSCompiler_temp = didSuspend) ||\n (JSCompiler_temp =\n null !== current && null === current.memoizedState\n ? !1\n : 0 !== (suspenseStackCursor.current & 2));\n JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));\n JSCompiler_temp = 0 !== (workInProgress.flags & 32);\n workInProgress.flags &= -33;\n if (null === current) {\n didSuspend = nextProps.children;\n nextProps = nextProps.fallback;\n if (showFallback) {\n reuseSuspenseHandlerOnStack(workInProgress);\n showFallback = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n didSuspend = { mode: \"hidden\", children: didSuspend };\n 0 === (showFallback & 1) && null !== progressedPrimaryFragment\n ? ((progressedPrimaryFragment.childLanes = 0),\n (progressedPrimaryFragment.pendingProps = didSuspend))\n : (progressedPrimaryFragment = createFiberFromOffscreen(\n didSuspend,\n showFallback,\n 0,\n null\n ));\n nextProps = createFiberFromFragment(\n nextProps,\n showFallback,\n renderLanes,\n null\n );\n progressedPrimaryFragment.return = workInProgress;\n nextProps.return = workInProgress;\n progressedPrimaryFragment.sibling = nextProps;\n workInProgress.child = progressedPrimaryFragment;\n showFallback = workInProgress.child;\n showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes);\n showFallback.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n );\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return nextProps;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n return mountSuspensePrimaryChildren(workInProgress, didSuspend);\n }\n progressedPrimaryFragment = current.memoizedState;\n if (null !== progressedPrimaryFragment) {\n var dehydrated = progressedPrimaryFragment.dehydrated;\n if (null !== dehydrated)\n return updateDehydratedSuspenseComponent(\n current,\n workInProgress,\n didSuspend,\n JSCompiler_temp,\n nextProps,\n dehydrated,\n progressedPrimaryFragment,\n renderLanes\n );\n }\n if (showFallback) {\n reuseSuspenseHandlerOnStack(workInProgress);\n showFallback = nextProps.fallback;\n didSuspend = workInProgress.mode;\n progressedPrimaryFragment = current.child;\n dehydrated = progressedPrimaryFragment.sibling;\n var primaryChildProps = { mode: \"hidden\", children: nextProps.children };\n 0 === (didSuspend & 1) && workInProgress.child !== progressedPrimaryFragment\n ? ((nextProps = workInProgress.child),\n (nextProps.childLanes = 0),\n (nextProps.pendingProps = primaryChildProps),\n (workInProgress.deletions = null))\n : ((nextProps = createWorkInProgress(\n progressedPrimaryFragment,\n primaryChildProps\n )),\n (nextProps.subtreeFlags =\n progressedPrimaryFragment.subtreeFlags & 31457280));\n null !== dehydrated\n ? (showFallback = createWorkInProgress(dehydrated, showFallback))\n : ((showFallback = createFiberFromFragment(\n showFallback,\n didSuspend,\n renderLanes,\n null\n )),\n (showFallback.flags |= 2));\n showFallback.return = workInProgress;\n nextProps.return = workInProgress;\n nextProps.sibling = showFallback;\n workInProgress.child = nextProps;\n nextProps = showFallback;\n showFallback = workInProgress.child;\n didSuspend = current.child.memoizedState;\n didSuspend =\n null === didSuspend\n ? mountSuspenseOffscreenState(renderLanes)\n : { baseLanes: didSuspend.baseLanes | renderLanes, cachePool: null };\n showFallback.memoizedState = didSuspend;\n showFallback.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n );\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return nextProps;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n JSCompiler_temp = current.child;\n current = JSCompiler_temp.sibling;\n JSCompiler_temp = createWorkInProgress(JSCompiler_temp, {\n mode: \"visible\",\n children: nextProps.children\n });\n 0 === (workInProgress.mode & 1) && (JSCompiler_temp.lanes = renderLanes);\n JSCompiler_temp.return = workInProgress;\n JSCompiler_temp.sibling = null;\n null !== current &&\n ((renderLanes = workInProgress.deletions),\n null === renderLanes\n ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))\n : renderLanes.push(current));\n workInProgress.child = JSCompiler_temp;\n workInProgress.memoizedState = null;\n return JSCompiler_temp;\n}\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren) {\n primaryChildren = createFiberFromOffscreen(\n { mode: \"visible\", children: primaryChildren },\n workInProgress.mode,\n 0,\n null\n );\n primaryChildren.return = workInProgress;\n return (workInProgress.child = primaryChildren);\n}\nfunction retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n recoverableError\n) {\n null !== recoverableError &&\n (null === hydrationErrors\n ? (hydrationErrors = [recoverableError])\n : hydrationErrors.push(recoverableError));\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n current = mountSuspensePrimaryChildren(\n workInProgress,\n workInProgress.pendingProps.children\n );\n current.flags |= 2;\n workInProgress.memoizedState = null;\n return current;\n}\nfunction updateDehydratedSuspenseComponent(\n current,\n workInProgress,\n didSuspend,\n didPrimaryChildrenDefer,\n nextProps,\n suspenseInstance,\n suspenseState,\n renderLanes\n) {\n if (didSuspend) {\n if (workInProgress.flags & 256)\n return (\n pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags &= -257),\n (didPrimaryChildrenDefer = createCapturedValueFromError(\n Error(\n \"There was an error while hydrating this Suspense boundary. Switched to client rendering.\"\n )\n )),\n retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n didPrimaryChildrenDefer\n )\n );\n if (null !== workInProgress.memoizedState)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n null\n );\n reuseSuspenseHandlerOnStack(workInProgress);\n suspenseState = nextProps.fallback;\n didSuspend = workInProgress.mode;\n nextProps = createFiberFromOffscreen(\n { mode: \"visible\", children: nextProps.children },\n didSuspend,\n 0,\n null\n );\n suspenseState = createFiberFromFragment(\n suspenseState,\n didSuspend,\n renderLanes,\n null\n );\n suspenseState.flags |= 2;\n nextProps.return = workInProgress;\n suspenseState.return = workInProgress;\n nextProps.sibling = suspenseState;\n workInProgress.child = nextProps;\n 0 !== (workInProgress.mode & 1) &&\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n nextProps = workInProgress.child;\n nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes);\n nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n didPrimaryChildrenDefer,\n renderLanes\n );\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return suspenseState;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n if (0 === (workInProgress.mode & 1))\n return retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n null\n );\n if (shim$1())\n return (\n (didPrimaryChildrenDefer = shim$1().digest),\n (suspenseState = Error(\n \"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.\"\n )),\n (suspenseState.digest = didPrimaryChildrenDefer),\n (didPrimaryChildrenDefer = createCapturedValueFromError(\n suspenseState,\n didPrimaryChildrenDefer,\n void 0\n )),\n retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n didPrimaryChildrenDefer\n )\n );\n didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes);\n if (didReceiveUpdate || didPrimaryChildrenDefer) {\n didPrimaryChildrenDefer = workInProgressRoot;\n if (null !== didPrimaryChildrenDefer) {\n nextProps = renderLanes & -renderLanes;\n if (0 !== (nextProps & 42)) nextProps = 1;\n else\n switch (nextProps) {\n case 2:\n nextProps = 1;\n break;\n case 8:\n nextProps = 4;\n break;\n case 32:\n nextProps = 16;\n break;\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n nextProps = 64;\n break;\n case 268435456:\n nextProps = 134217728;\n break;\n default:\n nextProps = 0;\n }\n nextProps =\n 0 !==\n (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes))\n ? 0\n : nextProps;\n if (0 !== nextProps && nextProps !== suspenseState.retryLane)\n throw (\n ((suspenseState.retryLane = nextProps),\n enqueueConcurrentRenderForLane(current, nextProps),\n scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps),\n SelectiveHydrationException)\n );\n }\n shim$1() || renderDidSuspendDelayIfPossible();\n return retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n null\n );\n }\n if (shim$1())\n return (\n (workInProgress.flags |= 128),\n (workInProgress.child = current.child),\n retryDehydratedSuspenseBoundary.bind(null, current),\n shim$1(),\n null\n );\n current = mountSuspensePrimaryChildren(workInProgress, nextProps.children);\n current.flags |= 4096;\n return current;\n}\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes |= renderLanes;\n var alternate = fiber.alternate;\n null !== alternate && (alternate.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\nfunction initSuspenseListRenderState(\n workInProgress,\n isBackwards,\n tail,\n lastContentRow,\n tailMode\n) {\n var renderState = workInProgress.memoizedState;\n null === renderState\n ? (workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode\n })\n : ((renderState.isBackwards = isBackwards),\n (renderState.rendering = null),\n (renderState.renderingStartTime = 0),\n (renderState.last = lastContentRow),\n (renderState.tail = tail),\n (renderState.tailMode = tailMode));\n}\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n revealOrder = nextProps.revealOrder,\n tailMode = nextProps.tail;\n reconcileChildren(current, workInProgress, nextProps.children, renderLanes);\n nextProps = suspenseStackCursor.current;\n if (0 !== (nextProps & 2))\n (nextProps = (nextProps & 1) | 2), (workInProgress.flags |= 128);\n else {\n if (null !== current && 0 !== (current.flags & 128))\n a: for (current = workInProgress.child; null !== current; ) {\n if (13 === current.tag)\n null !== current.memoizedState &&\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (19 === current.tag)\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (null !== current.child) {\n current.child.return = current;\n current = current.child;\n continue;\n }\n if (current === workInProgress) break a;\n for (; null === current.sibling; ) {\n if (null === current.return || current.return === workInProgress)\n break a;\n current = current.return;\n }\n current.sibling.return = current.return;\n current = current.sibling;\n }\n nextProps &= 1;\n }\n push(suspenseStackCursor, nextProps);\n if (0 === (workInProgress.mode & 1)) workInProgress.memoizedState = null;\n else\n switch (revealOrder) {\n case \"forwards\":\n renderLanes = workInProgress.child;\n for (revealOrder = null; null !== renderLanes; )\n (current = renderLanes.alternate),\n null !== current &&\n null === findFirstSuspended(current) &&\n (revealOrder = renderLanes),\n (renderLanes = renderLanes.sibling);\n renderLanes = revealOrder;\n null === renderLanes\n ? ((revealOrder = workInProgress.child),\n (workInProgress.child = null))\n : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));\n initSuspenseListRenderState(\n workInProgress,\n !1,\n revealOrder,\n renderLanes,\n tailMode\n );\n break;\n case \"backwards\":\n renderLanes = null;\n revealOrder = workInProgress.child;\n for (workInProgress.child = null; null !== revealOrder; ) {\n current = revealOrder.alternate;\n if (null !== current && null === findFirstSuspended(current)) {\n workInProgress.child = revealOrder;\n break;\n }\n current = revealOrder.sibling;\n revealOrder.sibling = renderLanes;\n renderLanes = revealOrder;\n revealOrder = current;\n }\n initSuspenseListRenderState(\n workInProgress,\n !0,\n renderLanes,\n null,\n tailMode\n );\n break;\n case \"together\":\n initSuspenseListRenderState(workInProgress, !1, null, null, void 0);\n break;\n default:\n workInProgress.memoizedState = null;\n }\n return workInProgress.child;\n}\nfunction resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {\n 0 === (workInProgress.mode & 1) &&\n null !== current &&\n ((current.alternate = null),\n (workInProgress.alternate = null),\n (workInProgress.flags |= 2));\n}\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n null !== current && (workInProgress.dependencies = current.dependencies);\n workInProgressRootSkippedLanes |= workInProgress.lanes;\n if (0 === (renderLanes & workInProgress.childLanes)) return null;\n if (null !== current && workInProgress.child !== current.child)\n throw Error(\"Resuming work not yet implemented.\");\n if (null !== workInProgress.child) {\n current = workInProgress.child;\n renderLanes = createWorkInProgress(current, current.pendingProps);\n workInProgress.child = renderLanes;\n for (renderLanes.return = workInProgress; null !== current.sibling; )\n (current = current.sibling),\n (renderLanes = renderLanes.sibling =\n createWorkInProgress(current, current.pendingProps)),\n (renderLanes.return = workInProgress);\n renderLanes.sibling = null;\n }\n return workInProgress.child;\n}\nfunction attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n) {\n switch (workInProgress.tag) {\n case 3:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n case 27:\n case 5:\n pushHostContext(workInProgress);\n break;\n case 4:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n case 10:\n var newValue = workInProgress.memoizedProps.value,\n context = workInProgress.type._context;\n push(valueCursor, context._currentValue2);\n context._currentValue2 = newValue;\n break;\n case 13:\n newValue = workInProgress.memoizedState;\n if (null !== newValue) {\n if (null !== newValue.dehydrated)\n return (\n pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags |= 128),\n null\n );\n if (0 !== (renderLanes & workInProgress.child.childLanes))\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n pushPrimaryTreeSuspenseHandler(workInProgress);\n current = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n return null !== current ? current.sibling : null;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n break;\n case 19:\n newValue = 0 !== (renderLanes & workInProgress.childLanes);\n if (0 !== (current.flags & 128)) {\n if (newValue)\n return updateSuspenseListComponent(\n current,\n workInProgress,\n renderLanes\n );\n workInProgress.flags |= 128;\n }\n context = workInProgress.memoizedState;\n null !== context &&\n ((context.rendering = null),\n (context.tail = null),\n (context.lastEffect = null));\n push(suspenseStackCursor, suspenseStackCursor.current);\n if (newValue) break;\n else return null;\n case 22:\n case 23:\n return (\n (workInProgress.lanes = 0),\n updateOffscreenComponent(current, workInProgress, renderLanes)\n );\n }\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\nfunction beginWork(current, workInProgress, renderLanes) {\n if (null !== current)\n if (current.memoizedProps !== workInProgress.pendingProps)\n didReceiveUpdate = !0;\n else {\n if (\n 0 === (current.lanes & renderLanes) &&\n 0 === (workInProgress.flags & 128)\n )\n return (\n (didReceiveUpdate = !1),\n attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n )\n );\n didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;\n }\n else didReceiveUpdate = !1;\n workInProgress.lanes = 0;\n switch (workInProgress.tag) {\n case 2:\n var Component = workInProgress.type;\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);\n current = workInProgress.pendingProps;\n prepareToReadContext(workInProgress, renderLanes);\n var value = renderWithHooks(\n null,\n workInProgress,\n Component,\n current,\n void 0,\n renderLanes\n );\n workInProgress.flags |= 1;\n \"object\" === typeof value &&\n null !== value &&\n \"function\" === typeof value.render &&\n void 0 === value.$$typeof\n ? ((workInProgress.tag = 1),\n (workInProgress.memoizedState = null),\n (workInProgress.updateQueue = null),\n (workInProgress.memoizedState =\n null !== value.state && void 0 !== value.state\n ? value.state\n : null),\n initializeUpdateQueue(workInProgress),\n (value.updater = classComponentUpdater),\n (workInProgress.stateNode = value),\n (value._reactInternals = workInProgress),\n mountClassInstance(workInProgress, Component, current, renderLanes),\n (workInProgress = finishClassComponent(\n null,\n workInProgress,\n Component,\n !0,\n !1,\n renderLanes\n )))\n : ((workInProgress.tag = 0),\n reconcileChildren(null, workInProgress, value, renderLanes),\n (workInProgress = workInProgress.child));\n return workInProgress;\n case 16:\n Component = workInProgress.elementType;\n a: {\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);\n current = workInProgress.pendingProps;\n value = Component._init;\n Component = value(Component._payload);\n workInProgress.type = Component;\n value = workInProgress.tag = resolveLazyComponentTag(Component);\n current = resolveDefaultProps(Component, current);\n switch (value) {\n case 0:\n workInProgress = updateFunctionComponent(\n null,\n workInProgress,\n Component,\n current,\n renderLanes\n );\n break a;\n case 1:\n workInProgress = updateClassComponent(\n null,\n workInProgress,\n Component,\n current,\n renderLanes\n );\n break a;\n case 11:\n workInProgress = updateForwardRef(\n null,\n workInProgress,\n Component,\n current,\n renderLanes\n );\n break a;\n case 14:\n workInProgress = updateMemoComponent(\n null,\n workInProgress,\n Component,\n resolveDefaultProps(Component.type, current),\n renderLanes\n );\n break a;\n }\n throw Error(\n \"Element type is invalid. Received a promise that resolves to: \" +\n Component +\n \". Lazy element type must resolve to a class or function.\"\n );\n }\n return workInProgress;\n case 0:\n return (\n (Component = workInProgress.type),\n (value = workInProgress.pendingProps),\n (value =\n workInProgress.elementType === Component\n ? value\n : resolveDefaultProps(Component, value)),\n updateFunctionComponent(\n current,\n workInProgress,\n Component,\n value,\n renderLanes\n )\n );\n case 1:\n return (\n (Component = workInProgress.type),\n (value = workInProgress.pendingProps),\n (value =\n workInProgress.elementType === Component\n ? value\n : resolveDefaultProps(Component, value)),\n updateClassComponent(\n current,\n workInProgress,\n Component,\n value,\n renderLanes\n )\n );\n case 3:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n if (null === current)\n throw Error(\"Should have a current fiber. This is a bug in React.\");\n value = workInProgress.pendingProps;\n Component = workInProgress.memoizedState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, value, null, renderLanes);\n value = workInProgress.memoizedState.element;\n value === Component\n ? (workInProgress = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n ))\n : (reconcileChildren(current, workInProgress, value, renderLanes),\n (workInProgress = workInProgress.child));\n return workInProgress;\n case 26:\n case 27:\n case 5:\n return (\n pushHostContext(workInProgress),\n (Component = workInProgress.pendingProps.children),\n markRef(current, workInProgress),\n reconcileChildren(current, workInProgress, Component, renderLanes),\n workInProgress.child\n );\n case 6:\n return null;\n case 13:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n case 4:\n return (\n pushHostContainer(\n workInProgress,\n workInProgress.stateNode.containerInfo\n ),\n (Component = workInProgress.pendingProps),\n null === current\n ? (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n Component,\n renderLanes\n ))\n : reconcileChildren(current, workInProgress, Component, renderLanes),\n workInProgress.child\n );\n case 11:\n return (\n (Component = workInProgress.type),\n (value = workInProgress.pendingProps),\n (value =\n workInProgress.elementType === Component\n ? value\n : resolveDefaultProps(Component, value)),\n updateForwardRef(current, workInProgress, Component, value, renderLanes)\n );\n case 7:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps,\n renderLanes\n ),\n workInProgress.child\n );\n case 8:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 12:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 10:\n a: {\n Component = workInProgress.type._context;\n value = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps,\n newValue = value.value;\n push(valueCursor, Component._currentValue2);\n Component._currentValue2 = newValue;\n if (null !== oldProps)\n if (objectIs(oldProps.value, newValue)) {\n if (oldProps.children === value.children) {\n workInProgress = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n break a;\n }\n } else\n for (\n oldProps = workInProgress.child,\n null !== oldProps && (oldProps.return = workInProgress);\n null !== oldProps;\n\n ) {\n var list = oldProps.dependencies;\n if (null !== list) {\n newValue = oldProps.child;\n for (\n var dependency = list.firstContext;\n null !== dependency;\n\n ) {\n if (dependency.context === Component) {\n if (1 === oldProps.tag) {\n dependency = createUpdate(renderLanes & -renderLanes);\n dependency.tag = 2;\n var updateQueue = oldProps.updateQueue;\n if (null !== updateQueue) {\n updateQueue = updateQueue.shared;\n var pending = updateQueue.pending;\n null === pending\n ? (dependency.next = dependency)\n : ((dependency.next = pending.next),\n (pending.next = dependency));\n updateQueue.pending = dependency;\n }\n }\n oldProps.lanes |= renderLanes;\n dependency = oldProps.alternate;\n null !== dependency && (dependency.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(\n oldProps.return,\n renderLanes,\n workInProgress\n );\n list.lanes |= renderLanes;\n break;\n }\n dependency = dependency.next;\n }\n } else if (10 === oldProps.tag)\n newValue =\n oldProps.type === workInProgress.type ? null : oldProps.child;\n else if (18 === oldProps.tag) {\n newValue = oldProps.return;\n if (null === newValue)\n throw Error(\n \"We just came from a parent so we must have had a parent. This is a bug in React.\"\n );\n newValue.lanes |= renderLanes;\n list = newValue.alternate;\n null !== list && (list.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(\n newValue,\n renderLanes,\n workInProgress\n );\n newValue = oldProps.sibling;\n } else newValue = oldProps.child;\n if (null !== newValue) newValue.return = oldProps;\n else\n for (newValue = oldProps; null !== newValue; ) {\n if (newValue === workInProgress) {\n newValue = null;\n break;\n }\n oldProps = newValue.sibling;\n if (null !== oldProps) {\n oldProps.return = newValue.return;\n newValue = oldProps;\n break;\n }\n newValue = newValue.return;\n }\n oldProps = newValue;\n }\n reconcileChildren(current, workInProgress, value.children, renderLanes);\n workInProgress = workInProgress.child;\n }\n return workInProgress;\n case 9:\n return (\n (value = workInProgress.type),\n (Component = workInProgress.pendingProps.children),\n prepareToReadContext(workInProgress, renderLanes),\n (value = readContext(value)),\n (Component = Component(value)),\n (workInProgress.flags |= 1),\n reconcileChildren(current, workInProgress, Component, renderLanes),\n workInProgress.child\n );\n case 14:\n return (\n (Component = workInProgress.type),\n (value = resolveDefaultProps(Component, workInProgress.pendingProps)),\n (value = resolveDefaultProps(Component.type, value)),\n updateMemoComponent(\n current,\n workInProgress,\n Component,\n value,\n renderLanes\n )\n );\n case 15:\n return updateSimpleMemoComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 17:\n return (\n (Component = workInProgress.type),\n (value = workInProgress.pendingProps),\n (value =\n workInProgress.elementType === Component\n ? value\n : resolveDefaultProps(Component, value)),\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),\n (workInProgress.tag = 1),\n prepareToReadContext(workInProgress, renderLanes),\n constructClassInstance(workInProgress, Component, value),\n mountClassInstance(workInProgress, Component, value, renderLanes),\n finishClassComponent(\n null,\n workInProgress,\n Component,\n !0,\n !1,\n renderLanes\n )\n );\n case 19:\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n case 22:\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n throw Error(\n \"Unknown unit of work tag (\" +\n workInProgress.tag +\n \"). This error is likely caused by a bug in React. Please file an issue.\"\n );\n}\nvar valueCursor = createCursor(null),\n currentlyRenderingFiber = null,\n lastContextDependency = null,\n lastFullyObservedContext = null;\nfunction resetContextDependencies() {\n lastFullyObservedContext =\n lastContextDependency =\n currentlyRenderingFiber =\n null;\n}\nfunction popProvider(context) {\n context._currentValue2 = valueCursor.current;\n pop(valueCursor);\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n for (; null !== parent; ) {\n var alternate = parent.alternate;\n (parent.childLanes & renderLanes) !== renderLanes\n ? ((parent.childLanes |= renderLanes),\n null !== alternate && (alternate.childLanes |= renderLanes))\n : null !== alternate &&\n (alternate.childLanes & renderLanes) !== renderLanes &&\n (alternate.childLanes |= renderLanes);\n if (parent === propagationRoot) break;\n parent = parent.return;\n }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastFullyObservedContext = lastContextDependency = null;\n workInProgress = workInProgress.dependencies;\n null !== workInProgress &&\n null !== workInProgress.firstContext &&\n (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0),\n (workInProgress.firstContext = null));\n}\nfunction readContext(context) {\n return readContextForConsumer(currentlyRenderingFiber, context);\n}\nfunction readContextDuringReconciliation(consumer, context, renderLanes) {\n null === currentlyRenderingFiber &&\n prepareToReadContext(consumer, renderLanes);\n return readContextForConsumer(consumer, context);\n}\nfunction readContextForConsumer(consumer, context) {\n var value = context._currentValue2;\n if (lastFullyObservedContext !== context)\n if (\n ((context = { context: context, memoizedValue: value, next: null }),\n null === lastContextDependency)\n ) {\n if (null === consumer)\n throw Error(\n \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n );\n lastContextDependency = context;\n consumer.dependencies = { lanes: 0, firstContext: context };\n } else lastContextDependency = lastContextDependency.next = context;\n return value;\n}\nvar ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nfunction handleAsyncAction() {}\nfunction doesRequireClone(current, completedWork) {\n if (null !== current && current.child === completedWork.child) return !1;\n if (0 !== (completedWork.flags & 16)) return !0;\n for (current = completedWork.child; null !== current; ) {\n if (0 !== (current.flags & 12854) || 0 !== (current.subtreeFlags & 12854))\n return !0;\n current = current.sibling;\n }\n return !1;\n}\nfunction appendAllChildren(\n parent,\n workInProgress,\n needsVisibilityToggle,\n isHidden\n) {\n for (var node = workInProgress.child; null !== node; ) {\n if (5 === node.tag) {\n var instance = node.stateNode;\n needsVisibilityToggle &&\n isHidden &&\n (instance = cloneHiddenInstance(instance));\n appendChildNode(parent.node, instance.node);\n } else if (6 === node.tag) {\n instance = node.stateNode;\n if (needsVisibilityToggle && isHidden)\n throw Error(\"Not yet implemented.\");\n appendChildNode(parent.node, instance.node);\n } else if (4 !== node.tag)\n if (22 === node.tag && null !== node.memoizedState)\n (instance = node.child),\n null !== instance && (instance.return = node),\n appendAllChildren(parent, node, !0, !0);\n else if (null !== node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === workInProgress) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === workInProgress) return;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\nfunction appendAllChildrenToContainer(\n containerChildSet,\n workInProgress,\n needsVisibilityToggle,\n isHidden\n) {\n for (var node = workInProgress.child; null !== node; ) {\n if (5 === node.tag) {\n var instance = node.stateNode;\n needsVisibilityToggle &&\n isHidden &&\n (instance = cloneHiddenInstance(instance));\n appendChildNodeToSet(containerChildSet, instance.node);\n } else if (6 === node.tag) {\n instance = node.stateNode;\n if (needsVisibilityToggle && isHidden)\n throw Error(\"Not yet implemented.\");\n appendChildNodeToSet(containerChildSet, instance.node);\n } else if (4 !== node.tag)\n if (22 === node.tag && null !== node.memoizedState)\n (instance = node.child),\n null !== instance && (instance.return = node),\n appendAllChildrenToContainer(\n containerChildSet,\n node,\n !(\n null !== node.memoizedProps &&\n \"manual\" === node.memoizedProps.mode\n ),\n !0\n );\n else if (null !== node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === workInProgress) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === workInProgress) return;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\nfunction updateHostContainer(current, workInProgress) {\n if (doesRequireClone(current, workInProgress)) {\n current = workInProgress.stateNode;\n var container = current.containerInfo,\n newChildSet = createChildNodeSet();\n appendAllChildrenToContainer(newChildSet, workInProgress, !1, !1);\n current.pendingChildren = newChildSet;\n workInProgress.flags |= 4;\n completeRoot(container, newChildSet);\n }\n}\nfunction scheduleRetryEffect(workInProgress, retryQueue) {\n null !== retryQueue\n ? (workInProgress.flags |= 4)\n : workInProgress.flags & 16384 &&\n ((retryQueue =\n 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),\n (workInProgress.lanes |= retryQueue));\n}\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n switch (renderState.tailMode) {\n case \"hidden\":\n hasRenderedATailFallback = renderState.tail;\n for (var lastTailNode = null; null !== hasRenderedATailFallback; )\n null !== hasRenderedATailFallback.alternate &&\n (lastTailNode = hasRenderedATailFallback),\n (hasRenderedATailFallback = hasRenderedATailFallback.sibling);\n null === lastTailNode\n ? (renderState.tail = null)\n : (lastTailNode.sibling = null);\n break;\n case \"collapsed\":\n lastTailNode = renderState.tail;\n for (var lastTailNode$61 = null; null !== lastTailNode; )\n null !== lastTailNode.alternate && (lastTailNode$61 = lastTailNode),\n (lastTailNode = lastTailNode.sibling);\n null === lastTailNode$61\n ? hasRenderedATailFallback || null === renderState.tail\n ? (renderState.tail = null)\n : (renderState.tail.sibling = null)\n : (lastTailNode$61.sibling = null);\n }\n}\nfunction bubbleProperties(completedWork) {\n var didBailout =\n null !== completedWork.alternate &&\n completedWork.alternate.child === completedWork.child,\n newChildLanes = 0,\n subtreeFlags = 0;\n if (didBailout)\n for (var child$62 = completedWork.child; null !== child$62; )\n (newChildLanes |= child$62.lanes | child$62.childLanes),\n (subtreeFlags |= child$62.subtreeFlags & 31457280),\n (subtreeFlags |= child$62.flags & 31457280),\n (child$62.return = completedWork),\n (child$62 = child$62.sibling);\n else\n for (child$62 = completedWork.child; null !== child$62; )\n (newChildLanes |= child$62.lanes | child$62.childLanes),\n (subtreeFlags |= child$62.subtreeFlags),\n (subtreeFlags |= child$62.flags),\n (child$62.return = completedWork),\n (child$62 = child$62.sibling);\n completedWork.subtreeFlags |= subtreeFlags;\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps;\n switch (workInProgress.tag) {\n case 2:\n case 16:\n case 15:\n case 0:\n case 11:\n case 7:\n case 8:\n case 12:\n case 9:\n case 14:\n return bubbleProperties(workInProgress), null;\n case 1:\n return bubbleProperties(workInProgress), null;\n case 3:\n return (\n (newProps = workInProgress.stateNode),\n popHostContainer(),\n newProps.pendingContext &&\n ((newProps.context = newProps.pendingContext),\n (newProps.pendingContext = null)),\n (null !== current && null !== current.child) ||\n null === current ||\n (current.memoizedState.isDehydrated &&\n 0 === (workInProgress.flags & 256)) ||\n ((workInProgress.flags |= 1024),\n null !== hydrationErrors &&\n (queueRecoverableErrors(hydrationErrors),\n (hydrationErrors = null))),\n updateHostContainer(current, workInProgress),\n bubbleProperties(workInProgress),\n null\n );\n case 26:\n case 27:\n case 5:\n popHostContext(workInProgress);\n renderLanes = workInProgress.type;\n if (null !== current && null != workInProgress.stateNode) {\n renderLanes = current.stateNode;\n var oldProps = current.memoizedProps;\n if (\n (current = doesRequireClone(current, workInProgress)) ||\n oldProps !== newProps\n ) {\n b: {\n oldProps = diffProperties(\n null,\n oldProps,\n newProps,\n renderLanes.canonical.viewConfig.validAttributes\n );\n renderLanes.canonical.currentProps = newProps;\n newProps = renderLanes.node;\n if (current)\n newProps =\n null !== oldProps\n ? cloneNodeWithNewChildrenAndProps(newProps, oldProps)\n : cloneNodeWithNewChildren(newProps);\n else if (null !== oldProps)\n newProps = cloneNodeWithNewProps(newProps, oldProps);\n else {\n newProps = renderLanes;\n break b;\n }\n newProps = { node: newProps, canonical: renderLanes.canonical };\n }\n newProps === renderLanes\n ? (workInProgress.stateNode = renderLanes)\n : ((workInProgress.stateNode = newProps),\n current\n ? appendAllChildren(newProps, workInProgress, !1, !1)\n : (workInProgress.flags |= 4));\n } else workInProgress.stateNode = renderLanes;\n } else {\n if (!newProps) {\n if (null === workInProgress.stateNode)\n throw Error(\n \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\"\n );\n bubbleProperties(workInProgress);\n return null;\n }\n oldProps = rootInstanceStackCursor.current;\n current = nextReactTag;\n nextReactTag += 2;\n renderLanes = getViewConfigForType(renderLanes);\n var updatePayload = diffProperties(\n null,\n emptyObject,\n newProps,\n renderLanes.validAttributes\n );\n oldProps = createNode(\n current,\n renderLanes.uiViewClassName,\n oldProps,\n updatePayload,\n workInProgress\n );\n updatePayload = ReactNativePrivateInterface.createPublicInstance(\n current,\n renderLanes,\n workInProgress\n );\n current = {\n node: oldProps,\n canonical: {\n nativeTag: current,\n viewConfig: renderLanes,\n currentProps: newProps,\n internalInstanceHandle: workInProgress,\n publicInstance: updatePayload\n }\n };\n appendAllChildren(current, workInProgress, !1, !1);\n workInProgress.stateNode = current;\n }\n bubbleProperties(workInProgress);\n workInProgress.flags &= -16777217;\n return null;\n case 6:\n if (current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps\n ? ((workInProgress.stateNode = createTextInstance(\n newProps,\n rootInstanceStackCursor.current,\n contextStackCursor.current,\n workInProgress\n )),\n (workInProgress.flags |= 4))\n : (workInProgress.stateNode = current.stateNode);\n else {\n if (\"string\" !== typeof newProps && null === workInProgress.stateNode)\n throw Error(\n \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\"\n );\n workInProgress.stateNode = createTextInstance(\n newProps,\n rootInstanceStackCursor.current,\n contextStackCursor.current,\n workInProgress\n );\n }\n bubbleProperties(workInProgress);\n return null;\n case 13:\n newProps = workInProgress.memoizedState;\n if (\n null === current ||\n (null !== current.memoizedState &&\n null !== current.memoizedState.dehydrated)\n ) {\n if (null !== newProps && null !== newProps.dehydrated) {\n if (null === current) {\n throw Error(\n \"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.\"\n );\n throw Error(\n \"Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.\"\n );\n }\n 0 === (workInProgress.flags & 128) &&\n (workInProgress.memoizedState = null);\n workInProgress.flags |= 4;\n bubbleProperties(workInProgress);\n oldProps = !1;\n } else\n null !== hydrationErrors &&\n (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)),\n (oldProps = !0);\n if (!oldProps) {\n if (workInProgress.flags & 256)\n return popSuspenseHandler(workInProgress), workInProgress;\n popSuspenseHandler(workInProgress);\n return null;\n }\n }\n popSuspenseHandler(workInProgress);\n if (0 !== (workInProgress.flags & 128))\n return (workInProgress.lanes = renderLanes), workInProgress;\n newProps = null !== newProps;\n newProps !== (null !== current && null !== current.memoizedState) &&\n newProps &&\n (workInProgress.child.flags |= 8192);\n scheduleRetryEffect(workInProgress, workInProgress.updateQueue);\n bubbleProperties(workInProgress);\n return null;\n case 4:\n return (\n popHostContainer(),\n updateHostContainer(current, workInProgress),\n bubbleProperties(workInProgress),\n null\n );\n case 10:\n return (\n popProvider(workInProgress.type._context),\n bubbleProperties(workInProgress),\n null\n );\n case 17:\n return bubbleProperties(workInProgress), null;\n case 19:\n pop(suspenseStackCursor);\n oldProps = workInProgress.memoizedState;\n if (null === oldProps) return bubbleProperties(workInProgress), null;\n newProps = 0 !== (workInProgress.flags & 128);\n updatePayload = oldProps.rendering;\n if (null === updatePayload)\n if (newProps) cutOffTailIfNeeded(oldProps, !1);\n else {\n if (\n 0 !== workInProgressRootExitStatus ||\n (null !== current && 0 !== (current.flags & 128))\n )\n for (current = workInProgress.child; null !== current; ) {\n updatePayload = findFirstSuspended(current);\n if (null !== updatePayload) {\n workInProgress.flags |= 128;\n cutOffTailIfNeeded(oldProps, !1);\n current = updatePayload.updateQueue;\n workInProgress.updateQueue = current;\n scheduleRetryEffect(workInProgress, current);\n workInProgress.subtreeFlags = 0;\n current = renderLanes;\n for (newProps = workInProgress.child; null !== newProps; )\n resetWorkInProgress(newProps, current),\n (newProps = newProps.sibling);\n push(\n suspenseStackCursor,\n (suspenseStackCursor.current & 1) | 2\n );\n return workInProgress.child;\n }\n current = current.sibling;\n }\n null !== oldProps.tail &&\n now() > workInProgressRootRenderTargetTime &&\n ((workInProgress.flags |= 128),\n (newProps = !0),\n cutOffTailIfNeeded(oldProps, !1),\n (workInProgress.lanes = 4194304));\n }\n else {\n if (!newProps)\n if (\n ((current = findFirstSuspended(updatePayload)), null !== current)\n ) {\n if (\n ((workInProgress.flags |= 128),\n (newProps = !0),\n (current = current.updateQueue),\n (workInProgress.updateQueue = current),\n scheduleRetryEffect(workInProgress, current),\n cutOffTailIfNeeded(oldProps, !0),\n null === oldProps.tail &&\n \"hidden\" === oldProps.tailMode &&\n !updatePayload.alternate)\n )\n return bubbleProperties(workInProgress), null;\n } else\n 2 * now() - oldProps.renderingStartTime >\n workInProgressRootRenderTargetTime &&\n 536870912 !== renderLanes &&\n ((workInProgress.flags |= 128),\n (newProps = !0),\n cutOffTailIfNeeded(oldProps, !1),\n (workInProgress.lanes = 4194304));\n oldProps.isBackwards\n ? ((updatePayload.sibling = workInProgress.child),\n (workInProgress.child = updatePayload))\n : ((current = oldProps.last),\n null !== current\n ? (current.sibling = updatePayload)\n : (workInProgress.child = updatePayload),\n (oldProps.last = updatePayload));\n }\n if (null !== oldProps.tail)\n return (\n (workInProgress = oldProps.tail),\n (oldProps.rendering = workInProgress),\n (oldProps.tail = workInProgress.sibling),\n (oldProps.renderingStartTime = now()),\n (workInProgress.sibling = null),\n (current = suspenseStackCursor.current),\n push(suspenseStackCursor, newProps ? (current & 1) | 2 : current & 1),\n workInProgress\n );\n bubbleProperties(workInProgress);\n return null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n (newProps = null !== workInProgress.memoizedState),\n null !== current\n ? (null !== current.memoizedState) !== newProps &&\n (workInProgress.flags |= 8192)\n : newProps && (workInProgress.flags |= 8192),\n newProps && 0 !== (workInProgress.mode & 1)\n ? 0 !== (renderLanes & 536870912) &&\n 0 === (workInProgress.flags & 128) &&\n (bubbleProperties(workInProgress),\n workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))\n : bubbleProperties(workInProgress),\n (current = workInProgress.updateQueue),\n null !== current &&\n scheduleRetryEffect(workInProgress, current.retryQueue),\n null\n );\n case 24:\n return null;\n case 25:\n return null;\n }\n throw Error(\n \"Unknown unit of work tag (\" +\n workInProgress.tag +\n \"). This error is likely caused by a bug in React. Please file an issue.\"\n );\n}\nfunction unwindWork(current, workInProgress) {\n switch (workInProgress.tag) {\n case 1:\n return (\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 3:\n return (\n popHostContainer(),\n (current = workInProgress.flags),\n 0 !== (current & 65536) && 0 === (current & 128)\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 26:\n case 27:\n case 5:\n return popHostContext(workInProgress), null;\n case 13:\n popSuspenseHandler(workInProgress);\n current = workInProgress.memoizedState;\n if (\n null !== current &&\n null !== current.dehydrated &&\n null === workInProgress.alternate\n )\n throw Error(\n \"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.\"\n );\n current = workInProgress.flags;\n return current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null;\n case 19:\n return pop(suspenseStackCursor), null;\n case 4:\n return popHostContainer(), null;\n case 10:\n return popProvider(workInProgress.type._context), null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 24:\n return null;\n case 25:\n return null;\n default:\n return null;\n }\n}\nfunction unwindInterruptedWork(current, interruptedWork) {\n switch (interruptedWork.tag) {\n case 3:\n popHostContainer();\n break;\n case 26:\n case 27:\n case 5:\n popHostContext(interruptedWork);\n break;\n case 4:\n popHostContainer();\n break;\n case 13:\n popSuspenseHandler(interruptedWork);\n break;\n case 19:\n pop(suspenseStackCursor);\n break;\n case 10:\n popProvider(interruptedWork.type._context);\n break;\n case 22:\n case 23:\n popSuspenseHandler(interruptedWork), popHiddenContext();\n }\n}\nvar offscreenSubtreeIsHidden = !1,\n offscreenSubtreeWasHidden = !1,\n PossiblyWeakSet = \"function\" === typeof WeakSet ? WeakSet : Set,\n nextEffect = null;\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n var ref = current.ref;\n if (null !== ref) {\n var instance = current.stateNode;\n switch (current.tag) {\n case 26:\n case 27:\n case 5:\n var instanceToUse = getPublicInstance(instance);\n break;\n default:\n instanceToUse = instance;\n }\n \"function\" === typeof ref\n ? (current.refCleanup = ref(instanceToUse))\n : (ref.current = instanceToUse);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref,\n refCleanup = current.refCleanup;\n if (null !== ref)\n if (\"function\" === typeof refCleanup)\n try {\n refCleanup();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n } finally {\n (current.refCleanup = null),\n (current = current.alternate),\n null != current && (current.refCleanup = null);\n }\n else if (\"function\" === typeof ref)\n try {\n ref(null);\n } catch (error$76) {\n captureCommitPhaseError(current, nearestMountedAncestor, error$76);\n }\n else ref.current = null;\n}\nfunction safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n try {\n destroy();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nvar shouldFireAfterActiveInstanceBlur = !1;\nfunction commitBeforeMutationEffects(root, firstChild) {\n for (nextEffect = firstChild; null !== nextEffect; )\n if (\n ((root = nextEffect),\n (firstChild = root.child),\n 0 !== (root.subtreeFlags & 1028) && null !== firstChild)\n )\n (firstChild.return = root), (nextEffect = firstChild);\n else\n for (; null !== nextEffect; ) {\n root = nextEffect;\n try {\n var current = root.alternate,\n flags = root.flags;\n switch (root.tag) {\n case 0:\n break;\n case 11:\n case 15:\n break;\n case 1:\n if (0 !== (flags & 1024) && null !== current) {\n var prevProps = current.memoizedProps,\n prevState = current.memoizedState,\n instance = root.stateNode,\n snapshot = instance.getSnapshotBeforeUpdate(\n root.elementType === root.type\n ? prevProps\n : resolveDefaultProps(root.type, prevProps),\n prevState\n );\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n break;\n case 3:\n break;\n case 5:\n case 26:\n case 27:\n case 6:\n case 4:\n case 17:\n break;\n default:\n if (0 !== (flags & 1024))\n throw Error(\n \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\"\n );\n }\n } catch (error) {\n captureCommitPhaseError(root, root.return, error);\n }\n firstChild = root.sibling;\n if (null !== firstChild) {\n firstChild.return = root.return;\n nextEffect = firstChild;\n break;\n }\n nextEffect = root.return;\n }\n current = shouldFireAfterActiveInstanceBlur;\n shouldFireAfterActiveInstanceBlur = !1;\n return current;\n}\nfunction commitHookEffectListUnmount(\n flags,\n finishedWork,\n nearestMountedAncestor\n) {\n var updateQueue = finishedWork.updateQueue;\n updateQueue = null !== updateQueue ? updateQueue.lastEffect : null;\n if (null !== updateQueue) {\n var effect = (updateQueue = updateQueue.next);\n do {\n if ((effect.tag & flags) === flags) {\n var inst = effect.inst,\n destroy = inst.destroy;\n void 0 !== destroy &&\n ((inst.destroy = void 0),\n safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy));\n }\n effect = effect.next;\n } while (effect !== updateQueue);\n }\n}\nfunction commitHookEffectListMount(flags, finishedWork) {\n finishedWork = finishedWork.updateQueue;\n finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;\n if (null !== finishedWork) {\n var effect = (finishedWork = finishedWork.next);\n do {\n if ((effect.tag & flags) === flags) {\n var create$77 = effect.create,\n inst = effect.inst;\n create$77 = create$77();\n inst.destroy = create$77;\n }\n effect = effect.next;\n } while (effect !== finishedWork);\n }\n}\nfunction commitHookLayoutEffects(finishedWork, hookFlags) {\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitClassCallbacks(finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n if (null !== updateQueue) {\n var instance = finishedWork.stateNode;\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\nfunction commitHostComponentMount(finishedWork) {\n try {\n throw Error(\n \"The current renderer does not support mutation. This error is likely caused by a bug in React. Please file an issue.\"\n );\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitHookLayoutEffects(finishedWork, 5);\n break;\n case 1:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (flags & 4)\n if (((finishedRoot = finishedWork.stateNode), null === current))\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n else {\n var prevProps =\n finishedWork.elementType === finishedWork.type\n ? current.memoizedProps\n : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n current = current.memoizedState;\n try {\n finishedRoot.componentDidUpdate(\n prevProps,\n current,\n finishedRoot.__reactInternalSnapshotBeforeUpdate\n );\n } catch (error$78) {\n captureCommitPhaseError(\n finishedWork,\n finishedWork.return,\n error$78\n );\n }\n }\n flags & 64 && commitClassCallbacks(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 3:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (flags & 64 && ((flags = finishedWork.updateQueue), null !== flags)) {\n finishedRoot = null;\n if (null !== finishedWork.child)\n switch (finishedWork.child.tag) {\n case 27:\n case 5:\n finishedRoot = getPublicInstance(finishedWork.child.stateNode);\n break;\n case 1:\n finishedRoot = finishedWork.child.stateNode;\n }\n try {\n commitCallbacks(flags, finishedRoot);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 26:\n case 27:\n case 5:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n null === current && flags & 4 && commitHostComponentMount(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n case 22:\n if (0 !== (finishedWork.mode & 1)) {\n if (\n ((prevProps =\n null !== finishedWork.memoizedState || offscreenSubtreeIsHidden),\n !prevProps)\n ) {\n current =\n (null !== current && null !== current.memoizedState) ||\n offscreenSubtreeWasHidden;\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevProps;\n (offscreenSubtreeWasHidden = current) &&\n !prevOffscreenSubtreeWasHidden\n ? recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n 0 !== (finishedWork.subtreeFlags & 8772)\n )\n : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n }\n } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 512 &&\n (\"manual\" === finishedWork.memoizedProps.mode\n ? safelyAttachRef(finishedWork, finishedWork.return)\n : safelyDetachRef(finishedWork, finishedWork.return));\n break;\n default:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n}\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n null !== alternate &&\n ((fiber.alternate = null), detachFiberAfterEffects(alternate));\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null;\n fiber.stateNode = null;\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null;\n fiber.updateQueue = null;\n}\nfunction recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n parent\n) {\n for (parent = parent.child; null !== parent; )\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),\n (parent = parent.sibling);\n}\nfunction commitDeletionEffectsOnFiber(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n) {\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberUnmount)\n try {\n injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);\n } catch (err) {}\n switch (deletedFiber.tag) {\n case 26:\n case 27:\n case 5:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n case 6:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 18:\n break;\n case 4:\n createChildNodeSet();\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 0:\n case 11:\n case 14:\n case 15:\n if (!offscreenSubtreeWasHidden) {\n var updateQueue = deletedFiber.updateQueue;\n if (\n null !== updateQueue &&\n ((updateQueue = updateQueue.lastEffect), null !== updateQueue)\n ) {\n var effect = (updateQueue = updateQueue.next);\n do {\n var tag = effect.tag,\n inst = effect.inst,\n destroy = inst.destroy;\n void 0 !== destroy &&\n (0 !== (tag & 2)\n ? ((inst.destroy = void 0),\n safelyCallDestroy(\n deletedFiber,\n nearestMountedAncestor,\n destroy\n ))\n : 0 !== (tag & 4) &&\n ((inst.destroy = void 0),\n safelyCallDestroy(\n deletedFiber,\n nearestMountedAncestor,\n destroy\n )));\n effect = effect.next;\n } while (effect !== updateQueue);\n }\n }\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 1:\n if (\n !offscreenSubtreeWasHidden &&\n (safelyDetachRef(deletedFiber, nearestMountedAncestor),\n (updateQueue = deletedFiber.stateNode),\n \"function\" === typeof updateQueue.componentWillUnmount)\n )\n try {\n (updateQueue.props = deletedFiber.memoizedProps),\n (updateQueue.state = deletedFiber.memoizedState),\n updateQueue.componentWillUnmount();\n } catch (error) {\n captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error);\n }\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 21:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 22:\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n deletedFiber.mode & 1\n ? ((offscreenSubtreeWasHidden =\n (updateQueue = offscreenSubtreeWasHidden) ||\n null !== deletedFiber.memoizedState),\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n ),\n (offscreenSubtreeWasHidden = updateQueue))\n : recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n default:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n }\n}\nfunction getRetryCache(finishedWork) {\n switch (finishedWork.tag) {\n case 13:\n case 19:\n var retryCache = finishedWork.stateNode;\n null === retryCache &&\n (retryCache = finishedWork.stateNode = new PossiblyWeakSet());\n return retryCache;\n case 22:\n return (\n (finishedWork = finishedWork.stateNode),\n (retryCache = finishedWork._retryCache),\n null === retryCache &&\n (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),\n retryCache\n );\n default:\n throw Error(\n \"Unexpected Suspense handler tag (\" +\n finishedWork.tag +\n \"). This is a bug in React.\"\n );\n }\n}\nfunction attachSuspenseRetryListeners(finishedWork, wakeables) {\n var retryCache = getRetryCache(finishedWork);\n wakeables.forEach(function (wakeable) {\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n retryCache.has(wakeable) ||\n (retryCache.add(wakeable), wakeable.then(retry, retry));\n });\n}\nfunction recursivelyTraverseMutationEffects(root, parentFiber) {\n var deletions = parentFiber.deletions;\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n try {\n commitDeletionEffectsOnFiber(root, parentFiber, childToDelete);\n var alternate = childToDelete.alternate;\n null !== alternate && (alternate.return = null);\n childToDelete.return = null;\n } catch (error) {\n captureCommitPhaseError(childToDelete, parentFiber, error);\n }\n }\n if (parentFiber.subtreeFlags & 12854)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitMutationEffectsOnFiber(parentFiber, root),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitMutationEffectsOnFiber(finishedWork, root) {\n var current = finishedWork.alternate,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & 4) {\n try {\n commitHookEffectListUnmount(3, finishedWork, finishedWork.return),\n commitHookEffectListMount(3, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n try {\n commitHookEffectListUnmount(5, finishedWork, finishedWork.return);\n } catch (error$80) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error$80);\n }\n }\n break;\n case 1:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n null !== current &&\n safelyDetachRef(current, current.return);\n flags & 64 &&\n offscreenSubtreeIsHidden &&\n ((finishedWork = finishedWork.updateQueue),\n null !== finishedWork &&\n ((flags = finishedWork.callbacks),\n null !== flags &&\n ((current = finishedWork.shared.hiddenCallbacks),\n (finishedWork.shared.hiddenCallbacks =\n null === current ? flags : current.concat(flags)))));\n break;\n case 26:\n case 27:\n case 5:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n null !== current &&\n safelyDetachRef(current, current.return);\n break;\n case 6:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 3:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 4:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 13:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n finishedWork.child.flags & 8192 &&\n ((current = null !== current && null !== current.memoizedState),\n null === finishedWork.memoizedState ||\n current ||\n (globalMostRecentFallbackTime = now()));\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 22:\n flags & 512 &&\n null !== current &&\n safelyDetachRef(current, current.return);\n var isHidden = null !== finishedWork.memoizedState,\n wasHidden = null !== current && null !== current.memoizedState;\n if (finishedWork.mode & 1) {\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || isHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n } else recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n root = finishedWork.stateNode;\n root._current = finishedWork;\n root._visibility &= -3;\n root._visibility |= root._pendingVisibility & 2;\n flags & 8192 &&\n ((root._visibility = isHidden\n ? root._visibility & -2\n : root._visibility | 1),\n isHidden &&\n ((isHidden = offscreenSubtreeIsHidden || offscreenSubtreeWasHidden),\n null === current ||\n wasHidden ||\n isHidden ||\n (0 !== (finishedWork.mode & 1) &&\n recursivelyTraverseDisappearLayoutEffects(finishedWork))));\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((current = flags.retryQueue),\n null !== current &&\n ((flags.retryQueue = null),\n attachSuspenseRetryListeners(finishedWork, current))));\n break;\n case 19:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 21:\n break;\n default:\n recursivelyTraverseMutationEffects(root, finishedWork),\n commitReconciliationEffects(finishedWork);\n }\n}\nfunction commitReconciliationEffects(finishedWork) {\n var flags = finishedWork.flags;\n flags & 2 && (finishedWork.flags &= -3);\n flags & 4096 && (finishedWork.flags &= -4097);\n}\nfunction recursivelyTraverseLayoutEffects(root, parentFiber) {\n if (parentFiber.subtreeFlags & 8772)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction recursivelyTraverseDisappearLayoutEffects(parentFiber) {\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedWork = parentFiber;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(4, finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 1:\n safelyDetachRef(finishedWork, finishedWork.return);\n var instance = finishedWork.stateNode;\n if (\"function\" === typeof instance.componentWillUnmount) {\n var current = finishedWork,\n nearestMountedAncestor = finishedWork.return;\n try {\n var current$jscomp$0 = current;\n instance.props = current$jscomp$0.memoizedProps;\n instance.state = current$jscomp$0.memoizedState;\n instance.componentWillUnmount();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n }\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 26:\n case 27:\n case 5:\n safelyDetachRef(finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 22:\n safelyDetachRef(finishedWork, finishedWork.return);\n null === finishedWork.memoizedState &&\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n default:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseReappearLayoutEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var current = parentFiber.alternate,\n finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n commitHookLayoutEffects(finishedWork, 4);\n break;\n case 1:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n finishedRoot = finishedWork.stateNode;\n if (\"function\" === typeof finishedRoot.componentDidMount)\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n current = finishedWork.updateQueue;\n if (null !== current) {\n var hiddenCallbacks = current.shared.hiddenCallbacks;\n if (null !== hiddenCallbacks)\n for (\n current.shared.hiddenCallbacks = null, current = 0;\n current < hiddenCallbacks.length;\n current++\n )\n callCallback(hiddenCallbacks[current], finishedRoot);\n }\n includeWorkInProgressEffects &&\n flags & 64 &&\n commitClassCallbacks(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 26:\n case 27:\n case 5:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n null === current &&\n flags & 4 &&\n commitHostComponentMount(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n break;\n case 13:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n default:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitHookPassiveMountEffects(finishedWork, hookFlags) {\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction recursivelyTraversePassiveMountEffects(root, parentFiber) {\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveMountOnFiber(root, parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveMountOnFiber(finishedRoot, finishedWork) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork);\n flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);\n break;\n case 3:\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork);\n break;\n case 23:\n break;\n case 22:\n flags = finishedWork.stateNode;\n null !== finishedWork.memoizedState\n ? flags._visibility & 4\n ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork)\n : finishedWork.mode & 1 ||\n ((flags._visibility |= 4),\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork))\n : flags._visibility & 4\n ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork)\n : ((flags._visibility |= 4),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork\n ));\n break;\n case 24:\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork);\n break;\n default:\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork);\n }\n}\nfunction recursivelyTraverseReconnectPassiveEffects(\n finishedRoot$jscomp$0,\n parentFiber\n) {\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork);\n commitHookPassiveMountEffects(finishedWork, 8);\n break;\n case 23:\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState\n ? instance._visibility & 4\n ? recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork\n )\n : finishedWork.mode & 1 ||\n ((instance._visibility |= 4),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork\n ))\n : ((instance._visibility |= 4),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork\n ));\n break;\n case 24:\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork);\n break;\n default:\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nvar suspenseyCommitFlag = 8192;\nfunction recursivelyAccumulateSuspenseyCommit(parentFiber) {\n if (parentFiber.subtreeFlags & suspenseyCommitFlag)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n accumulateSuspenseyCommitOnFiber(parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction accumulateSuspenseyCommitOnFiber(fiber) {\n switch (fiber.tag) {\n case 26:\n recursivelyAccumulateSuspenseyCommit(fiber);\n if (fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState)\n throw Error(\n \"The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue.\"\n );\n break;\n case 5:\n recursivelyAccumulateSuspenseyCommit(fiber);\n break;\n case 3:\n case 4:\n recursivelyAccumulateSuspenseyCommit(fiber);\n break;\n case 22:\n if (null === fiber.memoizedState) {\n var current = fiber.alternate;\n null !== current && null !== current.memoizedState\n ? ((current = suspenseyCommitFlag),\n (suspenseyCommitFlag = 16777216),\n recursivelyAccumulateSuspenseyCommit(fiber),\n (suspenseyCommitFlag = current))\n : recursivelyAccumulateSuspenseyCommit(fiber);\n }\n break;\n default:\n recursivelyAccumulateSuspenseyCommit(fiber);\n }\n}\nfunction detachAlternateSiblings(parentFiber) {\n var previousFiber = parentFiber.alternate;\n if (\n null !== previousFiber &&\n ((parentFiber = previousFiber.child), null !== parentFiber)\n ) {\n previousFiber.child = null;\n do\n (previousFiber = parentFiber.sibling),\n (parentFiber.sibling = null),\n (parentFiber = previousFiber);\n while (null !== parentFiber);\n }\n}\nfunction recursivelyTraversePassiveUnmountEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveUnmountOnFiber(parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n finishedWork.flags & 2048 &&\n commitHookEffectListUnmount(9, finishedWork, finishedWork.return);\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState &&\n instance._visibility & 4 &&\n (null === finishedWork.return || 13 !== finishedWork.return.tag)\n ? ((instance._visibility &= -5),\n recursivelyTraverseDisconnectPassiveEffects(finishedWork))\n : recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n default:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n }\n}\nfunction recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n deletions = parentFiber;\n switch (deletions.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, deletions, deletions.return);\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n break;\n case 22:\n i = deletions.stateNode;\n i._visibility & 4 &&\n ((i._visibility &= -5),\n recursivelyTraverseDisconnectPassiveEffects(deletions));\n break;\n default:\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n deletedSubtreeRoot,\n nearestMountedAncestor\n) {\n for (; null !== nextEffect; ) {\n var fiber = nextEffect;\n switch (fiber.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);\n }\n var child = fiber.child;\n if (null !== child) (child.return = fiber), (nextEffect = child);\n else\n a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {\n child = nextEffect;\n var sibling = child.sibling,\n returnFiber = child.return;\n detachFiberAfterEffects(child);\n if (child === fiber) {\n nextEffect = null;\n break a;\n }\n if (null !== sibling) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n break a;\n }\n nextEffect = returnFiber;\n }\n }\n}\nvar PossiblyWeakMap = \"function\" === typeof WeakMap ? WeakMap : Map,\n ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,\n ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,\n executionContext = 0,\n workInProgressRoot = null,\n workInProgress = null,\n workInProgressRootRenderLanes = 0,\n workInProgressSuspendedReason = 0,\n workInProgressThrownValue = null,\n workInProgressRootDidAttachPingListener = !1,\n entangledRenderLanes = 0,\n workInProgressRootExitStatus = 0,\n workInProgressRootFatalError = null,\n workInProgressRootSkippedLanes = 0,\n workInProgressRootInterleavedUpdatedLanes = 0,\n workInProgressRootPingedLanes = 0,\n workInProgressDeferredLane = 0,\n workInProgressRootConcurrentErrors = null,\n workInProgressRootRecoverableErrors = null,\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1,\n globalMostRecentFallbackTime = 0,\n workInProgressRootRenderTargetTime = Infinity,\n workInProgressTransitions = null,\n hasUncaughtError = !1,\n firstUncaughtError = null,\n legacyErrorBoundariesThatAlreadyFailed = null,\n rootDoesHavePassiveEffects = !1,\n rootWithPendingPassiveEffects = null,\n pendingPassiveEffectsLanes = 0,\n nestedUpdateCount = 0,\n rootWithNestedUpdates = null;\nfunction requestUpdateLane(fiber) {\n if (0 === (fiber.mode & 1)) return 2;\n if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes)\n return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;\n fiber = ReactCurrentBatchConfig$1.transition;\n null !== fiber && fiber._callbacks.add(handleAsyncAction);\n if (null !== fiber)\n return (\n 0 === currentEventTransitionLane &&\n (currentEventTransitionLane = claimNextTransitionLane()),\n currentEventTransitionLane\n );\n fiber = currentUpdatePriority;\n if (0 === fiber)\n a: {\n fiber = fabricGetCurrentEventPriority\n ? fabricGetCurrentEventPriority()\n : null;\n if (null != fiber)\n switch (fiber) {\n case FabricDiscretePriority:\n fiber = 2;\n break a;\n }\n fiber = 32;\n }\n return fiber;\n}\nfunction requestDeferredLane() {\n 0 === workInProgressDeferredLane &&\n (workInProgressDeferredLane =\n 0 !== (workInProgressRootRenderLanes & 536870912)\n ? 536870912\n : claimNextTransitionLane());\n var suspenseHandler = suspenseHandlerStackCursor.current;\n null !== suspenseHandler && (suspenseHandler.flags |= 32);\n return workInProgressDeferredLane;\n}\nfunction scheduleUpdateOnFiber(root, fiber, lane) {\n if (\n (root === workInProgressRoot && 2 === workInProgressSuspendedReason) ||\n null !== root.cancelPendingCommit\n )\n prepareFreshStack(root, 0),\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane\n );\n markRootUpdated$1(root, lane);\n if (0 === (executionContext & 2) || root !== workInProgressRoot)\n root === workInProgressRoot &&\n (0 === (executionContext & 2) &&\n (workInProgressRootInterleavedUpdatedLanes |= lane),\n 4 === workInProgressRootExitStatus &&\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane\n )),\n ensureRootIsScheduled(root),\n 2 === lane &&\n 0 === executionContext &&\n 0 === (fiber.mode & 1) &&\n ((workInProgressRootRenderTargetTime = now() + 500),\n flushSyncWorkAcrossRoots_impl(!0));\n}\nfunction performConcurrentWorkOnRoot(root, didTimeout) {\n if (0 !== (executionContext & 6))\n throw Error(\"Should not already be working.\");\n var originalCallbackNode = root.callbackNode;\n if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)\n return null;\n var lanes = getNextLanes(\n root,\n root === workInProgressRoot ? workInProgressRootRenderLanes : 0\n );\n if (0 === lanes) return null;\n var exitStatus = (didTimeout =\n 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout)\n ? renderRootConcurrent(root, lanes)\n : renderRootSync(root, lanes);\n if (0 !== exitStatus) {\n var renderWasConcurrent = didTimeout;\n do {\n if (6 === exitStatus) markRootSuspended(root, lanes, 0);\n else {\n didTimeout = root.current.alternate;\n if (\n renderWasConcurrent &&\n !isRenderConsistentWithExternalStores(didTimeout)\n ) {\n exitStatus = renderRootSync(root, lanes);\n renderWasConcurrent = !1;\n continue;\n }\n if (2 === exitStatus) {\n renderWasConcurrent = lanes;\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(\n root,\n renderWasConcurrent\n );\n 0 !== errorRetryLanes &&\n ((lanes = errorRetryLanes),\n (exitStatus = recoverFromConcurrentError(\n root,\n renderWasConcurrent,\n errorRetryLanes\n )));\n }\n if (1 === exitStatus)\n throw (\n ((originalCallbackNode = workInProgressRootFatalError),\n prepareFreshStack(root, 0),\n markRootSuspended(root, lanes, 0),\n ensureRootIsScheduled(root),\n originalCallbackNode)\n );\n root.finishedWork = didTimeout;\n root.finishedLanes = lanes;\n a: {\n renderWasConcurrent = root;\n switch (exitStatus) {\n case 0:\n case 1:\n throw Error(\"Root did not complete. This is a bug in React.\");\n case 4:\n if ((lanes & 4194176) === lanes) {\n markRootSuspended(\n renderWasConcurrent,\n lanes,\n workInProgressDeferredLane\n );\n break a;\n }\n break;\n case 2:\n case 3:\n case 5:\n break;\n default:\n throw Error(\"Unknown root exit status.\");\n }\n if (\n (lanes & 62914560) === lanes &&\n 3 === exitStatus &&\n ((exitStatus = globalMostRecentFallbackTime + 300 - now()),\n 10 < exitStatus)\n ) {\n markRootSuspended(\n renderWasConcurrent,\n lanes,\n workInProgressDeferredLane\n );\n if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;\n renderWasConcurrent.timeoutHandle = scheduleTimeout(\n commitRootWhenReady.bind(\n null,\n renderWasConcurrent,\n didTimeout,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane\n ),\n exitStatus\n );\n break a;\n }\n commitRootWhenReady(\n renderWasConcurrent,\n didTimeout,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane\n );\n }\n }\n break;\n } while (1);\n }\n ensureRootIsScheduled(root);\n scheduleTaskForRootDuringMicrotask(root, now());\n root =\n root.callbackNode === originalCallbackNode\n ? performConcurrentWorkOnRoot.bind(null, root)\n : null;\n return root;\n}\nfunction recoverFromConcurrentError(\n root,\n originallyAttemptedLanes,\n errorRetryLanes\n) {\n var errorsFromFirstAttempt = workInProgressRootConcurrentErrors,\n JSCompiler_inline_result;\n (JSCompiler_inline_result = root.current.memoizedState.isDehydrated) &&\n (prepareFreshStack(root, errorRetryLanes).flags |= 256);\n errorRetryLanes = renderRootSync(root, errorRetryLanes);\n if (2 !== errorRetryLanes) {\n if (workInProgressRootDidAttachPingListener && !JSCompiler_inline_result)\n return (\n (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes),\n (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes),\n 4\n );\n root = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = errorsFromFirstAttempt;\n null !== root && queueRecoverableErrors(root);\n }\n return errorRetryLanes;\n}\nfunction queueRecoverableErrors(errors) {\n null === workInProgressRootRecoverableErrors\n ? (workInProgressRootRecoverableErrors = errors)\n : workInProgressRootRecoverableErrors.push.apply(\n workInProgressRootRecoverableErrors,\n errors\n );\n}\nfunction commitRootWhenReady(\n root,\n finishedWork,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n lanes,\n spawnedLane\n) {\n 0 === (lanes & 42) && accumulateSuspenseyCommitOnFiber(finishedWork);\n commitRoot(\n root,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane\n );\n}\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n for (var node = finishedWork; ; ) {\n if (node.flags & 16384) {\n var updateQueue = node.updateQueue;\n if (\n null !== updateQueue &&\n ((updateQueue = updateQueue.stores), null !== updateQueue)\n )\n for (var i = 0; i < updateQueue.length; i++) {\n var check = updateQueue[i],\n getSnapshot = check.getSnapshot;\n check = check.value;\n try {\n if (!objectIs(getSnapshot(), check)) return !1;\n } catch (error) {\n return !1;\n }\n }\n }\n updateQueue = node.child;\n if (node.subtreeFlags & 16384 && null !== updateQueue)\n (updateQueue.return = node), (node = updateQueue);\n else {\n if (node === finishedWork) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === finishedWork) return !0;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n return !0;\n}\nfunction markRootSuspended(root, suspendedLanes, spawnedLane) {\n suspendedLanes &= ~workInProgressRootPingedLanes;\n suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes;\n for (\n var expirationTimes = root.expirationTimes, lanes = suspendedLanes;\n 0 < lanes;\n\n ) {\n var index$4 = 31 - clz32(lanes),\n lane = 1 << index$4;\n expirationTimes[index$4] = -1;\n lanes &= ~lane;\n }\n 0 !== spawnedLane &&\n markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);\n}\nfunction resetWorkInProgressStack() {\n if (null !== workInProgress) {\n if (0 === workInProgressSuspendedReason)\n var interruptedWork = workInProgress.return;\n else\n (interruptedWork = workInProgress),\n resetContextDependencies(),\n resetHooksOnUnwind(interruptedWork),\n (thenableState$1 = null),\n (thenableIndexCounter$1 = 0),\n (interruptedWork = workInProgress);\n for (; null !== interruptedWork; )\n unwindInterruptedWork(interruptedWork.alternate, interruptedWork),\n (interruptedWork = interruptedWork.return);\n workInProgress = null;\n }\n}\nfunction prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = 0;\n var timeoutHandle = root.timeoutHandle;\n -1 !== timeoutHandle &&\n ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));\n timeoutHandle = root.cancelPendingCommit;\n null !== timeoutHandle &&\n ((root.cancelPendingCommit = null), timeoutHandle());\n resetWorkInProgressStack();\n workInProgressRoot = root;\n workInProgress = timeoutHandle = createWorkInProgress(root.current, null);\n workInProgressRootRenderLanes = lanes;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n workInProgressRootDidAttachPingListener = !1;\n workInProgressRootExitStatus = 0;\n workInProgressRootFatalError = null;\n workInProgressDeferredLane =\n workInProgressRootPingedLanes =\n workInProgressRootInterleavedUpdatedLanes =\n workInProgressRootSkippedLanes =\n 0;\n workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =\n null;\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1;\n 0 !== (lanes & 8) && (lanes |= lanes & 32);\n var allEntangledLanes = root.entangledLanes;\n if (0 !== allEntangledLanes)\n for (\n root = root.entanglements, allEntangledLanes &= lanes;\n 0 < allEntangledLanes;\n\n ) {\n var index$2 = 31 - clz32(allEntangledLanes),\n lane = 1 << index$2;\n lanes |= root[index$2];\n allEntangledLanes &= ~lane;\n }\n entangledRenderLanes = lanes;\n finishQueueingConcurrentUpdates();\n return timeoutHandle;\n}\nfunction handleThrow(root, thrownValue) {\n currentlyRenderingFiber$1 = null;\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n ReactCurrentOwner.current = null;\n thrownValue === SuspenseException\n ? ((thrownValue = getSuspendedThenable()),\n (root = suspenseHandlerStackCursor.current),\n (workInProgressSuspendedReason =\n (null !== root &&\n ((workInProgressRootRenderLanes & 4194176) ===\n workInProgressRootRenderLanes\n ? null !== shellBoundary\n : ((workInProgressRootRenderLanes & 62914560) !==\n workInProgressRootRenderLanes &&\n 0 === (workInProgressRootRenderLanes & 536870912)) ||\n root !== shellBoundary)) ||\n 0 !== (workInProgressRootSkippedLanes & 134217727) ||\n 0 !== (workInProgressRootInterleavedUpdatedLanes & 134217727)\n ? 3\n : 2))\n : thrownValue === SuspenseyCommitException\n ? ((thrownValue = getSuspendedThenable()),\n (workInProgressSuspendedReason = 4))\n : (workInProgressSuspendedReason =\n thrownValue === SelectiveHydrationException\n ? 8\n : null !== thrownValue &&\n \"object\" === typeof thrownValue &&\n \"function\" === typeof thrownValue.then\n ? 6\n : 1);\n workInProgressThrownValue = thrownValue;\n null === workInProgress &&\n ((workInProgressRootExitStatus = 1),\n (workInProgressRootFatalError = thrownValue));\n}\nfunction pushDispatcher() {\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = ContextOnlyDispatcher;\n return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;\n}\nfunction renderDidSuspendDelayIfPossible() {\n workInProgressRootExitStatus = 4;\n (0 === (workInProgressRootSkippedLanes & 134217727) &&\n 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||\n null === workInProgressRoot ||\n markRootSuspended(\n workInProgressRoot,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane\n );\n}\nfunction renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher();\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)\n (workInProgressTransitions = null), prepareFreshStack(root, lanes);\n lanes = !1;\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n var unitOfWork = workInProgress,\n thrownValue = workInProgressThrownValue;\n switch (workInProgressSuspendedReason) {\n case 8:\n resetWorkInProgressStack();\n workInProgressRootExitStatus = 6;\n break a;\n case 3:\n case 2:\n lanes ||\n null !== suspenseHandlerStackCursor.current ||\n (lanes = !0);\n default:\n (workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue);\n }\n }\n workLoopSync();\n break;\n } catch (thrownValue$88) {\n handleThrow(root, thrownValue$88);\n }\n while (1);\n lanes && root.shellSuspendCounter++;\n resetContextDependencies();\n executionContext = prevExecutionContext;\n ReactCurrentDispatcher.current = prevDispatcher;\n if (null !== workInProgress)\n throw Error(\n \"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.\"\n );\n workInProgressRoot = null;\n workInProgressRootRenderLanes = 0;\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n}\nfunction workLoopSync() {\n for (; null !== workInProgress; ) performUnitOfWork(workInProgress);\n}\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher();\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)\n (workInProgressTransitions = null),\n (workInProgressRootRenderTargetTime = now() + 500),\n prepareFreshStack(root, lanes);\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n lanes = workInProgress;\n var thrownValue = workInProgressThrownValue;\n b: switch (workInProgressSuspendedReason) {\n case 1:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue);\n break;\n case 2:\n if (isThenableResolved(thrownValue)) {\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(lanes);\n break;\n }\n lanes = function () {\n 2 === workInProgressSuspendedReason &&\n workInProgressRoot === root &&\n (workInProgressSuspendedReason = 7);\n ensureRootIsScheduled(root);\n };\n thrownValue.then(lanes, lanes);\n break a;\n case 3:\n workInProgressSuspendedReason = 7;\n break a;\n case 4:\n workInProgressSuspendedReason = 5;\n break a;\n case 7:\n isThenableResolved(thrownValue)\n ? ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n replaySuspendedUnitOfWork(lanes))\n : ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, lanes, thrownValue));\n break;\n case 5:\n switch (workInProgress.tag) {\n case 5:\n case 26:\n case 27:\n lanes = workInProgress;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n var sibling = lanes.sibling;\n if (null !== sibling) workInProgress = sibling;\n else {\n var returnFiber = lanes.return;\n null !== returnFiber\n ? ((workInProgress = returnFiber),\n completeUnitOfWork(returnFiber))\n : (workInProgress = null);\n }\n break b;\n }\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue);\n break;\n case 6:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue);\n break;\n case 8:\n resetWorkInProgressStack();\n workInProgressRootExitStatus = 6;\n break a;\n default:\n throw Error(\"Unexpected SuspendedReason. This is a bug in React.\");\n }\n }\n workLoopConcurrent();\n break;\n } catch (thrownValue$90) {\n handleThrow(root, thrownValue$90);\n }\n while (1);\n resetContextDependencies();\n ReactCurrentDispatcher.current = prevDispatcher;\n executionContext = prevExecutionContext;\n if (null !== workInProgress) return 0;\n workInProgressRoot = null;\n workInProgressRootRenderLanes = 0;\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n}\nfunction workLoopConcurrent() {\n for (; null !== workInProgress && !shouldYield(); )\n performUnitOfWork(workInProgress);\n}\nfunction performUnitOfWork(unitOfWork) {\n var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n ReactCurrentOwner.current = null;\n}\nfunction replaySuspendedUnitOfWork(unitOfWork) {\n var current = unitOfWork.alternate;\n switch (unitOfWork.tag) {\n case 2:\n unitOfWork.tag = 0;\n case 15:\n case 0:\n var Component = unitOfWork.type,\n unresolvedProps = unitOfWork.pendingProps;\n unresolvedProps =\n unitOfWork.elementType === Component\n ? unresolvedProps\n : resolveDefaultProps(Component, unresolvedProps);\n current = replayFunctionComponent(\n current,\n unitOfWork,\n unresolvedProps,\n Component,\n void 0,\n workInProgressRootRenderLanes\n );\n break;\n case 11:\n Component = unitOfWork.type.render;\n unresolvedProps = unitOfWork.pendingProps;\n unresolvedProps =\n unitOfWork.elementType === Component\n ? unresolvedProps\n : resolveDefaultProps(Component, unresolvedProps);\n current = replayFunctionComponent(\n current,\n unitOfWork,\n unresolvedProps,\n Component,\n unitOfWork.ref,\n workInProgressRootRenderLanes\n );\n break;\n case 5:\n resetHooksOnUnwind(unitOfWork);\n default:\n unwindInterruptedWork(current, unitOfWork),\n (unitOfWork = workInProgress =\n resetWorkInProgress(unitOfWork, entangledRenderLanes)),\n (current = beginWork(current, unitOfWork, entangledRenderLanes));\n }\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === current\n ? completeUnitOfWork(unitOfWork)\n : (workInProgress = current);\n ReactCurrentOwner.current = null;\n}\nfunction throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {\n resetContextDependencies();\n resetHooksOnUnwind(unitOfWork);\n thenableState$1 = null;\n thenableIndexCounter$1 = 0;\n var returnFiber = unitOfWork.return;\n try {\n if (\n throwException(\n root,\n returnFiber,\n unitOfWork,\n thrownValue,\n workInProgressRootRenderLanes\n )\n ) {\n workInProgressRootExitStatus = 1;\n workInProgressRootFatalError = thrownValue;\n workInProgress = null;\n return;\n }\n } catch (error) {\n if (null !== returnFiber) throw ((workInProgress = returnFiber), error);\n workInProgressRootExitStatus = 1;\n workInProgressRootFatalError = thrownValue;\n workInProgress = null;\n return;\n }\n if (unitOfWork.flags & 32768)\n a: {\n root = unitOfWork;\n do {\n unitOfWork = unwindWork(root.alternate, root);\n if (null !== unitOfWork) {\n unitOfWork.flags &= 32767;\n workInProgress = unitOfWork;\n break a;\n }\n root = root.return;\n null !== root &&\n ((root.flags |= 32768),\n (root.subtreeFlags = 0),\n (root.deletions = null));\n workInProgress = root;\n } while (null !== root);\n workInProgressRootExitStatus = 6;\n workInProgress = null;\n }\n else completeUnitOfWork(unitOfWork);\n}\nfunction completeUnitOfWork(unitOfWork) {\n var completedWork = unitOfWork;\n do {\n unitOfWork = completedWork.return;\n var next = completeWork(\n completedWork.alternate,\n completedWork,\n entangledRenderLanes\n );\n if (null !== next) {\n workInProgress = next;\n return;\n }\n completedWork = completedWork.sibling;\n if (null !== completedWork) {\n workInProgress = completedWork;\n return;\n }\n workInProgress = completedWork = unitOfWork;\n } while (null !== completedWork);\n 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);\n}\nfunction commitRoot(\n root,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane\n) {\n var previousUpdateLanePriority = currentUpdatePriority,\n prevTransition = ReactCurrentBatchConfig.transition;\n try {\n (ReactCurrentBatchConfig.transition = null),\n (currentUpdatePriority = 2),\n commitRootImpl(\n root,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n previousUpdateLanePriority,\n spawnedLane\n );\n } finally {\n (ReactCurrentBatchConfig.transition = prevTransition),\n (currentUpdatePriority = previousUpdateLanePriority);\n }\n return null;\n}\nfunction commitRootImpl(\n root,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n renderPriorityLevel,\n spawnedLane\n) {\n do flushPassiveEffects();\n while (null !== rootWithPendingPassiveEffects);\n if (0 !== (executionContext & 6))\n throw Error(\"Should not already be working.\");\n didIncludeRenderPhaseUpdate = root.finishedWork;\n transitions = root.finishedLanes;\n if (null === didIncludeRenderPhaseUpdate) return null;\n root.finishedWork = null;\n root.finishedLanes = 0;\n if (didIncludeRenderPhaseUpdate === root.current)\n throw Error(\n \"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\"\n );\n root.callbackNode = null;\n root.callbackPriority = 0;\n root.cancelPendingCommit = null;\n var remainingLanes =\n didIncludeRenderPhaseUpdate.lanes | didIncludeRenderPhaseUpdate.childLanes;\n remainingLanes |= concurrentlyUpdatedLanes;\n markRootFinished(root, remainingLanes, spawnedLane);\n root === workInProgressRoot &&\n ((workInProgress = workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0));\n (0 === (didIncludeRenderPhaseUpdate.subtreeFlags & 10256) &&\n 0 === (didIncludeRenderPhaseUpdate.flags & 10256)) ||\n rootDoesHavePassiveEffects ||\n ((rootDoesHavePassiveEffects = !0),\n scheduleCallback(NormalPriority, function () {\n flushPassiveEffects();\n return null;\n }));\n spawnedLane = 0 !== (didIncludeRenderPhaseUpdate.flags & 15990);\n if (0 !== (didIncludeRenderPhaseUpdate.subtreeFlags & 15990) || spawnedLane) {\n spawnedLane = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n remainingLanes = currentUpdatePriority;\n currentUpdatePriority = 2;\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n ReactCurrentOwner.current = null;\n commitBeforeMutationEffects(root, didIncludeRenderPhaseUpdate);\n commitMutationEffectsOnFiber(didIncludeRenderPhaseUpdate, root);\n root.current = didIncludeRenderPhaseUpdate;\n commitLayoutEffectOnFiber(\n root,\n didIncludeRenderPhaseUpdate.alternate,\n didIncludeRenderPhaseUpdate\n );\n requestPaint();\n executionContext = prevExecutionContext;\n currentUpdatePriority = remainingLanes;\n ReactCurrentBatchConfig.transition = spawnedLane;\n } else root.current = didIncludeRenderPhaseUpdate;\n rootDoesHavePassiveEffects &&\n ((rootDoesHavePassiveEffects = !1),\n (rootWithPendingPassiveEffects = root),\n (pendingPassiveEffectsLanes = transitions));\n remainingLanes = root.pendingLanes;\n 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);\n onCommitRoot(didIncludeRenderPhaseUpdate.stateNode, renderPriorityLevel);\n ensureRootIsScheduled(root);\n if (null !== recoverableErrors)\n for (\n renderPriorityLevel = root.onRecoverableError,\n didIncludeRenderPhaseUpdate = 0;\n didIncludeRenderPhaseUpdate < recoverableErrors.length;\n didIncludeRenderPhaseUpdate++\n )\n (spawnedLane = recoverableErrors[didIncludeRenderPhaseUpdate]),\n (remainingLanes = {\n digest: spawnedLane.digest,\n componentStack: spawnedLane.stack\n }),\n renderPriorityLevel(spawnedLane.value, remainingLanes);\n if (hasUncaughtError)\n throw (\n ((hasUncaughtError = !1),\n (root = firstUncaughtError),\n (firstUncaughtError = null),\n root)\n );\n 0 !== (pendingPassiveEffectsLanes & 3) &&\n 0 !== root.tag &&\n flushPassiveEffects();\n remainingLanes = root.pendingLanes;\n 0 !== (transitions & 4194218) && 0 !== (remainingLanes & 42)\n ? root === rootWithNestedUpdates\n ? nestedUpdateCount++\n : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))\n : (nestedUpdateCount = 0);\n flushSyncWorkAcrossRoots_impl(!1);\n return null;\n}\nfunction flushPassiveEffects() {\n if (null !== rootWithPendingPassiveEffects) {\n var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),\n prevTransition = ReactCurrentBatchConfig.transition,\n previousPriority = currentUpdatePriority;\n try {\n ReactCurrentBatchConfig.transition = null;\n currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;\n if (null === rootWithPendingPassiveEffects)\n var JSCompiler_inline_result = !1;\n else {\n renderPriority = rootWithPendingPassiveEffects;\n rootWithPendingPassiveEffects = null;\n pendingPassiveEffectsLanes = 0;\n if (0 !== (executionContext & 6))\n throw Error(\"Cannot flush passive effects while already rendering.\");\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n commitPassiveUnmountOnFiber(renderPriority.current);\n commitPassiveMountOnFiber(renderPriority, renderPriority.current);\n executionContext = prevExecutionContext;\n flushSyncWorkAcrossRoots_impl(!1);\n if (\n injectedHook &&\n \"function\" === typeof injectedHook.onPostCommitFiberRoot\n )\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);\n } catch (err) {}\n JSCompiler_inline_result = !0;\n }\n return JSCompiler_inline_result;\n } finally {\n (currentUpdatePriority = previousPriority),\n (ReactCurrentBatchConfig.transition = prevTransition);\n }\n }\n return !1;\n}\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 2);\n rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);\n null !== rootFiber &&\n (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));\n}\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {\n if (3 === sourceFiber.tag)\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n else\n for (; null !== nearestMountedAncestor; ) {\n if (3 === nearestMountedAncestor.tag) {\n captureCommitPhaseErrorOnRoot(\n nearestMountedAncestor,\n sourceFiber,\n error\n );\n break;\n } else if (1 === nearestMountedAncestor.tag) {\n var instance = nearestMountedAncestor.stateNode;\n if (\n \"function\" ===\n typeof nearestMountedAncestor.type.getDerivedStateFromError ||\n (\"function\" === typeof instance.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(instance)))\n ) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n sourceFiber = createClassErrorUpdate(\n nearestMountedAncestor,\n sourceFiber,\n 2\n );\n nearestMountedAncestor = enqueueUpdate(\n nearestMountedAncestor,\n sourceFiber,\n 2\n );\n null !== nearestMountedAncestor &&\n (markRootUpdated$1(nearestMountedAncestor, 2),\n ensureRootIsScheduled(nearestMountedAncestor));\n break;\n }\n }\n nearestMountedAncestor = nearestMountedAncestor.return;\n }\n}\nfunction attachPingListener(root, wakeable, lanes) {\n var pingCache = root.pingCache;\n if (null === pingCache) {\n pingCache = root.pingCache = new PossiblyWeakMap();\n var threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else\n (threadIDs = pingCache.get(wakeable)),\n void 0 === threadIDs &&\n ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));\n threadIDs.has(lanes) ||\n ((workInProgressRootDidAttachPingListener = !0),\n threadIDs.add(lanes),\n (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),\n wakeable.then(root, root));\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n null !== pingCache && pingCache.delete(wakeable);\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n workInProgressRoot === root &&\n (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&\n (4 === workInProgressRootExitStatus ||\n (3 === workInProgressRootExitStatus &&\n (workInProgressRootRenderLanes & 62914560) ===\n workInProgressRootRenderLanes &&\n 300 > now() - globalMostRecentFallbackTime)\n ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)\n : (workInProgressRootPingedLanes |= pingedLanes));\n ensureRootIsScheduled(root);\n}\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n 0 === retryLane &&\n (retryLane = 0 === (boundaryFiber.mode & 1) ? 2 : claimNextRetryLane());\n boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n null !== boundaryFiber &&\n (markRootUpdated$1(boundaryFiber, retryLane),\n ensureRootIsScheduled(boundaryFiber));\n}\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState,\n retryLane = 0;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = 0;\n switch (boundaryFiber.tag) {\n case 13:\n var retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n break;\n case 19:\n retryCache = boundaryFiber.stateNode;\n break;\n case 22:\n retryCache = boundaryFiber.stateNode._retryCache;\n break;\n default:\n throw Error(\n \"Pinged unknown suspense boundary type. This is probably a bug in React.\"\n );\n }\n null !== retryCache && retryCache.delete(wakeable);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction scheduleCallback(priorityLevel, callback) {\n return scheduleCallback$2(priorityLevel, callback);\n}\nfunction FiberNode(tag, pendingProps, key, mode) {\n this.tag = tag;\n this.key = key;\n this.sibling =\n this.child =\n this.return =\n this.stateNode =\n this.type =\n this.elementType =\n null;\n this.index = 0;\n this.refCleanup = this.ref = null;\n this.pendingProps = pendingProps;\n this.dependencies =\n this.memoizedState =\n this.updateQueue =\n this.memoizedProps =\n null;\n this.mode = mode;\n this.subtreeFlags = this.flags = 0;\n this.deletions = null;\n this.childLanes = this.lanes = 0;\n this.alternate = null;\n}\nfunction createFiber(tag, pendingProps, key, mode) {\n return new FiberNode(tag, pendingProps, key, mode);\n}\nfunction shouldConstruct(Component) {\n Component = Component.prototype;\n return !(!Component || !Component.isReactComponent);\n}\nfunction resolveLazyComponentTag(Component) {\n if (\"function\" === typeof Component)\n return shouldConstruct(Component) ? 1 : 0;\n if (void 0 !== Component && null !== Component) {\n Component = Component.$$typeof;\n if (Component === REACT_FORWARD_REF_TYPE) return 11;\n if (Component === REACT_MEMO_TYPE) return 14;\n }\n return 2;\n}\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n null === workInProgress\n ? ((workInProgress = createFiber(\n current.tag,\n pendingProps,\n current.key,\n current.mode\n )),\n (workInProgress.elementType = current.elementType),\n (workInProgress.type = current.type),\n (workInProgress.stateNode = current.stateNode),\n (workInProgress.alternate = current),\n (current.alternate = workInProgress))\n : ((workInProgress.pendingProps = pendingProps),\n (workInProgress.type = current.type),\n (workInProgress.flags = 0),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null));\n workInProgress.flags = current.flags & 31457280;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n pendingProps = current.dependencies;\n workInProgress.dependencies =\n null === pendingProps\n ? null\n : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n workInProgress.refCleanup = current.refCleanup;\n return workInProgress;\n}\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n workInProgress.flags &= 31457282;\n var current = workInProgress.alternate;\n null === current\n ? ((workInProgress.childLanes = 0),\n (workInProgress.lanes = renderLanes),\n (workInProgress.child = null),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.memoizedProps = null),\n (workInProgress.memoizedState = null),\n (workInProgress.updateQueue = null),\n (workInProgress.dependencies = null),\n (workInProgress.stateNode = null))\n : ((workInProgress.childLanes = current.childLanes),\n (workInProgress.lanes = current.lanes),\n (workInProgress.child = current.child),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null),\n (workInProgress.memoizedProps = current.memoizedProps),\n (workInProgress.memoizedState = current.memoizedState),\n (workInProgress.updateQueue = current.updateQueue),\n (workInProgress.type = current.type),\n (renderLanes = current.dependencies),\n (workInProgress.dependencies =\n null === renderLanes\n ? null\n : {\n lanes: renderLanes.lanes,\n firstContext: renderLanes.firstContext\n }));\n return workInProgress;\n}\nfunction createFiberFromTypeAndProps(\n type,\n key,\n pendingProps,\n owner,\n mode,\n lanes\n) {\n var fiberTag = 2;\n owner = type;\n if (\"function\" === typeof type) shouldConstruct(type) && (fiberTag = 1);\n else if (\"string\" === typeof type) fiberTag = 5;\n else\n a: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n case REACT_STRICT_MODE_TYPE:\n fiberTag = 8;\n mode |= 8;\n 0 !== (mode & 1) && (mode |= 16);\n break;\n case REACT_PROFILER_TYPE:\n return (\n (type = createFiber(12, pendingProps, key, mode | 2)),\n (type.elementType = REACT_PROFILER_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_TYPE:\n return (\n (type = createFiber(13, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_LIST_TYPE:\n return (\n (type = createFiber(19, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_LIST_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n default:\n if (\"object\" === typeof type && null !== type)\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = 10;\n break a;\n case REACT_CONTEXT_TYPE:\n fiberTag = 9;\n break a;\n case REACT_CONSUMER_TYPE:\n case REACT_FORWARD_REF_TYPE:\n fiberTag = 11;\n break a;\n case REACT_MEMO_TYPE:\n fiberTag = 14;\n break a;\n case REACT_LAZY_TYPE:\n fiberTag = 16;\n owner = null;\n break a;\n }\n throw Error(\n \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" +\n ((null == type ? type : typeof type) + \".\")\n );\n }\n key = createFiber(fiberTag, pendingProps, key, mode);\n key.elementType = type;\n key.type = owner;\n key.lanes = lanes;\n return key;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n elements = createFiber(7, elements, key, mode);\n elements.lanes = lanes;\n return elements;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n pendingProps = createFiber(22, pendingProps, key, mode);\n pendingProps.elementType = REACT_OFFSCREEN_TYPE;\n pendingProps.lanes = lanes;\n var primaryChildInstance = {\n _visibility: 1,\n _pendingVisibility: 1,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null,\n _current: null,\n detach: function () {\n var fiber = primaryChildInstance._current;\n if (null === fiber)\n throw Error(\n \"Calling Offscreen.detach before instance handle has been set.\"\n );\n if (0 === (primaryChildInstance._pendingVisibility & 2)) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root &&\n ((primaryChildInstance._pendingVisibility |= 2),\n scheduleUpdateOnFiber(root, fiber, 2));\n }\n },\n attach: function () {\n var fiber = primaryChildInstance._current;\n if (null === fiber)\n throw Error(\n \"Calling Offscreen.detach before instance handle has been set.\"\n );\n if (0 !== (primaryChildInstance._pendingVisibility & 2)) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root &&\n ((primaryChildInstance._pendingVisibility &= -3),\n scheduleUpdateOnFiber(root, fiber, 2));\n }\n }\n };\n pendingProps.stateNode = primaryChildInstance;\n return pendingProps;\n}\nfunction createFiberFromText(content, mode, lanes) {\n content = createFiber(6, content, null, mode);\n content.lanes = lanes;\n return content;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n mode = createFiber(\n 4,\n null !== portal.children ? portal.children : [],\n portal.key,\n mode\n );\n mode.lanes = lanes;\n mode.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n implementation: portal.implementation\n };\n return mode;\n}\nfunction FiberRootNode(\n containerInfo,\n tag,\n hydrate,\n identifierPrefix,\n onRecoverableError,\n formState\n) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.finishedWork =\n this.pingCache =\n this.current =\n this.pendingChildren =\n null;\n this.timeoutHandle = -1;\n this.callbackNode =\n this.next =\n this.pendingContext =\n this.context =\n this.cancelPendingCommit =\n null;\n this.callbackPriority = 0;\n this.expirationTimes = createLaneMap(-1);\n this.entangledLanes =\n this.shellSuspendCounter =\n this.errorRecoveryDisabledLanes =\n this.finishedLanes =\n this.expiredLanes =\n this.pingedLanes =\n this.suspendedLanes =\n this.pendingLanes =\n 0;\n this.entanglements = createLaneMap(0);\n this.hiddenUpdates = createLaneMap(null);\n this.identifierPrefix = identifierPrefix;\n this.onRecoverableError = onRecoverableError;\n this.formState = formState;\n this.incompleteTransitions = new Map();\n}\nfunction createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\nfunction findHostInstance(component) {\n var fiber = component._reactInternals;\n if (void 0 === fiber) {\n if (\"function\" === typeof component.render)\n throw Error(\"Unable to find node on an unmounted component.\");\n component = Object.keys(component).join(\",\");\n throw Error(\n \"Argument appears to not be a ReactComponent. Keys: \" + component\n );\n }\n component = findCurrentHostFiber(fiber);\n return null === component ? null : getPublicInstance(component.stateNode);\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n parentComponent = container.current;\n var lane = requestUpdateLane(parentComponent);\n null === container.context\n ? (container.context = emptyContextObject)\n : (container.pendingContext = emptyContextObject);\n container = createUpdate(lane);\n container.payload = { element: element };\n callback = void 0 === callback ? null : callback;\n null !== callback && (container.callback = callback);\n element = enqueueUpdate(parentComponent, container, lane);\n null !== element &&\n (scheduleUpdateOnFiber(element, parentComponent, lane),\n entangleTransitions(element, parentComponent, lane));\n return lane;\n}\nfunction emptyFindFiberByHostInstance() {\n return null;\n}\nfunction findNodeHandle(componentOrHandle) {\n if (null == componentOrHandle) return null;\n if (\"number\" === typeof componentOrHandle) return componentOrHandle;\n if (componentOrHandle._nativeTag) return componentOrHandle._nativeTag;\n if (\n null != componentOrHandle.canonical &&\n null != componentOrHandle.canonical.nativeTag\n )\n return componentOrHandle.canonical.nativeTag;\n var nativeTag =\n ReactNativePrivateInterface.getNativeTagFromPublicInstance(\n componentOrHandle\n );\n if (nativeTag) return nativeTag;\n componentOrHandle = findHostInstance(componentOrHandle);\n return null == componentOrHandle\n ? componentOrHandle\n : null != componentOrHandle._nativeTag\n ? componentOrHandle._nativeTag\n : ReactNativePrivateInterface.getNativeTagFromPublicInstance(\n componentOrHandle\n );\n}\nfunction getInspectorDataForInstance() {\n throw Error(\"getInspectorDataForInstance() is not available in production\");\n}\nfunction onRecoverableError(error) {\n console.error(error);\n}\nbatchedUpdatesImpl = function (fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= 1;\n try {\n return fn(a);\n } finally {\n (executionContext = prevExecutionContext),\n 0 === executionContext &&\n ((workInProgressRootRenderTargetTime = now() + 500),\n flushSyncWorkAcrossRoots_impl(!0));\n }\n};\nvar roots = new Map(),\n devToolsConfig$jscomp$inline_1031 = {\n findFiberByHostInstance: getInstanceFromNode,\n bundleType: 0,\n version: \"18.3.0-canary-9372c6311-20240315\",\n rendererPackageName: \"react-native-renderer\",\n rendererConfig: {\n getInspectorDataForInstance: getInspectorDataForInstance,\n getInspectorDataForViewTag: function () {\n throw Error(\n \"getInspectorDataForViewTag() is not available in production\"\n );\n },\n getInspectorDataForViewAtPoint: function () {\n throw Error(\n \"getInspectorDataForViewAtPoint() is not available in production.\"\n );\n }.bind(null, findNodeHandle)\n }\n };\nvar internals$jscomp$inline_1259 = {\n bundleType: devToolsConfig$jscomp$inline_1031.bundleType,\n version: devToolsConfig$jscomp$inline_1031.version,\n rendererPackageName: devToolsConfig$jscomp$inline_1031.rendererPackageName,\n rendererConfig: devToolsConfig$jscomp$inline_1031.rendererConfig,\n overrideHookState: null,\n overrideHookStateDeletePath: null,\n overrideHookStateRenamePath: null,\n overrideProps: null,\n overridePropsDeletePath: null,\n overridePropsRenamePath: null,\n setErrorHandler: null,\n setSuspenseHandler: null,\n scheduleUpdate: null,\n currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,\n findHostInstanceByFiber: function (fiber) {\n fiber = findCurrentHostFiber(fiber);\n return null === fiber ? null : fiber.stateNode;\n },\n findFiberByHostInstance:\n devToolsConfig$jscomp$inline_1031.findFiberByHostInstance ||\n emptyFindFiberByHostInstance,\n findHostInstancesForRefresh: null,\n scheduleRefresh: null,\n scheduleRoot: null,\n setRefreshHandler: null,\n getCurrentFiber: null,\n reconcilerVersion: \"18.3.0-canary-9372c6311-20240315\"\n};\nif (\"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {\n var hook$jscomp$inline_1260 = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (\n !hook$jscomp$inline_1260.isDisabled &&\n hook$jscomp$inline_1260.supportsFiber\n )\n try {\n (rendererID = hook$jscomp$inline_1260.inject(\n internals$jscomp$inline_1259\n )),\n (injectedHook = hook$jscomp$inline_1260);\n } catch (err) {}\n}\nexports.createPortal = function (children, containerTag) {\n return createPortal$1(\n children,\n containerTag,\n null,\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null\n );\n};\nexports.dispatchCommand = function (handle, command, args) {\n var nativeTag =\n null != handle._nativeTag\n ? handle._nativeTag\n : ReactNativePrivateInterface.getNativeTagFromPublicInstance(handle);\n null != nativeTag &&\n ((handle = ReactNativePrivateInterface.getNodeFromPublicInstance(handle)),\n null != handle\n ? nativeFabricUIManager.dispatchCommand(handle, command, args)\n : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand(\n nativeTag,\n command,\n args\n ));\n};\nexports.findHostInstance_DEPRECATED = function (componentOrHandle) {\n return null == componentOrHandle\n ? null\n : componentOrHandle.canonical && componentOrHandle.canonical.publicInstance\n ? componentOrHandle.canonical.publicInstance\n : componentOrHandle._nativeTag\n ? componentOrHandle\n : findHostInstance(componentOrHandle);\n};\nexports.findNodeHandle = findNodeHandle;\nexports.getInspectorDataForInstance = getInspectorDataForInstance;\nexports.getNodeFromInternalInstanceHandle = function (internalInstanceHandle) {\n return (\n internalInstanceHandle &&\n internalInstanceHandle.stateNode &&\n internalInstanceHandle.stateNode.node\n );\n};\nexports.getPublicInstanceFromInternalInstanceHandle = function (\n internalInstanceHandle\n) {\n var instance = internalInstanceHandle.stateNode;\n return null == instance\n ? null\n : 6 === internalInstanceHandle.tag\n ? (null == instance.publicInstance &&\n (instance.publicInstance =\n ReactNativePrivateInterface.createPublicTextInstance(\n internalInstanceHandle\n )),\n instance.publicInstance)\n : getPublicInstance(internalInstanceHandle.stateNode);\n};\nexports.isChildPublicInstance = function () {\n throw Error(\"isChildPublicInstance() is not available in production.\");\n};\nexports.render = function (element, containerTag, callback, concurrentRoot) {\n var root = roots.get(containerTag);\n root ||\n ((root = concurrentRoot ? 1 : 0),\n (concurrentRoot = new FiberRootNode(\n containerTag,\n root,\n !1,\n \"\",\n onRecoverableError,\n null\n )),\n (root = createFiber(3, null, null, 1 === root ? 1 : 0)),\n (concurrentRoot.current = root),\n (root.stateNode = concurrentRoot),\n (root.memoizedState = { element: null, isDehydrated: !1, cache: null }),\n initializeUpdateQueue(root),\n (root = concurrentRoot),\n roots.set(containerTag, root));\n updateContainer(element, root, null, callback);\n a: if (((element = root.current), element.child))\n switch (element.child.tag) {\n case 27:\n case 5:\n element = getPublicInstance(element.child.stateNode);\n break a;\n default:\n element = element.child.stateNode;\n }\n else element = null;\n return element;\n};\nexports.sendAccessibilityEvent = function (handle, eventType) {\n var nativeTag =\n null != handle._nativeTag\n ? handle._nativeTag\n : ReactNativePrivateInterface.getNativeTagFromPublicInstance(handle);\n null != nativeTag &&\n ((handle = ReactNativePrivateInterface.getNodeFromPublicInstance(handle)),\n null != handle\n ? nativeFabricUIManager.sendAccessibilityEvent(handle, eventType)\n : ReactNativePrivateInterface.legacySendAccessibilityEvent(\n nativeTag,\n eventType\n ));\n};\nexports.stopSurface = function (containerTag) {\n var root = roots.get(containerTag);\n root &&\n updateContainer(null, root, null, function () {\n roots.delete(containerTag);\n });\n};\nexports.unmountComponentAtNode = function (containerTag) {\n this.stopSurface(containerTag);\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport '../Core/InitializeCore';\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n/**\n * Sets up global variables typical in most JavaScript environments.\n *\n * 1. Global timers (via `setTimeout` etc).\n * 2. Global console object.\n * 3. Hooks for printing stack traces with source maps.\n *\n * Leaves enough room in the environment for implementing your own:\n *\n * 1. Require system.\n * 2. Bridged modules.\n *\n */\n\n'use strict';\n\nconst start = Date.now();\n\nrequire('./setUpGlobals');\nrequire('../../src/private/core/setUpDOM');\nrequire('./setUpPerformance');\nrequire('./setUpErrorHandling');\nrequire('./polyfillPromise');\nrequire('./setUpRegeneratorRuntime');\nrequire('./setUpTimers');\nrequire('./setUpXHR');\nrequire('./setUpAlert');\nrequire('./setUpNavigator');\nrequire('./setUpBatchedBridge');\nrequire('./setUpSegmentFetcher');\nif (__DEV__) {\n require('./checkNativeVersion');\n require('./setUpDeveloperTools');\n require('../LogBox/LogBox').default.install();\n}\n\nrequire('../ReactNative/AppRegistry');\n\nconst GlobalPerformanceLogger = require('../Utilities/GlobalPerformanceLogger');\n// We could just call GlobalPerformanceLogger.markPoint at the top of the file,\n// but then we'd be excluding the time it took to require the logger.\n// Instead, we just use Date.now and backdate the timestamp.\nGlobalPerformanceLogger.markPoint(\n 'initializeCore_start',\n GlobalPerformanceLogger.currentTimestamp() - (Date.now() - start),\n);\nGlobalPerformanceLogger.markPoint('initializeCore_end');\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\n/**\n * Sets up global variables for React Native.\n * You can use this module directly, or just require InitializeCore.\n */\nif (global.window === undefined) {\n // $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it.\n global.window = global;\n}\n\nif (global.self === undefined) {\n // $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it.\n global.self = global;\n}\n\n// Set up process\n// $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it.\nglobal.process = global.process || {};\n// $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it.\nglobal.process.env = global.process.env || {};\nif (!global.process.env.NODE_ENV) {\n // $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it.\n global.process.env.NODE_ENV = __DEV__ ? 'development' : 'production';\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport DOMRect from '../webapis/dom/geometry/DOMRect';\nimport DOMRectReadOnly from '../webapis/dom/geometry/DOMRectReadOnly';\n\n// $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it\nglobal.DOMRect = DOMRect;\n\n// $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it\nglobal.DOMRectReadOnly = DOMRectReadOnly;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n/**\n * The JSDoc comments in this file have been extracted from [DOMRect](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect).\n * Content by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMRect/contributors.txt),\n * licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).\n */\n\nimport DOMRectReadOnly, {type DOMRectLike} from './DOMRectReadOnly';\n\n// flowlint unsafe-getters-setters:off\n\n/**\n * A `DOMRect` describes the size and position of a rectangle.\n * The type of box represented by the `DOMRect` is specified by the method or property that returned it.\n *\n * This is a (mostly) spec-compliant version of `DOMRect` (https://developer.mozilla.org/en-US/docs/Web/API/DOMRect).\n */\nexport default class DOMRect extends DOMRectReadOnly {\n /**\n * The x coordinate of the `DOMRect`'s origin.\n */\n get x(): number {\n return this.__getInternalX();\n }\n\n set x(x: ?number) {\n this.__setInternalX(x);\n }\n\n /**\n * The y coordinate of the `DOMRect`'s origin.\n */\n get y(): number {\n return this.__getInternalY();\n }\n\n set y(y: ?number) {\n this.__setInternalY(y);\n }\n\n /**\n * The width of the `DOMRect`.\n */\n get width(): number {\n return this.__getInternalWidth();\n }\n\n set width(width: ?number) {\n this.__setInternalWidth(width);\n }\n\n /**\n * The height of the `DOMRect`.\n */\n get height(): number {\n return this.__getInternalHeight();\n }\n\n set height(height: ?number) {\n this.__setInternalHeight(height);\n }\n\n /**\n * Creates a new `DOMRect` object with a given location and dimensions.\n */\n static fromRect(rect?: ?DOMRectLike): DOMRect {\n if (!rect) {\n return new DOMRect();\n }\n\n return new DOMRect(rect.x, rect.y, rect.width, rect.height);\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n/**\n * The JSDoc comments in this file have been extracted from [DOMRectReadOnly](https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly).\n * Content by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly/contributors.txt),\n * licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).\n */\n\n// flowlint sketchy-null:off, unsafe-getters-setters:off\n\nexport interface DOMRectLike {\n x?: ?number;\n y?: ?number;\n width?: ?number;\n height?: ?number;\n}\n\nfunction castToNumber(value: mixed): number {\n return value ? Number(value) : 0;\n}\n\n/**\n * The `DOMRectReadOnly` interface specifies the standard properties used by `DOMRect` to define a rectangle whose properties are immutable.\n *\n * This is a (mostly) spec-compliant version of `DOMRectReadOnly` (https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly).\n */\nexport default class DOMRectReadOnly {\n #x: number;\n #y: number;\n #width: number;\n #height: number;\n\n constructor(x: ?number, y: ?number, width: ?number, height: ?number) {\n this.__setInternalX(x);\n this.__setInternalY(y);\n this.__setInternalWidth(width);\n this.__setInternalHeight(height);\n }\n\n /**\n * The x coordinate of the `DOMRectReadOnly`'s origin.\n */\n get x(): number {\n return this.#x;\n }\n\n /**\n * The y coordinate of the `DOMRectReadOnly`'s origin.\n */\n get y(): number {\n return this.#y;\n }\n\n /**\n * The width of the `DOMRectReadOnly`.\n */\n get width(): number {\n return this.#width;\n }\n\n /**\n * The height of the `DOMRectReadOnly`.\n */\n get height(): number {\n return this.#height;\n }\n\n /**\n * Returns the top coordinate value of the `DOMRect` (has the same value as `y`, or `y + height` if `height` is negative).\n */\n get top(): number {\n const height = this.#height;\n const y = this.#y;\n\n if (height < 0) {\n return y + height;\n }\n\n return y;\n }\n\n /**\n * Returns the right coordinate value of the `DOMRect` (has the same value as ``x + width`, or `x` if `width` is negative).\n */\n get right(): number {\n const width = this.#width;\n const x = this.#x;\n\n if (width < 0) {\n return x;\n }\n\n return x + width;\n }\n\n /**\n * Returns the bottom coordinate value of the `DOMRect` (has the same value as `y + height`, or `y` if `height` is negative).\n */\n get bottom(): number {\n const height = this.#height;\n const y = this.#y;\n\n if (height < 0) {\n return y;\n }\n\n return y + height;\n }\n\n /**\n * Returns the left coordinate value of the `DOMRect` (has the same value as `x`, or `x + width` if `width` is negative).\n */\n get left(): number {\n const width = this.#width;\n const x = this.#x;\n\n if (width < 0) {\n return x + width;\n }\n\n return x;\n }\n\n toJSON(): {\n x: number,\n y: number,\n width: number,\n height: number,\n top: number,\n left: number,\n bottom: number,\n right: number,\n } {\n const {x, y, width, height, top, left, bottom, right} = this;\n return {x, y, width, height, top, left, bottom, right};\n }\n\n /**\n * Creates a new `DOMRectReadOnly` object with a given location and dimensions.\n */\n static fromRect(rect?: ?DOMRectLike): DOMRectReadOnly {\n if (!rect) {\n return new DOMRectReadOnly();\n }\n\n return new DOMRectReadOnly(rect.x, rect.y, rect.width, rect.height);\n }\n\n __getInternalX(): number {\n return this.#x;\n }\n\n __getInternalY(): number {\n return this.#y;\n }\n\n __getInternalWidth(): number {\n return this.#width;\n }\n\n __getInternalHeight(): number {\n return this.#height;\n }\n\n __setInternalX(x: ?number) {\n this.#x = castToNumber(x);\n }\n\n __setInternalY(y: ?number) {\n this.#y = castToNumber(y);\n }\n\n __setInternalWidth(width: ?number) {\n this.#width = castToNumber(width);\n }\n\n __setInternalHeight(height: ?number) {\n this.#height = castToNumber(height);\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport Performance from '../../src/private/webapis/performance/Performance';\nimport NativePerformance from '../../src/private/webapis/performance/specs/NativePerformance';\n\n// In case if the native implementation of the Performance API is available, use it,\n// otherwise fall back to the legacy/default one, which only defines 'Performance.now()'\nif (NativePerformance) {\n // $FlowExpectedError[cannot-write]\n global.performance = new Performance();\n} else {\n if (!global.performance) {\n // $FlowExpectedError[cannot-write]\n global.performance = {\n mark: () => {},\n measure: () => {},\n now: () => {\n const performanceNow = global.nativePerformanceNow || Date.now;\n return performanceNow();\n },\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n// flowlint unsafe-getters-setters:off\n\nimport type {HighResTimeStamp, PerformanceEntryType} from './PerformanceEntry';\nimport type {PerformanceEntryList} from './PerformanceObserver';\nimport type {\n PerformanceMarkOptions,\n PerformanceMeasureOptions,\n} from './UserTiming';\n\nimport warnOnce from '../../../../Libraries/Utilities/warnOnce';\nimport EventCounts from './EventCounts';\nimport MemoryInfo from './MemoryInfo';\nimport {ALWAYS_LOGGED_ENTRY_TYPES} from './PerformanceEntry';\nimport {warnNoNativePerformanceObserver} from './PerformanceObserver';\nimport {\n performanceEntryTypeToRaw,\n rawToPerformanceEntry,\n} from './RawPerformanceEntry';\nimport {RawPerformanceEntryTypeValues} from './RawPerformanceEntry';\nimport ReactNativeStartupTiming from './ReactNativeStartupTiming';\nimport NativePerformance from './specs/NativePerformance';\nimport NativePerformanceObserver from './specs/NativePerformanceObserver';\nimport {PerformanceMark, PerformanceMeasure} from './UserTiming';\n\ndeclare var global: {\n // This value is defined directly via JSI, if available.\n +nativePerformanceNow?: ?() => number,\n};\n\nconst getCurrentTimeStamp: () => HighResTimeStamp =\n NativePerformance?.now ?? global.nativePerformanceNow ?? (() => Date.now());\n\n// We want some of the performance entry types to be always logged,\n// even if they are not currently observed - this is either to be able to\n// retrieve them at any time via Performance.getEntries* or to refer by other entries\n// (such as when measures may refer to marks, even if the latter are not observed)\nif (NativePerformanceObserver?.setIsBuffered) {\n NativePerformanceObserver?.setIsBuffered(\n ALWAYS_LOGGED_ENTRY_TYPES.map(performanceEntryTypeToRaw),\n true,\n );\n}\n\nfunction warnNoNativePerformance() {\n warnOnce(\n 'missing-native-performance',\n 'Missing native implementation of Performance',\n );\n}\n\n/**\n * Partial implementation of the Performance interface for RN,\n * corresponding to the standard in\n * https://www.w3.org/TR/user-timing/#extensions-performance-interface\n */\nexport default class Performance {\n eventCounts: EventCounts = new EventCounts();\n\n // Get the current JS memory information.\n get memory(): MemoryInfo {\n if (NativePerformance?.getSimpleMemoryInfo) {\n // JSI API implementations may have different variants of names for the JS\n // heap information we need here. We will parse the result based on our\n // guess of the implementation for now.\n const memoryInfo = NativePerformance.getSimpleMemoryInfo();\n if (memoryInfo.hasOwnProperty('hermes_heapSize')) {\n // We got memory information from Hermes\n const {\n hermes_heapSize: totalJSHeapSize,\n hermes_allocatedBytes: usedJSHeapSize,\n } = memoryInfo;\n\n return new MemoryInfo({\n jsHeapSizeLimit: null, // We don't know the heap size limit from Hermes.\n totalJSHeapSize,\n usedJSHeapSize,\n });\n } else {\n // JSC and V8 has no native implementations for memory information in JSI::Instrumentation\n return new MemoryInfo();\n }\n }\n\n return new MemoryInfo();\n }\n\n // Startup metrics is not used in web, but only in React Native.\n get rnStartupTiming(): ReactNativeStartupTiming {\n if (NativePerformance?.getReactNativeStartupTiming) {\n const {\n startTime,\n endTime,\n initializeRuntimeStart,\n initializeRuntimeEnd,\n executeJavaScriptBundleEntryPointStart,\n executeJavaScriptBundleEntryPointEnd,\n } = NativePerformance.getReactNativeStartupTiming();\n return new ReactNativeStartupTiming({\n startTime,\n endTime,\n initializeRuntimeStart,\n initializeRuntimeEnd,\n executeJavaScriptBundleEntryPointStart,\n executeJavaScriptBundleEntryPointEnd,\n });\n }\n return new ReactNativeStartupTiming();\n }\n\n mark(\n markName: string,\n markOptions?: PerformanceMarkOptions,\n ): PerformanceMark {\n const mark = new PerformanceMark(markName, markOptions);\n\n if (NativePerformance?.mark) {\n NativePerformance.mark(markName, mark.startTime);\n } else {\n warnNoNativePerformance();\n }\n\n return mark;\n }\n\n clearMarks(markName?: string): void {\n if (!NativePerformanceObserver?.clearEntries) {\n warnNoNativePerformanceObserver();\n return;\n }\n\n NativePerformanceObserver?.clearEntries(\n RawPerformanceEntryTypeValues.MARK,\n markName,\n );\n }\n\n measure(\n measureName: string,\n startMarkOrOptions?: string | PerformanceMeasureOptions,\n endMark?: string,\n ): PerformanceMeasure {\n let options;\n let startMarkName,\n endMarkName = endMark,\n duration,\n startTime = 0,\n endTime = 0;\n\n if (typeof startMarkOrOptions === 'string') {\n startMarkName = startMarkOrOptions;\n } else if (startMarkOrOptions !== undefined) {\n options = startMarkOrOptions;\n if (endMark !== undefined) {\n throw new TypeError(\n \"Performance.measure: Can't have both options and endMark\",\n );\n }\n if (options.start === undefined && options.end === undefined) {\n throw new TypeError(\n 'Performance.measure: Must have at least one of start/end specified in options',\n );\n }\n if (\n options.start !== undefined &&\n options.end !== undefined &&\n options.duration !== undefined\n ) {\n throw new TypeError(\n \"Performance.measure: Can't have both start/end and duration explicitly in options\",\n );\n }\n\n if (typeof options.start === 'number') {\n startTime = options.start;\n } else {\n startMarkName = options.start;\n }\n\n if (typeof options.end === 'number') {\n endTime = options.end;\n } else {\n endMarkName = options.end;\n }\n\n duration = options.duration ?? duration;\n }\n\n const measure = new PerformanceMeasure(measureName, options);\n\n if (NativePerformance?.measure) {\n NativePerformance.measure(\n measureName,\n startTime,\n endTime,\n duration,\n startMarkName,\n endMarkName,\n );\n } else {\n warnNoNativePerformance();\n }\n\n return measure;\n }\n\n clearMeasures(measureName?: string): void {\n if (!NativePerformanceObserver?.clearEntries) {\n warnNoNativePerformanceObserver();\n return;\n }\n\n NativePerformanceObserver?.clearEntries(\n RawPerformanceEntryTypeValues.MEASURE,\n measureName,\n );\n }\n\n /**\n * Returns a double, measured in milliseconds.\n * https://developer.mozilla.org/en-US/docs/Web/API/Performance/now\n */\n now(): HighResTimeStamp {\n return getCurrentTimeStamp();\n }\n\n /**\n * An extension that allows to get back to JS all currently logged marks/measures\n * (in our case, be it from JS or native), see\n * https://www.w3.org/TR/performance-timeline/#extensions-to-the-performance-interface\n */\n getEntries(): PerformanceEntryList {\n if (!NativePerformanceObserver?.getEntries) {\n warnNoNativePerformanceObserver();\n return [];\n }\n return NativePerformanceObserver.getEntries().map(rawToPerformanceEntry);\n }\n\n getEntriesByType(entryType: PerformanceEntryType): PerformanceEntryList {\n if (!ALWAYS_LOGGED_ENTRY_TYPES.includes(entryType)) {\n console.warn(\n `Performance.getEntriesByType: Only valid for ${JSON.stringify(\n ALWAYS_LOGGED_ENTRY_TYPES,\n )} entry types, got ${entryType}`,\n );\n return [];\n }\n\n if (!NativePerformanceObserver?.getEntries) {\n warnNoNativePerformanceObserver();\n return [];\n }\n return NativePerformanceObserver.getEntries(\n performanceEntryTypeToRaw(entryType),\n ).map(rawToPerformanceEntry);\n }\n\n getEntriesByName(\n entryName: string,\n entryType?: PerformanceEntryType,\n ): PerformanceEntryList {\n if (\n entryType !== undefined &&\n !ALWAYS_LOGGED_ENTRY_TYPES.includes(entryType)\n ) {\n console.warn(\n `Performance.getEntriesByName: Only valid for ${JSON.stringify(\n ALWAYS_LOGGED_ENTRY_TYPES,\n )} entry types, got ${entryType}`,\n );\n return [];\n }\n\n if (!NativePerformanceObserver?.getEntries) {\n warnNoNativePerformanceObserver();\n return [];\n }\n return NativePerformanceObserver.getEntries(\n entryType != null ? performanceEntryTypeToRaw(entryType) : undefined,\n entryName,\n ).map(rawToPerformanceEntry);\n }\n}\n","function _readOnlyError(r) {\n throw new TypeError('\"' + r + '\" is read-only');\n}\nmodule.exports = _readOnlyError, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nconst warnedKeys: {[string]: boolean, ...} = {};\n\n/**\n * A simple function that prints a warning message once per session.\n *\n * @param {string} key - The key used to ensure the message is printed once.\n * This should be unique to the callsite.\n * @param {string} message - The message to print\n */\nfunction warnOnce(key: string, message: string) {\n if (warnedKeys[key]) {\n return;\n }\n\n console.warn(message);\n\n warnedKeys[key] = true;\n}\n\nmodule.exports = warnOnce;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport {warnNoNativePerformanceObserver} from './PerformanceObserver';\nimport NativePerformanceObserver from './specs/NativePerformanceObserver';\n\ntype EventCountsForEachCallbackType =\n | (() => void)\n | ((value: number) => void)\n | ((value: number, key: string) => void)\n | ((value: number, key: string, map: Map) => void);\n\nlet cachedEventCounts: ?Map;\n\nfunction getCachedEventCounts(): Map {\n if (cachedEventCounts) {\n return cachedEventCounts;\n }\n if (!NativePerformanceObserver) {\n warnNoNativePerformanceObserver();\n return new Map();\n }\n\n cachedEventCounts = new Map(\n NativePerformanceObserver.getEventCounts(),\n );\n // $FlowFixMe[incompatible-call]\n global.queueMicrotask(() => {\n // To be consistent with the calls to the API from the same task,\n // but also not to refetch the data from native too often,\n // schedule to invalidate the cache later,\n // after the current task is guaranteed to have finished.\n cachedEventCounts = null;\n });\n return cachedEventCounts ?? new Map();\n}\n/**\n * Implementation of the EventCounts Web Performance API\n * corresponding to the standard in\n * https://www.w3.org/TR/event-timing/#eventcounts\n */\nexport default class EventCounts {\n // flowlint unsafe-getters-setters:off\n get size(): number {\n return getCachedEventCounts().size;\n }\n\n entries(): Iterator<[string, number]> {\n return getCachedEventCounts().entries();\n }\n\n forEach(callback: EventCountsForEachCallbackType): void {\n return getCachedEventCounts().forEach(callback);\n }\n\n get(key: string): ?number {\n return getCachedEventCounts().get(key);\n }\n\n has(key: string): boolean {\n return getCachedEventCounts().has(key);\n }\n\n keys(): Iterator {\n return getCachedEventCounts().keys();\n }\n\n values(): Iterator {\n return getCachedEventCounts().values();\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type RawPerformanceEntryType = number;\n\nexport type RawPerformanceEntry = {|\n name: string,\n entryType: RawPerformanceEntryType,\n startTime: number,\n duration: number,\n // For \"event\" entries only:\n processingStart?: number,\n processingEnd?: number,\n interactionId?: number,\n|};\n\nexport type GetPendingEntriesResult = {|\n entries: $ReadOnlyArray,\n droppedEntriesCount: number,\n|};\n\nexport interface Spec extends TurboModule {\n +startReporting: (entryType: RawPerformanceEntryType) => void;\n +stopReporting: (entryType: RawPerformanceEntryType) => void;\n +setIsBuffered: (\n entryTypes: $ReadOnlyArray,\n isBuffered: boolean,\n ) => void;\n +popPendingEntries: () => GetPendingEntriesResult;\n +setOnPerformanceEntryCallback: (callback?: () => void) => void;\n +logRawEntry: (entry: RawPerformanceEntry) => void;\n +getEventCounts: () => $ReadOnlyArray<[string, number]>;\n +setDurationThreshold: (\n entryType: RawPerformanceEntryType,\n durationThreshold: number,\n ) => void;\n +clearEntries: (\n entryType: RawPerformanceEntryType,\n entryName?: string,\n ) => void;\n +getEntries: (\n entryType?: RawPerformanceEntryType,\n entryName?: string,\n ) => $ReadOnlyArray;\n +getSupportedPerformanceEntryTypes: () => $ReadOnlyArray;\n}\n\nexport default (TurboModuleRegistry.get(\n 'NativePerformanceObserverCxx',\n): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {HighResTimeStamp, PerformanceEntryType} from './PerformanceEntry';\n\nimport warnOnce from '../../../../Libraries/Utilities/warnOnce';\nimport {PerformanceEntry} from './PerformanceEntry';\nimport PerformanceEventTiming from './PerformanceEventTiming';\nimport {\n performanceEntryTypeToRaw,\n rawToPerformanceEntry,\n rawToPerformanceEntryType,\n} from './RawPerformanceEntry';\nimport NativePerformanceObserver from './specs/NativePerformanceObserver';\n\nexport type PerformanceEntryList = $ReadOnlyArray;\n\nexport {PerformanceEntry} from './PerformanceEntry';\n\nexport class PerformanceObserverEntryList {\n #entries: PerformanceEntryList;\n\n constructor(entries: PerformanceEntryList) {\n this.#entries = entries;\n }\n\n getEntries(): PerformanceEntryList {\n return this.#entries;\n }\n\n getEntriesByType(type: PerformanceEntryType): PerformanceEntryList {\n return this.#entries.filter(entry => entry.entryType === type);\n }\n\n getEntriesByName(\n name: string,\n type?: PerformanceEntryType,\n ): PerformanceEntryList {\n if (type === undefined) {\n return this.#entries.filter(entry => entry.name === name);\n } else {\n return this.#entries.filter(\n entry => entry.name === name && entry.entryType === type,\n );\n }\n }\n}\n\nexport type PerformanceObserverCallback = (\n list: PerformanceObserverEntryList,\n observer: PerformanceObserver,\n // The number of buffered entries which got dropped from the buffer due to the buffer being full:\n droppedEntryCount?: number,\n) => void;\n\nexport type PerformanceObserverInit =\n | {\n entryTypes: Array,\n }\n | {\n type: PerformanceEntryType,\n durationThreshold?: HighResTimeStamp,\n };\n\ntype PerformanceObserverConfig = {|\n callback: PerformanceObserverCallback,\n // Map of {entryType: durationThreshold}\n entryTypes: $ReadOnlyMap,\n|};\n\nconst observerCountPerEntryType: Map = new Map();\nconst registeredObservers: Map =\n new Map();\nlet isOnPerformanceEntryCallbackSet: boolean = false;\n\n// This is a callback that gets scheduled and periodically called from the native side\nconst onPerformanceEntry = () => {\n if (!NativePerformanceObserver) {\n return;\n }\n const entryResult = NativePerformanceObserver.popPendingEntries();\n const rawEntries = entryResult?.entries ?? [];\n const droppedEntriesCount = entryResult?.droppedEntriesCount;\n if (rawEntries.length === 0) {\n return;\n }\n const entries = rawEntries.map(rawToPerformanceEntry);\n for (const [observer, observerConfig] of registeredObservers.entries()) {\n const entriesForObserver: PerformanceEntryList = entries.filter(entry => {\n if (!observerConfig.entryTypes.has(entry.entryType)) {\n return false;\n }\n const durationThreshold = observerConfig.entryTypes.get(entry.entryType);\n return entry.duration >= (durationThreshold ?? 0);\n });\n if (entriesForObserver.length !== 0) {\n try {\n observerConfig.callback(\n new PerformanceObserverEntryList(entriesForObserver),\n observer,\n droppedEntriesCount,\n );\n } catch (error) {\n console.error(error);\n }\n }\n }\n};\n\nexport function warnNoNativePerformanceObserver() {\n warnOnce(\n 'missing-native-performance-observer',\n 'Missing native implementation of PerformanceObserver',\n );\n}\n\nfunction applyDurationThresholds() {\n const durationThresholds: Map = Array.from(\n registeredObservers.values(),\n )\n .map(config => config.entryTypes)\n .reduce(\n (accumulator, currentValue) => union(accumulator, currentValue),\n new Map(),\n );\n\n for (const [entryType, durationThreshold] of durationThresholds) {\n NativePerformanceObserver?.setDurationThreshold(\n performanceEntryTypeToRaw(entryType),\n durationThreshold ?? 0,\n );\n }\n}\n\nfunction getSupportedPerformanceEntryTypes(): $ReadOnlyArray {\n if (!NativePerformanceObserver) {\n return Object.freeze([]);\n }\n if (!NativePerformanceObserver.getSupportedPerformanceEntryTypes) {\n // fallback if getSupportedPerformanceEntryTypes is not defined on native side\n return Object.freeze(['mark', 'measure', 'event']);\n }\n return Object.freeze(\n NativePerformanceObserver.getSupportedPerformanceEntryTypes().map(\n rawToPerformanceEntryType,\n ),\n );\n}\n\n/**\n * Implementation of the PerformanceObserver interface for RN,\n * corresponding to the standard in https://www.w3.org/TR/performance-timeline/\n *\n * @example\n * const observer = new PerformanceObserver((list, _observer) => {\n * const entries = list.getEntries();\n * entries.forEach(entry => {\n * reportEvent({\n * eventName: entry.name,\n * startTime: entry.startTime,\n * endTime: entry.startTime + entry.duration,\n * processingStart: entry.processingStart,\n * processingEnd: entry.processingEnd,\n * interactionId: entry.interactionId,\n * });\n * });\n * });\n * observer.observe({ type: \"event\" });\n */\nexport default class PerformanceObserver {\n #callback: PerformanceObserverCallback;\n #type: 'single' | 'multiple' | void;\n\n constructor(callback: PerformanceObserverCallback) {\n this.#callback = callback;\n }\n\n observe(options: PerformanceObserverInit): void {\n if (!NativePerformanceObserver) {\n warnNoNativePerformanceObserver();\n return;\n }\n\n this.#validateObserveOptions(options);\n\n let requestedEntryTypes;\n\n if (options.entryTypes) {\n this.#type = 'multiple';\n requestedEntryTypes = new Map(\n options.entryTypes.map(t => [t, undefined]),\n );\n } else {\n this.#type = 'single';\n requestedEntryTypes = new Map([\n [options.type, options.durationThreshold],\n ]);\n }\n\n // The same observer may receive multiple calls to \"observe\", so we need\n // to check what is new on this call vs. previous ones.\n const currentEntryTypes = registeredObservers.get(this)?.entryTypes;\n const nextEntryTypes = currentEntryTypes\n ? union(requestedEntryTypes, currentEntryTypes)\n : requestedEntryTypes;\n\n // This `observe` call is a no-op because there are no new things to observe.\n if (currentEntryTypes && currentEntryTypes.size === nextEntryTypes.size) {\n return;\n }\n\n registeredObservers.set(this, {\n callback: this.#callback,\n entryTypes: nextEntryTypes,\n });\n\n if (!isOnPerformanceEntryCallbackSet) {\n NativePerformanceObserver.setOnPerformanceEntryCallback(\n onPerformanceEntry,\n );\n isOnPerformanceEntryCallbackSet = true;\n }\n\n // We only need to start listenening to new entry types being observed in\n // this observer.\n const newEntryTypes = currentEntryTypes\n ? difference(\n new Set(requestedEntryTypes.keys()),\n new Set(currentEntryTypes.keys()),\n )\n : new Set(requestedEntryTypes.keys());\n for (const type of newEntryTypes) {\n if (!observerCountPerEntryType.has(type)) {\n const rawType = performanceEntryTypeToRaw(type);\n NativePerformanceObserver.startReporting(rawType);\n }\n observerCountPerEntryType.set(\n type,\n (observerCountPerEntryType.get(type) ?? 0) + 1,\n );\n }\n applyDurationThresholds();\n }\n\n disconnect(): void {\n if (!NativePerformanceObserver) {\n warnNoNativePerformanceObserver();\n return;\n }\n\n const observerConfig = registeredObservers.get(this);\n if (!observerConfig) {\n return;\n }\n\n // Disconnect this observer\n for (const type of observerConfig.entryTypes.keys()) {\n const numberOfObserversForThisType =\n observerCountPerEntryType.get(type) ?? 0;\n if (numberOfObserversForThisType === 1) {\n observerCountPerEntryType.delete(type);\n NativePerformanceObserver.stopReporting(\n performanceEntryTypeToRaw(type),\n );\n } else if (numberOfObserversForThisType !== 0) {\n observerCountPerEntryType.set(type, numberOfObserversForThisType - 1);\n }\n }\n\n // Disconnect all observers if this was the last one\n registeredObservers.delete(this);\n if (registeredObservers.size === 0) {\n NativePerformanceObserver.setOnPerformanceEntryCallback(undefined);\n isOnPerformanceEntryCallbackSet = false;\n }\n\n applyDurationThresholds();\n }\n\n #validateObserveOptions(options: PerformanceObserverInit): void {\n const {type, entryTypes, durationThreshold} = options;\n\n if (!type && !entryTypes) {\n throw new TypeError(\n \"Failed to execute 'observe' on 'PerformanceObserver': An observe() call must not include both entryTypes and type arguments.\",\n );\n }\n\n if (entryTypes && type) {\n throw new TypeError(\n \"Failed to execute 'observe' on 'PerformanceObserver': An observe() call must include either entryTypes or type arguments.\",\n );\n }\n\n if (this.#type === 'multiple' && type) {\n throw new Error(\n \"Failed to execute 'observe' on 'PerformanceObserver': This observer has performed observe({entryTypes:...}, therefore it cannot perform observe({type:...})\",\n );\n }\n\n if (this.#type === 'single' && entryTypes) {\n throw new Error(\n \"Failed to execute 'observe' on 'PerformanceObserver': This PerformanceObserver has performed observe({type:...}, therefore it cannot perform observe({entryTypes:...})\",\n );\n }\n\n if (entryTypes && durationThreshold !== undefined) {\n throw new TypeError(\n \"Failed to execute 'observe' on 'PerformanceObserver': An observe() call must not include both entryTypes and durationThreshold arguments.\",\n );\n }\n }\n\n static supportedEntryTypes: $ReadOnlyArray =\n getSupportedPerformanceEntryTypes();\n}\n\n// As a Set union, except if value exists in both, we take minimum\nfunction union(\n a: $ReadOnlyMap,\n b: $ReadOnlyMap,\n): Map {\n const res = new Map();\n for (const [k, v] of a) {\n if (!b.has(k)) {\n res.set(k, v);\n } else {\n res.set(k, Math.min(v ?? 0, b.get(k) ?? 0));\n }\n }\n return res;\n}\n\nfunction difference(a: $ReadOnlySet, b: $ReadOnlySet): Set {\n return new Set([...a].filter(x => !b.has(x)));\n}\n\nexport {PerformanceEventTiming};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nexport type HighResTimeStamp = number;\nexport type PerformanceEntryType = 'mark' | 'measure' | 'event';\n\nexport type PerformanceEntryJSON = {\n name: string,\n entryType: PerformanceEntryType,\n startTime: HighResTimeStamp,\n duration: HighResTimeStamp,\n ...\n};\n\nexport const ALWAYS_LOGGED_ENTRY_TYPES: $ReadOnlyArray = [\n 'mark',\n 'measure',\n];\n\nexport class PerformanceEntry {\n name: string;\n entryType: PerformanceEntryType;\n startTime: HighResTimeStamp;\n duration: HighResTimeStamp;\n\n constructor(init: {\n name: string,\n entryType: PerformanceEntryType,\n startTime: HighResTimeStamp,\n duration: HighResTimeStamp,\n }) {\n this.name = init.name;\n this.entryType = init.entryType;\n this.startTime = init.startTime;\n this.duration = init.duration;\n }\n\n toJSON(): PerformanceEntryJSON {\n return {\n name: this.name,\n entryType: this.entryType,\n startTime: this.startTime,\n duration: this.duration,\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {HighResTimeStamp, PerformanceEntryJSON} from './PerformanceEntry';\n\nimport {PerformanceEntry} from './PerformanceEntry';\n\nexport type PerformanceEventTimingJSON = {\n ...PerformanceEntryJSON,\n processingStart: HighResTimeStamp,\n processingEnd: HighResTimeStamp,\n interactionId: number,\n ...\n};\n\nexport default class PerformanceEventTiming extends PerformanceEntry {\n processingStart: HighResTimeStamp;\n processingEnd: HighResTimeStamp;\n interactionId: number;\n\n constructor(init: {\n name: string,\n startTime?: HighResTimeStamp,\n duration?: HighResTimeStamp,\n processingStart?: HighResTimeStamp,\n processingEnd?: HighResTimeStamp,\n interactionId?: number,\n }) {\n super({\n name: init.name,\n entryType: 'event',\n startTime: init.startTime ?? 0,\n duration: init.duration ?? 0,\n });\n this.processingStart = init.processingStart ?? 0;\n this.processingEnd = init.processingEnd ?? 0;\n this.interactionId = init.interactionId ?? 0;\n }\n\n toJSON(): PerformanceEventTimingJSON {\n return {\n ...super.toJSON(),\n processingStart: this.processingStart,\n processingEnd: this.processingEnd,\n interactionId: this.interactionId,\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {PerformanceEntryType} from './PerformanceEntry';\nimport type {\n RawPerformanceEntry,\n RawPerformanceEntryType,\n} from './specs/NativePerformanceObserver';\n\nimport {PerformanceEntry} from './PerformanceEntry';\nimport PerformanceEventTiming from './PerformanceEventTiming';\n\nexport const RawPerformanceEntryTypeValues = {\n MARK: 1,\n MEASURE: 2,\n EVENT: 3,\n};\n\nexport function rawToPerformanceEntry(\n entry: RawPerformanceEntry,\n): PerformanceEntry {\n if (entry.entryType === RawPerformanceEntryTypeValues.EVENT) {\n return new PerformanceEventTiming({\n name: entry.name,\n startTime: entry.startTime,\n duration: entry.duration,\n processingStart: entry.processingStart,\n processingEnd: entry.processingEnd,\n interactionId: entry.interactionId,\n });\n } else {\n return new PerformanceEntry({\n name: entry.name,\n entryType: rawToPerformanceEntryType(entry.entryType),\n startTime: entry.startTime,\n duration: entry.duration,\n });\n }\n}\n\nexport function rawToPerformanceEntryType(\n type: RawPerformanceEntryType,\n): PerformanceEntryType {\n switch (type) {\n case RawPerformanceEntryTypeValues.MARK:\n return 'mark';\n case RawPerformanceEntryTypeValues.MEASURE:\n return 'measure';\n case RawPerformanceEntryTypeValues.EVENT:\n return 'event';\n default:\n throw new TypeError(\n `rawToPerformanceEntryType: unexpected performance entry type received: ${type}`,\n );\n }\n}\n\nexport function performanceEntryTypeToRaw(\n type: PerformanceEntryType,\n): RawPerformanceEntryType {\n switch (type) {\n case 'mark':\n return RawPerformanceEntryTypeValues.MARK;\n case 'measure':\n return RawPerformanceEntryTypeValues.MEASURE;\n case 'event':\n return RawPerformanceEntryTypeValues.EVENT;\n default:\n // Verify exhaustive check with Flow\n (type: empty);\n throw new TypeError(\n `performanceEntryTypeToRaw: unexpected performance entry type received: ${type}`,\n );\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n * @oncall react_native\n */\n\n// flowlint unsafe-getters-setters:off\n\ntype MemoryInfoLike = {\n jsHeapSizeLimit: ?number,\n totalJSHeapSize: ?number,\n usedJSHeapSize: ?number,\n};\n\n// Read-only object with JS memory information. This is returned by the performance.memory API.\nexport default class MemoryInfo {\n #jsHeapSizeLimit: ?number;\n #totalJSHeapSize: ?number;\n #usedJSHeapSize: ?number;\n\n constructor(memoryInfo: ?MemoryInfoLike) {\n if (memoryInfo != null) {\n this.#jsHeapSizeLimit = memoryInfo.jsHeapSizeLimit;\n this.#totalJSHeapSize = memoryInfo.totalJSHeapSize;\n this.#usedJSHeapSize = memoryInfo.usedJSHeapSize;\n }\n }\n\n /**\n * The maximum size of the heap, in bytes, that is available to the context\n */\n get jsHeapSizeLimit(): ?number {\n return this.#jsHeapSizeLimit;\n }\n\n /**\n * The total allocated heap size, in bytes\n */\n get totalJSHeapSize(): ?number {\n return this.#totalJSHeapSize;\n }\n\n /**\n * The currently active segment of JS heap, in bytes.\n */\n get usedJSHeapSize(): ?number {\n return this.#usedJSHeapSize;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n * @oncall react_native\n */\n\n// flowlint unsafe-getters-setters:off\n\ntype ReactNativeStartupTimingLike = {\n startTime: ?number,\n endTime: ?number,\n initializeRuntimeStart: ?number,\n initializeRuntimeEnd: ?number,\n executeJavaScriptBundleEntryPointStart: ?number,\n executeJavaScriptBundleEntryPointEnd: ?number,\n};\n\n// Read-only object with RN startup timing information.\n// This is returned by the performance.reactNativeStartup API.\nexport default class ReactNativeStartupTiming {\n // All time information here are in ms. The values may be null if not provided.\n // We do NOT match web spect here for two reasons:\n // 1. The `ReactNativeStartupTiming` is non-standard API\n // 2. The timing information is relative to the time origin, which means `0` has valid meaning\n #startTime: ?number;\n #endTime: ?number;\n #initializeRuntimeStart: ?number;\n #initializeRuntimeEnd: ?number;\n #executeJavaScriptBundleEntryPointStart: ?number;\n #executeJavaScriptBundleEntryPointEnd: ?number;\n\n constructor(startUpTiming: ?ReactNativeStartupTimingLike) {\n if (startUpTiming != null) {\n this.#startTime = startUpTiming.startTime;\n this.#endTime = startUpTiming.endTime;\n this.#initializeRuntimeStart = startUpTiming.initializeRuntimeStart;\n this.#initializeRuntimeEnd = startUpTiming.initializeRuntimeEnd;\n this.#executeJavaScriptBundleEntryPointStart =\n startUpTiming.executeJavaScriptBundleEntryPointStart;\n this.#executeJavaScriptBundleEntryPointEnd =\n startUpTiming.executeJavaScriptBundleEntryPointEnd;\n }\n }\n\n /**\n * Start time of the RN app startup process. This is provided by the platform by implementing the `ReactMarker.setAppStartTime` API in the native platform code.\n */\n get startTime(): ?number {\n return this.#startTime;\n }\n\n /**\n * End time of the RN app startup process. This is equal to `executeJavaScriptBundleEntryPointEnd`.\n */\n get endTime(): ?number {\n return this.#endTime;\n }\n\n /**\n * Start time when RN runtime get initialized. This is when RN infra first kicks in app startup process.\n */\n get initializeRuntimeStart(): ?number {\n return this.#initializeRuntimeStart;\n }\n\n /**\n * End time when RN runtime get initialized. This is the last marker before ends of the app startup process.\n */\n get initializeRuntimeEnd(): ?number {\n return this.#initializeRuntimeEnd;\n }\n\n /**\n * Start time of JS bundle being executed. This indicates the RN JS bundle is loaded and start to be evaluated.\n */\n get executeJavaScriptBundleEntryPointStart(): ?number {\n return this.#executeJavaScriptBundleEntryPointStart;\n }\n\n /**\n * End time of JS bundle being executed. This indicates all the synchronous entry point jobs are finished.\n */\n get executeJavaScriptBundleEntryPointEnd(): ?number {\n return this.#executeJavaScriptBundleEntryPointEnd;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type NativeMemoryInfo = {[key: string]: ?number};\n\nexport type ReactNativeStartupTiming = {[key: string]: ?number};\n\nexport interface Spec extends TurboModule {\n +now?: () => number;\n +mark: (name: string, startTime: number) => void;\n +measure: (\n name: string,\n startTime: number,\n endTime: number,\n duration?: number,\n startMark?: string,\n endMark?: string,\n ) => void;\n +getSimpleMemoryInfo: () => NativeMemoryInfo;\n +getReactNativeStartupTiming: () => ReactNativeStartupTiming;\n}\n\nexport default (TurboModuleRegistry.get('NativePerformanceCxx'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {HighResTimeStamp} from './PerformanceEntry';\n\nimport {PerformanceEntry} from './PerformanceEntry';\n\ntype DetailType = mixed;\n\nexport type PerformanceMarkOptions = {\n detail?: DetailType,\n startTime?: HighResTimeStamp,\n};\n\nexport type TimeStampOrName = HighResTimeStamp | string;\n\nexport type PerformanceMeasureOptions = {\n detail?: DetailType,\n start?: TimeStampOrName,\n end?: TimeStampOrName,\n duration?: HighResTimeStamp,\n};\n\nexport class PerformanceMark extends PerformanceEntry {\n detail: DetailType;\n\n constructor(markName: string, markOptions?: PerformanceMarkOptions) {\n super({\n name: markName,\n entryType: 'mark',\n startTime: markOptions?.startTime ?? performance.now(),\n duration: 0,\n });\n\n if (markOptions) {\n this.detail = markOptions.detail;\n }\n }\n}\n\nexport class PerformanceMeasure extends PerformanceEntry {\n detail: DetailType;\n\n constructor(measureName: string, measureOptions?: PerformanceMeasureOptions) {\n super({\n name: measureName,\n entryType: 'measure',\n startTime: 0,\n duration: measureOptions?.duration ?? 0,\n });\n\n if (measureOptions) {\n this.detail = measureOptions.detail;\n }\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\n/**\n * Sets up the console and exception handling (redbox) for React Native.\n * You can use this module directly, or just require InitializeCore.\n */\nconst ExceptionsManager = require('./ExceptionsManager');\nExceptionsManager.installConsoleErrorReporter();\n\n// Set up error handler\nif (!global.__fbDisableExceptionsManager) {\n const handleError = (e: mixed, isFatal: boolean) => {\n try {\n ExceptionsManager.handleException(e, isFatal);\n } catch (ee) {\n console.log('Failed to print error: ', ee.message);\n throw e;\n }\n };\n\n const ErrorUtils = require('../vendor/core/ErrorUtils');\n ErrorUtils.setGlobalHandler(handleError);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nimport type {ExtendedError} from './ExtendedError';\nimport type {ExceptionData} from './NativeExceptionsManager';\n\nclass SyntheticError extends Error {\n name: string = '';\n}\n\ntype ExceptionDecorator = ExceptionData => ExceptionData;\n\nlet userExceptionDecorator: ?ExceptionDecorator;\nlet inUserExceptionDecorator = false;\n\n// This Symbol is used to decorate an ExtendedError with extra data in select usecases.\n// Note that data passed using this method should be strictly contained,\n// as data that's not serializable/too large may cause issues with passing the error to the native code.\nconst decoratedExtraDataKey: symbol = Symbol('decoratedExtraDataKey');\n\n/**\n * Allows the app to add information to the exception report before it is sent\n * to native. This API is not final.\n */\n\nfunction unstable_setExceptionDecorator(\n exceptionDecorator: ?ExceptionDecorator,\n) {\n userExceptionDecorator = exceptionDecorator;\n}\n\nfunction preprocessException(data: ExceptionData): ExceptionData {\n if (userExceptionDecorator && !inUserExceptionDecorator) {\n inUserExceptionDecorator = true;\n try {\n return userExceptionDecorator(data);\n } catch {\n // Fall through\n } finally {\n inUserExceptionDecorator = false;\n }\n }\n return data;\n}\n\n/**\n * Handles the developer-visible aspect of errors and exceptions\n */\nlet exceptionID = 0;\nfunction reportException(\n e: ExtendedError,\n isFatal: boolean,\n reportToConsole: boolean, // only true when coming from handleException; the error has not yet been logged\n) {\n const parseErrorStack = require('./Devtools/parseErrorStack');\n const stack = parseErrorStack(e?.stack);\n const currentExceptionID = ++exceptionID;\n const originalMessage = e.message || '';\n let message = originalMessage;\n if (e.componentStack != null) {\n message += `\\n\\nThis error is located at:${e.componentStack}`;\n }\n const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;\n\n if (!message.startsWith(namePrefix)) {\n message = namePrefix + message;\n }\n\n message =\n e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;\n\n // $FlowFixMe[unclear-type]\n const extraData: Object = {\n // $FlowFixMe[incompatible-use] we can't define a type with a Symbol-keyed field in flow\n ...e[decoratedExtraDataKey],\n jsEngine: e.jsEngine,\n rawStack: e.stack,\n };\n if (e.cause != null && typeof e.cause === 'object') {\n extraData.stackSymbols = e.cause.stackSymbols;\n extraData.stackReturnAddresses = e.cause.stackReturnAddresses;\n extraData.stackElements = e.cause.stackElements;\n }\n\n const data = preprocessException({\n message,\n originalMessage: message === originalMessage ? null : originalMessage,\n name: e.name == null || e.name === '' ? null : e.name,\n componentStack:\n typeof e.componentStack === 'string' ? e.componentStack : null,\n stack,\n id: currentExceptionID,\n isFatal,\n extraData,\n });\n\n if (reportToConsole) {\n // we feed back into console.error, to make sure any methods that are\n // monkey patched on top of console.error are called when coming from\n // handleException\n console.error(data.message);\n }\n\n if (__DEV__) {\n const LogBox = require('../LogBox/LogBox').default;\n LogBox.addException({\n ...data,\n isComponentError: !!e.isComponentError,\n });\n } else if (isFatal || e.type !== 'warn') {\n const NativeExceptionsManager =\n require('./NativeExceptionsManager').default;\n if (NativeExceptionsManager) {\n NativeExceptionsManager.reportException(data);\n }\n }\n}\n\ndeclare var console: {\n error: (...data: $ReadOnlyArray) => void,\n _errorOriginal: (...data: $ReadOnlyArray) => void,\n reportErrorsAsExceptions: boolean,\n ...\n};\n\n// If we trigger console.error _from_ handleException,\n// we do want to make sure that console.error doesn't trigger error reporting again\nlet inExceptionHandler = false;\n\n/**\n * Logs exceptions to the (native) console and displays them\n */\nfunction handleException(e: mixed, isFatal: boolean) {\n let error: Error;\n if (e instanceof Error) {\n error = e;\n } else {\n // Workaround for reporting errors caused by `throw 'some string'`\n // Unfortunately there is no way to figure out the stacktrace in this\n // case, so if you ended up here trying to trace an error, look for\n // `throw ''` somewhere in your codebase.\n error = new SyntheticError(e);\n }\n try {\n inExceptionHandler = true;\n /* $FlowFixMe[class-object-subtyping] added when improving typing for this\n * parameters */\n reportException(error, isFatal, /*reportToConsole*/ true);\n } finally {\n inExceptionHandler = false;\n }\n}\n\n/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\nfunction reactConsoleErrorHandler(...args) {\n // bubble up to any original handlers\n console._errorOriginal(...args);\n if (!console.reportErrorsAsExceptions) {\n return;\n }\n if (inExceptionHandler) {\n // The fundamental trick here is that are multiple entry point to logging errors:\n // (see D19743075 for more background)\n //\n // 1. An uncaught exception being caught by the global handler\n // 2. An error being logged throw console.error\n //\n // However, console.error is monkey patched multiple times: by this module, and by the\n // DevTools setup that sends messages to Metro.\n // The patching order cannot be relied upon.\n //\n // So, some scenarios that are handled by this flag:\n //\n // Logging an error:\n // 1. console.error called from user code\n // 2. (possibly) arrives _first_ at DevTool handler, send to Metro\n // 3. Bubbles to here\n // 4. goes into report Exception.\n // 5. should not trigger console.error again, to avoid looping / logging twice\n // 6. should still bubble up to original console\n // (which might either be console.log, or the DevTools handler in case it patched _earlier_ and (2) didn't happen)\n //\n // Throwing an uncaught exception:\n // 1. exception thrown\n // 2. picked up by handleException\n // 3. should be sent to console.error (not console._errorOriginal, as DevTools might have patched _later_ and it needs to send it to Metro)\n // 4. that _might_ bubble again to the `reactConsoleErrorHandle` defined here\n // -> should not handle exception _again_, to avoid looping / showing twice (this code branch)\n // 5. should still bubble up to original console (which might either be console.log, or the DevTools handler in case that one patched _earlier_)\n return;\n }\n\n let error;\n\n const firstArg = args[0];\n if (firstArg?.stack) {\n // reportException will console.error this with high enough fidelity.\n error = firstArg;\n } else {\n const stringifySafe = require('../Utilities/stringifySafe').default;\n if (typeof firstArg === 'string' && firstArg.startsWith('Warning: ')) {\n // React warnings use console.error so that a stack trace is shown, but\n // we don't (currently) want these to show a redbox\n // (Note: Logic duplicated in polyfills/console.js.)\n return;\n }\n const message = args\n .map(arg => (typeof arg === 'string' ? arg : stringifySafe(arg)))\n .join(' ');\n\n error = new SyntheticError(message);\n error.name = 'console.error';\n }\n\n reportException(\n /* $FlowFixMe[class-object-subtyping] added when improving typing for this\n * parameters */\n error,\n false, // isFatal\n false, // reportToConsole\n );\n}\n\n/**\n * Shows a redbox with stacktrace for all console.error messages. Disable by\n * setting `console.reportErrorsAsExceptions = false;` in your app.\n */\nfunction installConsoleErrorReporter() {\n // Enable reportErrorsAsExceptions\n if (console._errorOriginal) {\n return; // already installed\n }\n // Flow doesn't like it when you set arbitrary values on a global object\n console._errorOriginal = console.error.bind(console);\n console.error = reactConsoleErrorHandler;\n if (console.reportErrorsAsExceptions === undefined) {\n // Individual apps can disable this\n // Flow doesn't like it when you set arbitrary values on a global object\n console.reportErrorsAsExceptions = true;\n }\n}\n\nmodule.exports = {\n decoratedExtraDataKey,\n handleException,\n installConsoleErrorReporter,\n SyntheticError,\n unstable_setExceptionDecorator,\n};\n","var getPrototypeOf = require(\"./getPrototypeOf.js\");\nvar setPrototypeOf = require(\"./setPrototypeOf.js\");\nvar isNativeFunction = require(\"./isNativeFunction.js\");\nvar construct = require(\"./construct.js\");\nfunction _wrapNativeSuper(t) {\n var r = \"function\" == typeof Map ? new Map() : void 0;\n return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) {\n if (null === t || !isNativeFunction(t)) return t;\n if (\"function\" != typeof t) throw new TypeError(\"Super expression must either be null or a function\");\n if (void 0 !== r) {\n if (r.has(t)) return r.get(t);\n r.set(t, Wrapper);\n }\n function Wrapper() {\n return construct(t, arguments, getPrototypeOf(this).constructor);\n }\n return Wrapper.prototype = Object.create(t.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }), setPrototypeOf(Wrapper, t);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _wrapNativeSuper(t);\n}\nmodule.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _isNativeFunction(t) {\n try {\n return -1 !== Function.toString.call(t).indexOf(\"[native code]\");\n } catch (n) {\n return \"function\" == typeof t;\n }\n}\nmodule.exports = _isNativeFunction, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var isNativeReflectConstruct = require(\"./isNativeReflectConstruct.js\");\nvar setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}\nmodule.exports = _construct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nimport type {StackFrame} from '../NativeExceptionsManager';\nimport type {HermesParsedStack} from './parseHermesStack';\n\nconst parseHermesStack = require('./parseHermesStack');\n\nfunction convertHermesStack(stack: HermesParsedStack): Array {\n const frames: Array = [];\n for (const entry of stack.entries) {\n if (entry.type !== 'FRAME') {\n continue;\n }\n const {location, functionName} = entry;\n if (location.type === 'NATIVE' || location.type === 'INTERNAL_BYTECODE') {\n continue;\n }\n frames.push({\n methodName: functionName,\n file: location.sourceUrl,\n lineNumber: location.line1Based,\n column:\n location.type === 'SOURCE'\n ? location.column1Based - 1\n : location.virtualOffset0Based,\n });\n }\n return frames;\n}\n\nfunction parseErrorStack(errorStack?: string): Array {\n if (errorStack == null) {\n return [];\n }\n\n const stacktraceParser = require('stacktrace-parser');\n const parsedStack = Array.isArray(errorStack)\n ? errorStack\n : global.HermesInternal\n ? convertHermesStack(parseHermesStack(errorStack))\n : stacktraceParser.parse(errorStack).map((frame): StackFrame => ({\n ...frame,\n column: frame.column != null ? frame.column - 1 : null,\n }));\n\n return parsedStack;\n}\n\nmodule.exports = parseErrorStack;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar UNKNOWN_FUNCTION = '';\n/**\n * This parses the different stack traces and puts them into one format\n * This borrows heavily from TraceKit (https://github.com/csnover/TraceKit)\n */\n\nfunction parse(stackString) {\n var lines = stackString.split('\\n');\n return lines.reduce(function (stack, line) {\n var parseResult = parseChrome(line) || parseWinjs(line) || parseGecko(line) || parseNode(line) || parseJSC(line);\n\n if (parseResult) {\n stack.push(parseResult);\n }\n\n return stack;\n }, []);\n}\nvar chromeRe = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar chromeEvalRe = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nfunction parseChrome(line) {\n var parts = chromeRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n var submatch = chromeEvalRe.exec(parts[2]);\n\n if (isEval && submatch != null) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n\n parts[3] = submatch[2]; // line\n\n parts[4] = submatch[3]; // column\n }\n\n return {\n file: !isNative ? parts[2] : null,\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: isNative ? [parts[2]] : [],\n lineNumber: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null\n };\n}\n\nvar winjsRe = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nfunction parseWinjs(line) {\n var parts = winjsRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n return {\n file: parts[2],\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: [],\n lineNumber: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n}\n\nvar geckoRe = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar geckoEvalRe = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nfunction parseGecko(line) {\n var parts = geckoRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n var submatch = geckoEvalRe.exec(parts[3]);\n\n if (isEval && submatch != null) {\n // throw out eval line/column and use top-most line number\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = null; // no column when eval\n }\n\n return {\n file: parts[3],\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: parts[2] ? parts[2].split(',') : [],\n lineNumber: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null\n };\n}\n\nvar javaScriptCoreRe = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;\n\nfunction parseJSC(line) {\n var parts = javaScriptCoreRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n return {\n file: parts[3],\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: [],\n lineNumber: +parts[4],\n column: parts[5] ? +parts[5] : null\n };\n}\n\nvar nodeRe = /^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nfunction parseNode(line) {\n var parts = nodeRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n return {\n file: parts[2],\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: [],\n lineNumber: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n}\n\nexports.parse = parse;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\ntype HermesStackLocationNative = $ReadOnly<{\n type: 'NATIVE',\n}>;\n\ntype HermesStackLocationSource = $ReadOnly<{\n type: 'SOURCE',\n sourceUrl: string,\n line1Based: number,\n column1Based: number,\n}>;\n\ntype HermesStackLocationInternalBytecode = $ReadOnly<{\n type: 'INTERNAL_BYTECODE',\n sourceUrl: string,\n line1Based: number,\n virtualOffset0Based: number,\n}>;\n\ntype HermesStackLocationBytecode = $ReadOnly<{\n type: 'BYTECODE',\n sourceUrl: string,\n line1Based: number,\n virtualOffset0Based: number,\n}>;\n\ntype HermesStackLocation =\n | HermesStackLocationNative\n | HermesStackLocationSource\n | HermesStackLocationInternalBytecode\n | HermesStackLocationBytecode;\n\ntype HermesStackEntryFrame = $ReadOnly<{\n type: 'FRAME',\n location: HermesStackLocation,\n functionName: string,\n}>;\n\ntype HermesStackEntrySkipped = $ReadOnly<{\n type: 'SKIPPED',\n count: number,\n}>;\n\ntype HermesStackEntry = HermesStackEntryFrame | HermesStackEntrySkipped;\n\nexport type HermesParsedStack = $ReadOnly<{\n message: string,\n entries: $ReadOnlyArray,\n}>;\n\n// Capturing groups:\n// 1. function name\n// 2. is this a native stack frame?\n// 3. is this a bytecode address or a source location?\n// 4. source URL (filename)\n// 5. line number (1 based)\n// 6. column number (1 based) or virtual offset (0 based)\nconst RE_FRAME =\n /^ {4}at (.+?)(?: \\((native)\\)?| \\((address at )?(.*?):(\\d+):(\\d+)\\))$/;\n\n// Capturing groups:\n// 1. count of skipped frames\nconst RE_SKIPPED = /^ {4}... skipping (\\d+) frames$/;\nconst RE_COMPONENT_NO_STACK = /^ {4}at .*$/;\n\nfunction isInternalBytecodeSourceUrl(sourceUrl: string): boolean {\n // See https://github.com/facebook/hermes/blob/3332fa020cae0bab751f648db7c94e1d687eeec7/lib/VM/Runtime.cpp#L1100\n return sourceUrl === 'InternalBytecode.js';\n}\n\nfunction parseLine(line: string): ?HermesStackEntry {\n const asFrame = line.match(RE_FRAME);\n if (asFrame) {\n return {\n type: 'FRAME',\n functionName: asFrame[1],\n location:\n asFrame[2] === 'native'\n ? {type: 'NATIVE'}\n : asFrame[3] === 'address at '\n ? isInternalBytecodeSourceUrl(asFrame[4])\n ? {\n type: 'INTERNAL_BYTECODE',\n sourceUrl: asFrame[4],\n line1Based: Number.parseInt(asFrame[5], 10),\n virtualOffset0Based: Number.parseInt(asFrame[6], 10),\n }\n : {\n type: 'BYTECODE',\n sourceUrl: asFrame[4],\n line1Based: Number.parseInt(asFrame[5], 10),\n virtualOffset0Based: Number.parseInt(asFrame[6], 10),\n }\n : {\n type: 'SOURCE',\n sourceUrl: asFrame[4],\n line1Based: Number.parseInt(asFrame[5], 10),\n column1Based: Number.parseInt(asFrame[6], 10),\n },\n };\n }\n const asSkipped = line.match(RE_SKIPPED);\n if (asSkipped) {\n return {\n type: 'SKIPPED',\n count: Number.parseInt(asSkipped[1], 10),\n };\n }\n}\n\nmodule.exports = function parseHermesStack(stack: string): HermesParsedStack {\n const lines = stack.split(/\\n/);\n let entries: Array = [];\n let lastMessageLine = -1;\n for (let i = 0; i < lines.length; ++i) {\n const line = lines[i];\n if (!line) {\n continue;\n }\n const entry = parseLine(line);\n if (entry) {\n entries.push(entry);\n continue;\n }\n if (RE_COMPONENT_NO_STACK.test(line)) {\n // Skip component stacks without source location.\n // TODO: This will not be displayed, not sure how to handle it.\n continue;\n }\n // No match - we're still in the message\n lastMessageLine = i;\n entries = [];\n }\n const message = lines.slice(0, lastMessageLine + 1).join('\\n');\n return {message, entries};\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeExceptionsManager';\nimport NativeExceptionsManager from '../../src/private/specs/modules/NativeExceptionsManager';\nexport default NativeExceptionsManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nconst Platform = require('../../../../Libraries/Utilities/Platform');\n\nexport type StackFrame = {|\n column: ?number,\n file: ?string,\n lineNumber: ?number,\n methodName: string,\n collapse?: boolean,\n|};\nexport type ExceptionData = {\n message: string,\n originalMessage: ?string,\n name: ?string,\n componentStack: ?string,\n stack: Array,\n id: number,\n isFatal: boolean,\n // flowlint-next-line unclear-type:off\n extraData?: Object,\n ...\n};\nexport interface Spec extends TurboModule {\n // Deprecated: Use `reportException`\n +reportFatalException: (\n message: string,\n stack: Array,\n exceptionId: number,\n ) => void;\n // Deprecated: Use `reportException`\n +reportSoftException: (\n message: string,\n stack: Array,\n exceptionId: number,\n ) => void;\n +reportException?: (data: ExceptionData) => void;\n +updateExceptionMessage: (\n message: string,\n stack: Array,\n exceptionId: number,\n ) => void;\n // TODO(T53311281): This is a noop on iOS now. Implement it.\n +dismissRedbox?: () => void;\n}\n\nconst NativeModule =\n TurboModuleRegistry.getEnforcing('ExceptionsManager');\n\nconst ExceptionsManager = {\n reportFatalException(\n message: string,\n stack: Array,\n exceptionId: number,\n ) {\n NativeModule.reportFatalException(message, stack, exceptionId);\n },\n reportSoftException(\n message: string,\n stack: Array,\n exceptionId: number,\n ) {\n NativeModule.reportSoftException(message, stack, exceptionId);\n },\n updateExceptionMessage(\n message: string,\n stack: Array,\n exceptionId: number,\n ) {\n NativeModule.updateExceptionMessage(message, stack, exceptionId);\n },\n dismissRedbox(): void {\n if (Platform.OS !== 'ios' && NativeModule.dismissRedbox) {\n // TODO(T53311281): This is a noop on iOS now. Implement it.\n NativeModule.dismissRedbox();\n }\n },\n reportException(data: ExceptionData): void {\n if (NativeModule.reportException) {\n NativeModule.reportException(data);\n return;\n }\n if (data.isFatal) {\n ExceptionsManager.reportFatalException(data.message, data.stack, data.id);\n } else {\n ExceptionsManager.reportSoftException(data.message, data.stack, data.id);\n }\n },\n};\n\nexport default ExceptionsManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nconst {polyfillGlobal} = require('../Utilities/PolyfillFunctions');\n\n/**\n * Set up Promise. The native Promise implementation throws the following error:\n * ERROR: Event loop not supported.\n *\n * If you don't need these polyfills, don't use InitializeCore; just directly\n * require the modules you need from InitializeCore for setup.\n */\n\n// If global.Promise is provided by Hermes, we are confident that it can provide\n// all the methods needed by React Native, so we can directly use it.\nif (global?.HermesInternal?.hasPromise?.()) {\n const HermesPromise = global.Promise;\n\n if (__DEV__) {\n if (typeof HermesPromise !== 'function') {\n console.error('HermesPromise does not exist');\n }\n global.HermesInternal?.enablePromiseRejectionTracker?.(\n require('../promiseRejectionTrackingOptions').default,\n );\n }\n} else {\n polyfillGlobal('Promise', () => require('../Promise'));\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nconst defineLazyObjectProperty = require('./defineLazyObjectProperty');\n\n/**\n * Sets an object's property. If a property with the same name exists, this will\n * replace it but maintain its descriptor configuration. The property will be\n * replaced with a lazy getter.\n *\n * In DEV mode the original property value will be preserved as `original[PropertyName]`\n * so that, if necessary, it can be restored. For example, if you want to route\n * network requests through DevTools (to trace them):\n *\n * global.XMLHttpRequest = global.originalXMLHttpRequest;\n *\n * @see https://github.com/facebook/react-native/issues/934\n */\nfunction polyfillObjectProperty(\n object: {...},\n name: string,\n getValue: () => T,\n): void {\n const descriptor = Object.getOwnPropertyDescriptor<$FlowFixMe>(object, name);\n if (__DEV__ && descriptor) {\n const backupName = `original${name[0].toUpperCase()}${name.slice(1)}`;\n Object.defineProperty(object, backupName, descriptor);\n }\n\n const {enumerable, writable, configurable = false} = descriptor || {};\n if (descriptor && !configurable) {\n console.error('Failed to set polyfill. ' + name + ' is not configurable.');\n return;\n }\n\n defineLazyObjectProperty(object, name, {\n get: getValue,\n enumerable: enumerable !== false,\n writable: writable !== false,\n });\n}\n\nfunction polyfillGlobal(name: string, getValue: () => T): void {\n polyfillObjectProperty(global, name, getValue);\n}\n\nmodule.exports = {polyfillObjectProperty, polyfillGlobal};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nconst Promise = require('promise/setimmediate/es6-extensions');\n\nrequire('promise/setimmediate/finally');\n\nif (__DEV__) {\n require('promise/setimmediate/rejection-tracking').enable(\n require('./promiseRejectionTrackingOptions').default,\n );\n}\n\nmodule.exports = Promise;\n","'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n","'use strict';\n\n\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._x = 0;\n this._y = 0;\n this._z = null;\n this._A = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._B = null;\nPromise._C = null;\nPromise._D = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._y === 3) {\n self = self._z;\n }\n if (Promise._B) {\n Promise._B(self);\n }\n if (self._y === 0) {\n if (self._x === 0) {\n self._x = 1;\n self._A = deferred;\n return;\n }\n if (self._x === 1) {\n self._x = 2;\n self._A = [self._A, deferred];\n return;\n }\n self._A.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n setImmediate(function() {\n var cb = self._y === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._y === 1) {\n resolve(deferred.promise, self._z);\n } else {\n reject(deferred.promise, self._z);\n }\n return;\n }\n var ret = tryCallOne(cb, self._z);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._y = 3;\n self._z = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._y = 1;\n self._z = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._y = 2;\n self._z = newValue;\n if (Promise._C) {\n Promise._C(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._x === 1) {\n handle(self, self._A);\n self._A = null;\n }\n if (self._x === 2) {\n for (var i = 0; i < self._A.length; i++) {\n handle(self, self._A[i]);\n }\n self._A = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n","'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._D);\n p._y = 1;\n p._z = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._y === 3) {\n val = val._z;\n }\n if (val._y === 1) return res(i, val._z);\n if (val._y === 2) reject(val._z);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nfunction onSettledFulfill(value) {\n return { status: 'fulfilled', value: value };\n}\nfunction onSettledReject(reason) {\n return { status: 'rejected', reason: reason };\n}\nfunction mapAllSettled(item) {\n if(item && (typeof item === 'object' || typeof item === 'function')){\n if(item instanceof Promise && item.then === Promise.prototype.then){\n return item.then(onSettledFulfill, onSettledReject);\n }\n var then = item.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(item)).then(onSettledFulfill, onSettledReject)\n }\n }\n\n return onSettledFulfill(item);\n}\nPromise.allSettled = function (iterable) {\n return Promise.all(iterableToArray(iterable).map(mapAllSettled));\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\nfunction getAggregateError(errors){\n if(typeof AggregateError === 'function'){\n return new AggregateError(errors,'All promises were rejected');\n }\n\n var error = new Error('All promises were rejected');\n\n error.name = 'AggregateError';\n error.errors = errors;\n\n return error;\n}\n\nPromise.any = function promiseAny(values) {\n return new Promise(function(resolve, reject) {\n var promises = iterableToArray(values);\n var hasResolved = false;\n var rejectionReasons = [];\n\n function resolveOnce(value) {\n if (!hasResolved) {\n hasResolved = true;\n resolve(value);\n }\n }\n\n function rejectionCheck(reason) {\n rejectionReasons.push(reason);\n\n if (rejectionReasons.length === promises.length) {\n reject(getAggregateError(rejectionReasons));\n }\n }\n\n if(promises.length === 0){\n reject(getAggregateError(rejectionReasons));\n } else {\n promises.forEach(function(value){\n Promise.resolve(value).then(resolveOnce, rejectionCheck);\n });\n }\n });\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nconst {hasNativeConstructor} = require('../Utilities/FeatureDetection');\nconst {polyfillGlobal} = require('../Utilities/PolyfillFunctions');\n\n/**\n * Set up regenerator.\n * You can use this module directly, or just require InitializeCore.\n */\n\nlet hasNativeGenerator;\ntry {\n // If this function was lowered by regenerator-transform, it will try to\n // access `global.regeneratorRuntime` which doesn't exist yet and will throw.\n hasNativeGenerator = hasNativeConstructor(\n function* () {},\n 'GeneratorFunction',\n );\n} catch {\n // In this case, we know generators are not provided natively.\n hasNativeGenerator = false;\n}\n\n// If generators are provided natively, which suggests that there was no\n// regenerator-transform, then there is no need to set up the runtime.\nif (!hasNativeGenerator) {\n polyfillGlobal('regeneratorRuntime', () => {\n // The require just sets up the global, so make sure when we first\n // invoke it the global does not exist\n delete global.regeneratorRuntime;\n\n // regenerator-runtime/runtime exports the regeneratorRuntime object, so we\n // can return it safely.\n return require('regenerator-runtime/runtime'); // flowlint-line untyped-import:off\n });\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n/**\n * @return whether or not a @param {function} f is provided natively by calling\n * `toString` and check if the result includes `[native code]` in it.\n *\n * Note that a polyfill can technically fake this behavior but few does it.\n * Therefore, this is usually good enough for our purpose.\n */\nfunction isNativeFunction(f: Function): boolean {\n return typeof f === 'function' && f.toString().indexOf('[native code]') > -1;\n}\n\n/**\n * @return whether or not the constructor of @param {object} o is an native\n * function named with @param {string} expectedName.\n */\nfunction hasNativeConstructor(o: Object, expectedName: string): boolean {\n const con = Object.getPrototypeOf(o).constructor;\n return con.name === expectedName && isNativeFunction(con);\n}\n\nmodule.exports = {isNativeFunction, hasNativeConstructor};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n defineProperty(\n GeneratorFunctionPrototype,\n \"constructor\",\n { value: GeneratorFunction, configurable: true }\n );\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n defineProperty(this, \"_invoke\", { value: enqueue });\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method;\n var method = delegate.iterator[methodName];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method, or a missing .next mehtod, always terminate the\n // yield* loop.\n context.delegate = null;\n\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n if (methodName !== \"return\") {\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a '\" + methodName + \"' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(val) {\n var object = Object(val);\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nconst ReactNativeFeatureFlags = require('../../src/private/featureflags/ReactNativeFeatureFlags');\nconst NativeReactNativeFeatureFlags =\n require('../../src/private/featureflags/specs/NativeReactNativeFeatureFlags').default;\nconst {polyfillGlobal} = require('../Utilities/PolyfillFunctions');\n\nif (__DEV__) {\n if (typeof global.Promise !== 'function') {\n console.error('Promise should exist before setting up timers.');\n }\n}\n\n// In bridgeless mode, timers are host functions installed from cpp.\nif (global.RN$Bridgeless !== true) {\n /**\n * Set up timers.\n * You can use this module directly, or just require InitializeCore.\n */\n const defineLazyTimer = (\n name:\n | $TEMPORARY$string<'cancelAnimationFrame'>\n | $TEMPORARY$string<'cancelIdleCallback'>\n | $TEMPORARY$string<'clearInterval'>\n | $TEMPORARY$string<'clearTimeout'>\n | $TEMPORARY$string<'requestAnimationFrame'>\n | $TEMPORARY$string<'requestIdleCallback'>\n | $TEMPORARY$string<'setInterval'>\n | $TEMPORARY$string<'setTimeout'>,\n ) => {\n polyfillGlobal(name, () => require('./Timers/JSTimers')[name]);\n };\n defineLazyTimer('setTimeout');\n defineLazyTimer('clearTimeout');\n defineLazyTimer('setInterval');\n defineLazyTimer('clearInterval');\n defineLazyTimer('requestAnimationFrame');\n defineLazyTimer('cancelAnimationFrame');\n defineLazyTimer('requestIdleCallback');\n defineLazyTimer('cancelIdleCallback');\n} else if (\n // TODO remove this condition when bridgeless == modern scheduler everywhere.\n NativeReactNativeFeatureFlags != null &&\n // eslint-disable-next-line react-hooks/rules-of-hooks -- false positive due to `use` prefix\n ReactNativeFeatureFlags.useModernRuntimeScheduler()\n) {\n polyfillGlobal(\n 'requestIdleCallback',\n () =>\n require('../../src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks')\n .default.requestIdleCallback,\n );\n\n polyfillGlobal(\n 'cancelIdleCallback',\n () =>\n require('../../src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks')\n .default.cancelIdleCallback,\n );\n}\n\n// We need to check if the native module is available before accessing the\n// feature flag, because otherwise the API would throw an error in the legacy\n// architecture in OSS, where the native module isn't available.\nif (\n NativeReactNativeFeatureFlags != null &&\n ReactNativeFeatureFlags.enableMicrotasks()\n) {\n // This is the flag that tells React to use `queueMicrotask` to batch state\n // updates, instead of using the scheduler to schedule a regular task.\n // We use a global variable because we don't currently have any other\n // mechanism to pass feature flags from RN to React in OSS.\n global.RN$enableMicrotasksInReact = true;\n\n polyfillGlobal(\n 'queueMicrotask',\n () =>\n require('../../src/private/webapis/microtasks/specs/NativeMicrotasks')\n .default.queueMicrotask,\n );\n\n // We shim the immediate APIs via `queueMicrotask` to maintain the backward\n // compatibility.\n polyfillGlobal(\n 'setImmediate',\n () => require('./Timers/immediateShim').setImmediate,\n );\n polyfillGlobal(\n 'clearImmediate',\n () => require('./Timers/immediateShim').clearImmediate,\n );\n} else {\n // Polyfill it with promise (regardless it's polyfilled or native) otherwise.\n polyfillGlobal(\n 'queueMicrotask',\n () => require('./Timers/queueMicrotask.js').default,\n );\n\n // When promise was polyfilled hence is queued to the RN microtask queue,\n // we polyfill the immediate APIs as aliases to the ReactNativeMicrotask APIs.\n // Note that in bridgeless mode, immediate APIs are installed from cpp.\n if (global.RN$Bridgeless !== true) {\n polyfillGlobal(\n 'setImmediate',\n () => require('./Timers/JSTimers').queueReactNativeMicrotask,\n );\n polyfillGlobal(\n 'clearImmediate',\n () => require('./Timers/JSTimers').clearReactNativeMicrotask,\n );\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport NativeTiming from './NativeTiming';\n\nconst BatchedBridge = require('../../BatchedBridge/BatchedBridge');\nconst Systrace = require('../../Performance/Systrace');\nconst invariant = require('invariant');\n\n/**\n * JS implementation of timer functions. Must be completely driven by an\n * external clock signal, all that's stored here is timerID, timer type, and\n * callback.\n */\n\nexport type JSTimerType =\n | 'setTimeout'\n | 'setInterval'\n | 'requestAnimationFrame'\n | 'queueReactNativeMicrotask'\n | 'requestIdleCallback';\n\n// These timing constants should be kept in sync with the ones in native ios and\n// android `RCTTiming` module.\nconst FRAME_DURATION = 1000 / 60;\nconst IDLE_CALLBACK_FRAME_DEADLINE = 1;\n\n// Parallel arrays\nconst callbacks: Array = [];\nconst types: Array = [];\nconst timerIDs: Array = [];\nlet reactNativeMicrotasks: Array = [];\nlet requestIdleCallbacks: Array = [];\nconst requestIdleCallbackTimeouts: {[number]: number, ...} = {};\n\nlet GUID = 1;\nconst errors: Array = [];\n\nlet hasEmittedTimeDriftWarning = false;\n\n// Returns a free index if one is available, and the next consecutive index otherwise.\nfunction _getFreeIndex(): number {\n let freeIndex = timerIDs.indexOf(null);\n if (freeIndex === -1) {\n freeIndex = timerIDs.length;\n }\n return freeIndex;\n}\n\nfunction _allocateCallback(func: Function, type: JSTimerType): number {\n const id = GUID++;\n const freeIndex = _getFreeIndex();\n timerIDs[freeIndex] = id;\n callbacks[freeIndex] = func;\n types[freeIndex] = type;\n return id;\n}\n\n/**\n * Calls the callback associated with the ID. Also unregister that callback\n * if it was a one time timer (setTimeout), and not unregister it if it was\n * recurring (setInterval).\n */\nfunction _callTimer(timerID: number, frameTime: number, didTimeout: ?boolean) {\n if (timerID > GUID) {\n console.warn(\n 'Tried to call timer with ID %s but no such timer exists.',\n timerID,\n );\n }\n\n // timerIndex of -1 means that no timer with that ID exists. There are\n // two situations when this happens, when a garbage timer ID was given\n // and when a previously existing timer was deleted before this callback\n // fired. In both cases we want to ignore the timer id, but in the former\n // case we warn as well.\n const timerIndex = timerIDs.indexOf(timerID);\n if (timerIndex === -1) {\n return;\n }\n\n const type = types[timerIndex];\n const callback = callbacks[timerIndex];\n if (!callback || !type) {\n console.error('No callback found for timerID ' + timerID);\n return;\n }\n\n if (__DEV__) {\n Systrace.beginEvent(type + ' [invoke]');\n }\n\n // Clear the metadata\n if (type !== 'setInterval') {\n _clearIndex(timerIndex);\n }\n\n try {\n if (\n type === 'setTimeout' ||\n type === 'setInterval' ||\n type === 'queueReactNativeMicrotask'\n ) {\n callback();\n } else if (type === 'requestAnimationFrame') {\n callback(global.performance.now());\n } else if (type === 'requestIdleCallback') {\n callback({\n timeRemaining: function () {\n // TODO: Optimisation: allow running for longer than one frame if\n // there are no pending JS calls on the bridge from native. This\n // would require a way to check the bridge queue synchronously.\n return Math.max(\n 0,\n FRAME_DURATION - (global.performance.now() - frameTime),\n );\n },\n didTimeout: !!didTimeout,\n });\n } else {\n console.error('Tried to call a callback with invalid type: ' + type);\n }\n } catch (e) {\n // Don't rethrow so that we can run all timers.\n errors.push(e);\n }\n\n if (__DEV__) {\n Systrace.endEvent();\n }\n}\n\n/**\n * Performs a single pass over the enqueued reactNativeMicrotasks. Returns whether\n * more reactNativeMicrotasks are queued up (can be used as a condition a while loop).\n */\nfunction _callReactNativeMicrotasksPass() {\n if (reactNativeMicrotasks.length === 0) {\n return false;\n }\n\n if (__DEV__) {\n Systrace.beginEvent('callReactNativeMicrotasksPass()');\n }\n\n // The main reason to extract a single pass is so that we can track\n // in the system trace\n const passReactNativeMicrotasks = reactNativeMicrotasks;\n reactNativeMicrotasks = [];\n\n // Use for loop rather than forEach as per @vjeux's advice\n // https://github.com/facebook/react-native/commit/c8fd9f7588ad02d2293cac7224715f4af7b0f352#commitcomment-14570051\n for (let i = 0; i < passReactNativeMicrotasks.length; ++i) {\n _callTimer(passReactNativeMicrotasks[i], 0);\n }\n\n if (__DEV__) {\n Systrace.endEvent();\n }\n return reactNativeMicrotasks.length > 0;\n}\n\nfunction _clearIndex(i: number) {\n timerIDs[i] = null;\n callbacks[i] = null;\n types[i] = null;\n}\n\nfunction _freeCallback(timerID: number) {\n // timerIDs contains nulls after timers have been removed;\n // ignore nulls upfront so indexOf doesn't find them\n if (timerID == null) {\n return;\n }\n\n const index = timerIDs.indexOf(timerID);\n // See corresponding comment in `callTimers` for reasoning behind this\n if (index !== -1) {\n const type = types[index];\n _clearIndex(index);\n if (\n type !== 'queueReactNativeMicrotask' &&\n type !== 'requestIdleCallback'\n ) {\n deleteTimer(timerID);\n }\n }\n}\n\n/**\n * JS implementation of timer functions. Must be completely driven by an\n * external clock signal, all that's stored here is timerID, timer type, and\n * callback.\n */\nconst JSTimers = {\n /**\n * @param {function} func Callback to be invoked after `duration` ms.\n * @param {number} duration Number of milliseconds.\n */\n setTimeout: function (\n func: Function,\n duration: number,\n ...args: any\n ): number {\n const id = _allocateCallback(\n () => func.apply(undefined, args),\n 'setTimeout',\n );\n createTimer(id, duration || 0, Date.now(), /* recurring */ false);\n return id;\n },\n\n /**\n * @param {function} func Callback to be invoked every `duration` ms.\n * @param {number} duration Number of milliseconds.\n */\n setInterval: function (\n func: Function,\n duration: number,\n ...args: any\n ): number {\n const id = _allocateCallback(\n () => func.apply(undefined, args),\n 'setInterval',\n );\n createTimer(id, duration || 0, Date.now(), /* recurring */ true);\n return id;\n },\n\n /**\n * The React Native microtask mechanism is used to back public APIs e.g.\n * `queueMicrotask`, `clearImmediate`, and `setImmediate` (which is used by\n * the Promise polyfill) when the JSVM microtask mechanism is not used.\n *\n * @param {function} func Callback to be invoked before the end of the\n * current JavaScript execution loop.\n */\n queueReactNativeMicrotask: function (func: Function, ...args: any): number {\n const id = _allocateCallback(\n () => func.apply(undefined, args),\n 'queueReactNativeMicrotask',\n );\n reactNativeMicrotasks.push(id);\n return id;\n },\n\n /**\n * @param {function} func Callback to be invoked every frame.\n */\n requestAnimationFrame: function (func: Function): any | number {\n const id = _allocateCallback(func, 'requestAnimationFrame');\n createTimer(id, 1, Date.now(), /* recurring */ false);\n return id;\n },\n\n /**\n * @param {function} func Callback to be invoked every frame and provided\n * with time remaining in frame.\n * @param {?object} options\n */\n requestIdleCallback: function (\n func: Function,\n options: ?Object,\n ): any | number {\n if (requestIdleCallbacks.length === 0) {\n setSendIdleEvents(true);\n }\n\n const timeout = options && options.timeout;\n const id: number = _allocateCallback(\n timeout != null\n ? (deadline: any) => {\n const timeoutId: number = requestIdleCallbackTimeouts[id];\n if (timeoutId) {\n JSTimers.clearTimeout(timeoutId);\n delete requestIdleCallbackTimeouts[id];\n }\n return func(deadline);\n }\n : func,\n 'requestIdleCallback',\n );\n requestIdleCallbacks.push(id);\n\n if (timeout != null) {\n const timeoutId: number = JSTimers.setTimeout(() => {\n const index: number = requestIdleCallbacks.indexOf(id);\n if (index > -1) {\n requestIdleCallbacks.splice(index, 1);\n _callTimer(id, global.performance.now(), true);\n }\n delete requestIdleCallbackTimeouts[id];\n if (requestIdleCallbacks.length === 0) {\n setSendIdleEvents(false);\n }\n }, timeout);\n requestIdleCallbackTimeouts[id] = timeoutId;\n }\n return id;\n },\n\n cancelIdleCallback: function (timerID: number) {\n _freeCallback(timerID);\n const index = requestIdleCallbacks.indexOf(timerID);\n if (index !== -1) {\n requestIdleCallbacks.splice(index, 1);\n }\n\n const timeoutId = requestIdleCallbackTimeouts[timerID];\n if (timeoutId) {\n JSTimers.clearTimeout(timeoutId);\n delete requestIdleCallbackTimeouts[timerID];\n }\n\n if (requestIdleCallbacks.length === 0) {\n setSendIdleEvents(false);\n }\n },\n\n clearTimeout: function (timerID: number) {\n _freeCallback(timerID);\n },\n\n clearInterval: function (timerID: number) {\n _freeCallback(timerID);\n },\n\n clearReactNativeMicrotask: function (timerID: number) {\n _freeCallback(timerID);\n const index = reactNativeMicrotasks.indexOf(timerID);\n if (index !== -1) {\n reactNativeMicrotasks.splice(index, 1);\n }\n },\n\n cancelAnimationFrame: function (timerID: number) {\n _freeCallback(timerID);\n },\n\n /**\n * This is called from the native side. We are passed an array of timerIDs,\n * and\n */\n callTimers: function (timersToCall: Array): any | void {\n invariant(\n timersToCall.length !== 0,\n 'Cannot call `callTimers` with an empty list of IDs.',\n );\n\n errors.length = 0;\n for (let i = 0; i < timersToCall.length; i++) {\n _callTimer(timersToCall[i], 0);\n }\n\n const errorCount = errors.length;\n if (errorCount > 0) {\n if (errorCount > 1) {\n // Throw all the other errors in a setTimeout, which will throw each\n // error one at a time\n for (let ii = 1; ii < errorCount; ii++) {\n JSTimers.setTimeout(\n ((error: Error) => {\n throw error;\n }).bind(null, errors[ii]),\n 0,\n );\n }\n }\n throw errors[0];\n }\n },\n\n callIdleCallbacks: function (frameTime: number) {\n if (\n FRAME_DURATION - (Date.now() - frameTime) <\n IDLE_CALLBACK_FRAME_DEADLINE\n ) {\n return;\n }\n\n errors.length = 0;\n if (requestIdleCallbacks.length > 0) {\n const passIdleCallbacks = requestIdleCallbacks;\n requestIdleCallbacks = [];\n\n for (let i = 0; i < passIdleCallbacks.length; ++i) {\n _callTimer(passIdleCallbacks[i], frameTime);\n }\n }\n\n if (requestIdleCallbacks.length === 0) {\n setSendIdleEvents(false);\n }\n\n errors.forEach(error =>\n JSTimers.setTimeout(() => {\n throw error;\n }, 0),\n );\n },\n\n /**\n * This is called after we execute any command we receive from native but\n * before we hand control back to native.\n */\n callReactNativeMicrotasks() {\n errors.length = 0;\n while (_callReactNativeMicrotasksPass()) {}\n errors.forEach(error =>\n JSTimers.setTimeout(() => {\n throw error;\n }, 0),\n );\n },\n\n /**\n * Called from native (in development) when environment times are out-of-sync.\n */\n emitTimeDriftWarning(warningMessage: string) {\n if (hasEmittedTimeDriftWarning) {\n return;\n }\n hasEmittedTimeDriftWarning = true;\n console.warn(warningMessage);\n },\n};\n\nfunction createTimer(\n callbackID: number,\n duration: number,\n jsSchedulingTime: number,\n repeats: boolean,\n): void {\n invariant(NativeTiming, 'NativeTiming is available');\n NativeTiming.createTimer(callbackID, duration, jsSchedulingTime, repeats);\n}\n\nfunction deleteTimer(timerID: number): void {\n invariant(NativeTiming, 'NativeTiming is available');\n NativeTiming.deleteTimer(timerID);\n}\n\nfunction setSendIdleEvents(sendIdleEvents: boolean): void {\n invariant(NativeTiming, 'NativeTiming is available');\n NativeTiming.setSendIdleEvents(sendIdleEvents);\n}\n\nlet ExportedJSTimers: {|\n callIdleCallbacks: (frameTime: number) => any | void,\n callReactNativeMicrotasks: () => void,\n callTimers: (timersToCall: Array) => any | void,\n cancelAnimationFrame: (timerID: number) => void,\n cancelIdleCallback: (timerID: number) => void,\n clearReactNativeMicrotask: (timerID: number) => void,\n clearInterval: (timerID: number) => void,\n clearTimeout: (timerID: number) => void,\n emitTimeDriftWarning: (warningMessage: string) => any | void,\n requestAnimationFrame: (func: any) => any | number,\n requestIdleCallback: (func: any, options: ?any) => any | number,\n queueReactNativeMicrotask: (func: any, ...args: any) => number,\n setInterval: (func: any, duration: number, ...args: any) => number,\n setTimeout: (func: any, duration: number, ...args: any) => number,\n|};\n\nif (!NativeTiming) {\n console.warn(\"Timing native module is not available, can't set timers.\");\n // $FlowFixMe[prop-missing] : we can assume timers are generally available\n ExportedJSTimers = ({\n callReactNativeMicrotasks: JSTimers.callReactNativeMicrotasks,\n queueReactNativeMicrotask: JSTimers.queueReactNativeMicrotask,\n }: typeof JSTimers);\n} else {\n ExportedJSTimers = JSTimers;\n}\n\nBatchedBridge.setReactNativeMicrotasksCallback(\n JSTimers.callReactNativeMicrotasks,\n);\n\nmodule.exports = ExportedJSTimers;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeTiming';\nimport NativeTiming from '../../../src/private/specs/modules/NativeTiming';\nexport default NativeTiming;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +createTimer: (\n callbackID: number,\n duration: number,\n jsSchedulingTime: number,\n repeats: boolean,\n ) => void;\n +deleteTimer: (timerID: number) => void;\n +setSendIdleEvents: (sendIdleEvents: boolean) => void;\n}\n\nexport default (TurboModuleRegistry.get('Timing'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @generated SignedSource<<6922b452333fc62a263bd77d42afbbbe>>\n * @flow strict-local\n */\n\n/**\n * IMPORTANT: Do NOT modify this file directly.\n *\n * To change the definition of the flags, edit\n * packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.\n *\n * To regenerate this code, run the following script from the repo root:\n * yarn featureflags-update\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +commonTestFlag?: () => boolean;\n +allowCollapsableChildren?: () => boolean;\n +allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;\n +batchRenderingUpdatesInEventLoop?: () => boolean;\n +destroyFabricSurfacesInReactInstanceManager?: () => boolean;\n +enableBackgroundExecutor?: () => boolean;\n +enableCleanTextInputYogaNode?: () => boolean;\n +enableGranularShadowTreeStateReconciliation?: () => boolean;\n +enableMicrotasks?: () => boolean;\n +enableSynchronousStateUpdates?: () => boolean;\n +enableUIConsistency?: () => boolean;\n +fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak?: () => boolean;\n +forceBatchingMountItemsOnAndroid?: () => boolean;\n +fuseboxEnabledDebug?: () => boolean;\n +fuseboxEnabledRelease?: () => boolean;\n +lazyAnimationCallbacks?: () => boolean;\n +preventDoubleTextMeasure?: () => boolean;\n +setAndroidLayoutDirection?: () => boolean;\n +useImmediateExecutorInAndroidBridgeless?: () => boolean;\n +useModernRuntimeScheduler?: () => boolean;\n +useNativeViewConfigsInBridgelessMode?: () => boolean;\n +useRuntimeShadowNodeReferenceUpdate?: () => boolean;\n +useRuntimeShadowNodeReferenceUpdateOnLayout?: () => boolean;\n +useStateAlignmentMechanism?: () => boolean;\n}\n\nconst NativeReactNativeFeatureFlags: ?Spec = TurboModuleRegistry.get(\n 'NativeReactNativeFeatureFlagsCxx',\n);\n\nexport default NativeReactNativeFeatureFlags;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @generated SignedSource<<870e25c844e692bb04ee49fe20cd3baf>>\n * @flow strict-local\n */\n\n/**\n * IMPORTANT: Do NOT modify this file directly.\n *\n * To change the definition of the flags, edit\n * packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.\n *\n * To regenerate this code, run the following script from the repo root:\n * yarn featureflags-update\n */\n\nimport {\n type Getter,\n createJavaScriptFlagGetter,\n createNativeFlagGetter,\n setOverrides,\n} from './ReactNativeFeatureFlagsBase';\n\nexport type ReactNativeFeatureFlagsJsOnly = {\n jsOnlyTestFlag: Getter,\n animatedShouldDebounceQueueFlush: Getter,\n animatedShouldUseSingleOp: Getter,\n enableAccessToHostTreeInFabric: Getter,\n isLayoutAnimationEnabled: Getter,\n shouldUseAnimatedObjectForTransform: Getter,\n shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter,\n shouldUseSetNativePropsInFabric: Getter,\n};\n\nexport type ReactNativeFeatureFlagsJsOnlyOverrides = Partial;\n\nexport type ReactNativeFeatureFlags = {\n ...ReactNativeFeatureFlagsJsOnly,\n commonTestFlag: Getter,\n allowCollapsableChildren: Getter,\n allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter,\n batchRenderingUpdatesInEventLoop: Getter,\n destroyFabricSurfacesInReactInstanceManager: Getter,\n enableBackgroundExecutor: Getter,\n enableCleanTextInputYogaNode: Getter,\n enableGranularShadowTreeStateReconciliation: Getter,\n enableMicrotasks: Getter,\n enableSynchronousStateUpdates: Getter,\n enableUIConsistency: Getter,\n fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak: Getter,\n forceBatchingMountItemsOnAndroid: Getter,\n fuseboxEnabledDebug: Getter,\n fuseboxEnabledRelease: Getter,\n lazyAnimationCallbacks: Getter,\n preventDoubleTextMeasure: Getter,\n setAndroidLayoutDirection: Getter,\n useImmediateExecutorInAndroidBridgeless: Getter,\n useModernRuntimeScheduler: Getter,\n useNativeViewConfigsInBridgelessMode: Getter,\n useRuntimeShadowNodeReferenceUpdate: Getter,\n useRuntimeShadowNodeReferenceUpdateOnLayout: Getter,\n useStateAlignmentMechanism: Getter,\n}\n\n/**\n * JS-only flag for testing. Do NOT modify.\n */\nexport const jsOnlyTestFlag: Getter = createJavaScriptFlagGetter('jsOnlyTestFlag', false);\n\n/**\n * Enables an experimental flush-queue debouncing in Animated.js.\n */\nexport const animatedShouldDebounceQueueFlush: Getter = createJavaScriptFlagGetter('animatedShouldDebounceQueueFlush', false);\n\n/**\n * Enables an experimental mega-operation for Animated.js that replaces many calls to native with a single call into native, to reduce JSI/JNI traffic.\n */\nexport const animatedShouldUseSingleOp: Getter = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);\n\n/**\n * Enables access to the host tree in Fabric using DOM-compatible APIs.\n */\nexport const enableAccessToHostTreeInFabric: Getter = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false);\n\n/**\n * Function used to enable / disabled Layout Animations in React Native.\n */\nexport const isLayoutAnimationEnabled: Getter = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);\n\n/**\n * Enables use of AnimatedObject for animating transform values.\n */\nexport const shouldUseAnimatedObjectForTransform: Getter = createJavaScriptFlagGetter('shouldUseAnimatedObjectForTransform', false);\n\n/**\n * removeClippedSubviews prop will be used as the default in FlatList on iOS to match Android\n */\nexport const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter = createJavaScriptFlagGetter('shouldUseRemoveClippedSubviewsAsDefaultOnIOS', false);\n\n/**\n * Enables use of setNativeProps in JS driven animations.\n */\nexport const shouldUseSetNativePropsInFabric: Getter = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);\n\n/**\n * Common flag for testing. Do NOT modify.\n */\nexport const commonTestFlag: Getter = createNativeFlagGetter('commonTestFlag', false);\n/**\n * Enables the differentiator to understand the \"collapsableChildren\" prop\n */\nexport const allowCollapsableChildren: Getter = createNativeFlagGetter('allowCollapsableChildren', true);\n/**\n * Adds support for recursively processing commits that mount synchronously (Android only).\n */\nexport const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter = createNativeFlagGetter('allowRecursiveCommitsWithSynchronousMountOnAndroid', false);\n/**\n * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.\n */\nexport const batchRenderingUpdatesInEventLoop: Getter = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);\n/**\n * When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy().\n */\nexport const destroyFabricSurfacesInReactInstanceManager: Getter = createNativeFlagGetter('destroyFabricSurfacesInReactInstanceManager', false);\n/**\n * Enables the use of a background executor to compute layout and commit updates on Fabric (this system is deprecated and should not be used).\n */\nexport const enableBackgroundExecutor: Getter = createNativeFlagGetter('enableBackgroundExecutor', false);\n/**\n * Clean yoga node when does not change.\n */\nexport const enableCleanTextInputYogaNode: Getter = createNativeFlagGetter('enableCleanTextInputYogaNode', false);\n/**\n * When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.\n */\nexport const enableGranularShadowTreeStateReconciliation: Getter = createNativeFlagGetter('enableGranularShadowTreeStateReconciliation', false);\n/**\n * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).\n */\nexport const enableMicrotasks: Getter = createNativeFlagGetter('enableMicrotasks', false);\n/**\n * Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).\n */\nexport const enableSynchronousStateUpdates: Getter = createNativeFlagGetter('enableSynchronousStateUpdates', false);\n/**\n * Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in other threads are not immediately propagated to JS during its execution).\n */\nexport const enableUIConsistency: Getter = createNativeFlagGetter('enableUIConsistency', false);\n/**\n * Fixes a leak in SurfaceMountingManager.mRemoveDeleteTreeUIFrameCallback\n */\nexport const fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak: Getter = createNativeFlagGetter('fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak', false);\n/**\n * Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.\n */\nexport const forceBatchingMountItemsOnAndroid: Getter = createNativeFlagGetter('forceBatchingMountItemsOnAndroid', false);\n/**\n * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in debug builds. This flag is global and should not be changed across React Host lifetimes.\n */\nexport const fuseboxEnabledDebug: Getter = createNativeFlagGetter('fuseboxEnabledDebug', false);\n/**\n * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.\n */\nexport const fuseboxEnabledRelease: Getter = createNativeFlagGetter('fuseboxEnabledRelease', false);\n/**\n * Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.\n */\nexport const lazyAnimationCallbacks: Getter = createNativeFlagGetter('lazyAnimationCallbacks', false);\n/**\n * When enabled, ParagraphShadowNode will no longer call measure twice.\n */\nexport const preventDoubleTextMeasure: Getter = createNativeFlagGetter('preventDoubleTextMeasure', true);\n/**\n * Propagate layout direction to Android views.\n */\nexport const setAndroidLayoutDirection: Getter = createNativeFlagGetter('setAndroidLayoutDirection', false);\n/**\n * Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization\n */\nexport const useImmediateExecutorInAndroidBridgeless: Getter = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', false);\n/**\n * When enabled, it uses the modern fork of RuntimeScheduler that allows scheduling tasks with priorities from any thread.\n */\nexport const useModernRuntimeScheduler: Getter = createNativeFlagGetter('useModernRuntimeScheduler', false);\n/**\n * When enabled, the native view configs are used in bridgeless mode.\n */\nexport const useNativeViewConfigsInBridgelessMode: Getter = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false);\n/**\n * When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.\n */\nexport const useRuntimeShadowNodeReferenceUpdate: Getter = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdate', false);\n/**\n * When enabled, cloning shadow nodes during layout will update the reference held by the current JS fiber tree.\n */\nexport const useRuntimeShadowNodeReferenceUpdateOnLayout: Getter = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdateOnLayout', false);\n/**\n * When enabled, it uses optimised state reconciliation algorithm.\n */\nexport const useStateAlignmentMechanism: Getter = createNativeFlagGetter('useStateAlignmentMechanism', false);\n\n/**\n * Overrides the feature flags with the provided methods.\n * NOTE: Only JS-only flags can be overridden from JavaScript using this API.\n */\nexport const override = setOverrides;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n ReactNativeFeatureFlagsJsOnly,\n ReactNativeFeatureFlagsJsOnlyOverrides,\n} from './ReactNativeFeatureFlags';\n\nimport NativeReactNativeFeatureFlags from './specs/NativeReactNativeFeatureFlags';\n\nconst accessedFeatureFlags: Set = new Set();\nlet overrides: ?ReactNativeFeatureFlagsJsOnlyOverrides;\n\nexport type Getter = () => T;\n\nfunction createGetter(\n configName: string,\n customValueGetter: Getter,\n defaultValue: T,\n): Getter {\n let cachedValue: ?T;\n\n return () => {\n if (cachedValue == null) {\n cachedValue = customValueGetter() ?? defaultValue;\n }\n return cachedValue;\n };\n}\n\nexport function createJavaScriptFlagGetter<\n K: $Keys,\n>(\n configName: K,\n defaultValue: ReturnType,\n): Getter> {\n return createGetter(\n configName,\n () => {\n accessedFeatureFlags.add(configName);\n return overrides?.[configName]?.();\n },\n defaultValue,\n );\n}\n\ntype NativeFeatureFlags = $NonMaybeType;\n\nexport function createNativeFlagGetter>(\n configName: K,\n defaultValue: ReturnType<$NonMaybeType>,\n): Getter>> {\n return createGetter(\n configName,\n () => {\n const valueFromNative = NativeReactNativeFeatureFlags?.[configName]?.();\n if (valueFromNative == null) {\n logUnavailableNativeModuleError(configName);\n }\n return valueFromNative;\n },\n defaultValue,\n );\n}\n\nexport function getOverrides(): ?ReactNativeFeatureFlagsJsOnlyOverrides {\n return overrides;\n}\n\nexport function setOverrides(\n newOverrides: ReactNativeFeatureFlagsJsOnlyOverrides,\n): void {\n if (overrides != null) {\n throw new Error('Feature flags cannot be overridden more than once');\n }\n\n if (accessedFeatureFlags.size > 0) {\n const accessedFeatureFlagsStr = Array.from(accessedFeatureFlags).join(', ');\n throw new Error(\n `Feature flags were accessed before being overridden: ${accessedFeatureFlagsStr}`,\n );\n }\n\n overrides = newOverrides;\n}\n\nconst reportedConfigNames: Set = new Set();\n\nfunction logUnavailableNativeModuleError(configName: string): void {\n if (!reportedConfigNames.has(configName)) {\n reportedConfigNames.add(configName);\n console.error(\n `Could not access feature flag '${configName}' because native module method was not available`,\n );\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type RequestIdleCallbackOptions = {\n timeout?: number,\n};\n\nexport type IdleDeadline = {\n didTimeout: boolean,\n timeRemaining: () => mixed,\n};\n\nexport interface Spec extends TurboModule {\n +requestIdleCallback: (\n callback: (idleDeadline: IdleDeadline) => mixed,\n options?: RequestIdleCallbackOptions,\n ) => mixed;\n +cancelIdleCallback: (handle: mixed) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing(\n 'NativeIdleCallbacksCxx',\n): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +queueMicrotask: (callback: () => mixed) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing(\n 'NativeMicrotasksCxx',\n): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\n// Globally Unique Immediate ID.\nlet GUIID = 1;\n\n// A global set of the currently cleared immediates.\nconst clearedImmediates: Set = new Set();\n\n/**\n * Shim the setImmediate API on top of queueMicrotask.\n * @param {function} func Callback to be invoked before the end of the\n * current JavaScript execution loop.\n */\nfunction setImmediate(callback: Function, ...args: any): number {\n if (arguments.length < 1) {\n throw new TypeError(\n 'setImmediate must be called with at least one argument (a function to call)',\n );\n }\n if (typeof callback !== 'function') {\n throw new TypeError(\n 'The first argument to setImmediate must be a function.',\n );\n }\n\n const id = GUIID++;\n // This is an edgey case in which the sequentially assigned ID has been\n // \"guessed\" and \"cleared\" ahead of time, so we need to clear it up first.\n if (clearedImmediates.has(id)) {\n clearedImmediates.delete(id);\n }\n\n // $FlowFixMe[incompatible-call]\n global.queueMicrotask(() => {\n if (!clearedImmediates.has(id)) {\n callback.apply(undefined, args);\n } else {\n // Free up the Set entry.\n clearedImmediates.delete(id);\n }\n });\n\n return id;\n}\n\n/**\n * @param {number} immediateID The ID of the immediate to be clearred.\n */\nfunction clearImmediate(immediateID: number) {\n clearedImmediates.add(immediateID);\n}\n\nconst immediateShim = {\n setImmediate: setImmediate,\n clearImmediate: clearImmediate,\n};\n\nmodule.exports = immediateShim;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nlet resolvedPromise;\n\n/**\n * Polyfill for the microtask queueing API defined by WHATWG HTML spec.\n * https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask\n *\n * The method must queue a microtask to invoke @param {function} callback, and\n * if the callback throws an exception, report the exception.\n */\nexport default function queueMicrotask(callback: Function) {\n if (arguments.length < 1) {\n throw new TypeError(\n 'queueMicrotask must be called with at least one argument (a function to call)',\n );\n }\n if (typeof callback !== 'function') {\n throw new TypeError('The argument to queueMicrotask must be a function.');\n }\n\n // Try to reuse a lazily allocated resolved promise from closure.\n (resolvedPromise || (resolvedPromise = Promise.resolve()))\n .then(callback)\n .catch(error =>\n // Report the exception until the next tick.\n setTimeout(() => {\n throw error;\n }, 0),\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nconst {polyfillGlobal} = require('../Utilities/PolyfillFunctions');\n\n/**\n * Set up XMLHttpRequest. The native XMLHttpRequest in Chrome dev tools is CORS\n * aware and won't let you fetch anything from the internet.\n *\n * You can use this module directly, or just require InitializeCore.\n */\npolyfillGlobal('XMLHttpRequest', () => require('../Network/XMLHttpRequest'));\npolyfillGlobal('FormData', () => require('../Network/FormData'));\n\npolyfillGlobal('fetch', () => require('../Network/fetch').fetch);\npolyfillGlobal('Headers', () => require('../Network/fetch').Headers);\npolyfillGlobal('Request', () => require('../Network/fetch').Request);\npolyfillGlobal('Response', () => require('../Network/fetch').Response);\npolyfillGlobal('WebSocket', () => require('../WebSocket/WebSocket'));\npolyfillGlobal('Blob', () => require('../Blob/Blob'));\npolyfillGlobal('File', () => require('../Blob/File'));\npolyfillGlobal('FileReader', () => require('../Blob/FileReader'));\npolyfillGlobal('URL', () => require('../Blob/URL').URL); // flowlint-line untyped-import:off\npolyfillGlobal('URLSearchParams', () => require('../Blob/URL').URLSearchParams); // flowlint-line untyped-import:off\npolyfillGlobal(\n 'AbortController',\n () => require('abort-controller/dist/abort-controller').AbortController, // flowlint-line untyped-import:off\n);\npolyfillGlobal(\n 'AbortSignal',\n () => require('abort-controller/dist/abort-controller').AbortSignal, // flowlint-line untyped-import:off\n);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nimport type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';\n\nimport {type EventSubscription} from '../vendor/emitter/EventEmitter';\nimport EventTarget from 'event-target-shim';\n\nconst BlobManager = require('../Blob/BlobManager');\nconst GlobalPerformanceLogger = require('../Utilities/GlobalPerformanceLogger');\nconst RCTNetworking = require('./RCTNetworking').default;\nconst base64 = require('base64-js');\nconst invariant = require('invariant');\n\nconst DEBUG_NETWORK_SEND_DELAY: false = false; // Set to a number of milliseconds when debugging\n\nexport type NativeResponseType = 'base64' | 'blob' | 'text';\nexport type ResponseType =\n | ''\n | 'arraybuffer'\n | 'blob'\n | 'document'\n | 'json'\n | 'text';\nexport type Response = ?Object | string;\n\ntype XHRInterceptor = interface {\n requestSent(id: number, url: string, method: string, headers: Object): void,\n responseReceived(\n id: number,\n url: string,\n status: number,\n headers: Object,\n ): void,\n dataReceived(id: number, data: string): void,\n loadingFinished(id: number, encodedDataLength: number): void,\n loadingFailed(id: number, error: string): void,\n};\n\n// The native blob module is optional so inject it here if available.\nif (BlobManager.isAvailable) {\n BlobManager.addNetworkingHandler();\n}\n\nconst UNSENT = 0;\nconst OPENED = 1;\nconst HEADERS_RECEIVED = 2;\nconst LOADING = 3;\nconst DONE = 4;\n\nconst SUPPORTED_RESPONSE_TYPES = {\n arraybuffer: typeof global.ArrayBuffer === 'function',\n blob: typeof global.Blob === 'function',\n document: false,\n json: true,\n text: true,\n '': true,\n};\n\nconst REQUEST_EVENTS = [\n 'abort',\n 'error',\n 'load',\n 'loadstart',\n 'progress',\n 'timeout',\n 'loadend',\n];\n\nconst XHR_EVENTS = REQUEST_EVENTS.concat('readystatechange');\n\nclass XMLHttpRequestEventTarget extends (EventTarget(...REQUEST_EVENTS): any) {\n onload: ?Function;\n onloadstart: ?Function;\n onprogress: ?Function;\n ontimeout: ?Function;\n onerror: ?Function;\n onabort: ?Function;\n onloadend: ?Function;\n}\n\n/**\n * Shared base for platform-specific XMLHttpRequest implementations.\n */\nclass XMLHttpRequest extends (EventTarget(...XHR_EVENTS): any) {\n static UNSENT: number = UNSENT;\n static OPENED: number = OPENED;\n static HEADERS_RECEIVED: number = HEADERS_RECEIVED;\n static LOADING: number = LOADING;\n static DONE: number = DONE;\n\n static _interceptor: ?XHRInterceptor = null;\n\n UNSENT: number = UNSENT;\n OPENED: number = OPENED;\n HEADERS_RECEIVED: number = HEADERS_RECEIVED;\n LOADING: number = LOADING;\n DONE: number = DONE;\n\n // EventTarget automatically initializes these to `null`.\n onload: ?Function;\n onloadstart: ?Function;\n onprogress: ?Function;\n ontimeout: ?Function;\n onerror: ?Function;\n onabort: ?Function;\n onloadend: ?Function;\n onreadystatechange: ?Function;\n\n readyState: number = UNSENT;\n responseHeaders: ?Object;\n status: number = 0;\n timeout: number = 0;\n responseURL: ?string;\n withCredentials: boolean = true;\n\n upload: XMLHttpRequestEventTarget = new XMLHttpRequestEventTarget();\n\n _requestId: ?number;\n _subscriptions: Array;\n\n _aborted: boolean = false;\n _cachedResponse: Response;\n _hasError: boolean = false;\n _headers: Object;\n _lowerCaseResponseHeaders: Object;\n _method: ?string = null;\n _perfKey: ?string = null;\n _responseType: ResponseType;\n _response: string = '';\n _sent: boolean;\n _url: ?string = null;\n _timedOut: boolean = false;\n _trackingName: string = 'unknown';\n _incrementalEvents: boolean = false;\n _performanceLogger: IPerformanceLogger = GlobalPerformanceLogger;\n\n static setInterceptor(interceptor: ?XHRInterceptor) {\n XMLHttpRequest._interceptor = interceptor;\n }\n\n constructor() {\n super();\n this._reset();\n }\n\n _reset(): void {\n this.readyState = this.UNSENT;\n this.responseHeaders = undefined;\n this.status = 0;\n delete this.responseURL;\n\n this._requestId = null;\n\n this._cachedResponse = undefined;\n this._hasError = false;\n this._headers = {};\n this._response = '';\n this._responseType = '';\n this._sent = false;\n this._lowerCaseResponseHeaders = {};\n\n this._clearSubscriptions();\n this._timedOut = false;\n }\n\n get responseType(): ResponseType {\n return this._responseType;\n }\n\n set responseType(responseType: ResponseType): void {\n if (this._sent) {\n throw new Error(\n \"Failed to set the 'responseType' property on 'XMLHttpRequest': The \" +\n 'response type cannot be set after the request has been sent.',\n );\n }\n if (!SUPPORTED_RESPONSE_TYPES.hasOwnProperty(responseType)) {\n console.warn(\n `The provided value '${responseType}' is not a valid 'responseType'.`,\n );\n return;\n }\n\n // redboxes early, e.g. for 'arraybuffer' on ios 7\n invariant(\n SUPPORTED_RESPONSE_TYPES[responseType] || responseType === 'document',\n `The provided value '${responseType}' is unsupported in this environment.`,\n );\n\n if (responseType === 'blob') {\n invariant(\n BlobManager.isAvailable,\n 'Native module BlobModule is required for blob support',\n );\n }\n this._responseType = responseType;\n }\n\n get responseText(): string {\n if (this._responseType !== '' && this._responseType !== 'text') {\n throw new Error(\n \"The 'responseText' property is only available if 'responseType' \" +\n `is set to '' or 'text', but it is '${this._responseType}'.`,\n );\n }\n if (this.readyState < LOADING) {\n return '';\n }\n return this._response;\n }\n\n get response(): Response {\n const {responseType} = this;\n if (responseType === '' || responseType === 'text') {\n return this.readyState < LOADING || this._hasError ? '' : this._response;\n }\n\n if (this.readyState !== DONE) {\n return null;\n }\n\n if (this._cachedResponse !== undefined) {\n return this._cachedResponse;\n }\n\n switch (responseType) {\n case 'document':\n this._cachedResponse = null;\n break;\n\n case 'arraybuffer':\n this._cachedResponse = base64.toByteArray(this._response).buffer;\n break;\n\n case 'blob':\n if (typeof this._response === 'object' && this._response) {\n this._cachedResponse = BlobManager.createFromOptions(this._response);\n } else if (this._response === '') {\n this._cachedResponse = BlobManager.createFromParts([]);\n } else {\n throw new Error(\n 'Invalid response for blob - expecting object, was ' +\n `${typeof this._response}: ${this._response.trim()}`,\n );\n }\n break;\n\n case 'json':\n try {\n this._cachedResponse = JSON.parse(this._response);\n } catch (_) {\n this._cachedResponse = null;\n }\n break;\n\n default:\n this._cachedResponse = null;\n }\n\n return this._cachedResponse;\n }\n\n // exposed for testing\n __didCreateRequest(requestId: number): void {\n this._requestId = requestId;\n\n XMLHttpRequest._interceptor &&\n XMLHttpRequest._interceptor.requestSent(\n requestId,\n this._url || '',\n this._method || 'GET',\n this._headers,\n );\n }\n\n // exposed for testing\n __didUploadProgress(\n requestId: number,\n progress: number,\n total: number,\n ): void {\n if (requestId === this._requestId) {\n this.upload.dispatchEvent({\n type: 'progress',\n lengthComputable: true,\n loaded: progress,\n total,\n });\n }\n }\n\n __didReceiveResponse(\n requestId: number,\n status: number,\n responseHeaders: ?Object,\n responseURL: ?string,\n ): void {\n if (requestId === this._requestId) {\n this._perfKey != null &&\n this._performanceLogger.stopTimespan(this._perfKey);\n this.status = status;\n this.setResponseHeaders(responseHeaders);\n this.setReadyState(this.HEADERS_RECEIVED);\n if (responseURL || responseURL === '') {\n this.responseURL = responseURL;\n } else {\n delete this.responseURL;\n }\n\n XMLHttpRequest._interceptor &&\n XMLHttpRequest._interceptor.responseReceived(\n requestId,\n responseURL || this._url || '',\n status,\n responseHeaders || {},\n );\n }\n }\n\n __didReceiveData(requestId: number, response: string): void {\n if (requestId !== this._requestId) {\n return;\n }\n this._response = response;\n this._cachedResponse = undefined; // force lazy recomputation\n this.setReadyState(this.LOADING);\n\n XMLHttpRequest._interceptor &&\n XMLHttpRequest._interceptor.dataReceived(requestId, response);\n }\n\n __didReceiveIncrementalData(\n requestId: number,\n responseText: string,\n progress: number,\n total: number,\n ) {\n if (requestId !== this._requestId) {\n return;\n }\n if (!this._response) {\n this._response = responseText;\n } else {\n this._response += responseText;\n }\n\n XMLHttpRequest._interceptor &&\n XMLHttpRequest._interceptor.dataReceived(requestId, responseText);\n\n this.setReadyState(this.LOADING);\n this.__didReceiveDataProgress(requestId, progress, total);\n }\n\n __didReceiveDataProgress(\n requestId: number,\n loaded: number,\n total: number,\n ): void {\n if (requestId !== this._requestId) {\n return;\n }\n this.dispatchEvent({\n type: 'progress',\n lengthComputable: total >= 0,\n loaded,\n total,\n });\n }\n\n // exposed for testing\n __didCompleteResponse(\n requestId: number,\n error: string,\n timeOutError: boolean,\n ): void {\n if (requestId === this._requestId) {\n if (error) {\n if (this._responseType === '' || this._responseType === 'text') {\n this._response = error;\n }\n this._hasError = true;\n if (timeOutError) {\n this._timedOut = true;\n }\n }\n this._clearSubscriptions();\n this._requestId = null;\n this.setReadyState(this.DONE);\n\n if (error) {\n XMLHttpRequest._interceptor &&\n XMLHttpRequest._interceptor.loadingFailed(requestId, error);\n } else {\n XMLHttpRequest._interceptor &&\n XMLHttpRequest._interceptor.loadingFinished(\n requestId,\n this._response.length,\n );\n }\n }\n }\n\n _clearSubscriptions(): void {\n (this._subscriptions || []).forEach(sub => {\n if (sub) {\n sub.remove();\n }\n });\n this._subscriptions = [];\n }\n\n getAllResponseHeaders(): ?string {\n if (!this.responseHeaders) {\n // according to the spec, return null if no response has been received\n return null;\n }\n\n // Assign to non-nullable local variable.\n const responseHeaders = this.responseHeaders;\n\n const unsortedHeaders: Map<\n string,\n {lowerHeaderName: string, upperHeaderName: string, headerValue: string},\n > = new Map();\n for (const rawHeaderName of Object.keys(responseHeaders)) {\n const headerValue = responseHeaders[rawHeaderName];\n const lowerHeaderName = rawHeaderName.toLowerCase();\n const header = unsortedHeaders.get(lowerHeaderName);\n if (header) {\n header.headerValue += ', ' + headerValue;\n unsortedHeaders.set(lowerHeaderName, header);\n } else {\n unsortedHeaders.set(lowerHeaderName, {\n lowerHeaderName,\n upperHeaderName: rawHeaderName.toUpperCase(),\n headerValue,\n });\n }\n }\n\n // Sort in ascending order, with a being less than b if a's name is legacy-uppercased-byte less than b's name.\n const sortedHeaders = [...unsortedHeaders.values()].sort((a, b) => {\n if (a.upperHeaderName < b.upperHeaderName) {\n return -1;\n }\n if (a.upperHeaderName > b.upperHeaderName) {\n return 1;\n }\n return 0;\n });\n\n // Combine into single text response.\n return (\n sortedHeaders\n .map(header => {\n return header.lowerHeaderName + ': ' + header.headerValue;\n })\n .join('\\r\\n') + '\\r\\n'\n );\n }\n\n getResponseHeader(header: string): ?string {\n const value = this._lowerCaseResponseHeaders[header.toLowerCase()];\n return value !== undefined ? value : null;\n }\n\n setRequestHeader(header: string, value: any): void {\n if (this.readyState !== this.OPENED) {\n throw new Error('Request has not been opened');\n }\n this._headers[header.toLowerCase()] = String(value);\n }\n\n /**\n * Custom extension for tracking origins of request.\n */\n setTrackingName(trackingName: string): XMLHttpRequest {\n this._trackingName = trackingName;\n return this;\n }\n\n /**\n * Custom extension for setting a custom performance logger\n */\n setPerformanceLogger(performanceLogger: IPerformanceLogger): XMLHttpRequest {\n this._performanceLogger = performanceLogger;\n return this;\n }\n\n open(method: string, url: string, async: ?boolean): void {\n /* Other optional arguments are not supported yet */\n if (this.readyState !== this.UNSENT) {\n throw new Error('Cannot open, already sending');\n }\n if (async !== undefined && !async) {\n // async is default\n throw new Error('Synchronous http requests are not supported');\n }\n if (!url) {\n throw new Error('Cannot load an empty url');\n }\n this._method = method.toUpperCase();\n this._url = url;\n this._aborted = false;\n this.setReadyState(this.OPENED);\n }\n\n send(data: any): void {\n if (this.readyState !== this.OPENED) {\n throw new Error('Request has not been opened');\n }\n if (this._sent) {\n throw new Error('Request has already been sent');\n }\n this._sent = true;\n const incrementalEvents =\n this._incrementalEvents || !!this.onreadystatechange || !!this.onprogress;\n\n this._subscriptions.push(\n RCTNetworking.addListener('didSendNetworkData', args =>\n this.__didUploadProgress(...args),\n ),\n );\n this._subscriptions.push(\n RCTNetworking.addListener('didReceiveNetworkResponse', args =>\n this.__didReceiveResponse(...args),\n ),\n );\n this._subscriptions.push(\n RCTNetworking.addListener('didReceiveNetworkData', args =>\n this.__didReceiveData(...args),\n ),\n );\n this._subscriptions.push(\n RCTNetworking.addListener('didReceiveNetworkIncrementalData', args =>\n this.__didReceiveIncrementalData(...args),\n ),\n );\n this._subscriptions.push(\n RCTNetworking.addListener('didReceiveNetworkDataProgress', args =>\n this.__didReceiveDataProgress(...args),\n ),\n );\n this._subscriptions.push(\n RCTNetworking.addListener('didCompleteNetworkResponse', args =>\n this.__didCompleteResponse(...args),\n ),\n );\n\n let nativeResponseType: NativeResponseType = 'text';\n if (this._responseType === 'arraybuffer') {\n nativeResponseType = 'base64';\n }\n if (this._responseType === 'blob') {\n nativeResponseType = 'blob';\n }\n\n const doSend = () => {\n const friendlyName =\n this._trackingName !== 'unknown' ? this._trackingName : this._url;\n this._perfKey = 'network_XMLHttpRequest_' + String(friendlyName);\n this._performanceLogger.startTimespan(this._perfKey);\n invariant(\n this._method,\n 'XMLHttpRequest method needs to be defined (%s).',\n friendlyName,\n );\n invariant(\n this._url,\n 'XMLHttpRequest URL needs to be defined (%s).',\n friendlyName,\n );\n RCTNetworking.sendRequest(\n this._method,\n this._trackingName,\n this._url,\n this._headers,\n data,\n /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found\n * when making Flow check .android.js files. */\n nativeResponseType,\n incrementalEvents,\n this.timeout,\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.__didCreateRequest.bind(this),\n this.withCredentials,\n );\n };\n if (DEBUG_NETWORK_SEND_DELAY) {\n setTimeout(doSend, DEBUG_NETWORK_SEND_DELAY);\n } else {\n doSend();\n }\n }\n\n abort(): void {\n this._aborted = true;\n if (this._requestId) {\n RCTNetworking.abortRequest(this._requestId);\n }\n // only call onreadystatechange if there is something to abort,\n // below logic is per spec\n if (\n !(\n this.readyState === this.UNSENT ||\n (this.readyState === this.OPENED && !this._sent) ||\n this.readyState === this.DONE\n )\n ) {\n this._reset();\n this.setReadyState(this.DONE);\n }\n // Reset again after, in case modified in handler\n this._reset();\n }\n\n setResponseHeaders(responseHeaders: ?Object): void {\n this.responseHeaders = responseHeaders || null;\n const headers = responseHeaders || {};\n this._lowerCaseResponseHeaders = Object.keys(headers).reduce<{\n [string]: any,\n }>((lcaseHeaders, headerName) => {\n // $FlowFixMe[invalid-computed-prop]\n lcaseHeaders[headerName.toLowerCase()] = headers[headerName];\n return lcaseHeaders;\n }, {});\n }\n\n setReadyState(newState: number): void {\n this.readyState = newState;\n this.dispatchEvent({type: 'readystatechange'});\n if (newState === this.DONE) {\n if (this._aborted) {\n this.dispatchEvent({type: 'abort'});\n } else if (this._hasError) {\n if (this._timedOut) {\n this.dispatchEvent({type: 'timeout'});\n } else {\n this.dispatchEvent({type: 'error'});\n }\n } else {\n this.dispatchEvent({type: 'load'});\n }\n this.dispatchEvent({type: 'loadend'});\n }\n }\n\n /* global EventListener */\n addEventListener(type: string, listener: EventListener): void {\n // If we dont' have a 'readystatechange' event handler, we don't\n // have to send repeated LOADING events with incremental updates\n // to responseText, which will avoid a bunch of native -> JS\n // bridge traffic.\n if (type === 'readystatechange' || type === 'progress') {\n this._incrementalEvents = true;\n }\n super.addEventListener(type, listener);\n }\n}\n\nmodule.exports = XMLHttpRequest;\n","/**\n * @author Toru Nagashima \n * @copyright 2015 Toru Nagashima. All rights reserved.\n * See LICENSE file in root directory for full license.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap}\n * @private\n */\nconst privateData = new WeakMap();\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap();\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event);\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n );\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n );\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true;\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault();\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n });\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true });\n\n // Define accessors\n const keys = Object.keys(event);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key));\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget;\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this);\n\n data.stopped = true;\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation();\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this);\n\n data.stopped = true;\n data.immediateStopped = true;\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation();\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this));\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this);\n\n data.stopped = true;\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true;\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this));\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n};\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n});\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype);\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event);\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value;\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event;\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto);\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event);\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n });\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key);\n const isFunc = typeof descriptor.value === \"function\";\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n );\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto);\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto);\n wrappers.set(proto, wrapper);\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nfunction wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event));\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nfunction isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nfunction setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase;\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nfunction setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget;\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nfunction setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener;\n}\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap();\n\n// Listener types\nconst CAPTURE = 1;\nconst BUBBLE = 2;\nconst ATTRIBUTE = 3;\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget);\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this);\n let node = listeners.get(eventName);\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next;\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null; // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this);\n\n // Traverse to the tail while removing old value.\n let prev = null;\n let node = listeners.get(eventName);\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n } else {\n prev = node;\n }\n\n node = node.next;\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n };\n if (prev === null) {\n listeners.set(eventName, newNode);\n } else {\n prev.next = newNode;\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n );\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this);\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n });\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map());\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length);\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i];\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this);\n const optionsIsObj = isObject(options);\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options);\n const listenerType = capture ? CAPTURE : BUBBLE;\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n };\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName);\n if (node === undefined) {\n listeners.set(eventName, newNode);\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null;\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node;\n node = node.next;\n }\n\n // Add it.\n prev.next = newNode;\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this);\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options);\n const listenerType = capture ? CAPTURE : BUBBLE;\n\n let prev = null;\n let node = listeners.get(eventName);\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n return\n }\n\n prev = node;\n node = node.next;\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this);\n const eventName = event.type;\n let node = listeners.get(eventName);\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event);\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null;\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n } else {\n prev = node;\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n );\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent);\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err);\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent);\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next;\n }\n setPassiveListener(wrappedEvent, null);\n setEventPhase(wrappedEvent, 0);\n setCurrentTarget(wrappedEvent, null);\n\n return !wrappedEvent.defaultPrevented\n },\n};\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n});\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype);\n}\n\nexports.defineEventAttribute = defineEventAttribute;\nexports.EventTarget = EventTarget;\nexports.default = EventTarget;\n\nmodule.exports = EventTarget\nmodule.exports.EventTarget = module.exports[\"default\"] = EventTarget\nmodule.exports.defineEventAttribute = defineEventAttribute\n//# sourceMappingURL=event-target-shim.js.map\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {BlobCollector, BlobData, BlobOptions} from './BlobTypes';\n\nimport NativeBlobModule from './NativeBlobModule';\nimport invariant from 'invariant';\n\nconst Blob = require('./Blob');\nconst BlobRegistry = require('./BlobRegistry');\n\n/*eslint-disable no-bitwise */\n/*eslint-disable eqeqeq */\n\n/**\n * Based on the rfc4122-compliant solution posted at\n * http://stackoverflow.com/questions/105034\n */\nfunction uuidv4(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {\n const r = (Math.random() * 16) | 0,\n v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\n// **Temporary workaround**\n// TODO(#24654): Use turbomodules for the Blob module.\n// Blob collector is a jsi::HostObject that is used by native to know\n// when the a Blob instance is deallocated. This allows to free the\n// underlying native resources. This is a hack to workaround the fact\n// that the current bridge infra doesn't allow to track js objects\n// deallocation. Ideally the whole Blob object should be a jsi::HostObject.\nfunction createBlobCollector(blobId: string): BlobCollector | null {\n if (global.__blobCollectorProvider == null) {\n return null;\n } else {\n return global.__blobCollectorProvider(blobId);\n }\n}\n\n/**\n * Module to manage blobs. Wrapper around the native blob module.\n */\nclass BlobManager {\n /**\n * If the native blob module is available.\n */\n static isAvailable: boolean = !!NativeBlobModule;\n\n /**\n * Create blob from existing array of blobs.\n */\n static createFromParts(\n parts: Array,\n options?: BlobOptions,\n ): Blob {\n invariant(NativeBlobModule, 'NativeBlobModule is available.');\n\n const blobId = uuidv4();\n const items = parts.map(part => {\n if (part instanceof ArrayBuffer || ArrayBuffer.isView(part)) {\n throw new Error(\n \"Creating blobs from 'ArrayBuffer' and 'ArrayBufferView' are not supported\",\n );\n }\n if (part instanceof Blob) {\n return {\n data: part.data,\n type: 'blob',\n };\n } else {\n return {\n data: String(part),\n type: 'string',\n };\n }\n });\n const size = items.reduce((acc, curr) => {\n if (curr.type === 'string') {\n return acc + global.unescape(encodeURI(curr.data)).length;\n } else {\n return acc + curr.data.size;\n }\n }, 0);\n\n NativeBlobModule.createFromParts(items, blobId);\n\n return BlobManager.createFromOptions({\n blobId,\n offset: 0,\n size,\n type: options ? options.type : '',\n lastModified: options ? options.lastModified : Date.now(),\n });\n }\n\n /**\n * Create blob instance from blob data from native.\n * Used internally by modules like XHR, WebSocket, etc.\n */\n static createFromOptions(options: BlobData): Blob {\n BlobRegistry.register(options.blobId);\n // $FlowFixMe[prop-missing]\n return Object.assign(Object.create(Blob.prototype), {\n data:\n // Reuse the collector instance when creating from an existing blob.\n // This will make sure that the underlying resource is only deallocated\n // when all blobs that refer to it are deallocated.\n options.__collector == null\n ? {\n ...options,\n __collector: createBlobCollector(options.blobId),\n }\n : options,\n });\n }\n\n /**\n * Deallocate resources for a blob.\n */\n static release(blobId: string): void {\n invariant(NativeBlobModule, 'NativeBlobModule is available.');\n\n BlobRegistry.unregister(blobId);\n if (BlobRegistry.has(blobId)) {\n return;\n }\n NativeBlobModule.release(blobId);\n }\n\n /**\n * Inject the blob content handler in the networking module to support blob\n * requests and responses.\n */\n static addNetworkingHandler(): void {\n invariant(NativeBlobModule, 'NativeBlobModule is available.');\n\n NativeBlobModule.addNetworkingHandler();\n }\n\n /**\n * Indicate the websocket should return a blob for incoming binary\n * messages.\n */\n static addWebSocketHandler(socketId: number): void {\n invariant(NativeBlobModule, 'NativeBlobModule is available.');\n\n NativeBlobModule.addWebSocketHandler(socketId);\n }\n\n /**\n * Indicate the websocket should no longer return a blob for incoming\n * binary messages.\n */\n static removeWebSocketHandler(socketId: number): void {\n invariant(NativeBlobModule, 'NativeBlobModule is available.');\n\n NativeBlobModule.removeWebSocketHandler(socketId);\n }\n\n /**\n * Send a blob message to a websocket.\n */\n static sendOverSocket(blob: Blob, socketId: number): void {\n invariant(NativeBlobModule, 'NativeBlobModule is available.');\n\n NativeBlobModule.sendOverSocket(blob.data, socketId);\n }\n}\n\nmodule.exports = BlobManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeBlobModule';\nimport NativeBlobModule from '../../src/private/specs/modules/NativeBlobModule';\nexport default NativeBlobModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type Constants = {|BLOB_URI_SCHEME: ?string, BLOB_URI_HOST: ?string|};\n\nexport interface Spec extends TurboModule {\n +getConstants: () => Constants;\n +addNetworkingHandler: () => void;\n +addWebSocketHandler: (id: number) => void;\n +removeWebSocketHandler: (id: number) => void;\n +sendOverSocket: (blob: Object, socketID: number) => void;\n +createFromParts: (parts: Array, withId: string) => void;\n +release: (blobId: string) => void;\n}\n\nconst NativeModule = TurboModuleRegistry.get('BlobModule');\n\nlet constants = null;\nlet NativeBlobModule = null;\n\nif (NativeModule != null) {\n NativeBlobModule = {\n getConstants(): Constants {\n if (constants == null) {\n constants = NativeModule.getConstants();\n }\n return constants;\n },\n addNetworkingHandler(): void {\n NativeModule.addNetworkingHandler();\n },\n addWebSocketHandler(id: number): void {\n NativeModule.addWebSocketHandler(id);\n },\n removeWebSocketHandler(id: number): void {\n NativeModule.removeWebSocketHandler(id);\n },\n sendOverSocket(blob: Object, socketID: number): void {\n NativeModule.sendOverSocket(blob, socketID);\n },\n createFromParts(parts: Array, withId: string): void {\n NativeModule.createFromParts(parts, withId);\n },\n release(blobId: string): void {\n NativeModule.release(blobId);\n },\n };\n}\n\nexport default (NativeBlobModule: ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport type {BlobData, BlobOptions} from './BlobTypes';\n\n/**\n * Opaque JS representation of some binary data in native.\n *\n * The API is modeled after the W3C Blob API, with one caveat\n * regarding explicit deallocation. Refer to the `close()`\n * method for further details.\n *\n * Example usage in a React component:\n *\n * class WebSocketImage extends React.Component {\n * state = {blob: null};\n * componentDidMount() {\n * let ws = this.ws = new WebSocket(...);\n * ws.binaryType = 'blob';\n * ws.onmessage = (event) => {\n * if (this.state.blob) {\n * this.state.blob.close();\n * }\n * this.setState({blob: event.data});\n * };\n * }\n * componentUnmount() {\n * if (this.state.blob) {\n * this.state.blob.close();\n * }\n * this.ws.close();\n * }\n * render() {\n * if (!this.state.blob) {\n * return ;\n * }\n * return ;\n * }\n * }\n *\n * Reference: https://developer.mozilla.org/en-US/docs/Web/API/Blob\n */\nclass Blob {\n _data: ?BlobData;\n\n /**\n * Constructor for JS consumers.\n * Currently we only support creating Blobs from other Blobs.\n * Reference: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n */\n constructor(parts: Array = [], options?: BlobOptions) {\n const BlobManager = require('./BlobManager');\n this.data = BlobManager.createFromParts(parts, options).data;\n }\n\n /*\n * This method is used to create a new Blob object containing\n * the data in the specified range of bytes of the source Blob.\n * Reference: https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice\n */\n // $FlowFixMe[unsafe-getters-setters]\n set data(data: ?BlobData) {\n this._data = data;\n }\n\n // $FlowFixMe[unsafe-getters-setters]\n get data(): BlobData {\n if (!this._data) {\n throw new Error('Blob has been closed and is no longer available');\n }\n\n return this._data;\n }\n\n slice(start?: number, end?: number, contentType: string = ''): Blob {\n const BlobManager = require('./BlobManager');\n let {offset, size} = this.data;\n\n if (typeof start === 'number') {\n if (start > size) {\n // $FlowFixMe[reassign-const]\n start = size;\n }\n offset += start;\n size -= start;\n\n if (typeof end === 'number') {\n if (end < 0) {\n // $FlowFixMe[reassign-const]\n end = this.size + end;\n }\n if (end > this.size) {\n // $FlowFixMe[reassign-const]\n end = this.size;\n }\n size = end - start;\n }\n }\n return BlobManager.createFromOptions({\n blobId: this.data.blobId,\n offset,\n size,\n type: contentType,\n /* Since `blob.slice()` creates a new view onto the same binary\n * data as the original blob, we should re-use the same collector\n * object so that the underlying resource gets deallocated when\n * the last view into the data is released, not the first.\n */\n __collector: this.data.__collector,\n });\n }\n\n /**\n * This method is in the standard, but not actually implemented by\n * any browsers at this point. It's important for how Blobs work in\n * React Native, however, since we cannot de-allocate resources automatically,\n * so consumers need to explicitly de-allocate them.\n *\n * Note that the semantics around Blobs created via `blob.slice()`\n * and `new Blob([blob])` are different. `blob.slice()` creates a\n * new *view* onto the same binary data, so calling `close()` on any\n * of those views is enough to deallocate the data, whereas\n * `new Blob([blob, ...])` actually copies the data in memory.\n */\n close() {\n const BlobManager = require('./BlobManager');\n BlobManager.release(this.data.blobId);\n this.data = null;\n }\n\n /**\n * Size of the data contained in the Blob object, in bytes.\n */\n // $FlowFixMe[unsafe-getters-setters]\n get size(): number {\n return this.data.size;\n }\n\n /*\n * String indicating the MIME type of the data contained in the Blob.\n * If the type is unknown, this string is empty.\n */\n // $FlowFixMe[unsafe-getters-setters]\n get type(): string {\n return this.data.type || '';\n }\n}\n\nmodule.exports = Blob;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nconst registry: Map = new Map();\n\nconst register = (id: string) => {\n const used = registry.get(id);\n\n if (used != null) {\n registry.set(id, used + 1);\n } else {\n registry.set(id, 1);\n }\n};\n\nconst unregister = (id: string) => {\n const used = registry.get(id);\n\n if (used != null) {\n if (used <= 1) {\n registry.delete(id);\n } else {\n registry.set(id, used - 1);\n }\n }\n};\n\nconst has = (id: string): number | boolean => {\n return registry.get(id) || false;\n};\n\nmodule.exports = {\n register,\n unregister,\n has,\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {IPerformanceLogger} from './createPerformanceLogger';\n\nimport createPerformanceLogger from './createPerformanceLogger';\n\n/**\n * This is a global shared instance of IPerformanceLogger that is created with\n * createPerformanceLogger().\n * This logger should be used only for global performance metrics like the ones\n * that are logged during loading bundle. If you want to log something from your\n * React component you should use PerformanceLoggerContext instead.\n */\nconst GlobalPerformanceLogger: IPerformanceLogger = createPerformanceLogger();\n\nmodule.exports = GlobalPerformanceLogger;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {\n Extras,\n ExtraValue,\n IPerformanceLogger,\n Timespan,\n} from './IPerformanceLogger';\n\nimport * as Systrace from '../Performance/Systrace';\nimport infoLog from './infoLog';\n\nconst _cookies: {[key: string]: number, ...} = {};\n\nconst PRINT_TO_CONSOLE: false = false; // Type as false to prevent accidentally committing `true`;\n\nexport const getCurrentTimestamp: () => number =\n global.nativeQPLTimestamp ?? (() => global.performance.now());\n\nclass PerformanceLogger implements IPerformanceLogger {\n _timespans: {[key: string]: ?Timespan} = {};\n _extras: {[key: string]: ?ExtraValue} = {};\n _points: {[key: string]: ?number} = {};\n _pointExtras: {[key: string]: ?Extras, ...} = {};\n _closed: boolean = false;\n\n addTimespan(\n key: string,\n startTime: number,\n endTime: number,\n startExtras?: Extras,\n endExtras?: Extras,\n ) {\n if (this._closed) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog('PerformanceLogger: addTimespan - has closed ignoring: ', key);\n }\n return;\n }\n if (this._timespans[key]) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog(\n 'PerformanceLogger: Attempting to add a timespan that already exists ',\n key,\n );\n }\n return;\n }\n\n this._timespans[key] = {\n startTime,\n endTime,\n totalTime: endTime - (startTime || 0),\n startExtras,\n endExtras,\n };\n }\n\n append(performanceLogger: IPerformanceLogger) {\n this._timespans = {\n ...performanceLogger.getTimespans(),\n ...this._timespans,\n };\n this._extras = {...performanceLogger.getExtras(), ...this._extras};\n this._points = {...performanceLogger.getPoints(), ...this._points};\n this._pointExtras = {\n ...performanceLogger.getPointExtras(),\n ...this._pointExtras,\n };\n }\n\n clear() {\n this._timespans = {};\n this._extras = {};\n this._points = {};\n if (PRINT_TO_CONSOLE) {\n infoLog('PerformanceLogger.js', 'clear');\n }\n }\n\n clearCompleted() {\n for (const key in this._timespans) {\n if (this._timespans[key]?.totalTime != null) {\n delete this._timespans[key];\n }\n }\n this._extras = {};\n this._points = {};\n if (PRINT_TO_CONSOLE) {\n infoLog('PerformanceLogger.js', 'clearCompleted');\n }\n }\n\n close() {\n this._closed = true;\n }\n\n currentTimestamp(): number {\n return getCurrentTimestamp();\n }\n\n getExtras(): {[key: string]: ?ExtraValue} {\n return this._extras;\n }\n\n getPoints(): {[key: string]: ?number} {\n return this._points;\n }\n\n getPointExtras(): {[key: string]: ?Extras} {\n return this._pointExtras;\n }\n\n getTimespans(): {[key: string]: ?Timespan} {\n return this._timespans;\n }\n\n hasTimespan(key: string): boolean {\n return !!this._timespans[key];\n }\n\n isClosed(): boolean {\n return this._closed;\n }\n\n logEverything() {\n if (PRINT_TO_CONSOLE) {\n // log timespans\n for (const key in this._timespans) {\n if (this._timespans[key]?.totalTime != null) {\n infoLog(key + ': ' + this._timespans[key].totalTime + 'ms');\n }\n }\n\n // log extras\n infoLog(this._extras);\n\n // log points\n for (const key in this._points) {\n if (this._points[key] != null) {\n infoLog(key + ': ' + this._points[key] + 'ms');\n }\n }\n }\n }\n\n markPoint(\n key: string,\n timestamp?: number = getCurrentTimestamp(),\n extras?: Extras,\n ) {\n if (this._closed) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog('PerformanceLogger: markPoint - has closed ignoring: ', key);\n }\n return;\n }\n if (this._points[key] != null) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog(\n 'PerformanceLogger: Attempting to mark a point that has been already logged ',\n key,\n );\n }\n return;\n }\n this._points[key] = timestamp;\n if (extras) {\n this._pointExtras[key] = extras;\n }\n }\n\n removeExtra(key: string): ?ExtraValue {\n const value = this._extras[key];\n delete this._extras[key];\n return value;\n }\n\n setExtra(key: string, value: ExtraValue) {\n if (this._closed) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog('PerformanceLogger: setExtra - has closed ignoring: ', key);\n }\n return;\n }\n\n if (this._extras.hasOwnProperty(key)) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog(\n 'PerformanceLogger: Attempting to set an extra that already exists ',\n {key, currentValue: this._extras[key], attemptedValue: value},\n );\n }\n return;\n }\n this._extras[key] = value;\n }\n\n startTimespan(\n key: string,\n timestamp?: number = getCurrentTimestamp(),\n extras?: Extras,\n ) {\n if (this._closed) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog(\n 'PerformanceLogger: startTimespan - has closed ignoring: ',\n key,\n );\n }\n return;\n }\n\n if (this._timespans[key]) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog(\n 'PerformanceLogger: Attempting to start a timespan that already exists ',\n key,\n );\n }\n return;\n }\n\n this._timespans[key] = {\n startTime: timestamp,\n startExtras: extras,\n };\n _cookies[key] = Systrace.beginAsyncEvent(key);\n if (PRINT_TO_CONSOLE) {\n infoLog('PerformanceLogger.js', 'start: ' + key);\n }\n }\n\n stopTimespan(\n key: string,\n timestamp?: number = getCurrentTimestamp(),\n extras?: Extras,\n ) {\n if (this._closed) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog('PerformanceLogger: stopTimespan - has closed ignoring: ', key);\n }\n return;\n }\n\n const timespan = this._timespans[key];\n if (!timespan || timespan.startTime == null) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog(\n 'PerformanceLogger: Attempting to end a timespan that has not started ',\n key,\n );\n }\n return;\n }\n if (timespan.endTime != null) {\n if (PRINT_TO_CONSOLE && __DEV__) {\n infoLog(\n 'PerformanceLogger: Attempting to end a timespan that has already ended ',\n key,\n );\n }\n return;\n }\n\n timespan.endExtras = extras;\n timespan.endTime = timestamp;\n timespan.totalTime = timespan.endTime - (timespan.startTime || 0);\n if (PRINT_TO_CONSOLE) {\n infoLog('PerformanceLogger.js', 'end: ' + key);\n }\n\n if (_cookies[key] != null) {\n Systrace.endAsyncEvent(key, _cookies[key]);\n delete _cookies[key];\n }\n }\n}\n\n// Re-exporting for backwards compatibility with all the clients that\n// may still import it from this module.\nexport type {Extras, ExtraValue, IPerformanceLogger, Timespan};\n\n/**\n * This function creates performance loggers that can be used to collect and log\n * various performance data such as timespans, points and extras.\n * The loggers need to have minimal overhead since they're used in production.\n */\nexport default function createPerformanceLogger(): IPerformanceLogger {\n return new PerformanceLogger();\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\n/**\n * Intentional info-level logging for clear separation from ad-hoc console debug logging.\n */\nfunction infoLog(...args: Array): void {\n return console.log(...args);\n}\n\nmodule.exports = infoLog;\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {RequestBody} from './convertRequestBody';\nimport type {NativeResponseType} from './XMLHttpRequest';\n\n// Do not require the native RCTNetworking module directly! Use this wrapper module instead.\n// It will add the necessary requestId, so that you don't have to generate it yourself.\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport Platform from '../Utilities/Platform';\nimport convertRequestBody from './convertRequestBody';\nimport NativeNetworkingAndroid from './NativeNetworkingAndroid';\n\ntype Header = [string, string];\n\n// Convert FormData headers to arrays, which are easier to consume in\n// native on Android.\nfunction convertHeadersMapToArray(headers: Object): Array
{\n const headerArray: Array
= [];\n for (const name in headers) {\n headerArray.push([name, headers[name]]);\n }\n return headerArray;\n}\n\nlet _requestId = 1;\nfunction generateRequestId(): number {\n return _requestId++;\n}\n\n/**\n * This class is a wrapper around the native RCTNetworking module. It adds a necessary unique\n * requestId to each network request that can be used to abort that request later on.\n */\n// FIXME: use typed events\nclass RCTNetworking extends NativeEventEmitter<$FlowFixMe> {\n constructor() {\n super(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeNetworkingAndroid,\n );\n }\n\n sendRequest(\n method: string,\n trackingName: string,\n url: string,\n headers: Object,\n data: RequestBody,\n responseType: NativeResponseType,\n incrementalUpdates: boolean,\n timeout: number,\n callback: (requestId: number) => mixed,\n withCredentials: boolean,\n ) {\n const body = convertRequestBody(data);\n if (body && body.formData) {\n body.formData = body.formData.map(part => ({\n ...part,\n headers: convertHeadersMapToArray(part.headers),\n }));\n }\n const requestId = generateRequestId();\n NativeNetworkingAndroid.sendRequest(\n method,\n url,\n requestId,\n convertHeadersMapToArray(headers),\n {...body, trackingName},\n responseType,\n incrementalUpdates,\n timeout,\n withCredentials,\n );\n callback(requestId);\n }\n\n abortRequest(requestId: number) {\n NativeNetworkingAndroid.abortRequest(requestId);\n }\n\n clearCookies(callback: (result: boolean) => any) {\n NativeNetworkingAndroid.clearCookies(callback);\n }\n}\n\nexport default (new RCTNetworking(): RCTNetworking);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport type {\n EventSubscription,\n IEventEmitter,\n} from '../vendor/emitter/EventEmitter';\n\nimport Platform from '../Utilities/Platform';\nimport RCTDeviceEventEmitter from './RCTDeviceEventEmitter';\nimport invariant from 'invariant';\n\ninterface NativeModule {\n addListener(eventType: string): void;\n removeListeners(count: number): void;\n}\n\nexport type {EventSubscription};\n\n/**\n * `NativeEventEmitter` is intended for use by Native Modules to emit events to\n * JavaScript listeners. If a `NativeModule` is supplied to the constructor, it\n * will be notified (via `addListener` and `removeListeners`) when the listener\n * count changes to manage \"native memory\".\n *\n * Currently, all native events are fired via a global `RCTDeviceEventEmitter`.\n * This means event names must be globally unique, and it means that call sites\n * can theoretically listen to `RCTDeviceEventEmitter` (although discouraged).\n */\nexport default class NativeEventEmitter\n implements IEventEmitter\n{\n _nativeModule: ?NativeModule;\n\n constructor(nativeModule: ?NativeModule) {\n if (Platform.OS === 'ios') {\n invariant(\n nativeModule != null,\n '`new NativeEventEmitter()` requires a non-null argument.',\n );\n }\n\n const hasAddListener =\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n !!nativeModule && typeof nativeModule.addListener === 'function';\n const hasRemoveListeners =\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n !!nativeModule && typeof nativeModule.removeListeners === 'function';\n\n if (nativeModule && hasAddListener && hasRemoveListeners) {\n this._nativeModule = nativeModule;\n } else if (nativeModule != null) {\n if (!hasAddListener) {\n console.warn(\n '`new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.',\n );\n }\n if (!hasRemoveListeners) {\n console.warn(\n '`new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.',\n );\n }\n }\n }\n\n addListener>(\n eventType: TEvent,\n listener: (...args: $ElementType) => mixed,\n context?: mixed,\n ): EventSubscription {\n this._nativeModule?.addListener(eventType);\n let subscription: ?EventSubscription = RCTDeviceEventEmitter.addListener(\n eventType,\n listener,\n context,\n );\n\n return {\n remove: () => {\n if (subscription != null) {\n this._nativeModule?.removeListeners(1);\n // $FlowFixMe[incompatible-use]\n subscription.remove();\n subscription = null;\n }\n },\n };\n }\n\n emit>(\n eventType: TEvent,\n ...args: $ElementType\n ): void {\n // Generally, `RCTDeviceEventEmitter` is directly invoked. But this is\n // included for completeness.\n RCTDeviceEventEmitter.emit(eventType, ...args);\n }\n\n removeAllListeners>(\n eventType?: ?TEvent,\n ): void {\n invariant(\n eventType != null,\n '`NativeEventEmitter.removeAllListener()` requires a non-null argument.',\n );\n this._nativeModule?.removeListeners(this.listenerCount(eventType));\n RCTDeviceEventEmitter.removeAllListeners(eventType);\n }\n\n listenerCount>(eventType: TEvent): number {\n return RCTDeviceEventEmitter.listenerCount(eventType);\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nconst Blob = require('../Blob/Blob');\nconst binaryToBase64 = require('../Utilities/binaryToBase64');\nconst FormData = require('./FormData');\n\nexport type RequestBody =\n | string\n | Blob\n | FormData\n | {uri: string, ...}\n | ArrayBuffer\n | $ArrayBufferView;\n\nfunction convertRequestBody(body: RequestBody): Object {\n if (typeof body === 'string') {\n return {string: body};\n }\n if (body instanceof Blob) {\n return {blob: body.data};\n }\n if (body instanceof FormData) {\n return {formData: body.getParts()};\n }\n if (body instanceof ArrayBuffer || ArrayBuffer.isView(body)) {\n /* $FlowFixMe[incompatible-call] : no way to assert that 'body' is indeed\n * an ArrayBufferView */\n return {base64: binaryToBase64(body)};\n }\n return body;\n}\n\nmodule.exports = convertRequestBody;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\ntype FormDataValue = string | {name?: string, type?: string, uri: string};\ntype FormDataNameValuePair = [string, FormDataValue];\n\ntype Headers = {[name: string]: string, ...};\ntype FormDataPart =\n | {\n string: string,\n headers: Headers,\n ...\n }\n | {\n uri: string,\n headers: Headers,\n name?: string,\n type?: string,\n ...\n };\n\n/**\n * Polyfill for XMLHttpRequest2 FormData API, allowing multipart POST requests\n * with mixed data (string, native files) to be submitted via XMLHttpRequest.\n *\n * Example:\n *\n * var photo = {\n * uri: uriFromCameraRoll,\n * type: 'image/jpeg',\n * name: 'photo.jpg',\n * };\n *\n * var body = new FormData();\n * body.append('authToken', 'secret');\n * body.append('photo', photo);\n * body.append('title', 'A beautiful photo!');\n *\n * xhr.open('POST', serverURL);\n * xhr.send(body);\n */\nclass FormData {\n _parts: Array;\n\n constructor() {\n this._parts = [];\n }\n\n append(key: string, value: FormDataValue) {\n // The XMLHttpRequest spec doesn't specify if duplicate keys are allowed.\n // MDN says that any new values should be appended to existing values.\n // In any case, major browsers allow duplicate keys, so that's what we'll do\n // too. They'll simply get appended as additional form data parts in the\n // request body, leaving the server to deal with them.\n this._parts.push([key, value]);\n }\n\n getAll(key: string): Array {\n return this._parts\n .filter(([name]) => name === key)\n .map(([, value]) => value);\n }\n\n getParts(): Array {\n return this._parts.map(([name, value]) => {\n const contentDisposition = 'form-data; name=\"' + name + '\"';\n\n const headers: Headers = {'content-disposition': contentDisposition};\n\n // The body part is a \"blob\", which in React Native just means\n // an object with a `uri` attribute. Optionally, it can also\n // have a `name` and `type` attribute to specify filename and\n // content type (cf. web Blob interface.)\n if (typeof value === 'object' && !Array.isArray(value) && value) {\n if (typeof value.name === 'string') {\n headers['content-disposition'] += `; filename=\"${\n value.name\n }\"; filename*=utf-8''${encodeURI(value.name)}`;\n }\n if (typeof value.type === 'string') {\n headers['content-type'] = value.type;\n }\n return {...value, headers, fieldName: name};\n }\n // Convert non-object values to strings as per FormData.append() spec\n return {string: String(value), headers, fieldName: name};\n });\n }\n}\n\nmodule.exports = FormData;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nconst base64 = require('base64-js');\n\nfunction binaryToBase64(data: ArrayBuffer | $ArrayBufferView): string {\n if (data instanceof ArrayBuffer) {\n // $FlowFixMe[reassign-const]\n data = new Uint8Array(data);\n }\n if (data instanceof Uint8Array) {\n return base64.fromByteArray(data);\n }\n if (!ArrayBuffer.isView(data)) {\n throw new Error('data must be ArrayBuffer or typed array');\n }\n // Already checked that `data` is `DataView` in `ArrayBuffer.isView(data)`\n const {buffer, byteOffset, byteLength}: DataView = (data: $FlowFixMe);\n return base64.fromByteArray(new Uint8Array(buffer, byteOffset, byteLength));\n}\n\nmodule.exports = binaryToBase64;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeNetworkingAndroid';\nimport NativeNetworkingAndroid from '../../src/private/specs/modules/NativeNetworkingAndroid';\nexport default NativeNetworkingAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\ntype Header = [string, string];\n\nexport interface Spec extends TurboModule {\n +sendRequest: (\n method: string,\n url: string,\n requestId: number,\n headers: Array
,\n data: Object,\n responseType: string,\n useIncrementalUpdates: boolean,\n timeout: number,\n withCredentials: boolean,\n ) => void;\n +abortRequest: (requestId: number) => void;\n +clearCookies: (callback: (result: boolean) => void) => void;\n\n // RCTEventEmitter\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('Networking'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n/* globals Headers, Request, Response */\n\n'use strict';\n\n// side-effectful require() to put fetch,\n// Headers, Request, Response in global scope\nrequire('whatwg-fetch');\n\nmodule.exports = {fetch, Headers, Request, Response};\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (factory((global.WHATWGFetch = {})));\n}(this, (function (exports) { 'use strict';\n\n /* eslint-disable no-prototype-builtins */\n var g =\n (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof self !== 'undefined' && self) ||\n // eslint-disable-next-line no-undef\n (typeof global !== 'undefined' && global) ||\n {};\n\n var support = {\n searchParams: 'URLSearchParams' in g,\n iterable: 'Symbol' in g && 'iterator' in Symbol,\n blob:\n 'FileReader' in g &&\n 'Blob' in g &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in g,\n arrayBuffer: 'ArrayBuffer' in g\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {\n throw new TypeError('Invalid character in header field name: \"' + name + '\"')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n if (header.length != 2) {\n throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)\n }\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body._noBody) return\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);\n var encoding = match ? match[1] : 'utf-8';\n reader.readAsText(blob, encoding);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n /*\n fetch-mock wraps the Response object in an ES6 Proxy to\n provide useful test harness features such as flush. However, on\n ES5 browsers without fetch or Proxy support pollyfills must be used;\n the proxy-pollyfill is unable to proxy an attribute unless it exists\n on the object before the Proxy is created. This change ensures\n Response.bodyUsed exists on the instance, while maintaining the\n semantic of setting Request.bodyUsed in the constructor before\n _initBody is called.\n */\n // eslint-disable-next-line no-self-assign\n this.bodyUsed = this.bodyUsed;\n this._bodyInit = body;\n if (!body) {\n this._noBody = true;\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n var isConsumed = consumed(this);\n if (isConsumed) {\n return isConsumed\n } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {\n return Promise.resolve(\n this._bodyArrayBuffer.buffer.slice(\n this._bodyArrayBuffer.byteOffset,\n this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength\n )\n )\n } else {\n return Promise.resolve(this._bodyArrayBuffer)\n }\n } else if (support.blob) {\n return this.blob().then(readBlobAsArrayBuffer)\n } else {\n throw new Error('could not read as ArrayBuffer')\n }\n };\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n if (!(this instanceof Request)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal || (function () {\n if ('AbortController' in g) {\n var ctrl = new AbortController();\n return ctrl.signal;\n }\n }());\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n\n if (this.method === 'GET' || this.method === 'HEAD') {\n if (options.cache === 'no-store' || options.cache === 'no-cache') {\n // Search for a '_' parameter in the query string\n var reParamSearch = /([?&])_=[^&]*/;\n if (reParamSearch.test(this.url)) {\n // If it already exists then set the value with the current time\n this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());\n } else {\n // Otherwise add a new '_' parameter to the end with the current time\n var reQueryString = /\\?/;\n this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();\n }\n }\n }\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill\n // https://github.com/github/fetch/issues/748\n // https://github.com/zloirock/core-js/issues/751\n preProcessedHeaders\n .split('\\r')\n .map(function(header) {\n return header.indexOf('\\n') === 0 ? header.substr(1, header.length) : header\n })\n .forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n try {\n headers.append(key, value);\n } catch (error) {\n console.warn('Response ' + error.message);\n }\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!(this instanceof Response)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n if (this.status < 200 || this.status > 599) {\n throw new RangeError(\"Failed to construct 'Response': The status provided (0) is outside the range [200, 599].\")\n }\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = options.statusText === undefined ? '' : '' + options.statusText;\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 200, statusText: ''});\n response.ok = false;\n response.status = 0;\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = g.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n // This check if specifically for when a user fetches a file locally from the file system\n // Only if the status is out of a normal range\n if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {\n options.status = 200;\n } else {\n options.status = xhr.status;\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n setTimeout(function() {\n resolve(new Response(body, options));\n }, 0);\n };\n\n xhr.onerror = function() {\n setTimeout(function() {\n reject(new TypeError('Network request failed'));\n }, 0);\n };\n\n xhr.ontimeout = function() {\n setTimeout(function() {\n reject(new TypeError('Network request timed out'));\n }, 0);\n };\n\n xhr.onabort = function() {\n setTimeout(function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n }, 0);\n };\n\n function fixUrl(url) {\n try {\n return url === '' && g.location.href ? g.location.href : url\n } catch (e) {\n return url\n }\n }\n\n xhr.open(request.method, fixUrl(request.url), true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr) {\n if (support.blob) {\n xhr.responseType = 'blob';\n } else if (\n support.arrayBuffer\n ) {\n xhr.responseType = 'arraybuffer';\n }\n }\n\n if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {\n var names = [];\n Object.getOwnPropertyNames(init.headers).forEach(function(name) {\n names.push(normalizeName(name));\n xhr.setRequestHeader(name, normalizeValue(init.headers[name]));\n });\n request.headers.forEach(function(value, name) {\n if (names.indexOf(name) === -1) {\n xhr.setRequestHeader(name, value);\n }\n });\n } else {\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n }\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!g.fetch) {\n g.fetch = fetch;\n g.Headers = Headers;\n g.Request = Request;\n g.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {BlobData} from '../Blob/BlobTypes';\nimport type {EventSubscription} from '../vendor/emitter/EventEmitter';\n\nimport Blob from '../Blob/Blob';\nimport BlobManager from '../Blob/BlobManager';\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport binaryToBase64 from '../Utilities/binaryToBase64';\nimport Platform from '../Utilities/Platform';\nimport NativeWebSocketModule from './NativeWebSocketModule';\nimport WebSocketEvent from './WebSocketEvent';\nimport base64 from 'base64-js';\nimport EventTarget from 'event-target-shim';\nimport invariant from 'invariant';\n\ntype ArrayBufferView =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Float32Array\n | Float64Array\n | DataView;\n\ntype BinaryType = 'blob' | 'arraybuffer';\n\nconst CONNECTING = 0;\nconst OPEN = 1;\nconst CLOSING = 2;\nconst CLOSED = 3;\n\nconst CLOSE_NORMAL = 1000;\n\n// Abnormal closure where no code is provided in a control frame\n// https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.5\nconst CLOSE_ABNORMAL = 1006;\n\nconst WEBSOCKET_EVENTS = ['close', 'error', 'message', 'open'];\n\nlet nextWebSocketId = 0;\n\ntype WebSocketEventDefinitions = {\n websocketOpen: [{id: number, protocol: string}],\n websocketClosed: [{id: number, code: number, reason: string}],\n websocketMessage: [\n | {type: 'binary', id: number, data: string}\n | {type: 'text', id: number, data: string}\n | {type: 'blob', id: number, data: BlobData},\n ],\n websocketFailed: [{id: number, message: string}],\n};\n\n/**\n * Browser-compatible WebSockets implementation.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n * See https://github.com/websockets/ws\n */\nclass WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): any) {\n static CONNECTING: number = CONNECTING;\n static OPEN: number = OPEN;\n static CLOSING: number = CLOSING;\n static CLOSED: number = CLOSED;\n\n CONNECTING: number = CONNECTING;\n OPEN: number = OPEN;\n CLOSING: number = CLOSING;\n CLOSED: number = CLOSED;\n\n _socketId: number;\n _eventEmitter: NativeEventEmitter;\n _subscriptions: Array;\n _binaryType: ?BinaryType;\n\n onclose: ?Function;\n onerror: ?Function;\n onmessage: ?Function;\n onopen: ?Function;\n\n bufferedAmount: number;\n extension: ?string;\n protocol: ?string;\n readyState: number = CONNECTING;\n url: ?string;\n\n constructor(\n url: string,\n protocols: ?string | ?Array,\n options: ?{headers?: {origin?: string, ...}, ...},\n ) {\n super();\n this.url = url;\n if (typeof protocols === 'string') {\n protocols = [protocols];\n }\n\n const {headers = {}, ...unrecognized} = options || {};\n\n // Preserve deprecated backwards compatibility for the 'origin' option\n // $FlowFixMe[prop-missing]\n if (unrecognized && typeof unrecognized.origin === 'string') {\n console.warn(\n 'Specifying `origin` as a WebSocket connection option is deprecated. Include it under `headers` instead.',\n );\n /* $FlowFixMe[prop-missing] (>=0.54.0 site=react_native_fb,react_native_\n * oss) This comment suppresses an error found when Flow v0.54 was\n * deployed. To see the error delete this comment and run Flow. */\n headers.origin = unrecognized.origin;\n /* $FlowFixMe[prop-missing] (>=0.54.0 site=react_native_fb,react_native_\n * oss) This comment suppresses an error found when Flow v0.54 was\n * deployed. To see the error delete this comment and run Flow. */\n delete unrecognized.origin;\n }\n\n // Warn about and discard anything else\n if (Object.keys(unrecognized).length > 0) {\n console.warn(\n 'Unrecognized WebSocket connection option(s) `' +\n Object.keys(unrecognized).join('`, `') +\n '`. ' +\n 'Did you mean to put these under `headers`?',\n );\n }\n\n if (!Array.isArray(protocols)) {\n protocols = null;\n }\n\n this._eventEmitter = new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeWebSocketModule,\n );\n this._socketId = nextWebSocketId++;\n this._registerEvents();\n NativeWebSocketModule.connect(url, protocols, {headers}, this._socketId);\n }\n\n get binaryType(): ?BinaryType {\n return this._binaryType;\n }\n\n set binaryType(binaryType: BinaryType): void {\n if (binaryType !== 'blob' && binaryType !== 'arraybuffer') {\n throw new Error(\"binaryType must be either 'blob' or 'arraybuffer'\");\n }\n if (this._binaryType === 'blob' || binaryType === 'blob') {\n invariant(\n BlobManager.isAvailable,\n 'Native module BlobModule is required for blob support',\n );\n if (binaryType === 'blob') {\n BlobManager.addWebSocketHandler(this._socketId);\n } else {\n BlobManager.removeWebSocketHandler(this._socketId);\n }\n }\n this._binaryType = binaryType;\n }\n\n close(code?: number, reason?: string): void {\n if (this.readyState === this.CLOSING || this.readyState === this.CLOSED) {\n return;\n }\n\n this.readyState = this.CLOSING;\n this._close(code, reason);\n }\n\n send(data: string | ArrayBuffer | ArrayBufferView | Blob): void {\n if (this.readyState === this.CONNECTING) {\n throw new Error('INVALID_STATE_ERR');\n }\n\n if (data instanceof Blob) {\n invariant(\n BlobManager.isAvailable,\n 'Native module BlobModule is required for blob support',\n );\n BlobManager.sendOverSocket(data, this._socketId);\n return;\n }\n\n if (typeof data === 'string') {\n NativeWebSocketModule.send(data, this._socketId);\n return;\n }\n\n if (data instanceof ArrayBuffer || ArrayBuffer.isView(data)) {\n NativeWebSocketModule.sendBinary(binaryToBase64(data), this._socketId);\n return;\n }\n\n throw new Error('Unsupported data type');\n }\n\n ping(): void {\n if (this.readyState === this.CONNECTING) {\n throw new Error('INVALID_STATE_ERR');\n }\n\n NativeWebSocketModule.ping(this._socketId);\n }\n\n _close(code?: number, reason?: string): void {\n // See https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent\n const statusCode = typeof code === 'number' ? code : CLOSE_NORMAL;\n const closeReason = typeof reason === 'string' ? reason : '';\n NativeWebSocketModule.close(statusCode, closeReason, this._socketId);\n\n if (BlobManager.isAvailable && this._binaryType === 'blob') {\n BlobManager.removeWebSocketHandler(this._socketId);\n }\n }\n\n _unregisterEvents(): void {\n this._subscriptions.forEach(e => e.remove());\n this._subscriptions = [];\n }\n\n _registerEvents(): void {\n this._subscriptions = [\n this._eventEmitter.addListener('websocketMessage', ev => {\n if (ev.id !== this._socketId) {\n return;\n }\n let data: Blob | BlobData | ArrayBuffer | string = ev.data;\n switch (ev.type) {\n case 'binary':\n data = base64.toByteArray(ev.data).buffer;\n break;\n case 'blob':\n data = BlobManager.createFromOptions(ev.data);\n break;\n }\n this.dispatchEvent(new WebSocketEvent('message', {data}));\n }),\n this._eventEmitter.addListener('websocketOpen', ev => {\n if (ev.id !== this._socketId) {\n return;\n }\n this.readyState = this.OPEN;\n this.protocol = ev.protocol;\n this.dispatchEvent(new WebSocketEvent('open'));\n }),\n this._eventEmitter.addListener('websocketClosed', ev => {\n if (ev.id !== this._socketId) {\n return;\n }\n this.readyState = this.CLOSED;\n this.dispatchEvent(\n new WebSocketEvent('close', {\n code: ev.code,\n reason: ev.reason,\n // TODO: missing `wasClean` (exposed on iOS as `clean` but missing on Android)\n }),\n );\n this._unregisterEvents();\n this.close();\n }),\n this._eventEmitter.addListener('websocketFailed', ev => {\n if (ev.id !== this._socketId) {\n return;\n }\n this.readyState = this.CLOSED;\n this.dispatchEvent(\n new WebSocketEvent('error', {\n message: ev.message,\n }),\n );\n this.dispatchEvent(\n new WebSocketEvent('close', {\n code: CLOSE_ABNORMAL,\n reason: ev.message,\n // TODO: Expose `wasClean`\n }),\n );\n this._unregisterEvents();\n this.close();\n }),\n ];\n }\n}\n\nmodule.exports = WebSocket;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeWebSocketModule';\nimport NativeWebSocketModule from '../../src/private/specs/modules/NativeWebSocketModule';\nexport default NativeWebSocketModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +connect: (\n url: string,\n protocols: ?Array,\n options: {|headers?: Object|},\n socketID: number,\n ) => void;\n +send: (message: string, forSocketID: number) => void;\n +sendBinary: (base64String: string, forSocketID: number) => void;\n +ping: (socketID: number) => void;\n +close: (code: number, reason: string, socketID: number) => void;\n\n // RCTEventEmitter\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing(\n 'WebSocketModule',\n): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\n'use strict';\n\n/**\n * Event object passed to the `onopen`, `onclose`, `onmessage`, `onerror`\n * callbacks of `WebSocket`.\n *\n * The `type` property is \"open\", \"close\", \"message\", \"error\" respectively.\n *\n * In case of \"message\", the `data` property contains the incoming data.\n */\nclass WebSocketEvent {\n constructor(type, eventInitDict) {\n this.type = type.toString();\n Object.assign(this, eventInitDict);\n }\n}\n\nmodule.exports = WebSocketEvent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {BlobOptions} from './BlobTypes';\n\nconst Blob = require('./Blob');\nconst invariant = require('invariant');\n\n/**\n * The File interface provides information about files.\n */\nclass File extends Blob {\n /**\n * Constructor for JS consumers.\n */\n constructor(\n parts: Array,\n name: string,\n options?: BlobOptions,\n ) {\n invariant(\n parts != null && name != null,\n 'Failed to construct `File`: Must pass both `parts` and `name` arguments.',\n );\n\n super(parts, options);\n this.data.name = name;\n }\n\n /**\n * Name of the file.\n */\n get name(): string {\n invariant(this.data.name != null, 'Files must have a name set.');\n return this.data.name;\n }\n\n /*\n * Last modified time of the file.\n */\n get lastModified(): number {\n return this.data.lastModified || 0;\n }\n}\n\nmodule.exports = File;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type Blob from './Blob';\n\nimport NativeFileReaderModule from './NativeFileReaderModule';\nimport {toByteArray} from 'base64-js';\nimport EventTarget from 'event-target-shim';\n\ntype ReadyState =\n | 0 // EMPTY\n | 1 // LOADING\n | 2; // DONE\n\ntype ReaderResult = string | ArrayBuffer;\n\nconst READER_EVENTS = [\n 'abort',\n 'error',\n 'load',\n 'loadstart',\n 'loadend',\n 'progress',\n];\n\nconst EMPTY = 0;\nconst LOADING = 1;\nconst DONE = 2;\n\nclass FileReader extends (EventTarget(...READER_EVENTS): any) {\n static EMPTY: number = EMPTY;\n static LOADING: number = LOADING;\n static DONE: number = DONE;\n\n EMPTY: number = EMPTY;\n LOADING: number = LOADING;\n DONE: number = DONE;\n\n _readyState: ReadyState;\n _error: ?Error;\n _result: ?ReaderResult;\n _aborted: boolean = false;\n\n constructor() {\n super();\n this._reset();\n }\n\n _reset(): void {\n this._readyState = EMPTY;\n this._error = null;\n this._result = null;\n }\n\n _setReadyState(newState: ReadyState) {\n this._readyState = newState;\n this.dispatchEvent({type: 'readystatechange'});\n if (newState === DONE) {\n if (this._aborted) {\n this.dispatchEvent({type: 'abort'});\n } else if (this._error) {\n this.dispatchEvent({type: 'error'});\n } else {\n this.dispatchEvent({type: 'load'});\n }\n this.dispatchEvent({type: 'loadend'});\n }\n }\n\n readAsArrayBuffer(blob: ?Blob): void {\n this._aborted = false;\n\n if (blob == null) {\n throw new TypeError(\n \"Failed to execute 'readAsArrayBuffer' on 'FileReader': parameter 1 is not of type 'Blob'\",\n );\n }\n\n NativeFileReaderModule.readAsDataURL(blob.data).then(\n (text: string) => {\n if (this._aborted) {\n return;\n }\n\n const base64 = text.split(',')[1];\n const typedArray = toByteArray(base64);\n\n this._result = typedArray.buffer;\n this._setReadyState(DONE);\n },\n error => {\n if (this._aborted) {\n return;\n }\n this._error = error;\n this._setReadyState(DONE);\n },\n );\n }\n\n readAsDataURL(blob: ?Blob): void {\n this._aborted = false;\n\n if (blob == null) {\n throw new TypeError(\n \"Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'\",\n );\n }\n\n NativeFileReaderModule.readAsDataURL(blob.data).then(\n (text: string) => {\n if (this._aborted) {\n return;\n }\n this._result = text;\n this._setReadyState(DONE);\n },\n error => {\n if (this._aborted) {\n return;\n }\n this._error = error;\n this._setReadyState(DONE);\n },\n );\n }\n\n readAsText(blob: ?Blob, encoding: string = 'UTF-8'): void {\n this._aborted = false;\n\n if (blob == null) {\n throw new TypeError(\n \"Failed to execute 'readAsText' on 'FileReader': parameter 1 is not of type 'Blob'\",\n );\n }\n\n NativeFileReaderModule.readAsText(blob.data, encoding).then(\n (text: string) => {\n if (this._aborted) {\n return;\n }\n this._result = text;\n this._setReadyState(DONE);\n },\n error => {\n if (this._aborted) {\n return;\n }\n this._error = error;\n this._setReadyState(DONE);\n },\n );\n }\n\n abort() {\n this._aborted = true;\n // only call onreadystatechange if there is something to abort, as per spec\n if (this._readyState !== EMPTY && this._readyState !== DONE) {\n this._reset();\n this._setReadyState(DONE);\n }\n // Reset again after, in case modified in handler\n this._reset();\n }\n\n get readyState(): ReadyState {\n return this._readyState;\n }\n\n get error(): ?Error {\n return this._error;\n }\n\n get result(): ?ReaderResult {\n return this._result;\n }\n}\n\nmodule.exports = FileReader;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeFileReaderModule';\nimport NativeFileReaderModule from '../../src/private/specs/modules/NativeFileReaderModule';\nexport default NativeFileReaderModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +readAsDataURL: (data: Object) => Promise;\n +readAsText: (data: Object, encoding: string) => Promise;\n}\n\nexport default (TurboModuleRegistry.getEnforcing(\n 'FileReaderModule',\n): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type Blob from './Blob';\n\nimport NativeBlobModule from './NativeBlobModule';\n\nlet BLOB_URL_PREFIX = null;\n\nif (\n NativeBlobModule &&\n typeof NativeBlobModule.getConstants().BLOB_URI_SCHEME === 'string'\n) {\n const constants = NativeBlobModule.getConstants();\n // $FlowFixMe[incompatible-type] asserted above\n // $FlowFixMe[unsafe-addition]\n BLOB_URL_PREFIX = constants.BLOB_URI_SCHEME + ':';\n if (typeof constants.BLOB_URI_HOST === 'string') {\n BLOB_URL_PREFIX += `//${constants.BLOB_URI_HOST}/`;\n }\n}\n\n/**\n * To allow Blobs be accessed via `content://` URIs,\n * you need to register `BlobProvider` as a ContentProvider in your app's `AndroidManifest.xml`:\n *\n * ```xml\n * \n * \n * \n * \n * \n * ```\n * And then define the `blob_provider_authority` string in `res/values/strings.xml`.\n * Use a dotted name that's entirely unique to your app:\n *\n * ```xml\n * \n * your.app.package.blobs\n * \n * ```\n */\n\n// Small subset from whatwg-url: https://github.com/jsdom/whatwg-url/tree/master/src\n// The reference code bloat comes from Unicode issues with URLs, so those won't work here.\nexport class URLSearchParams {\n _searchParams: Array> = [];\n\n constructor(params: any) {\n if (typeof params === 'object') {\n Object.keys(params).forEach(key => this.append(key, params[key]));\n }\n }\n\n append(key: string, value: string): void {\n this._searchParams.push([key, value]);\n }\n\n delete(name: string): void {\n throw new Error('URLSearchParams.delete is not implemented');\n }\n\n get(name: string): void {\n throw new Error('URLSearchParams.get is not implemented');\n }\n\n getAll(name: string): void {\n throw new Error('URLSearchParams.getAll is not implemented');\n }\n\n has(name: string): void {\n throw new Error('URLSearchParams.has is not implemented');\n }\n\n set(name: string, value: string): void {\n throw new Error('URLSearchParams.set is not implemented');\n }\n\n sort(): void {\n throw new Error('URLSearchParams.sort is not implemented');\n }\n\n // $FlowFixMe[unsupported-syntax]\n // $FlowFixMe[missing-local-annot]\n [Symbol.iterator]() {\n return this._searchParams[Symbol.iterator]();\n }\n\n toString(): string {\n if (this._searchParams.length === 0) {\n return '';\n }\n const last = this._searchParams.length - 1;\n return this._searchParams.reduce((acc, curr, index) => {\n return (\n acc +\n encodeURIComponent(curr[0]) +\n '=' +\n encodeURIComponent(curr[1]) +\n (index === last ? '' : '&')\n );\n }, '');\n }\n}\n\nfunction validateBaseUrl(url: string) {\n // from this MIT-licensed gist: https://gist.github.com/dperini/729294\n return /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)*(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?$/.test(\n url,\n );\n}\n\nexport class URL {\n _url: string;\n _searchParamsInstance: ?URLSearchParams = null;\n\n static createObjectURL(blob: Blob): string {\n if (BLOB_URL_PREFIX === null) {\n throw new Error('Cannot create URL for blob!');\n }\n return `${BLOB_URL_PREFIX}${blob.data.blobId}?offset=${blob.data.offset}&size=${blob.size}`;\n }\n\n static revokeObjectURL(url: string) {\n // Do nothing.\n }\n\n // $FlowFixMe[missing-local-annot]\n constructor(url: string, base: string | URL) {\n let baseUrl = null;\n if (!base || validateBaseUrl(url)) {\n this._url = url;\n if (!this._url.endsWith('/')) {\n this._url += '/';\n }\n } else {\n if (typeof base === 'string') {\n baseUrl = base;\n if (!validateBaseUrl(baseUrl)) {\n throw new TypeError(`Invalid base URL: ${baseUrl}`);\n }\n } else {\n baseUrl = base.toString();\n }\n if (baseUrl.endsWith('/')) {\n baseUrl = baseUrl.slice(0, baseUrl.length - 1);\n }\n if (!url.startsWith('/')) {\n url = `/${url}`;\n }\n if (baseUrl.endsWith(url)) {\n url = '';\n }\n this._url = `${baseUrl}${url}`;\n }\n }\n\n get hash(): string {\n throw new Error('URL.hash is not implemented');\n }\n\n get host(): string {\n throw new Error('URL.host is not implemented');\n }\n\n get hostname(): string {\n throw new Error('URL.hostname is not implemented');\n }\n\n get href(): string {\n return this.toString();\n }\n\n get origin(): string {\n throw new Error('URL.origin is not implemented');\n }\n\n get password(): string {\n throw new Error('URL.password is not implemented');\n }\n\n get pathname(): string {\n throw new Error('URL.pathname not implemented');\n }\n\n get port(): string {\n throw new Error('URL.port is not implemented');\n }\n\n get protocol(): string {\n throw new Error('URL.protocol is not implemented');\n }\n\n get search(): string {\n throw new Error('URL.search is not implemented');\n }\n\n get searchParams(): URLSearchParams {\n if (this._searchParamsInstance == null) {\n this._searchParamsInstance = new URLSearchParams();\n }\n return this._searchParamsInstance;\n }\n\n toJSON(): string {\n return this.toString();\n }\n\n toString(): string {\n if (this._searchParamsInstance === null) {\n return this._url;\n }\n // $FlowFixMe[incompatible-use]\n const instanceString = this._searchParamsInstance.toString();\n const separator = this._url.indexOf('?') > -1 ? '&' : '?';\n return this._url + separator + instanceString;\n }\n\n get username(): string {\n throw new Error('URL.username is not implemented');\n }\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar eventTargetShim = require('event-target-shim');\n\n/**\n * The signal class.\n * @see https://dom.spec.whatwg.org/#abortsignal\n */\nclass AbortSignal extends eventTargetShim.EventTarget {\n /**\n * AbortSignal cannot be constructed directly.\n */\n constructor() {\n super();\n throw new TypeError(\"AbortSignal cannot be constructed directly\");\n }\n /**\n * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.\n */\n get aborted() {\n const aborted = abortedFlags.get(this);\n if (typeof aborted !== \"boolean\") {\n throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? \"null\" : typeof this}`);\n }\n return aborted;\n }\n}\neventTargetShim.defineEventAttribute(AbortSignal.prototype, \"abort\");\n/**\n * Create an AbortSignal object.\n */\nfunction createAbortSignal() {\n const signal = Object.create(AbortSignal.prototype);\n eventTargetShim.EventTarget.call(signal);\n abortedFlags.set(signal, false);\n return signal;\n}\n/**\n * Abort a given signal.\n */\nfunction abortSignal(signal) {\n if (abortedFlags.get(signal) !== false) {\n return;\n }\n abortedFlags.set(signal, true);\n signal.dispatchEvent({ type: \"abort\" });\n}\n/**\n * Aborted flag for each instances.\n */\nconst abortedFlags = new WeakMap();\n// Properties should be enumerable.\nObject.defineProperties(AbortSignal.prototype, {\n aborted: { enumerable: true },\n});\n// `toString()` should return `\"[object AbortSignal]\"`\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortSignal\",\n });\n}\n\n/**\n * The AbortController.\n * @see https://dom.spec.whatwg.org/#abortcontroller\n */\nclass AbortController {\n /**\n * Initialize this controller.\n */\n constructor() {\n signals.set(this, createAbortSignal());\n }\n /**\n * Returns the `AbortSignal` object associated with this object.\n */\n get signal() {\n return getSignal(this);\n }\n /**\n * Abort and signal to any observers that the associated activity is to be aborted.\n */\n abort() {\n abortSignal(getSignal(this));\n }\n}\n/**\n * Associated signals.\n */\nconst signals = new WeakMap();\n/**\n * Get the associated signal of a given controller.\n */\nfunction getSignal(controller) {\n const signal = signals.get(controller);\n if (signal == null) {\n throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? \"null\" : typeof controller}`);\n }\n return signal;\n}\n// Properties should be enumerable.\nObject.defineProperties(AbortController.prototype, {\n signal: { enumerable: true },\n abort: { enumerable: true },\n});\nif (typeof Symbol === \"function\" && typeof Symbol.toStringTag === \"symbol\") {\n Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {\n configurable: true,\n value: \"AbortController\",\n });\n}\n\nexports.AbortController = AbortController;\nexports.AbortSignal = AbortSignal;\nexports.default = AbortController;\n\nmodule.exports = AbortController\nmodule.exports.AbortController = module.exports[\"default\"] = AbortController\nmodule.exports.AbortSignal = AbortSignal\n//# sourceMappingURL=abort-controller.js.map\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\n/**\n * Set up alert().\n * You can use this module directly, or just require InitializeCore.\n */\nif (!global.alert) {\n global.alert = function (text: string) {\n // Require Alert on demand. Requiring it too early can lead to issues\n // with things like Platform not being fully initialized.\n require('../Alert/Alert').alert('Alert', '' + text);\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {DialogOptions} from '../NativeModules/specs/NativeDialogManagerAndroid';\n\nimport Platform from '../Utilities/Platform';\nimport RCTAlertManager from './RCTAlertManager';\n\nexport type AlertType =\n | 'default'\n | 'plain-text'\n | 'secure-text'\n | 'login-password';\nexport type AlertButtonStyle = 'default' | 'cancel' | 'destructive';\nexport type Buttons = Array<{\n text?: string,\n onPress?: ?Function,\n isPreferred?: boolean,\n style?: AlertButtonStyle,\n ...\n}>;\n\ntype Options = {\n cancelable?: ?boolean,\n userInterfaceStyle?: 'unspecified' | 'light' | 'dark',\n onDismiss?: ?() => void,\n ...\n};\n\n/**\n * Launches an alert dialog with the specified title and message.\n *\n * See https://reactnative.dev/docs/alert\n */\nclass Alert {\n static alert(\n title: ?string,\n message?: ?string,\n buttons?: Buttons,\n options?: Options,\n ): void {\n if (Platform.OS === 'ios') {\n Alert.prompt(\n title,\n message,\n buttons,\n 'default',\n undefined,\n undefined,\n options,\n );\n } else if (Platform.OS === 'android') {\n const NativeDialogManagerAndroid =\n require('../NativeModules/specs/NativeDialogManagerAndroid').default;\n if (!NativeDialogManagerAndroid) {\n return;\n }\n const constants = NativeDialogManagerAndroid.getConstants();\n\n const config: DialogOptions = {\n title: title || '',\n message: message || '',\n cancelable: false,\n };\n\n if (options && options.cancelable) {\n config.cancelable = options.cancelable;\n }\n // At most three buttons (neutral, negative, positive). Ignore rest.\n // The text 'OK' should be probably localized. iOS Alert does that in native.\n const defaultPositiveText = 'OK';\n const validButtons: Buttons = buttons\n ? buttons.slice(0, 3)\n : [{text: defaultPositiveText}];\n const buttonPositive = validButtons.pop();\n const buttonNegative = validButtons.pop();\n const buttonNeutral = validButtons.pop();\n\n if (buttonNeutral) {\n config.buttonNeutral = buttonNeutral.text || '';\n }\n if (buttonNegative) {\n config.buttonNegative = buttonNegative.text || '';\n }\n if (buttonPositive) {\n config.buttonPositive = buttonPositive.text || defaultPositiveText;\n }\n\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n const onAction = (action, buttonKey) => {\n if (action === constants.buttonClicked) {\n if (buttonKey === constants.buttonNeutral) {\n buttonNeutral.onPress && buttonNeutral.onPress();\n } else if (buttonKey === constants.buttonNegative) {\n buttonNegative.onPress && buttonNegative.onPress();\n } else if (buttonKey === constants.buttonPositive) {\n buttonPositive.onPress && buttonPositive.onPress();\n }\n } else if (action === constants.dismissed) {\n options && options.onDismiss && options.onDismiss();\n }\n };\n const onError = (errorMessage: string) => console.warn(errorMessage);\n NativeDialogManagerAndroid.showAlert(config, onError, onAction);\n }\n }\n\n static prompt(\n title: ?string,\n message?: ?string,\n callbackOrButtons?: ?(((text: string) => void) | Buttons),\n type?: ?AlertType = 'plain-text',\n defaultValue?: string,\n keyboardType?: string,\n options?: Options,\n ): void {\n if (Platform.OS === 'ios') {\n let callbacks: Array = [];\n const buttons = [];\n let cancelButtonKey;\n let destructiveButtonKey;\n let preferredButtonKey;\n if (typeof callbackOrButtons === 'function') {\n callbacks = [callbackOrButtons];\n } else if (Array.isArray(callbackOrButtons)) {\n callbackOrButtons.forEach((btn, index) => {\n callbacks[index] = btn.onPress;\n if (btn.style === 'cancel') {\n cancelButtonKey = String(index);\n } else if (btn.style === 'destructive') {\n destructiveButtonKey = String(index);\n }\n if (btn.isPreferred) {\n preferredButtonKey = String(index);\n }\n if (btn.text || index < (callbackOrButtons || []).length - 1) {\n const btnDef: {[number]: string} = {};\n btnDef[index] = btn.text || '';\n buttons.push(btnDef);\n }\n });\n }\n\n RCTAlertManager.alertWithArgs(\n {\n title: title || '',\n message: message || undefined,\n buttons,\n type: type || undefined,\n defaultValue,\n cancelButtonKey,\n destructiveButtonKey,\n preferredButtonKey,\n keyboardType,\n userInterfaceStyle: options?.userInterfaceStyle || undefined,\n },\n (id, value) => {\n const cb = callbacks[id];\n cb && cb(value);\n },\n );\n }\n }\n}\n\nmodule.exports = Alert;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nimport NativeDialogManagerAndroid from '../NativeModules/specs/NativeDialogManagerAndroid';\n\nfunction emptyCallback() {}\n\nmodule.exports = {\n alertWithArgs: function (args, callback) {\n // TODO(5998984): Polyfill it correctly with DialogManagerAndroid\n if (!NativeDialogManagerAndroid) {\n return;\n }\n\n NativeDialogManagerAndroid.showAlert(\n args,\n emptyCallback,\n callback || emptyCallback,\n );\n },\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeDialogManagerAndroid';\nimport NativeDialogManagerAndroid from '../../../src/private/specs/modules/NativeDialogManagerAndroid';\nexport default NativeDialogManagerAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\n/* 'buttonClicked' | 'dismissed' */\ntype DialogAction = string;\n/*\n buttonPositive = -1,\n buttonNegative = -2,\n buttonNeutral = -3\n*/\ntype DialogButtonKey = number;\nexport type DialogOptions = {|\n title?: string,\n message?: string,\n buttonPositive?: string,\n buttonNegative?: string,\n buttonNeutral?: string,\n items?: Array,\n cancelable?: boolean,\n|};\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {|\n +buttonClicked: DialogAction,\n +dismissed: DialogAction,\n +buttonPositive: DialogButtonKey,\n +buttonNegative: DialogButtonKey,\n +buttonNeutral: DialogButtonKey,\n |};\n +showAlert: (\n config: DialogOptions,\n onError: (error: string) => void,\n onAction: (action: DialogAction, buttonKey?: DialogButtonKey) => void,\n ) => void;\n}\n\nexport default (TurboModuleRegistry.get('DialogManagerAndroid'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nconst {polyfillObjectProperty} = require('../Utilities/PolyfillFunctions');\n\nconst navigator = global.navigator;\nif (navigator === undefined) {\n // $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it.\n global.navigator = {product: 'ReactNative'};\n} else {\n // see https://github.com/facebook/react-native/issues/10881\n polyfillObjectProperty(navigator, 'product', () => 'ReactNative');\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nlet registerModule;\nif (global.RN$Bridgeless === true && global.RN$registerCallableModule) {\n registerModule = global.RN$registerCallableModule;\n} else {\n const BatchedBridge = require('../BatchedBridge/BatchedBridge');\n registerModule = (\n moduleName:\n | $TEMPORARY$string<'GlobalPerformanceLogger'>\n | $TEMPORARY$string<'HMRClient'>\n | $TEMPORARY$string<'HeapCapture'>\n | $TEMPORARY$string<'JSTimers'>\n | $TEMPORARY$string<'RCTDeviceEventEmitter'>\n | $TEMPORARY$string<'RCTLog'>\n | $TEMPORARY$string<'RCTNativeAppEventEmitter'>\n | $TEMPORARY$string<'SamplingProfiler'>\n | $TEMPORARY$string<'Systrace'>,\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n factory,\n ) => BatchedBridge.registerLazyCallableModule(moduleName, factory);\n}\n\nregisterModule('Systrace', () => require('../Performance/Systrace'));\nif (!(global.RN$Bridgeless === true)) {\n registerModule('JSTimers', () => require('./Timers/JSTimers'));\n}\nregisterModule('HeapCapture', () => require('../HeapCapture/HeapCapture'));\nregisterModule('SamplingProfiler', () =>\n require('../Performance/SamplingProfiler'),\n);\nregisterModule('RCTLog', () => require('../Utilities/RCTLog'));\nregisterModule(\n 'RCTDeviceEventEmitter',\n () => require('../EventEmitter/RCTDeviceEventEmitter').default,\n);\nregisterModule('RCTNativeAppEventEmitter', () =>\n require('../EventEmitter/RCTNativeAppEventEmitter'),\n);\nregisterModule('GlobalPerformanceLogger', () =>\n require('../Utilities/GlobalPerformanceLogger'),\n);\n\nif (__DEV__) {\n registerModule('HMRClient', () => require('../Utilities/HMRClient'));\n} else {\n registerModule('HMRClient', () => require('../Utilities/HMRClientProdShim'));\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport NativeJSCHeapCapture from './NativeJSCHeapCapture';\n\nconst HeapCapture = {\n captureHeap: function (path: string) {\n let error = null;\n try {\n global.nativeCaptureHeap(path);\n console.log('HeapCapture.captureHeap succeeded: ' + path);\n } catch (e) {\n console.log('HeapCapture.captureHeap error: ' + e.toString());\n error = e.toString();\n }\n if (NativeJSCHeapCapture) {\n NativeJSCHeapCapture.captureComplete(path, error);\n }\n },\n};\n\nmodule.exports = HeapCapture;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeJSCHeapCapture';\nimport NativeJSCHeapCapture from '../../src/private/specs/modules/NativeJSCHeapCapture';\nexport default NativeJSCHeapCapture;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +captureComplete: (path: string, error: ?string) => void;\n}\n\nexport default (TurboModuleRegistry.get('JSCHeapCapture'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nconst SamplingProfiler = {\n poke: function (token: number): void {\n let error = null;\n let result = null;\n try {\n result = global.pokeSamplingProfiler();\n if (result === null) {\n console.log('The JSC Sampling Profiler has started');\n } else {\n console.log('The JSC Sampling Profiler has stopped');\n }\n } catch (e) {\n console.log(\n 'Error occurred when restarting Sampling Profiler: ' + e.toString(),\n );\n error = e.toString();\n }\n\n const NativeJSCSamplingProfiler =\n require('./NativeJSCSamplingProfiler').default;\n if (NativeJSCSamplingProfiler) {\n NativeJSCSamplingProfiler.operationComplete(token, result, error);\n }\n },\n};\n\nmodule.exports = SamplingProfiler;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeJSCSamplingProfiler';\nimport NativeJSCSamplingProfiler from '../../src/private/specs/modules/NativeJSCSamplingProfiler';\nexport default NativeJSCSamplingProfiler;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +operationComplete: (token: number, result: ?string, error: ?string) => void;\n}\n\nexport default (TurboModuleRegistry.get('JSCSamplingProfiler'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nconst invariant = require('invariant');\n\nconst levelsMap = {\n log: 'log',\n info: 'info',\n warn: 'warn',\n error: 'error',\n fatal: 'error',\n};\n\nlet warningHandler: ?(...Array) => void = null;\n\nconst RCTLog = {\n // level one of log, info, warn, error, mustfix\n logIfNoNativeHook(level: string, ...args: Array): void {\n // We already printed in the native console, so only log here if using a js debugger\n if (typeof global.nativeLoggingHook === 'undefined') {\n RCTLog.logToConsole(level, ...args);\n } else {\n // Report native warnings to LogBox\n if (warningHandler && level === 'warn') {\n warningHandler(...args);\n }\n }\n },\n\n // Log to console regardless of nativeLoggingHook\n logToConsole(level: string, ...args: Array): void {\n // $FlowFixMe[invalid-computed-prop]\n const logFn = levelsMap[level];\n invariant(\n logFn,\n 'Level \"' + level + '\" not one of ' + Object.keys(levelsMap).toString(),\n );\n\n console[logFn](...args);\n },\n\n setWarningHandler(handler: typeof warningHandler): void {\n warningHandler = handler;\n },\n};\n\nmodule.exports = RCTLog;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport RCTDeviceEventEmitter from './RCTDeviceEventEmitter';\n\n/**\n * Deprecated - subclass NativeEventEmitter to create granular event modules instead of\n * adding all event listeners directly to RCTNativeAppEventEmitter.\n */\nconst RCTNativeAppEventEmitter = RCTDeviceEventEmitter;\nmodule.exports = RCTNativeAppEventEmitter;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nimport type {HMRClientNativeInterface} from './HMRClient';\n\n// This shim ensures DEV binary builds don't crash in JS\n// when they're combined with a PROD JavaScript build.\nconst HMRClientProdShim: HMRClientNativeInterface = {\n setup() {},\n enable() {\n console.error(\n 'Fast Refresh is disabled in JavaScript bundles built in production mode. ' +\n 'Did you forget to run Metro?',\n );\n },\n disable() {},\n registerBundle() {},\n log() {},\n unstable_notifyFuseboxConsoleEnabled() {},\n};\n\nmodule.exports = HMRClientProdShim;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nexport type FetchSegmentFunction = typeof __fetchSegment;\n\n/**\n * Set up SegmentFetcher.\n * You can use this module directly, or just require InitializeCore.\n */\n\nfunction __fetchSegment(\n segmentId: number,\n options: $ReadOnly<{\n otaBuildNumber: ?string,\n requestedModuleName: string,\n segmentHash: string,\n }>,\n callback: (?Error) => void,\n) {\n const SegmentFetcher =\n require('./SegmentFetcher/NativeSegmentFetcher').default;\n SegmentFetcher.fetchSegment(\n segmentId,\n options,\n (\n errorObject: ?{\n message: string,\n code: string,\n ...\n },\n ) => {\n if (errorObject) {\n const error = new Error(errorObject.message);\n (error: any).code = errorObject.code; // flowlint-line unclear-type: off\n callback(error);\n }\n\n callback(null);\n },\n );\n}\n\nglobal.__fetchSegment = __fetchSegment;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeSegmentFetcher';\nimport NativeSegmentFetcher from '../../../src/private/specs/modules/NativeSegmentFetcher';\nexport default NativeSegmentFetcher;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +fetchSegment: (\n segmentId: number,\n options: Object, // flowlint-line unclear-type: off\n callback: (error: ?Object) => void, // flowlint-line unclear-type: off\n ) => void;\n +getSegment?: (\n segmentId: number,\n options: Object, // flowlint-line unclear-type: off\n callback: (error: ?Object, path: ?string) => void, // flowlint-line unclear-type: off\n ) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('SegmentFetcher'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {ViewStyleProp} from '../StyleSheet/StyleSheet';\nimport type {RootTag} from '../Types/RootTagTypes';\nimport type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';\nimport type {DisplayModeType} from './DisplayMode';\n\nimport BatchedBridge from '../BatchedBridge/BatchedBridge';\nimport BugReporting from '../BugReporting/BugReporting';\nimport createPerformanceLogger from '../Utilities/createPerformanceLogger';\nimport infoLog from '../Utilities/infoLog';\nimport SceneTracker from '../Utilities/SceneTracker';\nimport {coerceDisplayMode} from './DisplayMode';\nimport HeadlessJsTaskError from './HeadlessJsTaskError';\nimport NativeHeadlessJsTaskSupport from './NativeHeadlessJsTaskSupport';\nimport renderApplication from './renderApplication';\nimport {unmountComponentAtNodeAndRemoveContainer} from './RendererProxy';\nimport invariant from 'invariant';\n\ntype Task = (taskData: any) => Promise;\nexport type TaskProvider = () => Task;\ntype TaskCanceller = () => void;\ntype TaskCancelProvider = () => TaskCanceller;\n\nexport type ComponentProvider = () => React$ComponentType;\nexport type ComponentProviderInstrumentationHook = (\n component_: ComponentProvider,\n scopedPerformanceLogger: IPerformanceLogger,\n) => React$ComponentType;\nexport type AppConfig = {\n appKey: string,\n component?: ComponentProvider,\n run?: Runnable,\n section?: boolean,\n ...\n};\ntype AppParameters = {\n initialProps: $ReadOnly<{[string]: mixed, ...}>,\n rootTag: RootTag,\n fabric?: boolean,\n concurrentRoot?: boolean,\n};\nexport type Runnable = (\n appParameters: AppParameters,\n displayMode: DisplayModeType,\n) => void;\nexport type Runnables = {[appKey: string]: Runnable};\nexport type Registry = {\n sections: $ReadOnlyArray,\n runnables: Runnables,\n ...\n};\nexport type WrapperComponentProvider = (\n appParameters: Object,\n) => React$ComponentType;\nexport type RootViewStyleProvider = (appParameters: Object) => ViewStyleProp;\n\nconst runnables: Runnables = {};\nlet runCount = 1;\nconst sections: Runnables = {};\nconst taskProviders: Map = new Map();\nconst taskCancelProviders: Map = new Map();\nlet componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =\n (component: ComponentProvider) => component();\n\nlet wrapperComponentProvider: ?WrapperComponentProvider;\nlet rootViewStyleProvider: ?RootViewStyleProvider;\nlet showArchitectureIndicator = false;\n\n/**\n * `AppRegistry` is the JavaScript entry point to running all React Native apps.\n *\n * See https://reactnative.dev/docs/appregistry\n */\nconst AppRegistry = {\n setWrapperComponentProvider(provider: WrapperComponentProvider) {\n wrapperComponentProvider = provider;\n },\n\n setRootViewStyleProvider(provider: RootViewStyleProvider) {\n rootViewStyleProvider = provider;\n },\n\n enableArchitectureIndicator(enabled: boolean): void {\n showArchitectureIndicator = enabled;\n },\n\n registerConfig(config: Array): void {\n config.forEach(appConfig => {\n if (appConfig.run) {\n AppRegistry.registerRunnable(appConfig.appKey, appConfig.run);\n } else {\n invariant(\n appConfig.component != null,\n 'AppRegistry.registerConfig(...): Every config is expected to set ' +\n 'either `run` or `component`, but `%s` has neither.',\n appConfig.appKey,\n );\n AppRegistry.registerComponent(\n appConfig.appKey,\n appConfig.component,\n appConfig.section,\n );\n }\n });\n },\n\n /**\n * Registers an app's root component.\n *\n * See https://reactnative.dev/docs/appregistry#registercomponent\n */\n registerComponent(\n appKey: string,\n componentProvider: ComponentProvider,\n section?: boolean,\n ): string {\n const scopedPerformanceLogger = createPerformanceLogger();\n runnables[appKey] = (appParameters, displayMode) => {\n const concurrentRootEnabled = Boolean(\n appParameters.initialProps?.concurrentRoot ||\n appParameters.concurrentRoot,\n );\n renderApplication(\n componentProviderInstrumentationHook(\n componentProvider,\n scopedPerformanceLogger,\n ),\n appParameters.initialProps,\n appParameters.rootTag,\n wrapperComponentProvider && wrapperComponentProvider(appParameters),\n rootViewStyleProvider && rootViewStyleProvider(appParameters),\n appParameters.fabric,\n showArchitectureIndicator,\n scopedPerformanceLogger,\n appKey === 'LogBox', // is logbox\n appKey,\n displayMode,\n concurrentRootEnabled,\n );\n };\n if (section) {\n sections[appKey] = runnables[appKey];\n }\n return appKey;\n },\n\n registerRunnable(appKey: string, run: Runnable): string {\n runnables[appKey] = run;\n return appKey;\n },\n\n registerSection(appKey: string, component: ComponentProvider): void {\n AppRegistry.registerComponent(appKey, component, true);\n },\n\n getAppKeys(): $ReadOnlyArray {\n return Object.keys(runnables);\n },\n\n getSectionKeys(): $ReadOnlyArray {\n return Object.keys(sections);\n },\n\n getSections(): Runnables {\n return {\n ...sections,\n };\n },\n\n getRunnable(appKey: string): ?Runnable {\n return runnables[appKey];\n },\n\n getRegistry(): Registry {\n return {\n sections: AppRegistry.getSectionKeys(),\n runnables: {...runnables},\n };\n },\n\n setComponentProviderInstrumentationHook(\n hook: ComponentProviderInstrumentationHook,\n ) {\n componentProviderInstrumentationHook = hook;\n },\n\n /**\n * Loads the JavaScript bundle and runs the app.\n *\n * See https://reactnative.dev/docs/appregistry#runapplication\n */\n runApplication(\n appKey: string,\n appParameters: AppParameters,\n displayMode?: number,\n ): void {\n if (appKey !== 'LogBox') {\n const logParams = __DEV__ ? ` with ${JSON.stringify(appParameters)}` : '';\n const msg = `Running \"${appKey}\"${logParams}`;\n infoLog(msg);\n BugReporting.addSource(\n 'AppRegistry.runApplication' + runCount++,\n () => msg,\n );\n }\n invariant(\n runnables[appKey],\n `\"${appKey}\" has not been registered. This can happen if:\\n` +\n '* Metro (the local dev server) is run from the wrong folder. ' +\n 'Check if Metro is running, stop it and restart it in the current project.\\n' +\n \"* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.\",\n );\n\n SceneTracker.setActiveScene({name: appKey});\n runnables[appKey](appParameters, coerceDisplayMode(displayMode));\n },\n\n /**\n * Update initial props for a surface that's already rendered\n */\n setSurfaceProps(\n appKey: string,\n appParameters: Object,\n displayMode?: number,\n ): void {\n if (appKey !== 'LogBox') {\n const msg =\n 'Updating props for Surface \"' +\n appKey +\n '\" with ' +\n JSON.stringify(appParameters);\n infoLog(msg);\n BugReporting.addSource(\n 'AppRegistry.setSurfaceProps' + runCount++,\n () => msg,\n );\n }\n invariant(\n runnables[appKey],\n `\"${appKey}\" has not been registered. This can happen if:\\n` +\n '* Metro (the local dev server) is run from the wrong folder. ' +\n 'Check if Metro is running, stop it and restart it in the current project.\\n' +\n \"* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.\",\n );\n\n runnables[appKey](appParameters, coerceDisplayMode(displayMode));\n },\n\n /**\n * Stops an application when a view should be destroyed.\n *\n * See https://reactnative.dev/docs/appregistry#unmountapplicationcomponentatroottag\n */\n unmountApplicationComponentAtRootTag(rootTag: RootTag): void {\n unmountComponentAtNodeAndRemoveContainer(rootTag);\n },\n\n /**\n * Register a headless task. A headless task is a bit of code that runs without a UI.\n *\n * See https://reactnative.dev/docs/appregistry#registerheadlesstask\n */\n registerHeadlessTask(taskKey: string, taskProvider: TaskProvider): void {\n // $FlowFixMe[object-this-reference]\n this.registerCancellableHeadlessTask(taskKey, taskProvider, () => () => {\n /* Cancel is no-op */\n });\n },\n\n /**\n * Register a cancellable headless task. A headless task is a bit of code that runs without a UI.\n *\n * See https://reactnative.dev/docs/appregistry#registercancellableheadlesstask\n */\n registerCancellableHeadlessTask(\n taskKey: string,\n taskProvider: TaskProvider,\n taskCancelProvider: TaskCancelProvider,\n ): void {\n if (taskProviders.has(taskKey)) {\n console.warn(\n `registerHeadlessTask or registerCancellableHeadlessTask called multiple times for same key '${taskKey}'`,\n );\n }\n taskProviders.set(taskKey, taskProvider);\n taskCancelProviders.set(taskKey, taskCancelProvider);\n },\n\n /**\n * Only called from native code. Starts a headless task.\n *\n * See https://reactnative.dev/docs/appregistry#startheadlesstask\n */\n startHeadlessTask(taskId: number, taskKey: string, data: any): void {\n const taskProvider = taskProviders.get(taskKey);\n if (!taskProvider) {\n console.warn(`No task registered for key ${taskKey}`);\n if (NativeHeadlessJsTaskSupport) {\n NativeHeadlessJsTaskSupport.notifyTaskFinished(taskId);\n }\n return;\n }\n taskProvider()(data)\n .then(() => {\n if (NativeHeadlessJsTaskSupport) {\n NativeHeadlessJsTaskSupport.notifyTaskFinished(taskId);\n }\n })\n .catch(reason => {\n console.error(reason);\n\n if (\n NativeHeadlessJsTaskSupport &&\n reason instanceof HeadlessJsTaskError\n ) {\n // $FlowFixMe[unused-promise]\n NativeHeadlessJsTaskSupport.notifyTaskRetry(taskId).then(\n retryPosted => {\n if (!retryPosted) {\n NativeHeadlessJsTaskSupport.notifyTaskFinished(taskId);\n }\n },\n );\n }\n });\n },\n\n /**\n * Only called from native code. Cancels a headless task.\n *\n * See https://reactnative.dev/docs/appregistry#cancelheadlesstask\n */\n cancelHeadlessTask(taskId: number, taskKey: string): void {\n const taskCancelProvider = taskCancelProviders.get(taskKey);\n if (!taskCancelProvider) {\n throw new Error(`No task canceller registered for key '${taskKey}'`);\n }\n taskCancelProvider()();\n },\n};\n\n// Register LogBox as a default surface\nAppRegistry.registerComponent('LogBox', () => {\n if (__DEV__ && typeof jest === 'undefined') {\n return require('../LogBox/LogBoxInspectorContainer').default;\n } else {\n return function NoOp() {\n return null;\n };\n }\n});\n\nglobal.RN$AppRegistry = AppRegistry;\n\n// Backwards compat with SurfaceRegistry, remove me later\nglobal.RN$SurfaceRegistry = {\n renderSurface: AppRegistry.runApplication,\n setSurfaceProps: AppRegistry.setSurfaceProps,\n};\n\nif (global.RN$Bridgeless === true) {\n console.log('Bridgeless mode is enabled');\n} else {\n BatchedBridge.registerCallableModule('AppRegistry', AppRegistry);\n}\n\nmodule.exports = AppRegistry;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';\nimport NativeRedBox from '../NativeModules/specs/NativeRedBox';\nimport {type EventSubscription} from '../vendor/emitter/EventEmitter';\nimport NativeBugReporting from './NativeBugReporting';\n\ntype ExtraData = {[key: string]: string, ...};\ntype SourceCallback = () => string;\ntype DebugData = {\n extras: ExtraData,\n files: ExtraData,\n ...\n};\n\nfunction defaultExtras() {\n BugReporting.addFileSource('react_hierarchy.txt', () =>\n require('./dumpReactTree')(),\n );\n}\n\n/**\n * A simple class for collecting bug report data. Components can add sources that will be queried when a bug report\n * is created via `collectExtraData`. For example, a list component might add a source that provides the list of rows\n * that are currently visible on screen. Components should also remember to call `remove()` on the object that is\n * returned by `addSource` when they are unmounted.\n */\nclass BugReporting {\n static _extraSources: Map = new Map();\n static _fileSources: Map = new Map();\n static _subscription: ?EventSubscription = null;\n static _redboxSubscription: ?EventSubscription = null;\n\n static _maybeInit() {\n if (!BugReporting._subscription) {\n BugReporting._subscription = RCTDeviceEventEmitter.addListener(\n 'collectBugExtraData',\n // $FlowFixMe[method-unbinding]\n BugReporting.collectExtraData,\n null,\n );\n defaultExtras();\n }\n\n if (!BugReporting._redboxSubscription) {\n BugReporting._redboxSubscription = RCTDeviceEventEmitter.addListener(\n 'collectRedBoxExtraData',\n // $FlowFixMe[method-unbinding]\n BugReporting.collectExtraData,\n null,\n );\n }\n }\n\n /**\n * Maps a string key to a simple callback that should return a string payload to be attached\n * to a bug report. Source callbacks are called when `collectExtraData` is called.\n *\n * Returns an object to remove the source when the component unmounts.\n *\n * Conflicts trample with a warning.\n */\n static addSource(\n key: string,\n callback: SourceCallback,\n ): {remove: () => void, ...} {\n return this._addSource(key, callback, BugReporting._extraSources);\n }\n\n /**\n * Maps a string key to a simple callback that should return a string payload to be attached\n * to a bug report. Source callbacks are called when `collectExtraData` is called.\n *\n * Returns an object to remove the source when the component unmounts.\n *\n * Conflicts trample with a warning.\n */\n static addFileSource(\n key: string,\n callback: SourceCallback,\n ): {remove: () => void, ...} {\n return this._addSource(key, callback, BugReporting._fileSources);\n }\n\n static _addSource(\n key: string,\n callback: SourceCallback,\n source: Map,\n ): {remove: () => void, ...} {\n BugReporting._maybeInit();\n if (source.has(key)) {\n console.warn(\n `BugReporting.add* called multiple times for same key '${key}'`,\n );\n }\n source.set(key, callback);\n return {\n remove: () => {\n source.delete(key);\n },\n };\n }\n\n /**\n * This can be called from a native bug reporting flow, or from JS code.\n *\n * If available, this will call `NativeModules.BugReporting.setExtraData(extraData)`\n * after collecting `extraData`.\n */\n static collectExtraData(): DebugData {\n const extraData: ExtraData = {};\n for (const [key, callback] of BugReporting._extraSources) {\n extraData[key] = callback();\n }\n const fileData: ExtraData = {};\n for (const [key, callback] of BugReporting._fileSources) {\n fileData[key] = callback();\n }\n\n if (NativeBugReporting != null && NativeBugReporting.setExtraData != null) {\n NativeBugReporting.setExtraData(extraData, fileData);\n }\n\n if (NativeRedBox != null && NativeRedBox.setExtraData != null) {\n NativeRedBox.setExtraData(extraData, 'From BugReporting.js');\n }\n\n return {extras: extraData, files: fileData};\n }\n}\n\nmodule.exports = BugReporting;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeRedBox';\nimport NativeRedBox from '../../../src/private/specs/modules/NativeRedBox';\nexport default NativeRedBox;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +setExtraData: (extraData: Object, forIdentifier: string) => void;\n +dismiss: () => void;\n}\n\nexport default (TurboModuleRegistry.get('RedBox'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeBugReporting';\nimport NativeBugReporting from '../../src/private/specs/modules/NativeBugReporting';\nexport default NativeBugReporting;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +startReportAProblemFlow: () => void;\n +setExtraData: (extraData: Object, extraFiles: Object) => void;\n}\n\nexport default (TurboModuleRegistry.get('BugReporting'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\n/*\nconst getReactData = require('getReactData');\n\nconst INDENTATION_SIZE = 2;\nconst MAX_DEPTH = 2;\nconst MAX_STRING_LENGTH = 50;\n*/\n\n/**\n * Dump all React Native root views and their content. This function tries\n * it best to get the content but ultimately relies on implementation details\n * of React and will fail in future versions.\n */\nfunction dumpReactTree(): string {\n try {\n return getReactTree();\n } catch (e) {\n return 'Failed to dump react tree: ' + e;\n }\n}\n\nfunction getReactTree() {\n // TODO(sema): Reenable tree dumps using the Fiber tree structure. #15945684\n return (\n 'React tree dumps have been temporarily disabled while React is ' +\n 'upgraded to Fiber.'\n );\n /*\n let output = '';\n const rootIds = Object.getOwnPropertyNames(ReactNativeMount._instancesByContainerID);\n for (const rootId of rootIds) {\n const instance = ReactNativeMount._instancesByContainerID[rootId];\n output += `============ Root ID: ${rootId} ============\\n`;\n output += dumpNode(instance, 0);\n output += `============ End root ID: ${rootId} ============\\n`;\n }\n return output;\n*/\n}\n\n/*\nfunction dumpNode(node: Object, indentation: number) {\n const data = getReactData(node);\n if (data.nodeType === 'Text') {\n return indent(indentation) + data.text + '\\n';\n } else if (data.nodeType === 'Empty') {\n return '';\n }\n let output = indent(indentation) + `<${data.name}`;\n if (data.nodeType === 'Composite') {\n for (const propName of Object.getOwnPropertyNames(data.props || {})) {\n if (isNormalProp(propName)) {\n try {\n const value = convertValue(data.props[propName]);\n if (value) {\n output += ` ${propName}=${value}`;\n }\n } catch (e) {\n const message = `[Failed to get property: ${e}]`;\n output += ` ${propName}=${message}`;\n }\n }\n }\n }\n let childOutput = '';\n for (const child of data.children || []) {\n childOutput += dumpNode(child, indentation + 1);\n }\n\n if (childOutput) {\n output += '>\\n' + childOutput + indent(indentation) + `\\n`;\n } else {\n output += ' />\\n';\n }\n\n return output;\n}\n\nfunction isNormalProp(name: string): boolean {\n switch (name) {\n case 'children':\n case 'key':\n case 'ref':\n return false;\n default:\n return true;\n }\n}\n\nfunction convertObject(object: Object, depth: number) {\n if (depth >= MAX_DEPTH) {\n return '[...omitted]';\n }\n let output = '{';\n let first = true;\n for (const key of Object.getOwnPropertyNames(object)) {\n if (!first) {\n output += ', ';\n }\n output += `${key}: ${convertValue(object[key], depth + 1)}`;\n first = false;\n }\n return output + '}';\n}\n\nfunction convertValue(value, depth = 0): ?string {\n if (!value) {\n return null;\n }\n\n switch (typeof value) {\n case 'string':\n return JSON.stringify(possiblyEllipsis(value).replace('\\n', '\\\\n'));\n case 'boolean':\n case 'number':\n return JSON.stringify(value);\n case 'function':\n return '[function]';\n case 'object':\n return convertObject(value, depth);\n default:\n return null;\n }\n}\n\nfunction possiblyEllipsis(value: string) {\n if (value.length > MAX_STRING_LENGTH) {\n return value.slice(0, MAX_STRING_LENGTH) + '...';\n } else {\n return value;\n }\n}\n\nfunction indent(size: number) {\n return ' '.repeat(size * INDENTATION_SIZE);\n}\n*/\n\nmodule.exports = dumpReactTree;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nexport type Scene = {name: string, [string]: mixed, ...};\n\nlet _listeners: Array<(scene: Scene) => void> = [];\n\nlet _activeScene = {name: 'default'};\n\nconst SceneTracker = {\n setActiveScene(scene: Scene) {\n _activeScene = scene;\n _listeners.forEach(listener => listener(_activeScene));\n },\n\n getActiveScene(): Scene {\n return _activeScene;\n },\n\n addActiveSceneChangedListener(callback: (scene: Scene) => void): {\n remove: () => void,\n ...\n } {\n _listeners.push(callback);\n return {\n remove: () => {\n _listeners = _listeners.filter(listener => callback !== listener);\n },\n };\n },\n};\n\nmodule.exports = SceneTracker;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport default class HeadlessJsTaskError extends Error {}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeHeadlessJsTaskSupport';\nimport NativeHeadlessJsTaskSupport from '../../src/private/specs/modules/NativeHeadlessJsTaskSupport';\nexport default NativeHeadlessJsTaskSupport;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +notifyTaskFinished: (taskId: number) => void;\n +notifyTaskRetry: (taskId: number) => Promise;\n}\n\nexport default (TurboModuleRegistry.get('HeadlessJsTaskSupport'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {ViewStyleProp} from '../StyleSheet/StyleSheet';\nimport type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';\n\nimport GlobalPerformanceLogger from '../Utilities/GlobalPerformanceLogger';\nimport PerformanceLoggerContext from '../Utilities/PerformanceLoggerContext';\nimport AppContainer from './AppContainer';\nimport DisplayMode, {type DisplayModeType} from './DisplayMode';\nimport getCachedComponentWithDebugName from './getCachedComponentWithDebugName';\nimport * as Renderer from './RendererProxy';\nimport invariant from 'invariant';\nimport * as React from 'react';\n\n// require BackHandler so it sets the default handler that exits the app if no listeners respond\nimport '../Utilities/BackHandler';\n\ntype ActivityType = React.AbstractComponent<{\n mode: 'visible' | 'hidden',\n children: React.Node,\n}>;\n\nexport default function renderApplication(\n RootComponent: React.ComponentType,\n initialProps: Props,\n rootTag: any,\n WrapperComponent?: ?React.ComponentType,\n rootViewStyle?: ?ViewStyleProp,\n fabric?: boolean,\n showArchitectureIndicator?: boolean,\n scopedPerformanceLogger?: IPerformanceLogger,\n isLogBox?: boolean,\n debugName?: string,\n displayMode?: ?DisplayModeType,\n useConcurrentRoot?: boolean,\n useOffscreen?: boolean,\n) {\n invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);\n\n const performanceLogger = scopedPerformanceLogger ?? GlobalPerformanceLogger;\n\n let renderable: React.MixedElement = (\n \n \n \n \n \n );\n\n if (__DEV__ && debugName) {\n const RootComponentWithMeaningfulName = getCachedComponentWithDebugName(\n `${debugName}(RootComponent)`,\n );\n renderable = (\n \n {renderable}\n \n );\n }\n\n if (useOffscreen && displayMode != null) {\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[prop-missing]\n const Activity: ActivityType = React.unstable_Activity;\n\n renderable = (\n \n {renderable}\n \n );\n }\n\n // We want to have concurrentRoot always enabled when you're on Fabric.\n const useConcurrentRootOverride = fabric;\n\n performanceLogger.startTimespan('renderApplication_React_render');\n performanceLogger.setExtra(\n 'usedReactConcurrentRoot',\n useConcurrentRootOverride ? '1' : '0',\n );\n performanceLogger.setExtra('usedReactFabric', fabric ? '1' : '0');\n performanceLogger.setExtra(\n 'usedReactProfiler',\n Renderer.isProfilingRenderer(),\n );\n Renderer.renderElement({\n element: renderable,\n rootTag,\n useFabric: Boolean(fabric),\n useConcurrentRoot: Boolean(useConcurrentRootOverride),\n });\n performanceLogger.stopTimespan('renderApplication_React_render');\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {IPerformanceLogger} from './createPerformanceLogger';\n\nimport GlobalPerformanceLogger from './GlobalPerformanceLogger';\nimport * as React from 'react';\nimport {useContext} from 'react';\n\n/**\n * This is a React Context that provides a scoped instance of IPerformanceLogger.\n * We wrap every with a Provider for this context so the logger\n * should be available in every component.\n * See React docs about using Context: https://react.dev/docs/context.html\n */\nconst PerformanceLoggerContext: React.Context =\n React.createContext(GlobalPerformanceLogger);\nif (__DEV__) {\n PerformanceLoggerContext.displayName = 'PerformanceLoggerContext';\n}\n\nexport function usePerformanceLogger(): IPerformanceLogger {\n return useContext(PerformanceLoggerContext);\n}\n\nexport default PerformanceLoggerContext;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {ViewStyleProp} from '../StyleSheet/StyleSheet';\nimport type {RootTag} from './RootTag';\n\nimport * as React from 'react';\n\nexport type Props = $ReadOnly<{|\n children?: React.Node,\n fabric?: boolean,\n rootTag: number | RootTag,\n initialProps?: {...},\n showArchitectureIndicator?: boolean,\n WrapperComponent?: ?React.ComponentType,\n rootViewStyle?: ?ViewStyleProp,\n internal_excludeLogBox?: boolean,\n internal_excludeInspector?: boolean,\n|}>;\n\nconst AppContainer: React.AbstractComponent = __DEV__\n ? require('./AppContainer-dev').default\n : require('./AppContainer-prod').default;\n\nmodule.exports = AppContainer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n * @oncall react_native\n */\n\nimport type {Props} from './AppContainer';\n\nimport View from '../Components/View/View';\nimport StyleSheet from '../StyleSheet/StyleSheet';\nimport {RootTagContext, createRootTag} from './RootTag';\nimport * as React from 'react';\n\nconst AppContainer = ({\n children,\n fabric,\n initialProps,\n rootTag,\n showArchitectureIndicator,\n WrapperComponent,\n rootViewStyle,\n}: Props): React.Node => {\n let innerView = children;\n\n if (WrapperComponent != null) {\n innerView = (\n \n {innerView}\n \n );\n }\n\n return (\n \n \n {innerView}\n \n \n );\n};\n\nconst styles = StyleSheet.create({\n root: {flex: 1},\n});\n\nexport default AppContainer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from './ViewPropTypes';\n\nimport TextAncestor from '../../Text/TextAncestor';\nimport ViewNativeComponent from './ViewNativeComponent';\nimport * as React from 'react';\n\nexport type Props = ViewProps;\n\n/**\n * The most fundamental component for building a UI, View is a container that\n * supports layout with flexbox, style, some touch handling, and accessibility\n * controls.\n *\n * @see https://reactnative.dev/docs/view\n */\nconst View: React.AbstractComponent<\n ViewProps,\n React.ElementRef,\n> = React.forwardRef(\n (\n {\n accessibilityElementsHidden,\n accessibilityLabel,\n accessibilityLabelledBy,\n accessibilityLiveRegion,\n accessibilityState,\n accessibilityValue,\n 'aria-busy': ariaBusy,\n 'aria-checked': ariaChecked,\n 'aria-disabled': ariaDisabled,\n 'aria-expanded': ariaExpanded,\n 'aria-hidden': ariaHidden,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-live': ariaLive,\n 'aria-selected': ariaSelected,\n 'aria-valuemax': ariaValueMax,\n 'aria-valuemin': ariaValueMin,\n 'aria-valuenow': ariaValueNow,\n 'aria-valuetext': ariaValueText,\n focusable,\n id,\n importantForAccessibility,\n nativeID,\n tabIndex,\n ...otherProps\n }: ViewProps,\n forwardedRef,\n ) => {\n const hasTextAncestor = React.useContext(TextAncestor);\n const _accessibilityLabelledBy =\n ariaLabelledBy?.split(/\\s*,\\s*/g) ?? accessibilityLabelledBy;\n\n let _accessibilityState;\n if (\n accessibilityState != null ||\n ariaBusy != null ||\n ariaChecked != null ||\n ariaDisabled != null ||\n ariaExpanded != null ||\n ariaSelected != null\n ) {\n _accessibilityState = {\n busy: ariaBusy ?? accessibilityState?.busy,\n checked: ariaChecked ?? accessibilityState?.checked,\n disabled: ariaDisabled ?? accessibilityState?.disabled,\n expanded: ariaExpanded ?? accessibilityState?.expanded,\n selected: ariaSelected ?? accessibilityState?.selected,\n };\n }\n let _accessibilityValue;\n if (\n accessibilityValue != null ||\n ariaValueMax != null ||\n ariaValueMin != null ||\n ariaValueNow != null ||\n ariaValueText != null\n ) {\n _accessibilityValue = {\n max: ariaValueMax ?? accessibilityValue?.max,\n min: ariaValueMin ?? accessibilityValue?.min,\n now: ariaValueNow ?? accessibilityValue?.now,\n text: ariaValueText ?? accessibilityValue?.text,\n };\n }\n\n const actualView = (\n \n );\n\n if (hasTextAncestor) {\n return (\n \n {actualView}\n \n );\n }\n\n return actualView;\n },\n);\n\nView.displayName = 'View';\n\nmodule.exports = View;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nconst React = require('react');\n\n/**\n * Whether the current element is the descendant of a element.\n */\nconst TextAncestorContext: React$Context<$FlowFixMe> =\n React.createContext(false);\nif (__DEV__) {\n TextAncestorContext.displayName = 'TextAncestorContext';\n}\nmodule.exports = TextAncestorContext;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\n\nimport * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';\nimport codegenNativeCommands from '../../Utilities/codegenNativeCommands';\nimport Platform from '../../Utilities/Platform';\nimport {type ViewProps as Props} from './ViewPropTypes';\nimport * as React from 'react';\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig =\n Platform.OS === 'android'\n ? {\n uiViewClassName: 'RCTView',\n validAttributes: {\n // ReactClippingViewManager @ReactProps\n removeClippedSubviews: true,\n\n // ReactViewManager @ReactProps\n accessible: true,\n hasTVPreferredFocus: true,\n nextFocusDown: true,\n nextFocusForward: true,\n nextFocusLeft: true,\n nextFocusRight: true,\n nextFocusUp: true,\n\n borderRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderBottomRightRadius: true,\n borderBottomLeftRadius: true,\n borderTopStartRadius: true,\n borderTopEndRadius: true,\n borderBottomStartRadius: true,\n borderBottomEndRadius: true,\n borderEndEndRadius: true,\n borderEndStartRadius: true,\n borderStartEndRadius: true,\n borderStartStartRadius: true,\n borderStyle: true,\n hitSlop: true,\n pointerEvents: true,\n nativeBackgroundAndroid: true,\n nativeForegroundAndroid: true,\n needsOffscreenAlphaCompositing: true,\n\n borderWidth: true,\n borderLeftWidth: true,\n borderRightWidth: true,\n borderTopWidth: true,\n borderBottomWidth: true,\n borderStartWidth: true,\n borderEndWidth: true,\n\n borderColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderLeftColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderRightColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderTopColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderBottomColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderStartColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderEndColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderBlockColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderBlockEndColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderBlockStartColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n\n focusable: true,\n overflow: true,\n backfaceVisibility: true,\n experimental_layoutConformance: true,\n },\n }\n : {\n uiViewClassName: 'RCTView',\n };\n\nconst ViewNativeComponent: HostComponent =\n NativeComponentRegistry.get('RCTView', () => __INTERNAL_VIEW_CONFIG);\n\ninterface NativeCommands {\n +hotspotUpdate: (\n viewRef: React.ElementRef>,\n x: number,\n y: number,\n ) => void;\n +setPressed: (\n viewRef: React.ElementRef>,\n pressed: boolean,\n ) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['hotspotUpdate', 'setPressed'],\n});\n\nexport default ViewNativeComponent;\n\nexport type ViewNativeComponentType = HostComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../Renderer/shims/ReactNativeTypes';\n\nimport getNativeComponentAttributes from '../ReactNative/getNativeComponentAttributes';\nimport UIManager from '../ReactNative/UIManager';\nimport * as ReactNativeViewConfigRegistry from '../Renderer/shims/ReactNativeViewConfigRegistry';\nimport verifyComponentAttributeEquivalence from '../Utilities/verifyComponentAttributeEquivalence';\nimport * as StaticViewConfigValidator from './StaticViewConfigValidator';\nimport {createViewConfig} from './ViewConfig';\nimport invariant from 'invariant';\nimport * as React from 'react';\n\nlet getRuntimeConfig;\n\n/**\n * Configures a function that is called to determine whether a given component\n * should be registered using reflection of the native component at runtime.\n *\n * The provider should return null if the native component is unavailable in\n * the current environment.\n */\nexport function setRuntimeConfigProvider(\n runtimeConfigProvider: (name: string) => ?{\n native: boolean,\n strict: boolean,\n verify: boolean,\n },\n): void {\n if (getRuntimeConfig === undefined) {\n getRuntimeConfig = runtimeConfigProvider;\n }\n}\n\n/**\n * Gets a `NativeComponent` that can be rendered by React Native.\n *\n * The supplied `viewConfigProvider` may or may not be invoked and utilized,\n * depending on how `setRuntimeConfigProvider` is configured.\n */\nexport function get(\n name: string,\n viewConfigProvider: () => PartialViewConfig,\n): HostComponent {\n ReactNativeViewConfigRegistry.register(name, () => {\n const {native, strict, verify} = getRuntimeConfig?.(name) ?? {\n native: !global.RN$Bridgeless,\n strict: false,\n verify: false,\n };\n\n let viewConfig;\n if (native) {\n viewConfig =\n getNativeComponentAttributes(name) ??\n createViewConfig(viewConfigProvider());\n } else {\n viewConfig =\n createViewConfig(viewConfigProvider()) ??\n getNativeComponentAttributes(name);\n }\n\n invariant(\n viewConfig != null,\n 'NativeComponentRegistry.get: both static and native view config are missing for native component \"%s\".',\n name,\n );\n\n if (verify) {\n const nativeViewConfig = native\n ? viewConfig\n : getNativeComponentAttributes(name);\n const staticViewConfig = native\n ? createViewConfig(viewConfigProvider())\n : viewConfig;\n\n if (strict) {\n const validationOutput = StaticViewConfigValidator.validate(\n name,\n nativeViewConfig,\n staticViewConfig,\n );\n\n if (validationOutput.type === 'invalid') {\n console.error(\n StaticViewConfigValidator.stringifyValidationResult(\n name,\n validationOutput,\n ),\n );\n }\n } else {\n verifyComponentAttributeEquivalence(nativeViewConfig, staticViewConfig);\n }\n }\n\n return viewConfig;\n });\n\n // $FlowFixMe[incompatible-return] `NativeComponent` is actually string!\n return name;\n}\n\n/**\n * Same as `NativeComponentRegistry.get(...)`, except this will check either\n * the `setRuntimeConfigProvider` configuration or use native reflection (slow)\n * to determine whether this native component is available.\n *\n * If the native component is not available, a stub component is returned. Note\n * that the return value of this is not `HostComponent` because the returned\n * component instance is not guaranteed to have native methods.\n */\nexport function getWithFallback_DEPRECATED(\n name: string,\n viewConfigProvider: () => PartialViewConfig,\n): React.AbstractComponent {\n if (getRuntimeConfig == null) {\n // `getRuntimeConfig == null` when static view configs are disabled\n // If `setRuntimeConfigProvider` is not configured, use native reflection.\n if (hasNativeViewConfig(name)) {\n return get(name, viewConfigProvider);\n }\n } else {\n // If there is no runtime config, then the native component is unavailable.\n if (getRuntimeConfig(name) != null) {\n return get(name, viewConfigProvider);\n }\n }\n\n const FallbackNativeComponent = function (props: Config): React.Node {\n return null;\n };\n FallbackNativeComponent.displayName = `Fallback(${name})`;\n return FallbackNativeComponent;\n}\n\nfunction hasNativeViewConfig(name: string): boolean {\n invariant(getRuntimeConfig == null, 'Unexpected invocation!');\n return UIManager.getViewManagerConfig(name) != null;\n}\n\n/**\n * Unstable API. Do not use!\n *\n * This method returns if there is a StaticViewConfig registered for the\n * component name received as a parameter.\n */\nexport function unstable_hasStaticViewConfig(name: string): boolean {\n const {native} = getRuntimeConfig?.(name) ?? {\n native: true,\n };\n return !native;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nconst ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');\nconst resolveAssetSource = require('../Image/resolveAssetSource');\nconst processColor = require('../StyleSheet/processColor').default;\nconst processColorArray = require('../StyleSheet/processColorArray');\nconst processFilter = require('../StyleSheet/processFilter').default;\nconst insetsDiffer = require('../Utilities/differ/insetsDiffer');\nconst matricesDiffer = require('../Utilities/differ/matricesDiffer');\nconst pointsDiffer = require('../Utilities/differ/pointsDiffer');\nconst sizesDiffer = require('../Utilities/differ/sizesDiffer');\nconst UIManager = require('./UIManager');\nconst nullthrows = require('nullthrows');\n\nfunction getNativeComponentAttributes(uiViewClassName: string): any {\n const viewConfig = UIManager.getViewManagerConfig(uiViewClassName);\n\n if (viewConfig == null) {\n return null;\n }\n\n // TODO: This seems like a whole lot of runtime initialization for every\n // native component that can be either avoided or simplified.\n let {baseModuleName, bubblingEventTypes, directEventTypes} = viewConfig;\n let nativeProps = viewConfig.NativeProps;\n\n bubblingEventTypes = bubblingEventTypes ?? {};\n directEventTypes = directEventTypes ?? {};\n\n while (baseModuleName) {\n const baseModule = UIManager.getViewManagerConfig(baseModuleName);\n if (!baseModule) {\n baseModuleName = null;\n } else {\n bubblingEventTypes = {\n ...baseModule.bubblingEventTypes,\n ...bubblingEventTypes,\n };\n directEventTypes = {\n ...baseModule.directEventTypes,\n ...directEventTypes,\n };\n nativeProps = {\n ...baseModule.NativeProps,\n ...nativeProps,\n };\n baseModuleName = baseModule.baseModuleName;\n }\n }\n\n const validAttributes: {[string]: mixed} = {};\n\n for (const key in nativeProps) {\n const typeName = nativeProps[key];\n const diff = getDifferForType(typeName);\n const process = getProcessorForType(typeName);\n\n // If diff or process == null, omit the corresponding property from the Attribute\n // Why:\n // 1. Consistency with AttributeType flow type\n // 2. Consistency with Static View Configs, which omit the null properties\n validAttributes[key] =\n diff == null\n ? process == null\n ? true\n : {process}\n : process == null\n ? {diff}\n : {diff, process};\n }\n\n // Unfortunately, the current setup declares style properties as top-level\n // props. This makes it so we allow style properties in the `style` prop.\n // TODO: Move style properties into a `style` prop and disallow them as\n // top-level props on the native side.\n validAttributes.style = ReactNativeStyleAttributes;\n\n Object.assign(viewConfig, {\n uiViewClassName,\n validAttributes,\n bubblingEventTypes,\n directEventTypes,\n });\n\n attachDefaultEventTypes(viewConfig);\n\n return viewConfig;\n}\n\nfunction attachDefaultEventTypes(viewConfig: any) {\n // This is supported on UIManager platforms (ex: Android),\n // as lazy view managers are not implemented for all platforms.\n // See [UIManager] for details on constants and implementations.\n const constants = UIManager.getConstants();\n if (constants.ViewManagerNames || constants.LazyViewManagersEnabled) {\n // Lazy view managers enabled.\n viewConfig = merge(\n viewConfig,\n nullthrows(UIManager.getDefaultEventTypes)(),\n );\n } else {\n viewConfig.bubblingEventTypes = merge(\n viewConfig.bubblingEventTypes,\n constants.genericBubblingEventTypes,\n );\n viewConfig.directEventTypes = merge(\n viewConfig.directEventTypes,\n constants.genericDirectEventTypes,\n );\n }\n}\n\n// TODO: Figure out how to avoid all this runtime initialization cost.\nfunction merge(destination: ?Object, source: ?Object): ?Object {\n if (!source) {\n return destination;\n }\n if (!destination) {\n return source;\n }\n\n for (const key in source) {\n if (!source.hasOwnProperty(key)) {\n continue;\n }\n\n let sourceValue = source[key];\n if (destination.hasOwnProperty(key)) {\n const destinationValue = destination[key];\n if (\n typeof sourceValue === 'object' &&\n typeof destinationValue === 'object'\n ) {\n sourceValue = merge(destinationValue, sourceValue);\n }\n }\n destination[key] = sourceValue;\n }\n return destination;\n}\n\nfunction getDifferForType(\n typeName: string,\n): ?(prevProp: any, nextProp: any) => boolean {\n switch (typeName) {\n // iOS Types\n case 'CATransform3D':\n return matricesDiffer;\n case 'CGPoint':\n return pointsDiffer;\n case 'CGSize':\n return sizesDiffer;\n case 'UIEdgeInsets':\n return insetsDiffer;\n // Android Types\n case 'Point':\n return pointsDiffer;\n case 'EdgeInsets':\n return insetsDiffer;\n }\n return null;\n}\n\nfunction getProcessorForType(typeName: string): ?(nextProp: any) => any {\n switch (typeName) {\n // iOS Types\n case 'CGColor':\n case 'UIColor':\n return processColor;\n case 'CGColorArray':\n case 'UIColorArray':\n return processColorArray;\n case 'CGImage':\n case 'UIImage':\n case 'RCTImageSource':\n return resolveAssetSource;\n // Android Types\n case 'Color':\n return processColor;\n case 'ColorArray':\n return processColorArray;\n case 'Filter':\n return processFilter;\n case 'ImageSource':\n return resolveAssetSource;\n }\n return null;\n}\n\nmodule.exports = getNativeComponentAttributes;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format strict-local\n * @flow strict-local\n */\n\nimport type {AnyAttributeType} from '../../Renderer/shims/ReactNativeTypes';\n\nimport processAspectRatio from '../../StyleSheet/processAspectRatio';\nimport processColor from '../../StyleSheet/processColor';\nimport processFilter from '../../StyleSheet/processFilter';\nimport processFontVariant from '../../StyleSheet/processFontVariant';\nimport processTransform from '../../StyleSheet/processTransform';\nimport processTransformOrigin from '../../StyleSheet/processTransformOrigin';\nimport sizesDiffer from '../../Utilities/differ/sizesDiffer';\n\nconst colorAttributes = {process: processColor};\n\nconst ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {\n /**\n * Layout\n */\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n aspectRatio: {process: processAspectRatio},\n borderBottomWidth: true,\n borderEndWidth: true,\n borderLeftWidth: true,\n borderRightWidth: true,\n borderStartWidth: true,\n borderTopWidth: true,\n columnGap: true,\n borderWidth: true,\n bottom: true,\n direction: true,\n display: true,\n end: true,\n flex: true,\n flexBasis: true,\n flexDirection: true,\n flexGrow: true,\n flexShrink: true,\n flexWrap: true,\n gap: true,\n height: true,\n inset: true,\n insetBlock: true,\n insetBlockEnd: true,\n insetBlockStart: true,\n insetInline: true,\n insetInlineEnd: true,\n insetInlineStart: true,\n justifyContent: true,\n left: true,\n margin: true,\n marginBlock: true,\n marginBlockEnd: true,\n marginBlockStart: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginInline: true,\n marginInlineEnd: true,\n marginInlineStart: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n overflow: true,\n padding: true,\n paddingBlock: true,\n paddingBlockEnd: true,\n paddingBlockStart: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingInline: true,\n paddingInlineEnd: true,\n paddingInlineStart: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n position: true,\n right: true,\n rowGap: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n\n /**\n * Shadow\n */\n elevation: true,\n shadowColor: colorAttributes,\n shadowOffset: {diff: sizesDiffer},\n shadowOpacity: true,\n shadowRadius: true,\n\n /**\n * Transform\n */\n transform: {process: processTransform},\n transformOrigin: {process: processTransformOrigin},\n\n /**\n * Filter\n */\n experimental_filter: {process: processFilter},\n\n /**\n * View\n */\n backfaceVisibility: true,\n backgroundColor: colorAttributes,\n borderBlockColor: colorAttributes,\n borderBlockEndColor: colorAttributes,\n borderBlockStartColor: colorAttributes,\n borderBottomColor: colorAttributes,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderColor: colorAttributes,\n borderCurve: true,\n borderEndColor: colorAttributes,\n borderEndEndRadius: true,\n borderEndStartRadius: true,\n borderLeftColor: colorAttributes,\n borderRadius: true,\n borderRightColor: colorAttributes,\n borderStartColor: colorAttributes,\n borderStartEndRadius: true,\n borderStartStartRadius: true,\n borderStyle: true,\n borderTopColor: colorAttributes,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n cursor: true,\n opacity: true,\n pointerEvents: true,\n\n /**\n * Text\n */\n color: colorAttributes,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontVariant: {process: processFontVariant},\n fontWeight: true,\n includeFontPadding: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textAlignVertical: true,\n textDecorationColor: colorAttributes,\n textDecorationLine: true,\n textDecorationStyle: true,\n textShadowColor: colorAttributes,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: true,\n userSelect: true,\n verticalAlign: true,\n writingDirection: true,\n\n /**\n * Image\n */\n overlayColor: colorAttributes,\n resizeMode: true,\n tintColor: colorAttributes,\n objectFit: true,\n};\n\nmodule.exports = ReactNativeStyleAttributes;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nconst invariant = require('invariant');\n\nfunction processAspectRatio(aspectRatio?: number | string): ?number {\n if (typeof aspectRatio === 'number') {\n return aspectRatio;\n }\n if (typeof aspectRatio !== 'string') {\n if (__DEV__) {\n invariant(\n !aspectRatio,\n 'aspectRatio must either be a number, a ratio string or `auto`. You passed: %s',\n aspectRatio,\n );\n }\n return;\n }\n\n const matches = aspectRatio.split('/').map(s => s.trim());\n\n if (matches.includes('auto')) {\n if (__DEV__) {\n invariant(\n matches.length,\n 'aspectRatio does not support `auto `. You passed: %s',\n aspectRatio,\n );\n }\n return;\n }\n\n const hasNonNumericValues = matches.some(n => Number.isNaN(Number(n)));\n if (__DEV__) {\n invariant(\n !hasNonNumericValues && (matches.length === 1 || matches.length === 2),\n 'aspectRatio must either be a number, a ratio string or `auto`. You passed: %s',\n aspectRatio,\n );\n }\n\n if (hasNonNumericValues) {\n return;\n }\n\n if (matches.length === 2) {\n return Number(matches[0]) / Number(matches[1]);\n }\n\n return Number(matches[0]);\n}\n\nmodule.exports = processAspectRatio;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nimport type {ColorValue, NativeColorValue} from './StyleSheet';\n\nconst Platform = require('../Utilities/Platform');\nconst normalizeColor = require('./normalizeColor');\n\nexport type ProcessedColorValue = number | NativeColorValue;\n\n/* eslint no-bitwise: 0 */\nfunction processColor(color?: ?(number | ColorValue)): ?ProcessedColorValue {\n if (color === undefined || color === null) {\n return color;\n }\n\n let normalizedColor = normalizeColor(color);\n if (normalizedColor === null || normalizedColor === undefined) {\n return undefined;\n }\n\n if (typeof normalizedColor === 'object') {\n const processColorObject =\n require('./PlatformColorValueTypes').processColorObject;\n\n const processedColorObj = processColorObject(normalizedColor);\n\n if (processedColorObj != null) {\n return processedColorObj;\n }\n }\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n // Converts 0xrrggbbaa into 0xaarrggbb\n normalizedColor = ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0;\n\n if (Platform.OS === 'android') {\n // Android use 32 bit *signed* integer to represent the color\n // We utilize the fact that bitwise operations in JS also operates on\n // signed 32 bit integers, so that we can use those to convert from\n // *unsigned* to *signed* 32bit int that way.\n normalizedColor = normalizedColor | 0x0;\n }\n return normalizedColor;\n}\n\nexport default processColor;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n/* eslint no-bitwise: 0 */\n\nimport type {ProcessedColorValue} from './processColor';\nimport type {ColorValue} from './StyleSheet';\n\nimport _normalizeColor from '@react-native/normalize-colors';\n\nfunction normalizeColor(\n color: ?(ColorValue | ProcessedColorValue),\n): ?ProcessedColorValue {\n if (typeof color === 'object' && color != null) {\n const {normalizeColorObject} = require('./PlatformColorValueTypes');\n const normalizedColor = normalizeColorObject(color);\n if (normalizedColor != null) {\n return normalizedColor;\n }\n }\n\n if (typeof color === 'string' || typeof color === 'number') {\n return _normalizeColor(color);\n }\n}\n\nmodule.exports = normalizeColor;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @noflow\n */\n\n/* eslint no-bitwise: 0 */\n\n'use strict';\n\nfunction normalizeColor(color) {\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n if (typeof color !== 'string') {\n return null;\n }\n\n const matchers = getMatchers();\n let match;\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color))) {\n return parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n const colorFromKeyword = normalizeKeyword(color);\n if (colorFromKeyword != null) {\n return colorFromKeyword;\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) | // b\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = matchers.rgba.exec(color))) {\n // rgba(R G B / A) notation\n if (match[6] !== undefined) {\n return (\n ((parse255(match[6]) << 24) | // r\n (parse255(match[7]) << 16) | // g\n (parse255(match[8]) << 8) | // b\n parse1(match[9])) >>> // a\n 0\n );\n }\n\n // rgba(R, G, B, A) notation\n return (\n ((parse255(match[2]) << 24) | // r\n (parse255(match[3]) << 16) | // g\n (parse255(match[4]) << 8) | // b\n parse1(match[5])) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return (\n parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n 'ff', // a\n 16,\n ) >>> 0\n );\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) {\n return parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = matchers.hex4.exec(color))) {\n return (\n parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n match[4] +\n match[4], // a\n 16,\n ) >>> 0\n );\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]), // l\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hsla.exec(color))) {\n // hsla(H S L / A) notation\n if (match[6] !== undefined) {\n return (\n (hslToRgb(\n parse360(match[6]), // h\n parsePercentage(match[7]), // s\n parsePercentage(match[8]), // l\n ) |\n parse1(match[9])) >>> // a\n 0\n );\n }\n\n // hsla(H, S, L, A) notation\n return (\n (hslToRgb(\n parse360(match[2]), // h\n parsePercentage(match[3]), // s\n parsePercentage(match[4]), // l\n ) |\n parse1(match[5])) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hwb.exec(color))) {\n return (\n (hwbToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // w\n parsePercentage(match[3]), // b\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n return null;\n}\n\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n\nfunction hslToRgb(h, s, l) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n\n return (\n (Math.round(r * 255) << 24) |\n (Math.round(g * 255) << 16) |\n (Math.round(b * 255) << 8)\n );\n}\n\nfunction hwbToRgb(h, w, b) {\n if (w + b >= 1) {\n const gray = Math.round((w * 255) / (w + b));\n\n return (gray << 24) | (gray << 16) | (gray << 8);\n }\n\n const red = hue2rgb(0, 1, h + 1 / 3) * (1 - w - b) + w;\n const green = hue2rgb(0, 1, h) * (1 - w - b) + w;\n const blue = hue2rgb(0, 1, h - 1 / 3) * (1 - w - b) + w;\n\n return (\n (Math.round(red * 255) << 24) |\n (Math.round(green * 255) << 16) |\n (Math.round(blue * 255) << 8)\n );\n}\n\nconst NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...args) {\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,?\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nfunction callWithSlashSeparator(...args) {\n return (\n '\\\\(\\\\s*(' +\n args.slice(0, args.length - 1).join(')\\\\s*,?\\\\s*(') +\n ')\\\\s*/\\\\s*(' +\n args[args.length - 1] +\n ')\\\\s*\\\\)'\n );\n}\n\nfunction commaSeparatedCall(...args) {\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nlet cachedMatchers;\n\nfunction getMatchers() {\n if (cachedMatchers === undefined) {\n cachedMatchers = {\n rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),\n rgba: new RegExp(\n 'rgba(' +\n commaSeparatedCall(NUMBER, NUMBER, NUMBER, NUMBER) +\n '|' +\n callWithSlashSeparator(NUMBER, NUMBER, NUMBER, NUMBER) +\n ')',\n ),\n hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hsla: new RegExp(\n 'hsla(' +\n commaSeparatedCall(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n '|' +\n callWithSlashSeparator(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n ')',\n ),\n hwb: new RegExp('hwb' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#([0-9a-fA-F]{6})$/,\n hex8: /^#([0-9a-fA-F]{8})$/,\n };\n }\n return cachedMatchers;\n}\n\nfunction parse255(str) {\n const int = parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\n\nfunction parse360(str) {\n const int = parseFloat(str);\n return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str) {\n const num = parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str) {\n // parseFloat conveniently ignores the final %\n const int = parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\n\nfunction normalizeKeyword(name) {\n // prettier-ignore\n switch (name) {\n case 'transparent': return 0x00000000;\n // http://www.w3.org/TR/css3-color/#svg-color\n case 'aliceblue': return 0xf0f8ffff;\n case 'antiquewhite': return 0xfaebd7ff;\n case 'aqua': return 0x00ffffff;\n case 'aquamarine': return 0x7fffd4ff;\n case 'azure': return 0xf0ffffff;\n case 'beige': return 0xf5f5dcff;\n case 'bisque': return 0xffe4c4ff;\n case 'black': return 0x000000ff;\n case 'blanchedalmond': return 0xffebcdff;\n case 'blue': return 0x0000ffff;\n case 'blueviolet': return 0x8a2be2ff;\n case 'brown': return 0xa52a2aff;\n case 'burlywood': return 0xdeb887ff;\n case 'burntsienna': return 0xea7e5dff;\n case 'cadetblue': return 0x5f9ea0ff;\n case 'chartreuse': return 0x7fff00ff;\n case 'chocolate': return 0xd2691eff;\n case 'coral': return 0xff7f50ff;\n case 'cornflowerblue': return 0x6495edff;\n case 'cornsilk': return 0xfff8dcff;\n case 'crimson': return 0xdc143cff;\n case 'cyan': return 0x00ffffff;\n case 'darkblue': return 0x00008bff;\n case 'darkcyan': return 0x008b8bff;\n case 'darkgoldenrod': return 0xb8860bff;\n case 'darkgray': return 0xa9a9a9ff;\n case 'darkgreen': return 0x006400ff;\n case 'darkgrey': return 0xa9a9a9ff;\n case 'darkkhaki': return 0xbdb76bff;\n case 'darkmagenta': return 0x8b008bff;\n case 'darkolivegreen': return 0x556b2fff;\n case 'darkorange': return 0xff8c00ff;\n case 'darkorchid': return 0x9932ccff;\n case 'darkred': return 0x8b0000ff;\n case 'darksalmon': return 0xe9967aff;\n case 'darkseagreen': return 0x8fbc8fff;\n case 'darkslateblue': return 0x483d8bff;\n case 'darkslategray': return 0x2f4f4fff;\n case 'darkslategrey': return 0x2f4f4fff;\n case 'darkturquoise': return 0x00ced1ff;\n case 'darkviolet': return 0x9400d3ff;\n case 'deeppink': return 0xff1493ff;\n case 'deepskyblue': return 0x00bfffff;\n case 'dimgray': return 0x696969ff;\n case 'dimgrey': return 0x696969ff;\n case 'dodgerblue': return 0x1e90ffff;\n case 'firebrick': return 0xb22222ff;\n case 'floralwhite': return 0xfffaf0ff;\n case 'forestgreen': return 0x228b22ff;\n case 'fuchsia': return 0xff00ffff;\n case 'gainsboro': return 0xdcdcdcff;\n case 'ghostwhite': return 0xf8f8ffff;\n case 'gold': return 0xffd700ff;\n case 'goldenrod': return 0xdaa520ff;\n case 'gray': return 0x808080ff;\n case 'green': return 0x008000ff;\n case 'greenyellow': return 0xadff2fff;\n case 'grey': return 0x808080ff;\n case 'honeydew': return 0xf0fff0ff;\n case 'hotpink': return 0xff69b4ff;\n case 'indianred': return 0xcd5c5cff;\n case 'indigo': return 0x4b0082ff;\n case 'ivory': return 0xfffff0ff;\n case 'khaki': return 0xf0e68cff;\n case 'lavender': return 0xe6e6faff;\n case 'lavenderblush': return 0xfff0f5ff;\n case 'lawngreen': return 0x7cfc00ff;\n case 'lemonchiffon': return 0xfffacdff;\n case 'lightblue': return 0xadd8e6ff;\n case 'lightcoral': return 0xf08080ff;\n case 'lightcyan': return 0xe0ffffff;\n case 'lightgoldenrodyellow': return 0xfafad2ff;\n case 'lightgray': return 0xd3d3d3ff;\n case 'lightgreen': return 0x90ee90ff;\n case 'lightgrey': return 0xd3d3d3ff;\n case 'lightpink': return 0xffb6c1ff;\n case 'lightsalmon': return 0xffa07aff;\n case 'lightseagreen': return 0x20b2aaff;\n case 'lightskyblue': return 0x87cefaff;\n case 'lightslategray': return 0x778899ff;\n case 'lightslategrey': return 0x778899ff;\n case 'lightsteelblue': return 0xb0c4deff;\n case 'lightyellow': return 0xffffe0ff;\n case 'lime': return 0x00ff00ff;\n case 'limegreen': return 0x32cd32ff;\n case 'linen': return 0xfaf0e6ff;\n case 'magenta': return 0xff00ffff;\n case 'maroon': return 0x800000ff;\n case 'mediumaquamarine': return 0x66cdaaff;\n case 'mediumblue': return 0x0000cdff;\n case 'mediumorchid': return 0xba55d3ff;\n case 'mediumpurple': return 0x9370dbff;\n case 'mediumseagreen': return 0x3cb371ff;\n case 'mediumslateblue': return 0x7b68eeff;\n case 'mediumspringgreen': return 0x00fa9aff;\n case 'mediumturquoise': return 0x48d1ccff;\n case 'mediumvioletred': return 0xc71585ff;\n case 'midnightblue': return 0x191970ff;\n case 'mintcream': return 0xf5fffaff;\n case 'mistyrose': return 0xffe4e1ff;\n case 'moccasin': return 0xffe4b5ff;\n case 'navajowhite': return 0xffdeadff;\n case 'navy': return 0x000080ff;\n case 'oldlace': return 0xfdf5e6ff;\n case 'olive': return 0x808000ff;\n case 'olivedrab': return 0x6b8e23ff;\n case 'orange': return 0xffa500ff;\n case 'orangered': return 0xff4500ff;\n case 'orchid': return 0xda70d6ff;\n case 'palegoldenrod': return 0xeee8aaff;\n case 'palegreen': return 0x98fb98ff;\n case 'paleturquoise': return 0xafeeeeff;\n case 'palevioletred': return 0xdb7093ff;\n case 'papayawhip': return 0xffefd5ff;\n case 'peachpuff': return 0xffdab9ff;\n case 'peru': return 0xcd853fff;\n case 'pink': return 0xffc0cbff;\n case 'plum': return 0xdda0ddff;\n case 'powderblue': return 0xb0e0e6ff;\n case 'purple': return 0x800080ff;\n case 'rebeccapurple': return 0x663399ff;\n case 'red': return 0xff0000ff;\n case 'rosybrown': return 0xbc8f8fff;\n case 'royalblue': return 0x4169e1ff;\n case 'saddlebrown': return 0x8b4513ff;\n case 'salmon': return 0xfa8072ff;\n case 'sandybrown': return 0xf4a460ff;\n case 'seagreen': return 0x2e8b57ff;\n case 'seashell': return 0xfff5eeff;\n case 'sienna': return 0xa0522dff;\n case 'silver': return 0xc0c0c0ff;\n case 'skyblue': return 0x87ceebff;\n case 'slateblue': return 0x6a5acdff;\n case 'slategray': return 0x708090ff;\n case 'slategrey': return 0x708090ff;\n case 'snow': return 0xfffafaff;\n case 'springgreen': return 0x00ff7fff;\n case 'steelblue': return 0x4682b4ff;\n case 'tan': return 0xd2b48cff;\n case 'teal': return 0x008080ff;\n case 'thistle': return 0xd8bfd8ff;\n case 'tomato': return 0xff6347ff;\n case 'turquoise': return 0x40e0d0ff;\n case 'violet': return 0xee82eeff;\n case 'wheat': return 0xf5deb3ff;\n case 'white': return 0xffffffff;\n case 'whitesmoke': return 0xf5f5f5ff;\n case 'yellow': return 0xffff00ff;\n case 'yellowgreen': return 0x9acd32ff;\n }\n return null;\n}\n\nmodule.exports = normalizeColor;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ProcessedColorValue} from './processColor';\nimport type {ColorValue, NativeColorValue} from './StyleSheet';\n\n/** The actual type of the opaque NativeColorValue on Android platform */\ntype LocalNativeColorValue = {\n resource_paths?: Array,\n};\n\nexport const PlatformColor = (...names: Array): ColorValue => {\n /* $FlowExpectedError[incompatible-return]\n * LocalNativeColorValue is the actual type of the opaque NativeColorValue on Android platform */\n return ({resource_paths: names}: LocalNativeColorValue);\n};\n\nexport const normalizeColorObject = (\n color: NativeColorValue,\n): ?ProcessedColorValue => {\n /* $FlowExpectedError[incompatible-cast]\n * LocalNativeColorValue is the actual type of the opaque NativeColorValue on Android platform */\n if ('resource_paths' in (color: LocalNativeColorValue)) {\n return color;\n }\n return null;\n};\n\nexport const processColorObject = (\n color: NativeColorValue,\n): ?NativeColorValue => {\n return color;\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nexport type FilterPrimitive =\n | {brightness: number | string}\n | {blur: number | string}\n | {contrast: number | string}\n | {grayscale: number | string}\n | {hueRotate: number | string}\n | {invert: number | string}\n | {opacity: number | string}\n | {saturate: number | string}\n | {sepia: number | string};\n\nexport default function processFilter(\n filter: $ReadOnlyArray | string,\n): $ReadOnlyArray {\n let result: Array = [];\n if (typeof filter === 'string') {\n // matches on functions with args like \"brightness(1.5)\"\n const regex = new RegExp(/(\\w+)\\(([^)]+)\\)/g);\n let matches;\n\n while ((matches = regex.exec(filter))) {\n const amount = _getFilterAmount(matches[1], matches[2]);\n\n if (amount != null) {\n const filterPrimitive = {};\n // $FlowFixMe The key will be the correct one but flow can't see that.\n filterPrimitive[matches[1]] = amount;\n // $FlowFixMe The key will be the correct one but flow can't see that.\n result.push(filterPrimitive);\n } else {\n // If any primitive is invalid then apply none of the filters. This is how\n // web works and makes it clear that something is wrong becuase no\n // graphical effects are happening.\n return [];\n }\n }\n } else {\n for (const filterPrimitive of filter) {\n const [filterName, filterValue] = Object.entries(filterPrimitive)[0];\n const amount = _getFilterAmount(filterName, filterValue);\n\n if (amount != null) {\n const resultObject = {};\n // $FlowFixMe\n resultObject[filterName] = amount;\n // $FlowFixMe\n result.push(resultObject);\n } else {\n // If any primitive is invalid then apply none of the filters. This is how\n // web works and makes it clear that something is wrong becuase no\n // graphical effects are happening.\n return [];\n }\n }\n }\n\n return result;\n}\n\nfunction _getFilterAmount(filterName: string, filterArgs: mixed): ?number {\n let filterArgAsNumber: number;\n let unit: string;\n if (typeof filterArgs === 'string') {\n // matches on args with units like \"1.5 5% -80deg\"\n const argsWithUnitsRegex = new RegExp(/([+-]?\\d*(\\.\\d+)?)([a-zA-Z%]+)?/g);\n const match = argsWithUnitsRegex.exec(filterArgs);\n\n if (!match || isNaN(Number(match[1]))) {\n return undefined;\n }\n\n filterArgAsNumber = Number(match[1]);\n unit = match[3];\n } else if (typeof filterArgs === 'number') {\n filterArgAsNumber = filterArgs;\n } else {\n return undefined;\n }\n\n switch (filterName) {\n // Hue rotate takes some angle that can have a unit and can be\n // negative. Additionally, 0 with no unit is allowed.\n case 'hueRotate':\n if (filterArgAsNumber === 0) {\n return 0;\n }\n if (unit !== 'deg' && unit !== 'rad') {\n return undefined;\n }\n return unit === 'rad'\n ? (180 * filterArgAsNumber) / Math.PI\n : filterArgAsNumber;\n // blur takes any positive CSS length that is not a percent. In RN\n // we currently only have DIPs, so we are not parsing units here.\n case 'blur':\n if ((unit && unit !== 'px') || filterArgAsNumber < 0) {\n return undefined;\n }\n return filterArgAsNumber;\n // All other filters except take a non negative number or percentage. There\n // are no units associated with this value and percentage numbers map 1-to-1\n // to a non-percentage number (e.g. 50% == 0.5).\n case 'brightness':\n case 'contrast':\n case 'grayscale':\n case 'invert':\n case 'opacity':\n case 'saturate':\n case 'sepia':\n if ((unit && unit !== '%' && unit !== 'px') || filterArgAsNumber < 0) {\n return undefined;\n }\n if (unit === '%') {\n filterArgAsNumber /= 100;\n }\n return filterArgAsNumber;\n default:\n return undefined;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nimport type {____FontVariantArray_Internal} from './StyleSheetTypes';\n\nfunction processFontVariant(\n fontVariant: ____FontVariantArray_Internal | string,\n): ?____FontVariantArray_Internal {\n if (Array.isArray(fontVariant)) {\n return fontVariant;\n }\n\n // $FlowFixMe[incompatible-type]\n const match: ?____FontVariantArray_Internal = fontVariant\n .split(' ')\n .filter(Boolean);\n\n return match;\n}\n\nmodule.exports = processFontVariant;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nconst stringifySafe = require('../Utilities/stringifySafe').default;\nconst invariant = require('invariant');\n\n/**\n * Generate a transform matrix based on the provided transforms, and use that\n * within the style object instead.\n *\n * This allows us to provide an API that is similar to CSS, where transforms may\n * be applied in an arbitrary order, and yet have a universal, singular\n * interface to native code.\n */\nfunction processTransform(\n transform: Array | string,\n): Array | Array {\n if (typeof transform === 'string') {\n const regex = new RegExp(/(\\w+)\\(([^)]+)\\)/g);\n let transformArray: Array = [];\n let matches;\n\n while ((matches = regex.exec(transform))) {\n const {key, value} = _getKeyAndValueFromCSSTransform(\n matches[1],\n matches[2],\n );\n\n if (value !== undefined) {\n transformArray.push({[key]: value});\n }\n }\n transform = transformArray;\n }\n\n if (__DEV__) {\n _validateTransforms(transform);\n }\n\n return transform;\n}\n\nconst _getKeyAndValueFromCSSTransform: (\n key:\n | string\n | $TEMPORARY$string<'matrix'>\n | $TEMPORARY$string<'perspective'>\n | $TEMPORARY$string<'rotate'>\n | $TEMPORARY$string<'rotateX'>\n | $TEMPORARY$string<'rotateY'>\n | $TEMPORARY$string<'rotateZ'>\n | $TEMPORARY$string<'scale'>\n | $TEMPORARY$string<'scaleX'>\n | $TEMPORARY$string<'scaleY'>\n | $TEMPORARY$string<'skewX'>\n | $TEMPORARY$string<'skewY'>\n | $TEMPORARY$string<'translate'>\n | $TEMPORARY$string<'translate3d'>\n | $TEMPORARY$string<'translateX'>\n | $TEMPORARY$string<'translateY'>,\n args: string,\n) => {key: string, value?: Array | number | string} = (\n key,\n args,\n) => {\n const argsWithUnitsRegex = new RegExp(/([+-]?\\d+(\\.\\d+)?)([a-zA-Z]+|%)?/g);\n\n switch (key) {\n case 'matrix':\n return {key, value: args.match(/[+-]?\\d+(\\.\\d+)?/g)?.map(Number)};\n case 'translate':\n case 'translate3d':\n const parsedArgs = [];\n let missingUnitOfMeasurement = false;\n\n let matches;\n while ((matches = argsWithUnitsRegex.exec(args))) {\n const value = Number(matches[1]);\n const unitOfMeasurement = matches[3];\n\n if (value !== 0 && !unitOfMeasurement) {\n missingUnitOfMeasurement = true;\n }\n\n if (unitOfMeasurement === '%') {\n parsedArgs.push(`${value}%`);\n } else {\n parsedArgs.push(value);\n }\n }\n\n if (__DEV__) {\n invariant(\n !missingUnitOfMeasurement,\n `Transform with key ${key} must have units unless the provided value is 0, found %s`,\n `${key}(${args})`,\n );\n\n if (key === 'translate') {\n invariant(\n parsedArgs?.length === 1 || parsedArgs?.length === 2,\n 'Transform with key translate must be an string with 1 or 2 parameters, found %s: %s',\n parsedArgs?.length,\n `${key}(${args})`,\n );\n } else {\n invariant(\n parsedArgs?.length === 3,\n 'Transform with key translate3d must be an string with 3 parameters, found %s: %s',\n parsedArgs?.length,\n `${key}(${args})`,\n );\n }\n }\n\n if (parsedArgs?.length === 1) {\n parsedArgs.push(0);\n }\n\n return {key: 'translate', value: parsedArgs};\n case 'translateX':\n case 'translateY':\n case 'perspective':\n const argMatches = argsWithUnitsRegex.exec(args);\n\n if (!argMatches?.length) {\n return {key, value: undefined};\n }\n\n const value = Number(argMatches[1]);\n const unitOfMeasurement = argMatches[3];\n\n if (__DEV__) {\n invariant(\n value === 0 || unitOfMeasurement,\n `Transform with key ${key} must have units unless the provided value is 0, found %s`,\n `${key}(${args})`,\n );\n }\n\n return {key, value};\n\n default:\n return {key, value: !isNaN(args) ? Number(args) : args};\n }\n};\n\nfunction _validateTransforms(transform: Array): void {\n transform.forEach(transformation => {\n const keys = Object.keys(transformation);\n invariant(\n keys.length === 1,\n 'You must specify exactly one property per transform object. Passed properties: %s',\n stringifySafe(transformation),\n );\n const key = keys[0];\n const value = transformation[key];\n _validateTransform(key, value, transformation);\n });\n}\n\nfunction _validateTransform(\n key:\n | string\n | $TEMPORARY$string<'matrix'>\n | $TEMPORARY$string<'perspective'>\n | $TEMPORARY$string<'rotate'>\n | $TEMPORARY$string<'rotateX'>\n | $TEMPORARY$string<'rotateY'>\n | $TEMPORARY$string<'rotateZ'>\n | $TEMPORARY$string<'scale'>\n | $TEMPORARY$string<'scaleX'>\n | $TEMPORARY$string<'scaleY'>\n | $TEMPORARY$string<'skewX'>\n | $TEMPORARY$string<'skewY'>\n | $TEMPORARY$string<'translate'>\n | $TEMPORARY$string<'translateX'>\n | $TEMPORARY$string<'translateY'>,\n value: any | number | string,\n transformation: any,\n) {\n invariant(\n !value.getValue,\n 'You passed an Animated.Value to a normal component. ' +\n 'You need to wrap that component in an Animated. For example, ' +\n 'replace by .',\n );\n\n const multivalueTransforms = ['matrix', 'translate'];\n if (multivalueTransforms.indexOf(key) !== -1) {\n invariant(\n Array.isArray(value),\n 'Transform with key of %s must have an array as the value: %s',\n key,\n stringifySafe(transformation),\n );\n }\n switch (key) {\n case 'matrix':\n invariant(\n value.length === 9 || value.length === 16,\n 'Matrix transform must have a length of 9 (2d) or 16 (3d). ' +\n 'Provided matrix has a length of %s: %s',\n /* $FlowFixMe[prop-missing] (>=0.84.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.84 was deployed. To\n * see the error, delete this comment and run Flow. */\n value.length,\n stringifySafe(transformation),\n );\n break;\n case 'translate':\n invariant(\n value.length === 2 || value.length === 3,\n 'Transform with key translate must be an array of length 2 or 3, found %s: %s',\n /* $FlowFixMe[prop-missing] (>=0.84.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.84 was deployed. To\n * see the error, delete this comment and run Flow. */\n value.length,\n stringifySafe(transformation),\n );\n break;\n case 'rotateX':\n case 'rotateY':\n case 'rotateZ':\n case 'rotate':\n case 'skewX':\n case 'skewY':\n invariant(\n typeof value === 'string',\n 'Transform with key of \"%s\" must be a string: %s',\n key,\n stringifySafe(transformation),\n );\n invariant(\n value.indexOf('deg') > -1 || value.indexOf('rad') > -1,\n 'Rotate transform must be expressed in degrees (deg) or radians ' +\n '(rad): %s',\n stringifySafe(transformation),\n );\n break;\n case 'perspective':\n invariant(\n typeof value === 'number',\n 'Transform with key of \"%s\" must be a number: %s',\n key,\n stringifySafe(transformation),\n );\n invariant(\n value !== 0,\n 'Transform with key of \"%s\" cannot be zero: %s',\n key,\n stringifySafe(transformation),\n );\n break;\n case 'translateX':\n case 'translateY':\n invariant(\n typeof value === 'number' ||\n (typeof value === 'string' && value.endsWith('%')),\n 'Transform with key of \"%s\" must be number or a percentage. Passed value: %s.',\n key,\n stringifySafe(transformation),\n );\n break;\n case 'scale':\n case 'scaleX':\n case 'scaleY':\n invariant(\n typeof value === 'number',\n 'Transform with key of \"%s\" must be a number: %s',\n key,\n stringifySafe(transformation),\n );\n break;\n default:\n invariant(\n false,\n 'Invalid transform %s: %s',\n key,\n stringifySafe(transformation),\n );\n }\n}\n\nmodule.exports = processTransform;\n","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport invariant from 'invariant';\n\nconst INDEX_X = 0;\nconst INDEX_Y = 1;\nconst INDEX_Z = 2;\n\n/* eslint-disable no-labels */\nexport default function processTransformOrigin(\n transformOrigin: Array | string,\n): Array {\n if (typeof transformOrigin === 'string') {\n const transformOriginString = transformOrigin;\n const regex = /(top|bottom|left|right|center|\\d+(?:%|px)|0)/gi;\n const transformOriginArray: Array = ['50%', '50%', 0];\n\n let index = INDEX_X;\n let matches;\n outer: while ((matches = regex.exec(transformOriginString))) {\n let nextIndex = index + 1;\n\n const value = matches[0];\n const valueLower = value.toLowerCase();\n\n switch (valueLower) {\n case 'left':\n case 'right': {\n invariant(\n index === INDEX_X,\n 'Transform-origin %s can only be used for x-position',\n value,\n );\n transformOriginArray[INDEX_X] = valueLower === 'left' ? 0 : '100%';\n break;\n }\n case 'top':\n case 'bottom': {\n invariant(\n index !== INDEX_Z,\n 'Transform-origin %s can only be used for y-position',\n value,\n );\n transformOriginArray[INDEX_Y] = valueLower === 'top' ? 0 : '100%';\n\n // Handle [[ center | left | right ] && [ center | top | bottom ]] ?\n if (index === INDEX_X) {\n const horizontal = regex.exec(transformOriginString);\n if (horizontal == null) {\n break outer;\n }\n\n switch (horizontal[0].toLowerCase()) {\n case 'left':\n transformOriginArray[INDEX_X] = 0;\n break;\n case 'right':\n transformOriginArray[INDEX_X] = '100%';\n break;\n case 'center':\n transformOriginArray[INDEX_X] = '50%';\n break;\n default:\n invariant(\n false,\n 'Could not parse transform-origin: %s',\n transformOriginString,\n );\n }\n nextIndex = INDEX_Z;\n }\n\n break;\n }\n case 'center': {\n invariant(\n index !== INDEX_Z,\n 'Transform-origin value %s cannot be used for z-position',\n value,\n );\n transformOriginArray[index] = '50%';\n break;\n }\n default: {\n if (value.endsWith('%')) {\n transformOriginArray[index] = value;\n } else {\n transformOriginArray[index] = parseFloat(value); // Remove `px`\n }\n break;\n }\n }\n\n index = nextIndex;\n }\n\n transformOrigin = transformOriginArray;\n }\n\n if (__DEV__) {\n _validateTransformOrigin(transformOrigin);\n }\n\n return transformOrigin;\n}\n\nfunction _validateTransformOrigin(transformOrigin: Array) {\n invariant(\n transformOrigin.length === 3,\n 'Transform origin must have exactly 3 values.',\n );\n const [x, y, z] = transformOrigin;\n invariant(\n typeof x === 'number' || (typeof x === 'string' && x.endsWith('%')),\n 'Transform origin x-position must be a number. Passed value: %s.',\n x,\n );\n invariant(\n typeof y === 'number' || (typeof y === 'string' && y.endsWith('%')),\n 'Transform origin y-position must be a number. Passed value: %s.',\n y,\n );\n invariant(\n typeof z === 'number',\n 'Transform origin z-position must be a number. Passed value: %s.',\n z,\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nconst dummySize = {width: undefined, height: undefined};\ntype Size = {width: ?number, height: ?number};\n\nconst sizesDiffer = function (one: Size, two: Size): boolean {\n const defaultedOne = one || dummySize;\n const defaultedTwo = two || dummySize;\n return (\n defaultedOne !== defaultedTwo &&\n (defaultedOne.width !== defaultedTwo.width ||\n defaultedOne.height !== defaultedTwo.height)\n );\n};\n\nmodule.exports = sizesDiffer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\n/**\n * Unrolls an array comparison specially for matrices. Prioritizes\n * checking of indices that are most likely to change so that the comparison\n * bails as early as possible.\n *\n * @param {MatrixMath.Matrix} one First matrix.\n * @param {MatrixMath.Matrix} two Second matrix.\n * @return {boolean} Whether or not the two matrices differ.\n */\nconst matricesDiffer = function (\n one: ?Array,\n two: ?Array,\n): boolean {\n if (one === two) {\n return false;\n }\n return (\n !one ||\n !two ||\n one[12] !== two[12] ||\n one[13] !== two[13] ||\n one[14] !== two[14] ||\n one[5] !== two[5] ||\n one[10] !== two[10] ||\n one[0] !== two[0] ||\n one[1] !== two[1] ||\n one[2] !== two[2] ||\n one[3] !== two[3] ||\n one[4] !== two[4] ||\n one[6] !== two[6] ||\n one[7] !== two[7] ||\n one[8] !== two[8] ||\n one[9] !== two[9] ||\n one[11] !== two[11] ||\n one[15] !== two[15]\n );\n};\n\nmodule.exports = matricesDiffer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\ntype Point = {\n x: ?number,\n y: ?number,\n ...\n};\n\nconst dummyPoint = {x: undefined, y: undefined};\n\nconst pointsDiffer = function (one: ?Point, two: ?Point): boolean {\n one = one || dummyPoint;\n two = two || dummyPoint;\n return one !== two && (one.x !== two.x || one.y !== two.y);\n};\n\nmodule.exports = pointsDiffer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\ntype Inset = {\n top: ?number,\n left: ?number,\n right: ?number,\n bottom: ?number,\n ...\n};\n\nconst dummyInsets = {\n top: undefined,\n left: undefined,\n right: undefined,\n bottom: undefined,\n};\n\nconst insetsDiffer = function (one: Inset, two: Inset): boolean {\n one = one || dummyInsets;\n two = two || dummyInsets;\n return (\n one !== two &&\n (one.top !== two.top ||\n one.left !== two.left ||\n one.right !== two.right ||\n one.bottom !== two.bottom)\n );\n};\n\nmodule.exports = insetsDiffer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nimport type {ColorValue} from './StyleSheet';\n\nimport processColor, {type ProcessedColorValue} from './processColor';\n\nconst TRANSPARENT = 0; // rgba(0, 0, 0, 0)\n\nfunction processColorArray(\n colors: ?$ReadOnlyArray,\n): ?$ReadOnlyArray {\n return colors == null ? null : colors.map(processColorElement);\n}\n\nfunction processColorElement(color: ColorValue): ProcessedColorValue {\n const value = processColor(color);\n // For invalid colors, fallback to transparent.\n if (value == null) {\n console.error('Invalid value in color array:', color);\n return TRANSPARENT;\n }\n return value;\n}\n\nmodule.exports = processColorArray;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// Utilities for resolving an asset into a `source` for e.g. `Image`\n\nimport type {ResolvedAssetSource} from './AssetSourceResolver';\nimport type {ImageSource} from './ImageSource';\n\nimport SourceCode from '../NativeModules/specs/NativeSourceCode';\n\nconst AssetSourceResolver = require('./AssetSourceResolver');\nconst {pickScale} = require('./AssetUtils');\nconst AssetRegistry = require('@react-native/assets-registry/registry');\n\ntype CustomSourceTransformer = (\n resolver: AssetSourceResolver,\n) => ?ResolvedAssetSource;\n\nlet _customSourceTransformers: Array = [];\nlet _serverURL: ?string;\nlet _scriptURL: ?string;\nlet _sourceCodeScriptURL: ?string;\n\nfunction getSourceCodeScriptURL(): ?string {\n if (_sourceCodeScriptURL != null) {\n return _sourceCodeScriptURL;\n }\n\n _sourceCodeScriptURL = SourceCode.getConstants().scriptURL;\n return _sourceCodeScriptURL;\n}\n\nfunction getDevServerURL(): ?string {\n if (_serverURL === undefined) {\n const sourceCodeScriptURL = getSourceCodeScriptURL();\n const match = sourceCodeScriptURL?.match(/^https?:\\/\\/.*?\\//);\n if (match) {\n // jsBundle was loaded from network\n _serverURL = match[0];\n } else {\n // jsBundle was loaded from file\n _serverURL = null;\n }\n }\n return _serverURL;\n}\n\nfunction _coerceLocalScriptURL(scriptURL: ?string): ?string {\n let normalizedScriptURL = scriptURL;\n\n if (normalizedScriptURL != null) {\n if (normalizedScriptURL.startsWith('assets://')) {\n // android: running from within assets, no offline path to use\n return null;\n }\n normalizedScriptURL = normalizedScriptURL.substring(\n 0,\n normalizedScriptURL.lastIndexOf('/') + 1,\n );\n if (!normalizedScriptURL.includes('://')) {\n // Add file protocol in case we have an absolute file path and not a URL.\n // This shouldn't really be necessary. scriptURL should be a URL.\n normalizedScriptURL = 'file://' + normalizedScriptURL;\n }\n }\n\n return normalizedScriptURL;\n}\n\nfunction getScriptURL(): ?string {\n if (_scriptURL === undefined) {\n _scriptURL = _coerceLocalScriptURL(getSourceCodeScriptURL());\n }\n return _scriptURL;\n}\n\n/**\n * `transformer` can optionally be used to apply a custom transformation when\n * resolving an asset source. This methods overrides all other custom transformers\n * that may have been previously registered.\n */\nfunction setCustomSourceTransformer(\n transformer: CustomSourceTransformer,\n): void {\n _customSourceTransformers = [transformer];\n}\n\n/**\n * Adds a `transformer` into the chain of custom source transformers, which will\n * be applied in the order registered, until one returns a non-null value.\n */\nfunction addCustomSourceTransformer(\n transformer: CustomSourceTransformer,\n): void {\n _customSourceTransformers.push(transformer);\n}\n\n/**\n * `source` is either a number (opaque type returned by require('./foo.png'))\n * or an `ImageSource` like { uri: '' }\n */\nfunction resolveAssetSource(source: ?ImageSource): ?ResolvedAssetSource {\n if (source == null || typeof source === 'object') {\n // $FlowFixMe[incompatible-exact] `source` doesn't exactly match `ResolvedAssetSource`\n // $FlowFixMe[incompatible-return] `source` doesn't exactly match `ResolvedAssetSource`\n return source;\n }\n\n const asset = AssetRegistry.getAssetByID(source);\n if (!asset) {\n return null;\n }\n\n const resolver = new AssetSourceResolver(\n getDevServerURL(),\n getScriptURL(),\n asset,\n );\n\n // Apply (chained) custom source transformers, if any\n if (_customSourceTransformers) {\n for (const customSourceTransformer of _customSourceTransformers) {\n const transformedSource = customSourceTransformer(resolver);\n if (transformedSource != null) {\n return transformedSource;\n }\n }\n }\n\n return resolver.defaultAsset();\n}\n\nresolveAssetSource.pickScale = pickScale;\nresolveAssetSource.setCustomSourceTransformer = setCustomSourceTransformer;\nresolveAssetSource.addCustomSourceTransformer = addCustomSourceTransformer;\nmodule.exports = resolveAssetSource;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeSourceCode';\nimport NativeSourceCode from '../../../src/private/specs/modules/NativeSourceCode';\nexport default NativeSourceCode;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type SourceCodeConstants = {|\n scriptURL: string,\n|};\n\nexport interface Spec extends TurboModule {\n +getConstants: () => SourceCodeConstants;\n}\n\nconst NativeModule = TurboModuleRegistry.getEnforcing('SourceCode');\nlet constants = null;\n\nconst NativeSourceCode = {\n getConstants(): SourceCodeConstants {\n if (constants == null) {\n constants = NativeModule.getConstants();\n }\n\n return constants;\n },\n};\n\nexport default NativeSourceCode;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nexport type PackagerAsset = {\n +__packager_asset: boolean,\n +fileSystemLocation: string,\n +httpServerLocation: string,\n +width: ?number,\n +height: ?number,\n +scales: Array,\n +hash: string,\n +name: string,\n +type: string,\n ...\n};\n\nconst assets: Array = [];\n\nfunction registerAsset(asset: PackagerAsset): number {\n // `push` returns new array length, so the first asset will\n // get id 1 (not 0) to make the value truthy\n return assets.push(asset);\n}\n\nfunction getAssetByID(assetId: number): PackagerAsset {\n return assets[assetId - 1];\n}\n\nmodule.exports = {registerAsset, getAssetByID};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nexport type ResolvedAssetSource = {|\n +__packager_asset: boolean,\n +width: ?number,\n +height: ?number,\n +uri: string,\n +scale: number,\n|};\n\nimport type {PackagerAsset} from '@react-native/assets-registry/registry';\n\nconst PixelRatio = require('../Utilities/PixelRatio').default;\nconst Platform = require('../Utilities/Platform');\nconst {pickScale} = require('./AssetUtils');\nconst {\n getAndroidResourceFolderName,\n getAndroidResourceIdentifier,\n getBasePath,\n} = require('@react-native/assets-registry/path-support');\nconst invariant = require('invariant');\n\n/**\n * Returns a path like 'assets/AwesomeModule/icon@2x.png'\n */\nfunction getScaledAssetPath(asset: PackagerAsset): string {\n const scale = pickScale(asset.scales, PixelRatio.get());\n const scaleSuffix = scale === 1 ? '' : '@' + scale + 'x';\n const assetDir = getBasePath(asset);\n return assetDir + '/' + asset.name + scaleSuffix + '.' + asset.type;\n}\n\n/**\n * Returns a path like 'drawable-mdpi/icon.png'\n */\nfunction getAssetPathInDrawableFolder(asset: PackagerAsset): string {\n const scale = pickScale(asset.scales, PixelRatio.get());\n const drawableFolder = getAndroidResourceFolderName(asset, scale);\n const fileName = getAndroidResourceIdentifier(asset);\n return drawableFolder + '/' + fileName + '.' + asset.type;\n}\n\nclass AssetSourceResolver {\n serverUrl: ?string;\n // where the jsbundle is being run from\n jsbundleUrl: ?string;\n // the asset to resolve\n asset: PackagerAsset;\n\n constructor(serverUrl: ?string, jsbundleUrl: ?string, asset: PackagerAsset) {\n this.serverUrl = serverUrl;\n this.jsbundleUrl = jsbundleUrl;\n this.asset = asset;\n }\n\n isLoadedFromServer(): boolean {\n return !!this.serverUrl;\n }\n\n isLoadedFromFileSystem(): boolean {\n return this.jsbundleUrl != null && this.jsbundleUrl?.startsWith('file://');\n }\n\n defaultAsset(): ResolvedAssetSource {\n if (this.isLoadedFromServer()) {\n return this.assetServerURL();\n }\n\n if (Platform.OS === 'android') {\n return this.isLoadedFromFileSystem()\n ? this.drawableFolderInBundle()\n : this.resourceIdentifierWithoutScale();\n } else {\n return this.scaledAssetURLNearBundle();\n }\n }\n\n /**\n * Returns an absolute URL which can be used to fetch the asset\n * from the devserver\n */\n assetServerURL(): ResolvedAssetSource {\n invariant(this.serverUrl != null, 'need server to load from');\n return this.fromSource(\n this.serverUrl +\n getScaledAssetPath(this.asset) +\n '?platform=' +\n Platform.OS +\n '&hash=' +\n this.asset.hash,\n );\n }\n\n /**\n * Resolves to just the scaled asset filename\n * E.g. 'assets/AwesomeModule/icon@2x.png'\n */\n scaledAssetPath(): ResolvedAssetSource {\n return this.fromSource(getScaledAssetPath(this.asset));\n }\n\n /**\n * Resolves to where the bundle is running from, with a scaled asset filename\n * E.g. 'file:///sdcard/bundle/assets/AwesomeModule/icon@2x.png'\n */\n scaledAssetURLNearBundle(): ResolvedAssetSource {\n const path = this.jsbundleUrl ?? 'file://';\n return this.fromSource(\n // Assets can have relative paths outside of the project root.\n // When bundling them we replace `../` with `_` to make sure they\n // don't end up outside of the expected assets directory.\n path + getScaledAssetPath(this.asset).replace(/\\.\\.\\//g, '_'),\n );\n }\n\n /**\n * The default location of assets bundled with the app, located by\n * resource identifier\n * The Android resource system picks the correct scale.\n * E.g. 'assets_awesomemodule_icon'\n */\n resourceIdentifierWithoutScale(): ResolvedAssetSource {\n invariant(\n Platform.OS === 'android',\n 'resource identifiers work on Android',\n );\n return this.fromSource(getAndroidResourceIdentifier(this.asset));\n }\n\n /**\n * If the jsbundle is running from a sideload location, this resolves assets\n * relative to its location\n * E.g. 'file:///sdcard/AwesomeModule/drawable-mdpi/icon.png'\n */\n drawableFolderInBundle(): ResolvedAssetSource {\n const path = this.jsbundleUrl ?? 'file://';\n return this.fromSource(path + getAssetPathInDrawableFolder(this.asset));\n }\n\n fromSource(source: string): ResolvedAssetSource {\n return {\n __packager_asset: true,\n width: this.asset.width,\n height: this.asset.height,\n uri: source,\n scale: pickScale(this.asset.scales, PixelRatio.get()),\n };\n }\n\n static pickScale: (scales: Array, deviceScale?: number) => number =\n pickScale;\n}\n\nmodule.exports = AssetSourceResolver;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport PixelRatio from '../Utilities/PixelRatio';\n\nlet cacheBreaker;\nlet warnIfCacheBreakerUnset = true;\n\nexport function pickScale(scales: Array, deviceScale?: number): number {\n const requiredDeviceScale = deviceScale ?? PixelRatio.get();\n\n // Packager guarantees that `scales` array is sorted\n for (let i = 0; i < scales.length; i++) {\n if (scales[i] >= requiredDeviceScale) {\n return scales[i];\n }\n }\n\n // If nothing matches, device scale is larger than any available\n // scales, so we return the biggest one. Unless the array is empty,\n // in which case we default to 1\n return scales[scales.length - 1] || 1;\n}\n\nexport function setUrlCacheBreaker(appendage: string) {\n cacheBreaker = appendage;\n}\n\nexport function getUrlCacheBreaker(): string {\n if (cacheBreaker == null) {\n if (__DEV__ && warnIfCacheBreakerUnset) {\n warnIfCacheBreakerUnset = false;\n console.warn(\n 'AssetUtils.getUrlCacheBreaker: Cache breaker value is unset',\n );\n }\n return '';\n }\n return cacheBreaker;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nconst Dimensions = require('./Dimensions').default;\n\n/**\n * PixelRatio class gives access to the device pixel density.\n *\n * ## Fetching a correctly sized image\n *\n * You should get a higher resolution image if you are on a high pixel density\n * device. A good rule of thumb is to multiply the size of the image you display\n * by the pixel ratio.\n *\n * ```\n * var image = getImage({\n * width: PixelRatio.getPixelSizeForLayoutSize(200),\n * height: PixelRatio.getPixelSizeForLayoutSize(100),\n * });\n * \n * ```\n *\n * ## Pixel grid snapping\n *\n * In iOS, you can specify positions and dimensions for elements with arbitrary\n * precision, for example 29.674825. But, ultimately the physical display only\n * have a fixed number of pixels, for example 640×960 for iPhone 4 or 750×1334\n * for iPhone 6. iOS tries to be as faithful as possible to the user value by\n * spreading one original pixel into multiple ones to trick the eye. The\n * downside of this technique is that it makes the resulting element look\n * blurry.\n *\n * In practice, we found out that developers do not want this feature and they\n * have to work around it by doing manual rounding in order to avoid having\n * blurry elements. In React Native, we are rounding all the pixels\n * automatically.\n *\n * We have to be careful when to do this rounding. You never want to work with\n * rounded and unrounded values at the same time as you're going to accumulate\n * rounding errors. Having even one rounding error is deadly because a one\n * pixel border may vanish or be twice as big.\n *\n * In React Native, everything in JavaScript and within the layout engine works\n * with arbitrary precision numbers. It's only when we set the position and\n * dimensions of the native element on the main thread that we round. Also,\n * rounding is done relative to the root rather than the parent, again to avoid\n * accumulating rounding errors.\n *\n */\nclass PixelRatio {\n /**\n * Returns the device pixel density. Some examples:\n *\n * - PixelRatio.get() === 1\n * - mdpi Android devices (160 dpi)\n * - PixelRatio.get() === 1.5\n * - hdpi Android devices (240 dpi)\n * - PixelRatio.get() === 2\n * - iPhone 4, 4S\n * - iPhone 5, 5c, 5s\n * - iPhone 6\n * - iPhone 7\n * - iPhone 8\n * - iPhone SE\n * - xhdpi Android devices (320 dpi)\n * - PixelRatio.get() === 3\n * - iPhone 6 Plus\n * - iPhone 7 Plus\n * - iPhone 8 Plus\n * - iPhone X\n * - xxhdpi Android devices (480 dpi)\n * - PixelRatio.get() === 3.5\n * - Nexus 6\n */\n static get(): number {\n return Dimensions.get('window').scale;\n }\n\n /**\n * Returns the scaling factor for font sizes. This is the ratio that is used to calculate the\n * absolute font size, so any elements that heavily depend on that should use this to do\n * calculations.\n *\n * If a font scale is not set, this returns the device pixel ratio.\n *\n * This reflects the user preference set in:\n * - Settings > Display > Font size on Android,\n * - Settings > Display & Brightness > Text Size on iOS.\n */\n static getFontScale(): number {\n return Dimensions.get('window').fontScale || PixelRatio.get();\n }\n\n /**\n * Converts a layout size (dp) to pixel size (px).\n *\n * Guaranteed to return an integer number.\n */\n static getPixelSizeForLayoutSize(layoutSize: number): number {\n return Math.round(layoutSize * PixelRatio.get());\n }\n\n /**\n * Rounds a layout size (dp) to the nearest layout size that corresponds to\n * an integer number of pixels. For example, on a device with a PixelRatio\n * of 3, `PixelRatio.roundToNearestPixel(8.4) = 8.33`, which corresponds to\n * exactly (8.33 * 3) = 25 pixels.\n */\n static roundToNearestPixel(layoutSize: number): number {\n const ratio = PixelRatio.get();\n return Math.round(layoutSize * ratio) / ratio;\n }\n\n // No-op for iOS, but used on the web. Should not be documented.\n static startDetecting() {}\n}\n\nexport default PixelRatio;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';\nimport EventEmitter, {\n type EventSubscription,\n} from '../vendor/emitter/EventEmitter';\nimport NativeDeviceInfo, {\n type DimensionsPayload,\n type DisplayMetrics,\n type DisplayMetricsAndroid,\n} from './NativeDeviceInfo';\nimport invariant from 'invariant';\n\nconst eventEmitter = new EventEmitter<{\n change: [DimensionsPayload],\n}>();\nlet dimensionsInitialized = false;\nlet dimensions: DimensionsPayload;\n\nclass Dimensions {\n /**\n * NOTE: `useWindowDimensions` is the preferred API for React components.\n *\n * Initial dimensions are set before `runApplication` is called so they should\n * be available before any other require's are run, but may be updated later.\n *\n * Note: Although dimensions are available immediately, they may change (e.g\n * due to device rotation) so any rendering logic or styles that depend on\n * these constants should try to call this function on every render, rather\n * than caching the value (for example, using inline styles rather than\n * setting a value in a `StyleSheet`).\n *\n * Example: `const {height, width} = Dimensions.get('window');`\n *\n * @param {string} dim Name of dimension as defined when calling `set`.\n * @returns {DisplayMetrics? | DisplayMetricsAndroid?} Value for the dimension.\n */\n static get(dim: string): DisplayMetrics | DisplayMetricsAndroid {\n // $FlowFixMe[invalid-computed-prop]\n invariant(dimensions[dim], 'No dimension set for key ' + dim);\n return dimensions[dim];\n }\n\n /**\n * This should only be called from native code by sending the\n * didUpdateDimensions event.\n *\n * @param {DimensionsPayload} dims Simple string-keyed object of dimensions to set\n */\n static set(dims: $ReadOnly): void {\n // We calculate the window dimensions in JS so that we don't encounter loss of\n // precision in transferring the dimensions (which could be non-integers) over\n // the bridge.\n let {screen, window} = dims;\n const {windowPhysicalPixels} = dims;\n if (windowPhysicalPixels) {\n window = {\n width: windowPhysicalPixels.width / windowPhysicalPixels.scale,\n height: windowPhysicalPixels.height / windowPhysicalPixels.scale,\n scale: windowPhysicalPixels.scale,\n fontScale: windowPhysicalPixels.fontScale,\n };\n }\n const {screenPhysicalPixels} = dims;\n if (screenPhysicalPixels) {\n screen = {\n width: screenPhysicalPixels.width / screenPhysicalPixels.scale,\n height: screenPhysicalPixels.height / screenPhysicalPixels.scale,\n scale: screenPhysicalPixels.scale,\n fontScale: screenPhysicalPixels.fontScale,\n };\n } else if (screen == null) {\n screen = window;\n }\n\n dimensions = {window, screen};\n if (dimensionsInitialized) {\n // Don't fire 'change' the first time the dimensions are set.\n eventEmitter.emit('change', dimensions);\n } else {\n dimensionsInitialized = true;\n }\n }\n\n /**\n * Add an event handler. Supported events:\n *\n * - `change`: Fires when a property within the `Dimensions` object changes. The argument\n * to the event handler is an object with `window` and `screen` properties whose values\n * are the same as the return values of `Dimensions.get('window')` and\n * `Dimensions.get('screen')`, respectively.\n */\n static addEventListener(\n type: 'change',\n handler: Function,\n ): EventSubscription {\n invariant(\n type === 'change',\n 'Trying to subscribe to unknown event: \"%s\"',\n type,\n );\n return eventEmitter.addListener(type, handler);\n }\n}\n\n// Subscribe before calling getConstants to make sure we don't miss any updates in between.\nRCTDeviceEventEmitter.addListener(\n 'didUpdateDimensions',\n (update: DimensionsPayload) => {\n Dimensions.set(update);\n },\n);\nDimensions.set(NativeDeviceInfo.getConstants().Dimensions);\n\nexport default Dimensions;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeDeviceInfo';\nimport NativeDeviceInfo from '../../src/private/specs/modules/NativeDeviceInfo';\nexport default NativeDeviceInfo;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type DisplayMetricsAndroid = {|\n width: number,\n height: number,\n scale: number,\n fontScale: number,\n densityDpi: number,\n|};\n\nexport type DisplayMetrics = {|\n width: number,\n height: number,\n scale: number,\n fontScale: number,\n|};\n\nexport type DimensionsPayload = {|\n window?: DisplayMetrics,\n screen?: DisplayMetrics,\n windowPhysicalPixels?: DisplayMetricsAndroid,\n screenPhysicalPixels?: DisplayMetricsAndroid,\n|};\n\nexport type DeviceInfoConstants = {|\n +Dimensions: DimensionsPayload,\n +isIPhoneX_deprecated?: boolean,\n|};\n\nexport interface Spec extends TurboModule {\n +getConstants: () => DeviceInfoConstants;\n}\n\nconst NativeModule: Spec = TurboModuleRegistry.getEnforcing('DeviceInfo');\nlet constants: ?DeviceInfoConstants = null;\n\nconst NativeDeviceInfo = {\n getConstants(): DeviceInfoConstants {\n if (constants == null) {\n constants = NativeModule.getConstants();\n }\n return constants;\n },\n};\n\nexport default NativeDeviceInfo;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nimport type {PackagerAsset} from './registry.js';\n\nconst androidScaleSuffix = {\n '0.75': 'ldpi',\n '1': 'mdpi',\n '1.5': 'hdpi',\n '2': 'xhdpi',\n '3': 'xxhdpi',\n '4': 'xxxhdpi',\n};\n\nconst ANDROID_BASE_DENSITY = 160;\n\n/**\n * FIXME: using number to represent discrete scale numbers is fragile in essence because of\n * floating point numbers imprecision.\n */\nfunction getAndroidAssetSuffix(scale: number): string {\n if (scale.toString() in androidScaleSuffix) {\n // $FlowFixMe[invalid-computed-prop]\n return androidScaleSuffix[scale.toString()];\n }\n // NOTE: Android Gradle Plugin does not fully support the nnndpi format.\n // See https://issuetracker.google.com/issues/72884435\n if (Number.isFinite(scale) && scale > 0) {\n return Math.round(scale * ANDROID_BASE_DENSITY) + 'dpi';\n }\n throw new Error('no such scale ' + scale.toString());\n}\n\n// See https://developer.android.com/guide/topics/resources/drawable-resource.html\nconst drawableFileTypes = new Set([\n 'gif',\n 'jpeg',\n 'jpg',\n 'ktx',\n 'png',\n 'svg',\n 'webp',\n 'xml',\n]);\n\nfunction getAndroidResourceFolderName(\n asset: PackagerAsset,\n scale: number,\n): string | $TEMPORARY$string<'raw'> {\n if (!drawableFileTypes.has(asset.type)) {\n return 'raw';\n }\n const suffix = getAndroidAssetSuffix(scale);\n if (!suffix) {\n throw new Error(\n \"Don't know which android drawable suffix to use for scale: \" +\n scale +\n '\\nAsset: ' +\n JSON.stringify(asset, null, '\\t') +\n '\\nPossible scales are:' +\n JSON.stringify(androidScaleSuffix, null, '\\t'),\n );\n }\n return 'drawable-' + suffix;\n}\n\nfunction getAndroidResourceIdentifier(asset: PackagerAsset): string {\n return (getBasePath(asset) + '/' + asset.name)\n .toLowerCase()\n .replace(/\\//g, '_') // Encode folder structure in file name\n .replace(/([^a-z0-9_])/g, '') // Remove illegal chars\n .replace(/^assets_/, ''); // Remove \"assets_\" prefix\n}\n\nfunction getBasePath(asset: PackagerAsset): string {\n const basePath = asset.httpServerLocation;\n return basePath.startsWith('/') ? basePath.slice(1) : basePath;\n}\n\nmodule.exports = {\n getAndroidResourceFolderName,\n getAndroidResourceIdentifier,\n getBasePath,\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @noformat\n * @nolint\n * @flow strict-local\n * @generated SignedSource<<69d0cc554d77cddb1c779dfbdf569505>>\n */\n\n'use strict';\n\nimport {type ViewConfig} from './ReactNativeTypes';\nimport invariant from 'invariant';\n\n// Event configs\nexport const customBubblingEventTypes: {\n [eventName: string]: $ReadOnly<{\n phasedRegistrationNames: $ReadOnly<{\n captured: string,\n bubbled: string,\n skipBubbling?: ?boolean,\n }>,\n }>,\n} = {};\nexport const customDirectEventTypes: {\n [eventName: string]: $ReadOnly<{\n registrationName: string,\n }>,\n} = {};\n\nconst viewConfigCallbacks = new Map ViewConfig>();\nconst viewConfigs = new Map();\n\nfunction processEventTypes(viewConfig: ViewConfig): void {\n const {bubblingEventTypes, directEventTypes} = viewConfig;\n\n if (__DEV__) {\n if (bubblingEventTypes != null && directEventTypes != null) {\n for (const topLevelType in directEventTypes) {\n invariant(\n bubblingEventTypes[topLevelType] == null,\n 'Event cannot be both direct and bubbling: %s',\n topLevelType,\n );\n }\n }\n }\n\n if (bubblingEventTypes != null) {\n for (const topLevelType in bubblingEventTypes) {\n if (customBubblingEventTypes[topLevelType] == null) {\n customBubblingEventTypes[topLevelType] =\n bubblingEventTypes[topLevelType];\n }\n }\n }\n\n if (directEventTypes != null) {\n for (const topLevelType in directEventTypes) {\n if (customDirectEventTypes[topLevelType] == null) {\n customDirectEventTypes[topLevelType] = directEventTypes[topLevelType];\n }\n }\n }\n}\n\n/**\n * Registers a native view/component by name.\n * A callback is provided to load the view config from UIManager.\n * The callback is deferred until the view is actually rendered.\n */\nexport function register(name: string, callback: () => ViewConfig): string {\n invariant(\n !viewConfigCallbacks.has(name),\n 'Tried to register two views with the same name %s',\n name,\n );\n invariant(\n typeof callback === 'function',\n 'View config getter callback for component `%s` must be a function (received `%s`)',\n name,\n callback === null ? 'null' : typeof callback,\n );\n viewConfigCallbacks.set(name, callback);\n return name;\n}\n\n/**\n * Retrieves a config for the specified view.\n * If this is the first time the view has been used,\n * This configuration will be lazy-loaded from UIManager.\n */\nexport function get(name: string): ViewConfig {\n let viewConfig;\n if (!viewConfigs.has(name)) {\n const callback = viewConfigCallbacks.get(name);\n if (typeof callback !== 'function') {\n invariant(\n false,\n 'View config getter callback for component `%s` must be a function (received `%s`).%s',\n name,\n callback === null ? 'null' : typeof callback,\n // $FlowFixMe[recursive-definition]\n typeof name[0] === 'string' && /[a-z]/.test(name[0])\n ? ' Make sure to start component names with a capital letter.'\n : '',\n );\n }\n viewConfig = callback();\n processEventTypes(viewConfig);\n viewConfigs.set(name, viewConfig);\n\n // Clear the callback after the config is set so that\n // we don't mask any errors during registration.\n viewConfigCallbacks.set(name, null);\n } else {\n viewConfig = viewConfigs.get(name);\n }\n invariant(viewConfig, 'View config not found for name %s', name);\n return viewConfig;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport PlatformBaseViewConfig from '../NativeComponent/PlatformBaseViewConfig';\nimport {type ViewConfig} from '../Renderer/shims/ReactNativeTypes';\n\nconst IGNORED_KEYS = ['transform', 'hitSlop'];\n\n/**\n * The purpose of this function is to validate that the view config that\n * native exposes for a given view manager is the same as the view config\n * that is specified for that view manager in JS.\n *\n * In order to improve perf, we want to avoid calling into native to get\n * the view config when each view manager is used. To do this, we are moving\n * the configs to JS. In the future we will use these JS based view configs\n * to codegen the view manager on native to ensure they stay in sync without\n * this runtime check.\n *\n * If this function fails, that likely means a change was made to the native\n * view manager without updating the JS config as well. Ideally you can make\n * that direct change to the JS config. If you don't know what the differences\n * are, the best approach I've found is to create a view that prints\n * the return value of getNativeComponentAttributes, and then copying that\n * text and pasting it back into JS:\n * {JSON.stringify(getNativeComponentAttributes('RCTView'))}\n *\n * This is meant to be a stopgap until the time comes when we only have a\n * single source of truth. I wonder if this message will still be here two\n * years from now...\n */\nexport default function verifyComponentAttributeEquivalence(\n nativeViewConfig: ViewConfig,\n staticViewConfig: ViewConfig,\n) {\n for (const prop of [\n 'validAttributes',\n 'bubblingEventTypes',\n 'directEventTypes',\n ]) {\n const diff = Object.keys(\n lefthandObjectDiff(nativeViewConfig[prop], staticViewConfig[prop]),\n );\n\n if (diff.length > 0) {\n const name =\n staticViewConfig.uiViewClassName ?? nativeViewConfig.uiViewClassName;\n console.error(\n `'${name}' has a view config that does not match native. ` +\n `'${prop}' is missing: ${diff.join(', ')}`,\n );\n }\n }\n}\n\n// Return the different key-value pairs of the right object, by iterating through the keys in the left object\n// Note it won't return a difference where a key is missing in the left but exists the right.\nfunction lefthandObjectDiff(leftObj: Object, rightObj: Object): Object {\n const differentKeys: {[string]: any | {...}} = {};\n\n function compare(leftItem: any, rightItem: any, key: string) {\n if (typeof leftItem !== typeof rightItem && leftItem != null) {\n differentKeys[key] = rightItem;\n return;\n }\n\n if (typeof leftItem === 'object') {\n const objDiff = lefthandObjectDiff(leftItem, rightItem);\n if (Object.keys(objDiff).length > 1) {\n differentKeys[key] = objDiff;\n }\n return;\n }\n\n if (leftItem !== rightItem) {\n differentKeys[key] = rightItem;\n return;\n }\n }\n\n for (const key in leftObj) {\n if (IGNORED_KEYS.includes(key)) {\n continue;\n }\n\n if (!rightObj) {\n differentKeys[key] = {};\n } else if (leftObj.hasOwnProperty(key)) {\n compare(leftObj[key], rightObj[key], key);\n }\n }\n\n return differentKeys;\n}\n\nexport function getConfigWithoutViewProps(\n viewConfig: ViewConfig,\n propName: string,\n): {...} {\n // $FlowFixMe[invalid-computed-prop]\n if (!viewConfig[propName]) {\n return {};\n }\n\n return (\n Object.keys(viewConfig[propName])\n // $FlowFixMe[invalid-computed-prop]\n .filter(prop => !PlatformBaseViewConfig[propName][prop])\n .reduce<{[string]: any}>((obj, prop) => {\n // $FlowFixMe[invalid-computed-prop]\n obj[prop] = viewConfig[propName][prop];\n return obj;\n }, {})\n );\n}\n\nexport function stringifyViewConfig(viewConfig: any): string {\n return JSON.stringify(\n viewConfig,\n (key, val) => {\n if (typeof val === 'function') {\n return `ƒ ${val.name}`;\n }\n return val;\n },\n 2,\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {PartialViewConfig} from '../Renderer/shims/ReactNativeTypes';\n\nimport BaseViewConfig from './BaseViewConfig';\n\nexport type PartialViewConfigWithoutName = $Rest<\n PartialViewConfig,\n {uiViewClassName: string},\n>;\n\nconst PlatformBaseViewConfig: PartialViewConfigWithoutName = BaseViewConfig;\n\n// In Wilde/FB4A, use RNHostComponentListRoute in Bridge mode to verify\n// whether the JS props defined here match the native props defined\n// in RCTViewManagers in iOS, and ViewManagers in Android.\nexport default PlatformBaseViewConfig;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {PartialViewConfigWithoutName} from './PlatformBaseViewConfig';\n\nimport ReactNativeStyleAttributes from '../Components/View/ReactNativeStyleAttributes';\nimport {DynamicallyInjectedByGestureHandler} from './ViewConfigIgnore';\n\nconst bubblingEventTypes = {\n // Bubbling events from UIManagerModuleConstants.java\n topChange: {\n phasedRegistrationNames: {\n captured: 'onChangeCapture',\n bubbled: 'onChange',\n },\n },\n topSelect: {\n phasedRegistrationNames: {\n captured: 'onSelectCapture',\n bubbled: 'onSelect',\n },\n },\n topTouchEnd: {\n phasedRegistrationNames: {\n captured: 'onTouchEndCapture',\n bubbled: 'onTouchEnd',\n },\n },\n topTouchCancel: {\n phasedRegistrationNames: {\n captured: 'onTouchCancelCapture',\n bubbled: 'onTouchCancel',\n },\n },\n topTouchStart: {\n phasedRegistrationNames: {\n captured: 'onTouchStartCapture',\n bubbled: 'onTouchStart',\n },\n },\n topTouchMove: {\n phasedRegistrationNames: {\n captured: 'onTouchMoveCapture',\n bubbled: 'onTouchMove',\n },\n },\n\n // Experimental/Work in Progress Pointer Events (not yet ready for use)\n topPointerCancel: {\n phasedRegistrationNames: {\n captured: 'onPointerCancelCapture',\n bubbled: 'onPointerCancel',\n },\n },\n topPointerDown: {\n phasedRegistrationNames: {\n captured: 'onPointerDownCapture',\n bubbled: 'onPointerDown',\n },\n },\n topPointerEnter: {\n phasedRegistrationNames: {\n captured: 'onPointerEnterCapture',\n bubbled: 'onPointerEnter',\n skipBubbling: true,\n },\n },\n topPointerLeave: {\n phasedRegistrationNames: {\n captured: 'onPointerLeaveCapture',\n bubbled: 'onPointerLeave',\n skipBubbling: true,\n },\n },\n topPointerMove: {\n phasedRegistrationNames: {\n captured: 'onPointerMoveCapture',\n bubbled: 'onPointerMove',\n },\n },\n topPointerUp: {\n phasedRegistrationNames: {\n captured: 'onPointerUpCapture',\n bubbled: 'onPointerUp',\n },\n },\n topPointerOut: {\n phasedRegistrationNames: {\n captured: 'onPointerOutCapture',\n bubbled: 'onPointerOut',\n },\n },\n topPointerOver: {\n phasedRegistrationNames: {\n captured: 'onPointerOverCapture',\n bubbled: 'onPointerOver',\n },\n },\n topClick: {\n phasedRegistrationNames: {\n captured: 'onClickCapture',\n bubbled: 'onClick',\n },\n },\n};\n\nconst directEventTypes = {\n topAccessibilityAction: {\n registrationName: 'onAccessibilityAction',\n },\n onGestureHandlerEvent: DynamicallyInjectedByGestureHandler({\n registrationName: 'onGestureHandlerEvent',\n }),\n onGestureHandlerStateChange: DynamicallyInjectedByGestureHandler({\n registrationName: 'onGestureHandlerStateChange',\n }),\n\n // Direct events from UIManagerModuleConstants.java\n topContentSizeChange: {\n registrationName: 'onContentSizeChange',\n },\n topScrollBeginDrag: {\n registrationName: 'onScrollBeginDrag',\n },\n topMessage: {\n registrationName: 'onMessage',\n },\n topSelectionChange: {\n registrationName: 'onSelectionChange',\n },\n topLoadingFinish: {\n registrationName: 'onLoadingFinish',\n },\n topMomentumScrollEnd: {\n registrationName: 'onMomentumScrollEnd',\n },\n topLoadingStart: {\n registrationName: 'onLoadingStart',\n },\n topLoadingError: {\n registrationName: 'onLoadingError',\n },\n topMomentumScrollBegin: {\n registrationName: 'onMomentumScrollBegin',\n },\n topScrollEndDrag: {\n registrationName: 'onScrollEndDrag',\n },\n topScroll: {\n registrationName: 'onScroll',\n },\n topLayout: {\n registrationName: 'onLayout',\n },\n};\n\nconst validAttributesForNonEventProps = {\n // @ReactProps from BaseViewManager\n backgroundColor: {process: require('../StyleSheet/processColor').default},\n transform: true,\n transformOrigin: true,\n experimental_filter: {\n process: require('../StyleSheet/processFilter').default,\n },\n opacity: true,\n elevation: true,\n shadowColor: {process: require('../StyleSheet/processColor').default},\n zIndex: true,\n renderToHardwareTextureAndroid: true,\n testID: true,\n nativeID: true,\n accessibilityLabelledBy: true,\n accessibilityLabel: true,\n accessibilityHint: true,\n accessibilityRole: true,\n accessibilityCollection: true,\n accessibilityCollectionItem: true,\n accessibilityState: true,\n accessibilityActions: true,\n accessibilityValue: true,\n importantForAccessibility: true,\n role: true,\n rotation: true,\n scaleX: true,\n scaleY: true,\n translateX: true,\n translateY: true,\n accessibilityLiveRegion: true,\n\n // @ReactProps from LayoutShadowNode\n width: true,\n minWidth: true,\n collapsable: true,\n collapsableChildren: true,\n maxWidth: true,\n height: true,\n minHeight: true,\n maxHeight: true,\n flex: true,\n flexGrow: true,\n rowGap: true,\n columnGap: true,\n gap: true,\n flexShrink: true,\n flexBasis: true,\n aspectRatio: true,\n flexDirection: true,\n flexWrap: true,\n alignSelf: true,\n alignItems: true,\n alignContent: true,\n justifyContent: true,\n overflow: true,\n display: true,\n\n margin: true,\n marginBlock: true,\n marginBlockEnd: true,\n marginBlockStart: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginInline: true,\n marginInlineEnd: true,\n marginInlineStart: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n\n padding: true,\n paddingBlock: true,\n paddingBlockEnd: true,\n paddingBlockStart: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingInline: true,\n paddingInlineEnd: true,\n paddingInlineStart: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n\n borderWidth: true,\n borderStartWidth: true,\n borderEndWidth: true,\n borderTopWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n borderRightWidth: true,\n\n start: true,\n end: true,\n left: true,\n right: true,\n top: true,\n bottom: true,\n\n inset: true,\n insetBlock: true,\n insetBlockEnd: true,\n insetBlockStart: true,\n insetInline: true,\n insetInlineEnd: true,\n insetInlineStart: true,\n\n position: true,\n\n style: ReactNativeStyleAttributes,\n\n experimental_layoutConformance: true,\n};\n\n// Props for bubbling and direct events\nconst validAttributesForEventProps = {\n onLayout: true,\n\n // PanResponder handlers\n onMoveShouldSetResponder: true,\n onMoveShouldSetResponderCapture: true,\n onStartShouldSetResponder: true,\n onStartShouldSetResponderCapture: true,\n onResponderGrant: true,\n onResponderReject: true,\n onResponderStart: true,\n onResponderEnd: true,\n onResponderRelease: true,\n onResponderMove: true,\n onResponderTerminate: true,\n onResponderTerminationRequest: true,\n onShouldBlockNativeResponder: true,\n\n // Touch events\n onTouchStart: true,\n onTouchMove: true,\n onTouchEnd: true,\n onTouchCancel: true,\n\n // Pointer events\n onClick: true,\n onClickCapture: true,\n onPointerEnter: true,\n onPointerEnterCapture: true,\n onPointerLeave: true,\n onPointerLeaveCapture: true,\n onPointerMove: true,\n onPointerMoveCapture: true,\n onPointerOut: true,\n onPointerOutCapture: true,\n onPointerOver: true,\n onPointerOverCapture: true,\n};\n\n/**\n * On Android, Props are derived from a ViewManager and its ShadowNode.\n *\n * Where did we find these base platform props from?\n * - Nearly all component ViewManagers descend from BaseViewManager,\n * - and BaseViewManagers' ShadowNodes descend from LayoutShadowNode.\n * - Also, all components inherit ViewConfigs from UIManagerModuleConstants.java.\n *\n * So, these ViewConfigs are generated from LayoutShadowNode and BaseViewManager.\n */\nconst PlatformBaseViewConfigAndroid: PartialViewConfigWithoutName = {\n directEventTypes,\n bubblingEventTypes,\n validAttributes: {\n ...validAttributesForNonEventProps,\n ...validAttributesForEventProps,\n },\n};\n\nexport default PlatformBaseViewConfigAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport Platform from '../Utilities/Platform';\n\nconst ignoredViewConfigProps = new WeakSet<{...}>();\n\n/**\n * Decorates ViewConfig values that are dynamically injected by the library,\n * react-native-gesture-handler. (T45765076)\n */\nexport function DynamicallyInjectedByGestureHandler(object: T): T {\n ignoredViewConfigProps.add(object);\n return object;\n}\n\n/**\n * On iOS, ViewManager event declarations generate {eventName}: true entries\n * in ViewConfig valueAttributes. These entries aren't generated for Android.\n * This annotation allows Static ViewConfigs to insert these entries into\n * iOS but not Android.\n *\n * In the future, we want to remove this platform-inconsistency. We want\n * to set RN$ViewConfigEventValidAttributesDisabled = true server-side,\n * so that iOS does not generate validAttributes from event props in iOS RCTViewManager,\n * since Android does not generate validAttributes from events props in Android ViewManager.\n *\n * TODO(T110872225): Remove this logic, after achieving platform-consistency\n */\nexport function ConditionallyIgnoredEventHandlers(\n value: T,\n): T | void {\n if (Platform.OS === 'ios') {\n return value;\n }\n return undefined;\n}\n\nexport function isIgnored(value: mixed): boolean {\n if (typeof value === 'object' && value != null) {\n return ignoredViewConfigProps.has(value);\n }\n return false;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport {type ViewConfig} from '../Renderer/shims/ReactNativeTypes';\nimport {isIgnored} from './ViewConfigIgnore';\n\nexport type Difference =\n | {\n type: 'missing',\n path: Array,\n nativeValue: mixed,\n }\n | {\n type: 'unequal',\n path: Array,\n nativeValue: mixed,\n staticValue: mixed,\n }\n | {\n type: 'unexpected',\n path: Array,\n staticValue: mixed,\n };\n\nexport type ValidationResult = ValidResult | InvalidResult;\ntype ValidResult = {\n type: 'valid',\n};\ntype InvalidResult = {\n type: 'invalid',\n differences: Array,\n};\n\n/**\n * During the migration from native view configs to static view configs, this is\n * used to validate that the two are equivalent.\n */\nexport function validate(\n name: string,\n nativeViewConfig: ViewConfig,\n staticViewConfig: ViewConfig,\n): ValidationResult {\n const differences: Array = [];\n accumulateDifferences(\n differences,\n [],\n {\n bubblingEventTypes: nativeViewConfig.bubblingEventTypes,\n directEventTypes: nativeViewConfig.directEventTypes,\n uiViewClassName: nativeViewConfig.uiViewClassName,\n validAttributes: nativeViewConfig.validAttributes,\n },\n {\n bubblingEventTypes: staticViewConfig.bubblingEventTypes,\n directEventTypes: staticViewConfig.directEventTypes,\n uiViewClassName: staticViewConfig.uiViewClassName,\n validAttributes: staticViewConfig.validAttributes,\n },\n );\n\n if (differences.length === 0) {\n return {type: 'valid'};\n }\n\n return {\n type: 'invalid',\n differences,\n };\n}\n\nexport function stringifyValidationResult(\n name: string,\n validationResult: InvalidResult,\n): string {\n const {differences} = validationResult;\n return [\n `StaticViewConfigValidator: Invalid static view config for '${name}'.`,\n '',\n ...differences.map(difference => {\n const {type, path} = difference;\n switch (type) {\n case 'missing':\n return `- '${path.join('.')}' is missing.`;\n case 'unequal':\n return `- '${path.join('.')}' is the wrong value.`;\n case 'unexpected':\n return `- '${path.join('.')}' is present but not expected to be.`;\n }\n }),\n '',\n ].join('\\n');\n}\n\nfunction accumulateDifferences(\n differences: Array,\n path: Array,\n nativeObject: {...},\n staticObject: {...},\n): void {\n for (const nativeKey in nativeObject) {\n // $FlowFixMe[invalid-computed-prop]\n const nativeValue = nativeObject[nativeKey];\n\n if (!staticObject.hasOwnProperty(nativeKey)) {\n differences.push({\n path: [...path, nativeKey],\n type: 'missing',\n nativeValue,\n });\n continue;\n }\n\n // $FlowFixMe[invalid-computed-prop]\n const staticValue = staticObject[nativeKey];\n\n const nativeValueIfObject = ifObject(nativeValue);\n if (nativeValueIfObject != null) {\n const staticValueIfObject = ifObject(staticValue);\n if (staticValueIfObject != null) {\n path.push(nativeKey);\n accumulateDifferences(\n differences,\n path,\n nativeValueIfObject,\n staticValueIfObject,\n );\n path.pop();\n continue;\n }\n }\n\n if (nativeValue !== staticValue) {\n differences.push({\n path: [...path, nativeKey],\n type: 'unequal',\n nativeValue,\n staticValue,\n });\n }\n }\n\n for (const staticKey in staticObject) {\n if (\n !nativeObject.hasOwnProperty(staticKey) &&\n // $FlowFixMe[invalid-computed-prop]\n !isIgnored(staticObject[staticKey])\n ) {\n differences.push({\n path: [...path, staticKey],\n type: 'unexpected',\n staticValue: staticObject[staticKey],\n });\n }\n }\n}\n\nfunction ifObject(value: mixed): ?{...} {\n return typeof value === 'object' && !Array.isArray(value) ? value : null;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n PartialViewConfig,\n ViewConfig,\n} from '../Renderer/shims/ReactNativeTypes';\n\nimport PlatformBaseViewConfig from './PlatformBaseViewConfig';\n\n/**\n * Creates a complete `ViewConfig` from a `PartialViewConfig`.\n */\nexport function createViewConfig(\n partialViewConfig: PartialViewConfig,\n): ViewConfig {\n return {\n uiViewClassName: partialViewConfig.uiViewClassName,\n Commands: {},\n bubblingEventTypes: composeIndexers(\n PlatformBaseViewConfig.bubblingEventTypes,\n partialViewConfig.bubblingEventTypes,\n ),\n directEventTypes: composeIndexers(\n PlatformBaseViewConfig.directEventTypes,\n partialViewConfig.directEventTypes,\n ),\n // $FlowFixMe[incompatible-return]\n validAttributes: composeIndexers(\n // $FlowFixMe[incompatible-call] `style` property confuses Flow.\n PlatformBaseViewConfig.validAttributes,\n // $FlowFixMe[incompatible-call] `style` property confuses Flow.\n partialViewConfig.validAttributes,\n ),\n };\n}\n\nfunction composeIndexers(\n maybeA: ?{+[string]: T},\n maybeB: ?{+[string]: T},\n): {+[string]: T} {\n return maybeA == null || maybeB == null\n ? maybeA ?? maybeB ?? {}\n : {...maybeA, ...maybeB};\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nconst {dispatchCommand} = require('../ReactNative/RendererProxy');\n\ntype Options = $ReadOnly<{|\n supportedCommands: $ReadOnlyArray,\n|}>;\n\nfunction codegenNativeCommands(options: Options<$Keys>): T {\n const commandObj: {[$Keys]: (...$ReadOnlyArray) => void} = {};\n\n options.supportedCommands.forEach(command => {\n // $FlowFixMe[missing-local-annot]\n commandObj[command] = (ref, ...args) => {\n // $FlowFixMe[incompatible-call]\n dispatchCommand(ref, command, args);\n };\n });\n\n return ((commandObj: any): T);\n}\n\nexport default codegenNativeCommands;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {\n ____ColorValue_Internal,\n ____DangerouslyImpreciseStyle_Internal,\n ____DangerouslyImpreciseStyleProp_Internal,\n ____ImageStyle_Internal,\n ____ImageStyleProp_Internal,\n ____Styles_Internal,\n ____TextStyle_Internal,\n ____TextStyleProp_Internal,\n ____ViewStyle_Internal,\n ____ViewStyleProp_Internal,\n} from './StyleSheetTypes';\n\nimport composeStyles from '../../src/private/core/composeStyles';\n\nconst ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');\nconst PixelRatio = require('../Utilities/PixelRatio').default;\nconst flatten = require('./flattenStyle');\n\nexport type {NativeColorValue} from './StyleSheetTypes';\n\n/**\n * This type should be used as the type for anything that is a color. It is\n * most useful when using DynamicColorIOS which can be a string or a dynamic\n * color object.\n *\n * type props = {backgroundColor: ColorValue};\n */\nexport type ColorValue = ____ColorValue_Internal;\n\n/**\n * This type should be used as the type for a prop that is passed through\n * to a 's `style` prop. This ensures call sites of the component\n * can't pass styles that View doesn't support such as `fontSize`.`\n *\n * type Props = {style: ViewStyleProp}\n * const MyComponent = (props: Props) => \n */\nexport type ViewStyleProp = ____ViewStyleProp_Internal;\n\n/**\n * This type should be used as the type for a prop that is passed through\n * to a 's `style` prop. This ensures call sites of the component\n * can't pass styles that Text doesn't support such as `resizeMode`.`\n *\n * type Props = {style: TextStyleProp}\n * const MyComponent = (props: Props) => \n */\nexport type TextStyleProp = ____TextStyleProp_Internal;\n\n/**\n * This type should be used as the type for a prop that is passed through\n * to an 's `style` prop. This ensures call sites of the component\n * can't pass styles that Image doesn't support such as `fontSize`.`\n *\n * type Props = {style: ImageStyleProp}\n * const MyComponent = (props: Props) => \n */\nexport type ImageStyleProp = ____ImageStyleProp_Internal;\n\n/**\n * WARNING: You probably shouldn't be using this type. This type\n * is similar to the ones above except it allows styles that are accepted\n * by all of View, Text, or Image. It is therefore very unsafe to pass this\n * through to an underlying component. Using this is almost always a mistake\n * and using one of the other more restrictive types is likely the right choice.\n */\nexport type DangerouslyImpreciseStyleProp =\n ____DangerouslyImpreciseStyleProp_Internal;\n\n/**\n * Utility type for getting the values for specific style keys.\n *\n * The following is bad because position is more restrictive than 'string':\n * ```\n * type Props = {position: string};\n * ```\n *\n * You should use the following instead:\n *\n * ```\n * type Props = {position: TypeForStyleKey<'position'>};\n * ```\n *\n * This will correctly give you the type 'absolute' | 'relative'\n */\nexport type TypeForStyleKey<\n +key: $Keys<____DangerouslyImpreciseStyle_Internal>,\n> = $ElementType<____DangerouslyImpreciseStyle_Internal, key>;\n\n/**\n * This type is an object of the different possible style\n * properties that can be specified for View.\n *\n * Note that this isn't a safe way to type a style prop for a component as\n * results from StyleSheet.create return an internal identifier, not\n * an object of styles.\n *\n * If you want to type the style prop of a function,\n * consider using ViewStyleProp.\n *\n * A reasonable usage of this type is for helper functions that return an\n * object of styles to pass to a View that can't be precomputed with\n * StyleSheet.create.\n */\nexport type ViewStyle = ____ViewStyle_Internal;\n\n/**\n * This type is an object of the different possible style\n * properties that can be specified for Text.\n *\n * Note that this isn't a safe way to type a style prop for a component as\n * results from StyleSheet.create return an internal identifier, not\n * an object of styles.\n *\n * If you want to type the style prop of a function,\n * consider using TextStyleProp.\n *\n * A reasonable usage of this type is for helper functions that return an\n * object of styles to pass to a Text that can't be precomputed with\n * StyleSheet.create.\n */\nexport type TextStyle = ____TextStyle_Internal;\n\n/**\n * This type is an object of the different possible style\n * properties that can be specified for Image.\n *\n * Note that this isn't a safe way to type a style prop for a component as\n * results from StyleSheet.create return an internal identifier, not\n * an object of styles.\n *\n * If you want to type the style prop of a function,\n * consider using ImageStyleProp.\n *\n * A reasonable usage of this type is for helper functions that return an\n * object of styles to pass to an Image that can't be precomputed with\n * StyleSheet.create.\n */\nexport type ImageStyle = ____ImageStyle_Internal;\n\n/**\n * WARNING: You probably shouldn't be using this type. This type is an object\n * with all possible style keys and their values. Note that this isn't\n * a safe way to type a style prop for a component as results from\n * StyleSheet.create return an internal identifier, not an object of styles.\n *\n * If you want to type the style prop of a function, consider using\n * ViewStyleProp, TextStyleProp, or ImageStyleProp.\n *\n * This should only be used by very core utilities that operate on an object\n * containing any possible style value.\n */\nexport type DangerouslyImpreciseStyle = ____DangerouslyImpreciseStyle_Internal;\n\nlet hairlineWidth: number = PixelRatio.roundToNearestPixel(0.4);\nif (hairlineWidth === 0) {\n hairlineWidth = 1 / PixelRatio.get();\n}\n\nconst absoluteFill = {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n};\nif (__DEV__) {\n Object.freeze(absoluteFill);\n}\n\n/**\n * A StyleSheet is an abstraction similar to CSS StyleSheets\n *\n * Create a new StyleSheet:\n *\n * ```\n * const styles = StyleSheet.create({\n * container: {\n * borderRadius: 4,\n * borderWidth: 0.5,\n * borderColor: '#d6d7da',\n * },\n * title: {\n * fontSize: 19,\n * fontWeight: 'bold',\n * },\n * activeTitle: {\n * color: 'red',\n * },\n * });\n * ```\n *\n * Use a StyleSheet:\n *\n * ```\n * \n * \n * \n * ```\n *\n * Code quality:\n *\n * - By moving styles away from the render function, you're making the code\n * easier to understand.\n * - Naming the styles is a good way to add meaning to the low level components\n * in the render function, and encourage reuse.\n * - In most IDEs, using `StyleSheet.create()` will offer static type checking\n * and suggestions to help you write valid styles.\n *\n */\nmodule.exports = {\n /**\n * This is defined as the width of a thin line on the platform. It can be\n * used as the thickness of a border or division between two elements.\n * Example:\n * ```\n * {\n * borderBottomColor: '#bbb',\n * borderBottomWidth: StyleSheet.hairlineWidth\n * }\n * ```\n *\n * This constant will always be a round number of pixels (so a line defined\n * by it look crisp) and will try to match the standard width of a thin line\n * on the underlying platform. However, you should not rely on it being a\n * constant size, because on different platforms and screen densities its\n * value may be calculated differently.\n *\n * A line with hairline width may not be visible if your simulator is downscaled.\n */\n hairlineWidth,\n\n /**\n * A very common pattern is to create overlays with position absolute and zero positioning,\n * so `absoluteFill` can be used for convenience and to reduce duplication of these repeated\n * styles.\n */\n absoluteFill: (absoluteFill: any), // TODO: This should be updated after we fix downstream Flow sites.\n\n /**\n * Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be\n * used to create a customized entry in a `StyleSheet`, e.g.:\n *\n * const styles = StyleSheet.create({\n * wrapper: {\n * ...StyleSheet.absoluteFillObject,\n * top: 10,\n * backgroundColor: 'transparent',\n * },\n * });\n */\n absoluteFillObject: absoluteFill,\n\n /**\n * Combines two styles such that `style2` will override any styles in `style1`.\n * If either style is falsy, the other one is returned without allocating an\n * array, saving allocations and maintaining reference equality for\n * PureComponent checks.\n */\n compose: composeStyles,\n\n /**\n * Flattens an array of style objects, into one aggregated style object.\n *\n * Example:\n * ```\n * const styles = StyleSheet.create({\n * listItem: {\n * flex: 1,\n * fontSize: 16,\n * color: 'white'\n * },\n * selectedListItem: {\n * color: 'green'\n * }\n * });\n *\n * StyleSheet.flatten([styles.listItem, styles.selectedListItem])\n * // returns { flex: 1, fontSize: 16, color: 'green' }\n * ```\n */\n flatten,\n\n /**\n * WARNING: EXPERIMENTAL. Breaking changes will probably happen a lot and will\n * not be reliably announced. The whole thing might be deleted, who knows? Use\n * at your own risk.\n *\n * Sets a function to use to pre-process a style property value. This is used\n * internally to process color and transform values. You should not use this\n * unless you really know what you are doing and have exhausted other options.\n */\n setStyleAttributePreprocessor(\n property: string,\n process: (nextProp: mixed) => mixed,\n ) {\n let value;\n\n if (ReactNativeStyleAttributes[property] === true) {\n value = {process};\n } else if (typeof ReactNativeStyleAttributes[property] === 'object') {\n value = {...ReactNativeStyleAttributes[property], process};\n } else {\n console.error(`${property} is not a valid style attribute`);\n return;\n }\n\n if (\n __DEV__ &&\n typeof value.process === 'function' &&\n typeof ReactNativeStyleAttributes[property]?.process === 'function' &&\n value.process !== ReactNativeStyleAttributes[property]?.process\n ) {\n console.warn(`Overwriting ${property} style attribute preprocessor`);\n }\n\n ReactNativeStyleAttributes[property] = value;\n },\n\n /**\n * An identity function for creating style sheets.\n */\n // $FlowFixMe[unsupported-variance-annotation]\n create<+S: ____Styles_Internal>(obj: S): $ReadOnly {\n // TODO: This should return S as the return type. But first,\n // we need to codemod all the callsites that are typing this\n // return value as a number (even though it was opaque).\n if (__DEV__) {\n for (const key in obj) {\n if (obj[key]) {\n Object.freeze(obj[key]);\n }\n }\n }\n return obj;\n },\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n/**\n * Combines two styles such that `style2` will override any styles in `style1`.\n * If either style is null or undefined, the other one is returned without\n * allocating an array, saving allocations and enabling memoization.\n */\nexport default function composeStyles(\n style1: ?T1,\n style2: ?T2,\n): ?(T1 | T2 | $ReadOnlyArray) {\n if (style1 == null) {\n return style2;\n }\n if (style2 == null) {\n return style1;\n }\n return [style1, style2];\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport type {DangerouslyImpreciseStyleProp} from './StyleSheet';\nimport type {____FlattenStyleProp_Internal} from './StyleSheetTypes';\n\nfunction flattenStyle(\n style: ?TStyleProp,\n // $FlowFixMe[underconstrained-implicit-instantiation]\n): ?____FlattenStyleProp_Internal {\n if (style === null || typeof style !== 'object') {\n return undefined;\n }\n\n if (!Array.isArray(style)) {\n // $FlowFixMe[incompatible-return]\n return style;\n }\n\n const result: {[string]: $FlowFixMe} = {};\n for (let i = 0, styleLength = style.length; i < styleLength; ++i) {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n const computedStyle = flattenStyle(style[i]);\n if (computedStyle) {\n // $FlowFixMe[invalid-in-rhs]\n for (const key in computedStyle) {\n // $FlowFixMe[incompatible-use]\n // $FlowFixMe[invalid-computed-prop]\n result[key] = computedStyle[key];\n }\n }\n }\n // $FlowFixMe[incompatible-return]\n return result;\n}\n\nmodule.exports = flattenStyle;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport * as React from 'react';\n\nexport opaque type RootTag = number;\n\nexport const RootTagContext: React$Context =\n React.createContext(0);\n\nif (__DEV__) {\n RootTagContext.displayName = 'RootTagContext';\n}\n\n/**\n * Intended to only be used by `AppContainer`.\n */\nexport function createRootTag(rootTag: number | RootTag): RootTag {\n return rootTag;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport opaque type DisplayModeType = number;\n\n/** DisplayMode should be in sync with the method displayModeToInt from\n * react/renderer/uimanager/primitives.h. */\nconst DisplayMode: {[string]: DisplayModeType} = Object.freeze({\n VISIBLE: 1,\n SUSPENDED: 2,\n HIDDEN: 3,\n});\n\nexport function coerceDisplayMode(value: ?number): DisplayModeType {\n switch (value) {\n case DisplayMode.SUSPENDED:\n return DisplayMode.SUSPENDED;\n case DisplayMode.HIDDEN:\n return DisplayMode.HIDDEN;\n default:\n return DisplayMode.VISIBLE;\n }\n}\n\nexport default DisplayMode;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {AbstractComponent} from 'react';\n\nimport * as React from 'react';\n\ntype NoopComponent = AbstractComponent<{children: React.Node}>;\n\nconst cache: Map<\n string, // displayName\n NoopComponent, // ComponentWithDisplayName\n> = new Map();\n\nexport default function getCachedComponentWithDisplayName(\n displayName: string,\n): NoopComponent {\n let ComponentWithDisplayName = cache.get(displayName);\n\n if (!ComponentWithDisplayName) {\n ComponentWithDisplayName = ({children}: {children: React.Node}) => children;\n // $FlowFixMe[prop-missing]\n ComponentWithDisplayName.displayName = displayName;\n cache.set(displayName, ComponentWithDisplayName);\n }\n\n return ComponentWithDisplayName;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport NativeDeviceEventManager from '../../Libraries/NativeModules/specs/NativeDeviceEventManager';\nimport RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';\n\nconst DEVICE_BACK_EVENT = 'hardwareBackPress';\n\ntype BackPressEventName = 'backPress' | 'hardwareBackPress';\n\nconst _backPressSubscriptions = [];\n\nRCTDeviceEventEmitter.addListener(DEVICE_BACK_EVENT, function () {\n for (let i = _backPressSubscriptions.length - 1; i >= 0; i--) {\n if (_backPressSubscriptions[i]()) {\n return;\n }\n }\n\n BackHandler.exitApp();\n});\n\n/**\n * Detect hardware button presses for back navigation.\n *\n * Android: Detect hardware back button presses, and programmatically invoke the default back button\n * functionality to exit the app if there are no listeners or if none of the listeners return true.\n *\n * iOS: Not applicable.\n *\n * The event subscriptions are called in reverse order (i.e. last registered subscription first),\n * and if one subscription returns true then subscriptions registered earlier will not be called.\n *\n * Example:\n *\n * ```javascript\n * BackHandler.addEventListener('hardwareBackPress', function() {\n * // this.onMainScreen and this.goBack are just examples, you need to use your own implementation here\n * // Typically you would use the navigator here to go to the last state.\n *\n * if (!this.onMainScreen()) {\n * this.goBack();\n * return true;\n * }\n * return false;\n * });\n * ```\n */\ntype TBackHandler = {|\n +exitApp: () => void,\n +addEventListener: (\n eventName: BackPressEventName,\n handler: () => ?boolean,\n ) => {remove: () => void, ...},\n +removeEventListener: (\n eventName: BackPressEventName,\n handler: () => ?boolean,\n ) => void,\n|};\nconst BackHandler: TBackHandler = {\n exitApp: function (): void {\n if (!NativeDeviceEventManager) {\n return;\n }\n\n NativeDeviceEventManager.invokeDefaultBackPressHandler();\n },\n\n /**\n * Adds an event handler. Supported events:\n *\n * - `hardwareBackPress`: Fires when the Android hardware back button is pressed.\n */\n addEventListener: function (\n eventName: BackPressEventName,\n handler: () => ?boolean,\n ): {remove: () => void, ...} {\n if (_backPressSubscriptions.indexOf(handler) === -1) {\n _backPressSubscriptions.push(handler);\n }\n return {\n remove: (): void => BackHandler.removeEventListener(eventName, handler),\n };\n },\n\n /**\n * Removes the event handler.\n */\n removeEventListener: function (\n eventName: BackPressEventName,\n handler: () => ?boolean,\n ): void {\n const index = _backPressSubscriptions.indexOf(handler);\n if (index !== -1) {\n _backPressSubscriptions.splice(index, 1);\n }\n },\n};\n\nmodule.exports = BackHandler;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeDeviceEventManager';\nimport NativeDeviceEventManager from '../../../src/private/specs/modules/NativeDeviceEventManager';\nexport default NativeDeviceEventManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +invokeDefaultBackPressHandler: () => void;\n}\n\nexport default (TurboModuleRegistry.get('DeviceEventManager'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport typeof BatchedBridge from '../BatchedBridge/BatchedBridge';\nimport typeof legacySendAccessibilityEvent from '../Components/AccessibilityInfo/legacySendAccessibilityEvent';\nimport typeof TextInputState from '../Components/TextInput/TextInputState';\nimport typeof ExceptionsManager from '../Core/ExceptionsManager';\nimport typeof RawEventEmitter from '../Core/RawEventEmitter';\nimport typeof ReactFiberErrorDialog from '../Core/ReactFiberErrorDialog';\nimport typeof RCTEventEmitter from '../EventEmitter/RCTEventEmitter';\nimport typeof CustomEvent from '../Events/CustomEvent';\nimport typeof {\n createPublicInstance,\n createPublicTextInstance,\n getInternalInstanceHandleFromPublicInstance,\n getNativeTagFromPublicInstance,\n getNodeFromPublicInstance,\n} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';\nimport typeof {\n create as createAttributePayload,\n diff as diffAttributePayloads,\n} from '../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload';\nimport typeof UIManager from '../ReactNative/UIManager';\nimport typeof * as ReactNativeViewConfigRegistry from '../Renderer/shims/ReactNativeViewConfigRegistry';\nimport typeof flattenStyle from '../StyleSheet/flattenStyle';\nimport type {DangerouslyImpreciseStyleProp} from '../StyleSheet/StyleSheet';\nimport typeof deepFreezeAndThrowOnMutationInDev from '../Utilities/deepFreezeAndThrowOnMutationInDev';\nimport typeof deepDiffer from '../Utilities/differ/deepDiffer';\nimport typeof Platform from '../Utilities/Platform';\n\n// flowlint unsafe-getters-setters:off\nmodule.exports = {\n get BatchedBridge(): BatchedBridge {\n return require('../BatchedBridge/BatchedBridge');\n },\n get ExceptionsManager(): ExceptionsManager {\n return require('../Core/ExceptionsManager');\n },\n get Platform(): Platform {\n return require('../Utilities/Platform');\n },\n get RCTEventEmitter(): RCTEventEmitter {\n return require('../EventEmitter/RCTEventEmitter');\n },\n get ReactNativeViewConfigRegistry(): ReactNativeViewConfigRegistry {\n return require('../Renderer/shims/ReactNativeViewConfigRegistry');\n },\n get TextInputState(): TextInputState {\n return require('../Components/TextInput/TextInputState');\n },\n get UIManager(): UIManager {\n return require('../ReactNative/UIManager');\n },\n // TODO: Remove when React has migrated to `createAttributePayload` and `diffAttributePayloads`\n get deepDiffer(): deepDiffer {\n return require('../Utilities/differ/deepDiffer');\n },\n get deepFreezeAndThrowOnMutationInDev(): deepFreezeAndThrowOnMutationInDev<\n {...} | Array,\n > {\n return require('../Utilities/deepFreezeAndThrowOnMutationInDev');\n },\n // TODO: Remove when React has migrated to `createAttributePayload` and `diffAttributePayloads`\n get flattenStyle(): flattenStyle {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n // $FlowFixMe[incompatible-return]\n return require('../StyleSheet/flattenStyle');\n },\n get ReactFiberErrorDialog(): ReactFiberErrorDialog {\n return require('../Core/ReactFiberErrorDialog').default;\n },\n get legacySendAccessibilityEvent(): legacySendAccessibilityEvent {\n return require('../Components/AccessibilityInfo/legacySendAccessibilityEvent');\n },\n get RawEventEmitter(): RawEventEmitter {\n return require('../Core/RawEventEmitter').default;\n },\n get CustomEvent(): CustomEvent {\n return require('../Events/CustomEvent').default;\n },\n get createAttributePayload(): createAttributePayload {\n return require('../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')\n .create;\n },\n get diffAttributePayloads(): diffAttributePayloads {\n return require('../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')\n .diff;\n },\n get createPublicInstance(): createPublicInstance {\n return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')\n .createPublicInstance;\n },\n get createPublicTextInstance(): createPublicTextInstance {\n return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')\n .createPublicTextInstance;\n },\n get getNativeTagFromPublicInstance(): getNativeTagFromPublicInstance {\n return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')\n .getNativeTagFromPublicInstance;\n },\n get getNodeFromPublicInstance(): getNodeFromPublicInstance {\n return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')\n .getNodeFromPublicInstance;\n },\n get getInternalInstanceHandleFromPublicInstance(): getInternalInstanceHandleFromPublicInstance {\n return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')\n .getInternalInstanceHandleFromPublicInstance;\n },\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nconst BatchedBridge = require('../BatchedBridge/BatchedBridge');\n\nconst RCTEventEmitter = {\n register(eventEmitter: any) {\n if (global.RN$Bridgeless) {\n global.RN$registerCallableModule('RCTEventEmitter', () => eventEmitter);\n } else {\n BatchedBridge.registerCallableModule('RCTEventEmitter', eventEmitter);\n }\n },\n};\n\nmodule.exports = RCTEventEmitter;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// This class is responsible for coordinating the \"focused\" state for\n// TextInputs. All calls relating to the keyboard should be funneled\n// through here.\n\nimport type {\n HostComponent,\n MeasureInWindowOnSuccessCallback,\n MeasureLayoutOnSuccessCallback,\n MeasureOnSuccessCallback,\n} from '../../Renderer/shims/ReactNativeTypes';\n\nimport {Commands as AndroidTextInputCommands} from '../../Components/TextInput/AndroidTextInputNativeComponent';\nimport {Commands as iOSTextInputCommands} from '../../Components/TextInput/RCTSingelineTextInputNativeComponent';\n\nconst {findNodeHandle} = require('../../ReactNative/RendererProxy');\nconst Platform = require('../../Utilities/Platform');\nconst React = require('react');\ntype ComponentRef = React.ElementRef>;\n\nlet currentlyFocusedInputRef: ?ComponentRef = null;\nconst inputs = new Set<{\n blur(): void,\n focus(): void,\n measure(callback: MeasureOnSuccessCallback): void,\n measureInWindow(callback: MeasureInWindowOnSuccessCallback): void,\n measureLayout(\n relativeToNativeNode: number | React.ElementRef>,\n onSuccess: MeasureLayoutOnSuccessCallback,\n onFail?: () => void,\n ): void,\n setNativeProps(nativeProps: {...}): void,\n}>();\n\nfunction currentlyFocusedInput(): ?ComponentRef {\n return currentlyFocusedInputRef;\n}\n\n/**\n * Returns the ID of the currently focused text field, if one exists\n * If no text field is focused it returns null\n */\nfunction currentlyFocusedField(): ?number {\n if (__DEV__) {\n console.error(\n 'currentlyFocusedField is deprecated and will be removed in a future release. Use currentlyFocusedInput',\n );\n }\n\n return findNodeHandle(currentlyFocusedInputRef);\n}\n\nfunction focusInput(textField: ?ComponentRef): void {\n if (currentlyFocusedInputRef !== textField && textField != null) {\n currentlyFocusedInputRef = textField;\n }\n}\n\nfunction blurInput(textField: ?ComponentRef): void {\n if (currentlyFocusedInputRef === textField && textField != null) {\n currentlyFocusedInputRef = null;\n }\n}\n\nfunction focusField(textFieldID: ?number): void {\n if (__DEV__) {\n console.error('focusField no longer works. Use focusInput');\n }\n\n return;\n}\n\nfunction blurField(textFieldID: ?number) {\n if (__DEV__) {\n console.error('blurField no longer works. Use blurInput');\n }\n\n return;\n}\n\n/**\n * @param {number} TextInputID id of the text field to focus\n * Focuses the specified text field\n * noop if the text field was already focused or if the field is not editable\n */\nfunction focusTextInput(textField: ?ComponentRef) {\n if (typeof textField === 'number') {\n if (__DEV__) {\n console.error(\n 'focusTextInput must be called with a host component. Passing a react tag is deprecated.',\n );\n }\n\n return;\n }\n\n if (textField != null) {\n const fieldCanBeFocused =\n currentlyFocusedInputRef !== textField &&\n // $FlowFixMe - `currentProps` is missing in `NativeMethods`\n textField.currentProps?.editable !== false;\n\n if (!fieldCanBeFocused) {\n return;\n }\n focusInput(textField);\n if (Platform.OS === 'ios') {\n // This isn't necessarily a single line text input\n // But commands don't actually care as long as the thing being passed in\n // actually has a command with that name. So this should work with single\n // and multiline text inputs. Ideally we'll merge them into one component\n // in the future.\n iOSTextInputCommands.focus(textField);\n } else if (Platform.OS === 'android') {\n AndroidTextInputCommands.focus(textField);\n }\n }\n}\n\n/**\n * @param {number} textFieldID id of the text field to unfocus\n * Unfocuses the specified text field\n * noop if it wasn't focused\n */\nfunction blurTextInput(textField: ?ComponentRef) {\n if (typeof textField === 'number') {\n if (__DEV__) {\n console.error(\n 'blurTextInput must be called with a host component. Passing a react tag is deprecated.',\n );\n }\n\n return;\n }\n\n if (currentlyFocusedInputRef === textField && textField != null) {\n blurInput(textField);\n if (Platform.OS === 'ios') {\n // This isn't necessarily a single line text input\n // But commands don't actually care as long as the thing being passed in\n // actually has a command with that name. So this should work with single\n // and multiline text inputs. Ideally we'll merge them into one component\n // in the future.\n iOSTextInputCommands.blur(textField);\n } else if (Platform.OS === 'android') {\n AndroidTextInputCommands.blur(textField);\n }\n }\n}\n\nfunction registerInput(textField: ComponentRef) {\n if (typeof textField === 'number') {\n if (__DEV__) {\n console.error(\n 'registerInput must be called with a host component. Passing a react tag is deprecated.',\n );\n }\n\n return;\n }\n\n inputs.add(textField);\n}\n\nfunction unregisterInput(textField: ComponentRef) {\n if (typeof textField === 'number') {\n if (__DEV__) {\n console.error(\n 'unregisterInput must be called with a host component. Passing a react tag is deprecated.',\n );\n }\n\n return;\n }\n inputs.delete(textField);\n}\n\nfunction isTextInput(textField: ComponentRef): boolean {\n if (typeof textField === 'number') {\n if (__DEV__) {\n console.error(\n 'isTextInput must be called with a host component. Passing a react tag is deprecated.',\n );\n }\n\n return false;\n }\n\n return inputs.has(textField);\n}\n\nmodule.exports = {\n currentlyFocusedInput,\n focusInput,\n blurInput,\n\n currentlyFocusedField,\n focusField,\n blurField,\n focusTextInput,\n blurTextInput,\n registerInput,\n unregisterInput,\n isTextInput,\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type {\n ColorValue,\n TextStyleProp,\n ViewStyleProp,\n} from '../../StyleSheet/StyleSheet';\nimport type {\n BubblingEventHandler,\n DirectEventHandler,\n Double,\n Float,\n Int32,\n WithDefault,\n} from '../../Types/CodegenTypes';\nimport type {ViewProps} from '../View/ViewPropTypes';\nimport type {TextInputNativeCommands} from './TextInputNativeCommands';\n\nimport * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';\nimport codegenNativeCommands from '../../Utilities/codegenNativeCommands';\n\nexport type KeyboardType =\n // Cross Platform\n | 'default'\n | 'email-address'\n | 'numeric'\n | 'phone-pad'\n | 'number-pad'\n | 'decimal-pad'\n | 'url'\n // iOS-only\n | 'ascii-capable'\n | 'numbers-and-punctuation'\n | 'name-phone-pad'\n | 'twitter'\n | 'web-search'\n // Android-only\n | 'visible-password';\n\nexport type ReturnKeyType =\n // Cross Platform\n | 'done'\n | 'go'\n | 'next'\n | 'search'\n | 'send'\n // Android-only\n | 'none'\n | 'previous'\n // iOS-only\n | 'default'\n | 'emergency-call'\n | 'google'\n | 'join'\n | 'route'\n | 'yahoo';\n\nexport type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline';\n\nexport type NativeProps = $ReadOnly<{|\n // This allows us to inherit everything from ViewProps except for style (see below)\n // This must be commented for Fabric codegen to work.\n ...$Diff>,\n\n /**\n * Android props after this\n */\n /**\n * Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.\n * To disable autocomplete, set `autoComplete` to `off`.\n *\n * *Android Only*\n *\n * Possible values for `autoComplete` are:\n *\n * - `birthdate-day`\n * - `birthdate-full`\n * - `birthdate-month`\n * - `birthdate-year`\n * - `cc-csc`\n * - `cc-exp`\n * - `cc-exp-day`\n * - `cc-exp-month`\n * - `cc-exp-year`\n * - `cc-number`\n * - `email`\n * - `gender`\n * - `name`\n * - `name-family`\n * - `name-given`\n * - `name-middle`\n * - `name-middle-initial`\n * - `name-prefix`\n * - `name-suffix`\n * - `password`\n * - `password-new`\n * - `postal-address`\n * - `postal-address-country`\n * - `postal-address-extended`\n * - `postal-address-extended-postal-code`\n * - `postal-address-locality`\n * - `postal-address-region`\n * - `postal-code`\n * - `street-address`\n * - `sms-otp`\n * - `tel`\n * - `tel-country-code`\n * - `tel-national`\n * - `tel-device`\n * - `username`\n * - `username-new`\n * - `off`\n *\n * @platform android\n */\n autoComplete?: WithDefault<\n | 'birthdate-day'\n | 'birthdate-full'\n | 'birthdate-month'\n | 'birthdate-year'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-day'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-number'\n | 'email'\n | 'gender'\n | 'name'\n | 'name-family'\n | 'name-given'\n | 'name-middle'\n | 'name-middle-initial'\n | 'name-prefix'\n | 'name-suffix'\n | 'password'\n | 'password-new'\n | 'postal-address'\n | 'postal-address-country'\n | 'postal-address-extended'\n | 'postal-address-extended-postal-code'\n | 'postal-address-locality'\n | 'postal-address-region'\n | 'postal-code'\n | 'street-address'\n | 'sms-otp'\n | 'tel'\n | 'tel-country-code'\n | 'tel-national'\n | 'tel-device'\n | 'username'\n | 'username-new'\n | 'off',\n 'off',\n >,\n\n /**\n * Sets the return key to the label. Use it instead of `returnKeyType`.\n * @platform android\n */\n returnKeyLabel?: ?string,\n\n /**\n * Sets the number of lines for a `TextInput`. Use it with multiline set to\n * `true` to be able to fill the lines.\n * @platform android\n */\n numberOfLines?: ?Int32,\n\n /**\n * When `false`, if there is a small amount of space available around a text input\n * (e.g. landscape orientation on a phone), the OS may choose to have the user edit\n * the text inside of a full screen text input mode. When `true`, this feature is\n * disabled and users will always edit the text directly inside of the text input.\n * Defaults to `false`.\n * @platform android\n */\n disableFullscreenUI?: ?boolean,\n\n /**\n * Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced`\n * The default value is `simple`.\n * @platform android\n */\n textBreakStrategy?: WithDefault<\n 'simple' | 'highQuality' | 'balanced',\n 'simple',\n >,\n\n /**\n * The color of the `TextInput` underline.\n * @platform android\n */\n underlineColorAndroid?: ?ColorValue,\n\n /**\n * If defined, the provided image resource will be rendered on the left.\n * The image resource must be inside `/android/app/src/main/res/drawable` and referenced\n * like\n * ```\n * \n * ```\n * @platform android\n */\n inlineImageLeft?: ?string,\n\n /**\n * Padding between the inline image, if any, and the text input itself.\n * @platform android\n */\n inlineImagePadding?: ?Int32,\n\n importantForAutofill?: string /*?(\n | 'auto'\n | 'no'\n | 'noExcludeDescendants'\n | 'yes'\n | 'yesExcludeDescendants'\n ),*/,\n\n /**\n * When `false`, it will prevent the soft keyboard from showing when the field is focused.\n * Defaults to `true`.\n */\n showSoftInputOnFocus?: ?boolean,\n\n /**\n * TextInput props after this\n */\n /**\n * Can tell `TextInput` to automatically capitalize certain characters.\n *\n * - `characters`: all characters.\n * - `words`: first letter of each word.\n * - `sentences`: first letter of each sentence (*default*).\n * - `none`: don't auto capitalize anything.\n */\n autoCapitalize?: WithDefault<\n 'none' | 'sentences' | 'words' | 'characters',\n 'none',\n >,\n\n /**\n * If `false`, disables auto-correct. The default value is `true`.\n */\n autoCorrect?: ?boolean,\n\n /**\n * If `true`, focuses the input on `componentDidMount`.\n * The default value is `false`.\n */\n autoFocus?: ?boolean,\n\n /**\n * Specifies whether fonts should scale to respect Text Size accessibility settings. The\n * default is `true`.\n */\n allowFontScaling?: ?boolean,\n\n /**\n * Specifies largest possible scale a font can reach when `allowFontScaling` is enabled.\n * Possible values:\n * `null/undefined` (default): inherit from the parent node or the global default (0)\n * `0`: no max, ignore parent/global default\n * `>= 1`: sets the maxFontSizeMultiplier of this node to this value\n */\n maxFontSizeMultiplier?: ?Float,\n\n /**\n * If `false`, text is not editable. The default value is `true`.\n */\n editable?: ?boolean,\n\n /**\n * Determines which keyboard to open, e.g.`numeric`.\n *\n * The following values work across platforms:\n *\n * - `default`\n * - `numeric`\n * - `number-pad`\n * - `decimal-pad`\n * - `email-address`\n * - `phone-pad`\n * - `url`\n *\n * *Android Only*\n *\n * The following values work on Android only:\n *\n * - `visible-password`\n */\n keyboardType?: WithDefault,\n\n /**\n * Determines how the return key should look. On Android you can also use\n * `returnKeyLabel`.\n *\n * *Cross platform*\n *\n * The following values work across platforms:\n *\n * - `done`\n * - `go`\n * - `next`\n * - `search`\n * - `send`\n *\n * *Android Only*\n *\n * The following values work on Android only:\n *\n * - `none`\n * - `previous`\n */\n returnKeyType?: WithDefault,\n\n /**\n * Limits the maximum number of characters that can be entered. Use this\n * instead of implementing the logic in JS to avoid flicker.\n */\n maxLength?: ?Int32,\n\n /**\n * If `true`, the text input can be multiple lines.\n * The default value is `false`.\n */\n multiline?: ?boolean,\n\n /**\n * Callback that is called when the text input is blurred.\n * `target` is the reactTag of the element\n */\n onBlur?: ?BubblingEventHandler<$ReadOnly<{|target: Int32|}>>,\n\n /**\n * Callback that is called when the text input is focused.\n * `target` is the reactTag of the element\n */\n onFocus?: ?BubblingEventHandler<$ReadOnly<{|target: Int32|}>>,\n\n /**\n * Callback that is called when the text input's text changes.\n * `target` is the reactTag of the element\n * TODO: differentiate between onChange and onChangeText\n */\n onChange?: ?BubblingEventHandler<\n $ReadOnly<{|target: Int32, eventCount: Int32, text: string|}>,\n >,\n\n /**\n * Callback that is called when the text input's text changes.\n * Changed text is passed as an argument to the callback handler.\n * TODO: differentiate between onChange and onChangeText\n */\n onChangeText?: ?BubblingEventHandler<\n $ReadOnly<{|target: Int32, eventCount: Int32, text: string|}>,\n >,\n\n /**\n * Callback that is called when the text input's content size changes.\n * This will be called with\n * `{ nativeEvent: { contentSize: { width, height } } }`.\n *\n * Only called for multiline text inputs.\n */\n onContentSizeChange?: ?DirectEventHandler<\n $ReadOnly<{|\n target: Int32,\n contentSize: $ReadOnly<{|width: Double, height: Double|}>,\n |}>,\n >,\n\n /**\n * Callback that is called when text input ends.\n */\n onEndEditing?: ?BubblingEventHandler<\n $ReadOnly<{|target: Int32, text: string|}>,\n >,\n\n /**\n * Callback that is called when the text input selection is changed.\n * This will be called with\n * `{ nativeEvent: { selection: { start, end } } }`.\n */\n onSelectionChange?: ?DirectEventHandler<\n $ReadOnly<{|\n target: Int32,\n selection: $ReadOnly<{|start: Double, end: Double|}>,\n |}>,\n >,\n\n /**\n * Callback that is called when the text input's submit button is pressed.\n * Invalid if `multiline={true}` is specified.\n */\n onSubmitEditing?: ?BubblingEventHandler<\n $ReadOnly<{|target: Int32, text: string|}>,\n >,\n\n /**\n * Callback that is called when a key is pressed.\n * This will be called with `{ nativeEvent: { key: keyValue } }`\n * where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and\n * the typed-in character otherwise including `' '` for space.\n * Fires before `onChange` callbacks.\n */\n onKeyPress?: ?BubblingEventHandler<$ReadOnly<{|target: Int32, key: string|}>>,\n\n /**\n * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`.\n * May also contain other properties from ScrollEvent but on Android contentSize\n * is not provided for performance reasons.\n */\n onScroll?: ?DirectEventHandler<\n $ReadOnly<{|\n target: Int32,\n responderIgnoreScroll: boolean,\n contentInset: $ReadOnly<{|\n top: Double, // always 0 on Android\n bottom: Double, // always 0 on Android\n left: Double, // always 0 on Android\n right: Double, // always 0 on Android\n |}>,\n contentOffset: $ReadOnly<{|\n x: Double,\n y: Double,\n |}>,\n contentSize: $ReadOnly<{|\n width: Double, // always 0 on Android\n height: Double, // always 0 on Android\n |}>,\n layoutMeasurement: $ReadOnly<{|\n width: Double,\n height: Double,\n |}>,\n velocity: $ReadOnly<{|\n x: Double, // always 0 on Android\n y: Double, // always 0 on Android\n |}>,\n |}>,\n >,\n\n /**\n * The string that will be rendered before text input has been entered.\n */\n placeholder?: ?Stringish,\n\n /**\n * The text color of the placeholder string.\n */\n placeholderTextColor?: ?ColorValue,\n\n /**\n * If `true`, the text input obscures the text entered so that sensitive text\n * like passwords stay secure. The default value is `false`. Does not work with 'multiline={true}'.\n */\n secureTextEntry?: ?boolean,\n\n /**\n * The highlight and cursor color of the text input.\n */\n selectionColor?: ?ColorValue,\n\n /**\n * The text selection handle color.\n */\n selectionHandleColor?: ?ColorValue,\n\n /**\n * The start and end of the text input's selection. Set start and end to\n * the same value to position the cursor.\n */\n selection?: ?$ReadOnly<{|\n start: Int32,\n end?: ?Int32,\n |}>,\n\n /**\n * The value to show for the text input. `TextInput` is a controlled\n * component, which means the native value will be forced to match this\n * value prop if provided. For most uses, this works great, but in some\n * cases this may cause flickering - one common cause is preventing edits\n * by keeping value the same. In addition to simply setting the same value,\n * either set `editable={false}`, or set/update `maxLength` to prevent\n * unwanted edits without flicker.\n */\n value?: ?string,\n\n /**\n * Provides an initial value that will change when the user starts typing.\n * Useful for simple use-cases where you do not want to deal with listening\n * to events and updating the value prop to keep the controlled state in sync.\n */\n defaultValue?: ?string,\n\n /**\n * If `true`, all text will automatically be selected on focus.\n */\n selectTextOnFocus?: ?boolean,\n\n /**\n * If `true`, the text field will blur when submitted.\n * The default value is true for single-line fields and false for\n * multiline fields. Note that for multiline fields, setting `blurOnSubmit`\n * to `true` means that pressing return will blur the field and trigger the\n * `onSubmitEditing` event instead of inserting a newline into the field.\n *\n * @deprecated\n * Note that `submitBehavior` now takes the place of `blurOnSubmit` and will\n * override any behavior defined by `blurOnSubmit`.\n * @see submitBehavior\n */\n blurOnSubmit?: ?boolean,\n\n /**\n * When the return key is pressed,\n *\n * For single line inputs:\n *\n * - `'newline`' defaults to `'blurAndSubmit'`\n * - `undefined` defaults to `'blurAndSubmit'`\n *\n * For multiline inputs:\n *\n * - `'newline'` adds a newline\n * - `undefined` defaults to `'newline'`\n *\n * For both single line and multiline inputs:\n *\n * - `'submit'` will only send a submit event and not blur the input\n * - `'blurAndSubmit`' will both blur the input and send a submit event\n */\n submitBehavior?: ?SubmitBehavior,\n\n /**\n * Note that not all Text styles are supported, an incomplete list of what is not supported includes:\n *\n * - `borderLeftWidth`\n * - `borderTopWidth`\n * - `borderRightWidth`\n * - `borderBottomWidth`\n * - `borderTopLeftRadius`\n * - `borderTopRightRadius`\n * - `borderBottomRightRadius`\n * - `borderBottomLeftRadius`\n *\n * see [Issue#7070](https://github.com/facebook/react-native/issues/7070)\n * for more detail.\n *\n * [Styles](docs/style.html)\n */\n // TODO: figure out what to do with this style prop for codegen/Fabric purposes\n // This must be commented for Fabric codegen to work; it's currently not possible\n // to override the default View style prop in codegen.\n style?: ?TextStyleProp,\n\n /**\n * If `true`, caret is hidden. The default value is `false`.\n * This property is supported only for single-line TextInput component on iOS.\n */\n caretHidden?: ?boolean,\n\n /*\n * If `true`, contextMenuHidden is hidden. The default value is `false`.\n */\n contextMenuHidden?: ?boolean,\n\n /**\n * The following are props that `BaseTextShadowNode` takes. It is unclear if they\n * are used by TextInput.\n */\n textShadowColor?: ?ColorValue,\n textShadowRadius?: ?Float,\n textDecorationLine?: ?string,\n fontStyle?: ?string,\n textShadowOffset?: ?$ReadOnly<{|width?: ?Double, height?: ?Double|}>,\n lineHeight?: ?Float,\n textTransform?: ?string,\n color?: ?Int32,\n letterSpacing?: ?Float,\n fontSize?: ?Float,\n textAlign?: ?string,\n includeFontPadding?: ?boolean,\n fontWeight?: ?string,\n fontFamily?: ?string,\n\n /**\n * I cannot find where these are defined but JS complains without them.\n */\n textAlignVertical?: ?string,\n cursorColor?: ?ColorValue,\n\n /**\n * \"Private\" fields used by TextInput.js and not users of this component directly\n */\n mostRecentEventCount: Int32,\n text?: ?string,\n|}>;\n\ntype NativeType = HostComponent;\n\ntype NativeCommands = TextInputNativeCommands;\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['focus', 'blur', 'setTextAndSelection'],\n});\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {\n uiViewClassName: 'AndroidTextInput',\n bubblingEventTypes: {\n topBlur: {\n phasedRegistrationNames: {\n bubbled: 'onBlur',\n captured: 'onBlurCapture',\n },\n },\n topEndEditing: {\n phasedRegistrationNames: {\n bubbled: 'onEndEditing',\n captured: 'onEndEditingCapture',\n },\n },\n topFocus: {\n phasedRegistrationNames: {\n bubbled: 'onFocus',\n captured: 'onFocusCapture',\n },\n },\n topKeyPress: {\n phasedRegistrationNames: {\n bubbled: 'onKeyPress',\n captured: 'onKeyPressCapture',\n },\n },\n topSubmitEditing: {\n phasedRegistrationNames: {\n bubbled: 'onSubmitEditing',\n captured: 'onSubmitEditingCapture',\n },\n },\n },\n directEventTypes: {\n topScroll: {\n registrationName: 'onScroll',\n },\n },\n validAttributes: {\n maxFontSizeMultiplier: true,\n adjustsFontSizeToFit: true,\n minimumFontScale: true,\n autoFocus: true,\n placeholder: true,\n inlineImagePadding: true,\n contextMenuHidden: true,\n textShadowColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n maxLength: true,\n selectTextOnFocus: true,\n textShadowRadius: true,\n underlineColorAndroid: {\n process: require('../../StyleSheet/processColor').default,\n },\n textDecorationLine: true,\n submitBehavior: true,\n textAlignVertical: true,\n fontStyle: true,\n textShadowOffset: true,\n selectionColor: {process: require('../../StyleSheet/processColor').default},\n selectionHandleColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n placeholderTextColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n importantForAutofill: true,\n lineHeight: true,\n textTransform: true,\n returnKeyType: true,\n keyboardType: true,\n multiline: true,\n color: {process: require('../../StyleSheet/processColor').default},\n autoComplete: true,\n numberOfLines: true,\n letterSpacing: true,\n returnKeyLabel: true,\n fontSize: true,\n onKeyPress: true,\n cursorColor: {process: require('../../StyleSheet/processColor').default},\n text: true,\n showSoftInputOnFocus: true,\n textAlign: true,\n autoCapitalize: true,\n autoCorrect: true,\n caretHidden: true,\n secureTextEntry: true,\n textBreakStrategy: true,\n onScroll: true,\n onContentSizeChange: true,\n disableFullscreenUI: true,\n includeFontPadding: true,\n fontWeight: true,\n fontFamily: true,\n allowFontScaling: true,\n onSelectionChange: true,\n mostRecentEventCount: true,\n inlineImageLeft: true,\n editable: true,\n fontVariant: true,\n borderBottomRightRadius: true,\n borderBottomColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderRadius: true,\n borderRightColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderColor: {process: require('../../StyleSheet/processColor').default},\n borderTopRightRadius: true,\n borderStyle: true,\n borderBottomLeftRadius: true,\n borderLeftColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderTopLeftRadius: true,\n borderTopColor: {process: require('../../StyleSheet/processColor').default},\n },\n};\n\nlet AndroidTextInputNativeComponent = NativeComponentRegistry.get(\n 'AndroidTextInput',\n () => __INTERNAL_VIEW_CONFIG,\n);\n\n// flowlint-next-line unclear-type:off\nexport default ((AndroidTextInputNativeComponent: any): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nlet logListeners;\n\ntype LogListeners = {|\n +onDifferentFunctionsIgnored: (nameOne: ?string, nameTwo: ?string) => void,\n|};\n\ntype Options = {|+unsafelyIgnoreFunctions?: boolean|};\n\nfunction unstable_setLogListeners(listeners: ?LogListeners) {\n logListeners = listeners;\n}\n\n/*\n * @returns {bool} true if different, false if equal\n */\nconst deepDiffer = function (\n one: any,\n two: any,\n maxDepthOrOptions: Options | number = -1,\n maybeOptions?: Options,\n): boolean {\n const options =\n typeof maxDepthOrOptions === 'number' ? maybeOptions : maxDepthOrOptions;\n const maxDepth =\n typeof maxDepthOrOptions === 'number' ? maxDepthOrOptions : -1;\n if (maxDepth === 0) {\n return true;\n }\n if (one === two) {\n // Short circuit on identical object references instead of traversing them.\n return false;\n }\n if (typeof one === 'function' && typeof two === 'function') {\n // We consider all functions equal unless explicitly configured otherwise\n let unsafelyIgnoreFunctions = options?.unsafelyIgnoreFunctions;\n if (unsafelyIgnoreFunctions == null) {\n if (\n logListeners &&\n logListeners.onDifferentFunctionsIgnored &&\n (!options || !('unsafelyIgnoreFunctions' in options))\n ) {\n logListeners.onDifferentFunctionsIgnored(one.name, two.name);\n }\n unsafelyIgnoreFunctions = true;\n }\n return !unsafelyIgnoreFunctions;\n }\n if (typeof one !== 'object' || one === null) {\n // Primitives can be directly compared\n return one !== two;\n }\n if (typeof two !== 'object' || two === null) {\n // We know they are different because the previous case would have triggered\n // otherwise.\n return true;\n }\n if (one.constructor !== two.constructor) {\n return true;\n }\n if (Array.isArray(one)) {\n // We know two is also an array because the constructors are equal\n const len = one.length;\n if (two.length !== len) {\n return true;\n }\n for (let ii = 0; ii < len; ii++) {\n if (deepDiffer(one[ii], two[ii], maxDepth - 1, options)) {\n return true;\n }\n }\n } else {\n for (const key in one) {\n if (deepDiffer(one[key], two[key], maxDepth - 1, options)) {\n return true;\n }\n }\n for (const twoKey in two) {\n // The only case we haven't checked yet is keys that are in two but aren't\n // in one, which means they are different.\n if (one[twoKey] === undefined && two[twoKey] !== undefined) {\n return true;\n }\n }\n }\n return false;\n};\n\ndeepDiffer.unstable_setLogListeners = unstable_setLogListeners;\nmodule.exports = deepDiffer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\n/**\n * If your application is accepting different values for the same field over\n * time and is doing a diff on them, you can either (1) create a copy or\n * (2) ensure that those values are not mutated behind two passes.\n * This function helps you with (2) by freezing the object and throwing if\n * the user subsequently modifies the value.\n *\n * There are two caveats with this function:\n * - If the call site is not in strict mode, it will only throw when\n * mutating existing fields, adding a new one\n * will unfortunately fail silently :(\n * - If the object is already frozen or sealed, it will not continue the\n * deep traversal and will leave leaf nodes unfrozen.\n *\n * Freezing the object and adding the throw mechanism is expensive and will\n * only be used in DEV.\n */\nfunction deepFreezeAndThrowOnMutationInDev>(\n object: T,\n): T {\n if (__DEV__) {\n if (\n typeof object !== 'object' ||\n object === null ||\n Object.isFrozen(object) ||\n Object.isSealed(object)\n ) {\n return object;\n }\n\n // $FlowFixMe[not-an-object] `object` can be an array, but Object.keys works with arrays too\n const keys = Object.keys((object: {...} | Array));\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n const hasOwnProperty = Object.prototype.hasOwnProperty;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (hasOwnProperty.call(object, key)) {\n Object.defineProperty(object, key, {\n get: identity.bind(null, object[key]),\n });\n Object.defineProperty(object, key, {\n set: throwOnImmutableMutation.bind(null, key),\n });\n }\n }\n\n Object.freeze(object);\n Object.seal(object);\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (hasOwnProperty.call(object, key)) {\n deepFreezeAndThrowOnMutationInDev(object[key]);\n }\n }\n }\n return object;\n}\n\n/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\nfunction throwOnImmutableMutation(key: empty, value) {\n throw Error(\n 'You attempted to set the key `' +\n key +\n '` with the value `' +\n JSON.stringify(value) +\n '` on an object that is meant to be immutable ' +\n 'and has been frozen.',\n );\n}\n\nfunction identity(value: mixed) {\n return value;\n}\n\nmodule.exports = deepFreezeAndThrowOnMutationInDev;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ExtendedError} from './ExtendedError';\n\nimport {SyntheticError, handleException} from './ExceptionsManager';\n\nexport type CapturedError = {\n +componentStack: string,\n +error: mixed,\n +errorBoundary: ?{...},\n ...\n};\n\nconst ReactFiberErrorDialog = {\n /**\n * Intercept lifecycle errors and ensure they are shown with the correct stack\n * trace within the native redbox component.\n */\n showErrorDialog({componentStack, error: errorValue}: CapturedError): boolean {\n let error: ?ExtendedError;\n\n // Typically, `errorValue` should be an error. However, other values such as\n // strings (or even null) are sometimes thrown.\n if (errorValue instanceof Error) {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (errorValue: ExtendedError);\n } else if (typeof errorValue === 'string') {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (new SyntheticError(errorValue): ExtendedError);\n } else {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (new SyntheticError('Unspecified error'): ExtendedError);\n }\n try {\n error.componentStack = componentStack;\n error.isComponentError = true;\n } catch {\n // Ignored.\n }\n\n handleException(error, false);\n\n // Return false here to prevent ReactFiberErrorLogger default behavior of\n // logging error details to console.error. Calls to console.error are\n // automatically routed to the native redbox controller, which we've already\n // done above by calling ExceptionsManager.\n return false;\n },\n};\n\nexport default ReactFiberErrorDialog;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {IEventEmitter} from '../vendor/emitter/EventEmitter';\n\nimport EventEmitter from '../vendor/emitter/EventEmitter';\n\nexport type RawEventEmitterEvent = $ReadOnly<{|\n eventName: string,\n // We expect, but do not/cannot require, that nativeEvent is an object\n // with the properties: key, elementType (string), type (string), tag (numeric),\n // and a stateNode of the native element/Fiber the event was emitted to.\n nativeEvent: {[string]: mixed},\n|}>;\n\ntype RawEventDefinitions = {\n [eventChannel: string]: [RawEventEmitterEvent],\n};\n\nconst RawEventEmitter: IEventEmitter =\n new EventEmitter();\n\n// See the React renderer / react repo for how this is used.\n// Raw events are emitted here when they are received in JS\n// and before any event Plugins process them or before components\n// have a chance to respond to them. This allows you to implement\n// app-specific perf monitoring, which is unimplemented by default,\n// making this entire RawEventEmitter do nothing by default until\n// *you* add listeners for your own app.\n// Besides perf monitoring and maybe debugging, this RawEventEmitter\n// should not be used.\nexport default RawEventEmitter;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// Make sure global Event is defined\nimport EventPolyfill from './EventPolyfill';\n\ntype CustomEvent$Options = $ReadOnly<{|\n bubbles?: boolean,\n cancelable?: boolean,\n composed?: boolean,\n detail?: {...},\n|}>;\n\nclass CustomEvent extends EventPolyfill {\n detail: ?{...};\n\n constructor(typeArg: string, options: CustomEvent$Options) {\n const {bubbles, cancelable, composed} = options;\n super(typeArg, {bubbles, cancelable, composed});\n\n this.detail = options.detail; // this would correspond to `NativeEvent` in SyntheticEvent\n }\n}\n\nexport default CustomEvent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// https://dom.spec.whatwg.org/#dictdef-eventinit\ntype Event$Init = {\n bubbles?: boolean,\n cancelable?: boolean,\n composed?: boolean,\n /** Non-standard. See `composed` instead. */\n scoped?: boolean,\n ...\n};\n\n/**\n * This is a copy of the Event interface defined in Flow:\n * https://github.com/facebook/flow/blob/741104e69c43057ebd32804dd6bcc1b5e97548ea/lib/dom.js\n * which is itself a faithful interface of the W3 spec:\n * https://dom.spec.whatwg.org/#interface-event\n *\n * Since Flow assumes that Event is provided and is on the global object,\n * we must provide an implementation of Event for CustomEvent (and future\n * alignment of React Native's event system with the W3 spec).\n */\ninterface IEvent {\n constructor(type: string, eventInitDict?: Event$Init): void;\n /**\n * Returns the type of event, e.g. \"click\", \"hashchange\", or \"submit\".\n */\n +type: string;\n /**\n * Returns the object to which event is dispatched (its target).\n */\n +target: EventTarget; // TODO: nullable\n /** @deprecated */\n +srcElement: Element; // TODO: nullable\n /**\n * Returns the object whose event listener's callback is currently being invoked.\n */\n +currentTarget: EventTarget; // TODO: nullable\n /**\n * Returns the invocation target objects of event's path (objects on which\n * listeners will be invoked), except for any nodes in shadow trees of which\n * the shadow root's mode is \"closed\" that are not reachable from event's\n * currentTarget.\n */\n composedPath(): Array;\n\n +NONE: number;\n +AT_TARGET: number;\n +BUBBLING_PHASE: number;\n +CAPTURING_PHASE: number;\n /**\n * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET,\n * and BUBBLING_PHASE.\n */\n +eventPhase: number;\n\n /**\n * When dispatched in a tree, invoking this method prevents event from reaching\n * any objects other than the current object.\n */\n stopPropagation(): void;\n /**\n * Invoking this method prevents event from reaching any registered event\n * listeners after the current one finishes running and, when dispatched in a\n * tree, also prevents event from reaching any other objects.\n */\n stopImmediatePropagation(): void;\n\n /**\n * Returns true or false depending on how event was initialized. True if\n * event goes through its target's ancestors in reverse tree order, and\n * false otherwise.\n */\n +bubbles: boolean;\n /**\n * Returns true or false depending on how event was initialized. Its\n * return value does not always carry meaning, but true can indicate\n * that part of the operation during which event was dispatched, can\n * be canceled by invoking the preventDefault() method.\n */\n +cancelable: boolean;\n // returnValue: boolean; // legacy, and some subclasses still define it as a string!\n /**\n * If invoked when the cancelable attribute value is true, and while\n * executing a listener for the event with passive set to false, signals to\n * the operation that caused event to be dispatched that it needs to be\n * canceled.\n */\n preventDefault(): void;\n /**\n * Returns true if preventDefault() was invoked successfully to indicate\n * cancelation, and false otherwise.\n */\n +defaultPrevented: boolean;\n /**\n * Returns true or false depending on how event was initialized. True if\n * event invokes listeners past a ShadowRoot node that is the root of its\n * target, and false otherwise.\n */\n +composed: boolean;\n\n /**\n * Returns true if event was dispatched by the user agent, and false otherwise.\n */\n +isTrusted: boolean;\n /**\n * Returns the event's timestamp as the number of milliseconds measured relative\n * to the time origin.\n */\n +timeStamp: number;\n\n /** Non-standard. See Event.prototype.composedPath */\n +deepPath?: () => EventTarget[];\n /** Non-standard. See Event.prototype.composed */\n +scoped: boolean;\n\n /**\n * @deprecated\n */\n initEvent(type: string, bubbles: boolean, cancelable: boolean): void;\n}\n\nclass EventPolyfill implements IEvent {\n type: string;\n bubbles: boolean;\n cancelable: boolean;\n composed: boolean;\n // Non-standard. See `composed` instead.\n scoped: boolean;\n isTrusted: boolean;\n defaultPrevented: boolean;\n timeStamp: number;\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Event/eventPhase\n NONE: number;\n AT_TARGET: number;\n BUBBLING_PHASE: number;\n CAPTURING_PHASE: number;\n\n eventPhase: number;\n\n currentTarget: EventTarget; // TODO: nullable\n target: EventTarget; // TODO: nullable\n /** @deprecated */\n srcElement: Element; // TODO: nullable\n\n // React Native-specific: proxy data to a SyntheticEvent when\n // certain methods are called.\n // SyntheticEvent will also have a reference to this instance -\n // it is circular - and both classes use this reference to keep\n // data with the other in sync.\n _syntheticEvent: mixed;\n\n constructor(type: string, eventInitDict?: Event$Init) {\n this.type = type;\n this.bubbles = !!(eventInitDict?.bubbles || false);\n this.cancelable = !!(eventInitDict?.cancelable || false);\n this.composed = !!(eventInitDict?.composed || false);\n this.scoped = !!(eventInitDict?.scoped || false);\n\n // TODO: somehow guarantee that only \"private\" instantiations of Event\n // can set this to true\n this.isTrusted = false;\n\n // TODO: in the future we'll want to make sure this has the same\n // time-basis as events originating from native\n this.timeStamp = Date.now();\n\n this.defaultPrevented = false;\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Event/eventPhase\n this.NONE = 0;\n this.AT_TARGET = 1;\n this.BUBBLING_PHASE = 2;\n this.CAPTURING_PHASE = 3;\n this.eventPhase = this.NONE;\n\n // $FlowFixMe\n this.currentTarget = null;\n // $FlowFixMe\n this.target = null;\n // $FlowFixMe\n this.srcElement = null;\n }\n\n composedPath(): Array {\n throw new Error('TODO: not yet implemented');\n }\n\n preventDefault(): void {\n this.defaultPrevented = true;\n\n if (this._syntheticEvent != null) {\n // $FlowFixMe\n this._syntheticEvent.preventDefault();\n }\n }\n\n initEvent(type: string, bubbles: boolean, cancelable: boolean): void {\n throw new Error(\n 'TODO: not yet implemented. This method is also deprecated.',\n );\n }\n\n stopImmediatePropagation(): void {\n throw new Error('TODO: not yet implemented');\n }\n\n stopPropagation(): void {\n if (this._syntheticEvent != null) {\n // $FlowFixMe\n this._syntheticEvent.stopPropagation();\n }\n }\n\n setSyntheticEvent(value: mixed): void {\n this._syntheticEvent = value;\n }\n}\n\n// Assertion magic for polyfill follows.\ndeclare var checkEvent: Event; // eslint-disable-line no-unused-vars\n\n/*::\n// This can be a strict mode error at runtime so put it in a Flow comment.\n(checkEvent: IEvent);\n*/\n\nglobal.Event = EventPolyfill;\n\nexport default EventPolyfill;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {AttributeConfiguration} from '../../Renderer/shims/ReactNativeTypes';\n\nimport flattenStyle from '../../StyleSheet/flattenStyle';\nimport deepDiffer from '../../Utilities/differ/deepDiffer';\n\nconst emptyObject = {};\n\n/**\n * Create a payload that contains all the updates between two sets of props.\n *\n * These helpers are all encapsulated into a single module, because they use\n * mutation as a performance optimization which leads to subtle shared\n * dependencies between the code paths. To avoid this mutable state leaking\n * across modules, I've kept them isolated to this module.\n */\n\ntype NestedNode = Array | Object;\n\n// Tracks removed keys\nlet removedKeys: {[string]: boolean} | null = null;\nlet removedKeyCount = 0;\n\nconst deepDifferOptions = {\n unsafelyIgnoreFunctions: true,\n};\n\nfunction defaultDiffer(prevProp: mixed, nextProp: mixed): boolean {\n if (typeof nextProp !== 'object' || nextProp === null) {\n // Scalars have already been checked for equality\n return true;\n } else {\n // For objects and arrays, the default diffing algorithm is a deep compare\n return deepDiffer(prevProp, nextProp, deepDifferOptions);\n }\n}\n\nfunction restoreDeletedValuesInNestedArray(\n updatePayload: Object,\n node: NestedNode,\n validAttributes: AttributeConfiguration,\n) {\n if (Array.isArray(node)) {\n let i = node.length;\n while (i-- && removedKeyCount > 0) {\n restoreDeletedValuesInNestedArray(\n updatePayload,\n node[i],\n validAttributes,\n );\n }\n } else if (node && removedKeyCount > 0) {\n const obj = node;\n for (const propKey in removedKeys) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (!removedKeys[propKey]) {\n continue;\n }\n let nextProp = obj[propKey];\n if (nextProp === undefined) {\n continue;\n }\n\n const attributeConfig = validAttributes[propKey];\n if (!attributeConfig) {\n continue; // not a valid native prop\n }\n\n if (typeof nextProp === 'function') {\n // $FlowFixMe[incompatible-type] found when upgrading Flow\n nextProp = true;\n }\n if (typeof nextProp === 'undefined') {\n // $FlowFixMe[incompatible-type] found when upgrading Flow\n nextProp = null;\n }\n\n if (typeof attributeConfig !== 'object') {\n // case: !Object is the default case\n updatePayload[propKey] = nextProp;\n } else if (\n typeof attributeConfig.diff === 'function' ||\n typeof attributeConfig.process === 'function'\n ) {\n // case: CustomAttributeConfiguration\n const nextValue =\n typeof attributeConfig.process === 'function'\n ? attributeConfig.process(nextProp)\n : nextProp;\n updatePayload[propKey] = nextValue;\n }\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n removedKeys[propKey] = false;\n removedKeyCount--;\n }\n }\n}\n\nfunction diffNestedArrayProperty(\n updatePayload: null | Object,\n prevArray: Array,\n nextArray: Array,\n validAttributes: AttributeConfiguration,\n): null | Object {\n const minLength =\n prevArray.length < nextArray.length ? prevArray.length : nextArray.length;\n let i;\n for (i = 0; i < minLength; i++) {\n // Diff any items in the array in the forward direction. Repeated keys\n // will be overwritten by later values.\n updatePayload = diffNestedProperty(\n updatePayload,\n prevArray[i],\n nextArray[i],\n validAttributes,\n );\n }\n for (; i < prevArray.length; i++) {\n // Clear out all remaining properties.\n updatePayload = clearNestedProperty(\n updatePayload,\n prevArray[i],\n validAttributes,\n );\n }\n for (; i < nextArray.length; i++) {\n // Add all remaining properties.\n updatePayload = addNestedProperty(\n updatePayload,\n nextArray[i],\n validAttributes,\n );\n }\n return updatePayload;\n}\n\nfunction diffNestedProperty(\n updatePayload: null | Object,\n prevProp: NestedNode,\n nextProp: NestedNode,\n validAttributes: AttributeConfiguration,\n): null | Object {\n if (!updatePayload && prevProp === nextProp) {\n // If no properties have been added, then we can bail out quickly on object\n // equality.\n return updatePayload;\n }\n\n if (!prevProp || !nextProp) {\n if (nextProp) {\n return addNestedProperty(updatePayload, nextProp, validAttributes);\n }\n if (prevProp) {\n return clearNestedProperty(updatePayload, prevProp, validAttributes);\n }\n return updatePayload;\n }\n\n if (!Array.isArray(prevProp) && !Array.isArray(nextProp)) {\n // Both are leaves, we can diff the leaves.\n return diffProperties(updatePayload, prevProp, nextProp, validAttributes);\n }\n\n if (Array.isArray(prevProp) && Array.isArray(nextProp)) {\n // Both are arrays, we can diff the arrays.\n return diffNestedArrayProperty(\n updatePayload,\n prevProp,\n nextProp,\n validAttributes,\n );\n }\n\n if (Array.isArray(prevProp)) {\n return diffProperties(\n updatePayload,\n // $FlowFixMe - We know that this is always an object when the input is.\n flattenStyle(prevProp),\n // $FlowFixMe - We know that this isn't an array because of above flow.\n nextProp,\n validAttributes,\n );\n }\n\n return diffProperties(\n updatePayload,\n prevProp,\n // $FlowFixMe - We know that this is always an object when the input is.\n flattenStyle(nextProp),\n validAttributes,\n );\n}\n\n/**\n * addNestedProperty takes a single set of props and valid attribute\n * attribute configurations. It processes each prop and adds it to the\n * updatePayload.\n */\nfunction addNestedProperty(\n updatePayload: null | Object,\n nextProp: NestedNode,\n validAttributes: AttributeConfiguration,\n): $FlowFixMe {\n if (!nextProp) {\n return updatePayload;\n }\n\n if (!Array.isArray(nextProp)) {\n // Add each property of the leaf.\n return addProperties(updatePayload, nextProp, validAttributes);\n }\n\n for (let i = 0; i < nextProp.length; i++) {\n // Add all the properties of the array.\n updatePayload = addNestedProperty(\n updatePayload,\n nextProp[i],\n validAttributes,\n );\n }\n\n return updatePayload;\n}\n\n/**\n * clearNestedProperty takes a single set of props and valid attributes. It\n * adds a null sentinel to the updatePayload, for each prop key.\n */\nfunction clearNestedProperty(\n updatePayload: null | Object,\n prevProp: NestedNode,\n validAttributes: AttributeConfiguration,\n): null | Object {\n if (!prevProp) {\n return updatePayload;\n }\n\n if (!Array.isArray(prevProp)) {\n // Add each property of the leaf.\n return clearProperties(updatePayload, prevProp, validAttributes);\n }\n\n for (let i = 0; i < prevProp.length; i++) {\n // Add all the properties of the array.\n updatePayload = clearNestedProperty(\n updatePayload,\n prevProp[i],\n validAttributes,\n );\n }\n return updatePayload;\n}\n\n/**\n * diffProperties takes two sets of props and a set of valid attributes\n * and write to updatePayload the values that changed or were deleted.\n * If no updatePayload is provided, a new one is created and returned if\n * anything changed.\n */\nfunction diffProperties(\n updatePayload: null | Object,\n prevProps: Object,\n nextProps: Object,\n validAttributes: AttributeConfiguration,\n): null | Object {\n let attributeConfig;\n let nextProp;\n let prevProp;\n\n for (const propKey in nextProps) {\n attributeConfig = validAttributes[propKey];\n if (!attributeConfig) {\n continue; // not a valid native prop\n }\n\n prevProp = prevProps[propKey];\n nextProp = nextProps[propKey];\n\n // functions are converted to booleans as markers that the associated\n // events should be sent from native.\n if (typeof nextProp === 'function') {\n nextProp = (true: any);\n // If nextProp is not a function, then don't bother changing prevProp\n // since nextProp will win and go into the updatePayload regardless.\n if (typeof prevProp === 'function') {\n prevProp = (true: any);\n }\n }\n\n // An explicit value of undefined is treated as a null because it overrides\n // any other preceding value.\n if (typeof nextProp === 'undefined') {\n nextProp = (null: any);\n if (typeof prevProp === 'undefined') {\n prevProp = (null: any);\n }\n }\n\n if (removedKeys) {\n removedKeys[propKey] = false;\n }\n\n if (updatePayload && updatePayload[propKey] !== undefined) {\n // Something else already triggered an update to this key because another\n // value diffed. Since we're now later in the nested arrays our value is\n // more important so we need to calculate it and override the existing\n // value. It doesn't matter if nothing changed, we'll set it anyway.\n\n // Pattern match on: attributeConfig\n if (typeof attributeConfig !== 'object') {\n // case: !Object is the default case\n updatePayload[propKey] = nextProp;\n } else if (\n typeof attributeConfig.diff === 'function' ||\n typeof attributeConfig.process === 'function'\n ) {\n // case: CustomAttributeConfiguration\n const nextValue =\n typeof attributeConfig.process === 'function'\n ? attributeConfig.process(nextProp)\n : nextProp;\n updatePayload[propKey] = nextValue;\n }\n continue;\n }\n\n if (prevProp === nextProp) {\n continue; // nothing changed\n }\n\n // Pattern match on: attributeConfig\n if (typeof attributeConfig !== 'object') {\n // case: !Object is the default case\n if (defaultDiffer(prevProp, nextProp)) {\n // a normal leaf has changed\n (updatePayload || (updatePayload = ({}: {[string]: $FlowFixMe})))[\n propKey\n ] = nextProp;\n }\n } else if (\n typeof attributeConfig.diff === 'function' ||\n typeof attributeConfig.process === 'function'\n ) {\n // case: CustomAttributeConfiguration\n const shouldUpdate =\n prevProp === undefined ||\n (typeof attributeConfig.diff === 'function'\n ? attributeConfig.diff(prevProp, nextProp)\n : defaultDiffer(prevProp, nextProp));\n if (shouldUpdate) {\n const nextValue =\n typeof attributeConfig.process === 'function'\n ? // $FlowFixMe[incompatible-use] found when upgrading Flow\n attributeConfig.process(nextProp)\n : nextProp;\n (updatePayload || (updatePayload = ({}: {[string]: $FlowFixMe})))[\n propKey\n ] = nextValue;\n }\n } else {\n // default: fallthrough case when nested properties are defined\n removedKeys = null;\n removedKeyCount = 0;\n // We think that attributeConfig is not CustomAttributeConfiguration at\n // this point so we assume it must be AttributeConfiguration.\n updatePayload = diffNestedProperty(\n updatePayload,\n prevProp,\n nextProp,\n ((attributeConfig: any): AttributeConfiguration),\n );\n if (removedKeyCount > 0 && updatePayload) {\n restoreDeletedValuesInNestedArray(\n updatePayload,\n nextProp,\n ((attributeConfig: any): AttributeConfiguration),\n );\n removedKeys = null;\n }\n }\n }\n\n // Also iterate through all the previous props to catch any that have been\n // removed and make sure native gets the signal so it can reset them to the\n // default.\n for (const propKey in prevProps) {\n if (nextProps[propKey] !== undefined) {\n continue; // we've already covered this key in the previous pass\n }\n attributeConfig = validAttributes[propKey];\n if (!attributeConfig) {\n continue; // not a valid native prop\n }\n\n if (updatePayload && updatePayload[propKey] !== undefined) {\n // This was already updated to a diff result earlier.\n continue;\n }\n\n prevProp = prevProps[propKey];\n if (prevProp === undefined) {\n continue; // was already empty anyway\n }\n // Pattern match on: attributeConfig\n if (\n typeof attributeConfig !== 'object' ||\n typeof attributeConfig.diff === 'function' ||\n typeof attributeConfig.process === 'function'\n ) {\n // case: CustomAttributeConfiguration | !Object\n // Flag the leaf property for removal by sending a sentinel.\n (updatePayload || (updatePayload = ({}: {[string]: $FlowFixMe})))[\n propKey\n ] = null;\n if (!removedKeys) {\n removedKeys = ({}: {[string]: boolean});\n }\n if (!removedKeys[propKey]) {\n removedKeys[propKey] = true;\n removedKeyCount++;\n }\n } else {\n // default:\n // This is a nested attribute configuration where all the properties\n // were removed so we need to go through and clear out all of them.\n updatePayload = clearNestedProperty(\n updatePayload,\n prevProp,\n ((attributeConfig: any): AttributeConfiguration),\n );\n }\n }\n return updatePayload;\n}\n\n/**\n * addProperties adds all the valid props to the payload after being processed.\n */\nfunction addProperties(\n updatePayload: null | Object,\n props: Object,\n validAttributes: AttributeConfiguration,\n): null | Object {\n // TODO: Fast path\n return diffProperties(updatePayload, emptyObject, props, validAttributes);\n}\n\n/**\n * clearProperties clears all the previous props by adding a null sentinel\n * to the payload for each valid key.\n */\nfunction clearProperties(\n updatePayload: null | Object,\n prevProps: Object,\n validAttributes: AttributeConfiguration,\n): null | Object {\n // TODO: Fast path\n return diffProperties(updatePayload, prevProps, emptyObject, validAttributes);\n}\n\nexport function create(\n props: Object,\n validAttributes: AttributeConfiguration,\n): null | Object {\n return addProperties(\n null, // updatePayload\n props,\n validAttributes,\n );\n}\n\nexport function diff(\n prevProps: Object,\n nextProps: Object,\n validAttributes: AttributeConfiguration,\n): null | Object {\n return diffProperties(\n null, // updatePayload\n prevProps,\n nextProps,\n validAttributes,\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n/**\n * This module is meant to be used by the React renderers to create public\n * instances and get some data from them (like their instance handle / fiber).\n */\n\nimport type ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';\nimport type ReadOnlyText from '../../../src/private/webapis/dom/nodes/ReadOnlyText';\nimport typeof ReactFabricType from '../../Renderer/shims/ReactFabric';\nimport type {\n InternalInstanceHandle,\n Node,\n ViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type ReactFabricHostComponent from './ReactFabricHostComponent';\n\nimport * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';\n\n// Lazy loaded to avoid evaluating the module when using the legacy renderer.\nlet PublicInstanceClass:\n | Class\n | Class;\nlet ReadOnlyTextClass: Class;\n\n// Lazy loaded to avoid evaluating the module when using the legacy renderer.\nlet ReactFabric: ReactFabricType;\n\nexport function createPublicInstance(\n tag: number,\n viewConfig: ViewConfig,\n internalInstanceHandle: InternalInstanceHandle,\n): ReactFabricHostComponent | ReactNativeElement {\n if (PublicInstanceClass == null) {\n // We don't use inline requires in react-native, so this forces lazy loading\n // the right module to avoid eagerly loading both.\n if (ReactNativeFeatureFlags.enableAccessToHostTreeInFabric()) {\n PublicInstanceClass =\n require('../../../src/private/webapis/dom/nodes/ReactNativeElement').default;\n } else {\n PublicInstanceClass = require('./ReactFabricHostComponent').default;\n }\n }\n\n return new PublicInstanceClass(tag, viewConfig, internalInstanceHandle);\n}\n\nexport function createPublicTextInstance(\n internalInstanceHandle: InternalInstanceHandle,\n): ReadOnlyText {\n if (ReadOnlyTextClass == null) {\n ReadOnlyTextClass =\n require('../../../src/private/webapis/dom/nodes/ReadOnlyText').default;\n }\n\n return new ReadOnlyTextClass(internalInstanceHandle);\n}\n\nexport function getNativeTagFromPublicInstance(\n publicInstance: ReactFabricHostComponent | ReactNativeElement,\n): number {\n return publicInstance.__nativeTag;\n}\n\nexport function getNodeFromPublicInstance(\n publicInstance: ReactFabricHostComponent | ReactNativeElement,\n): ?Node {\n // Avoid loading ReactFabric if using an instance from the legacy renderer.\n if (publicInstance.__internalInstanceHandle == null) {\n return null;\n }\n\n if (ReactFabric == null) {\n ReactFabric = require('../../Renderer/shims/ReactFabric');\n }\n return ReactFabric.getNodeFromInternalInstanceHandle(\n publicInstance.__internalInstanceHandle,\n );\n}\n\nexport function getInternalInstanceHandleFromPublicInstance(\n publicInstance: ReactFabricHostComponent | ReactNativeElement,\n): InternalInstanceHandle {\n // TODO(T174762768): Remove this once OSS versions of renderers will be synced.\n // $FlowExpectedError[prop-missing] Keeping this for backwards-compatibility with the renderers versions in open source.\n if (publicInstance._internalInstanceHandle != null) {\n // $FlowExpectedError[incompatible-return] Keeping this for backwards-compatibility with the renderers versions in open source.\n return publicInstance._internalInstanceHandle;\n }\n\n return publicInstance.__internalInstanceHandle;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// flowlint unsafe-getters-setters:off\n\nimport type {\n HostComponent,\n INativeMethods,\n InternalInstanceHandle,\n MeasureInWindowOnSuccessCallback,\n MeasureLayoutOnSuccessCallback,\n MeasureOnSuccessCallback,\n ViewConfig,\n} from '../../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ElementRef} from 'react';\n\nimport TextInputState from '../../../../../Libraries/Components/TextInput/TextInputState';\nimport {getFabricUIManager} from '../../../../../Libraries/ReactNative/FabricUIManager';\nimport {create as createAttributePayload} from '../../../../../Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload';\nimport warnForStyleProps from '../../../../../Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps';\nimport ReadOnlyElement, {getBoundingClientRect} from './ReadOnlyElement';\nimport ReadOnlyNode from './ReadOnlyNode';\nimport {\n getPublicInstanceFromInternalInstanceHandle,\n getShadowNode,\n} from './ReadOnlyNode';\nimport NativeDOM from './specs/NativeDOM';\nimport nullthrows from 'nullthrows';\n\nconst noop = () => {};\n\nexport default class ReactNativeElement\n extends ReadOnlyElement\n implements INativeMethods\n{\n // These need to be accessible from `ReactFabricPublicInstanceUtils`.\n __nativeTag: number;\n __internalInstanceHandle: InternalInstanceHandle;\n\n #viewConfig: ViewConfig;\n\n constructor(\n tag: number,\n viewConfig: ViewConfig,\n internalInstanceHandle: InternalInstanceHandle,\n ) {\n super(internalInstanceHandle);\n\n this.__nativeTag = tag;\n this.__internalInstanceHandle = internalInstanceHandle;\n this.#viewConfig = viewConfig;\n }\n\n get offsetHeight(): number {\n return Math.round(\n getBoundingClientRect(this, {includeTransform: false}).height,\n );\n }\n\n get offsetLeft(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const offset = NativeDOM.getOffset(node);\n return Math.round(offset[2]);\n }\n\n return 0;\n }\n\n get offsetParent(): ReadOnlyElement | null {\n const node = getShadowNode(this);\n\n if (node != null) {\n const offset = NativeDOM.getOffset(node);\n // For children of the root node we currently return offset data\n // but a `null` parent because the root node is not accessible\n // in JavaScript yet.\n if (offset[0] != null) {\n const offsetParentInstanceHandle = offset[0];\n const offsetParent = getPublicInstanceFromInternalInstanceHandle(\n offsetParentInstanceHandle,\n );\n // $FlowExpectedError[incompatible-type] The value returned by `getOffset` is always an instance handle for `ReadOnlyElement`.\n const offsetParentElement: ReadOnlyElement | null = offsetParent;\n return offsetParentElement;\n }\n }\n\n return null;\n }\n\n get offsetTop(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const offset = NativeDOM.getOffset(node);\n return Math.round(offset[1]);\n }\n\n return 0;\n }\n\n get offsetWidth(): number {\n return Math.round(\n getBoundingClientRect(this, {includeTransform: false}).width,\n );\n }\n\n /**\n * React Native compatibility methods\n */\n\n blur(): void {\n // $FlowFixMe[incompatible-exact] Migrate all usages of `NativeMethods` to an interface to fix this.\n TextInputState.blurTextInput(this);\n }\n\n focus() {\n // $FlowFixMe[incompatible-exact] Migrate all usages of `NativeMethods` to an interface to fix this.\n TextInputState.focusTextInput(this);\n }\n\n measure(callback: MeasureOnSuccessCallback) {\n const node = getShadowNode(this);\n if (node != null) {\n nullthrows(getFabricUIManager()).measure(node, callback);\n }\n }\n\n measureInWindow(callback: MeasureInWindowOnSuccessCallback) {\n const node = getShadowNode(this);\n if (node != null) {\n nullthrows(getFabricUIManager()).measureInWindow(node, callback);\n }\n }\n\n measureLayout(\n relativeToNativeNode: number | ElementRef>,\n onSuccess: MeasureLayoutOnSuccessCallback,\n onFail?: () => void /* currently unused */,\n ) {\n if (!(relativeToNativeNode instanceof ReadOnlyNode)) {\n if (__DEV__) {\n console.error(\n 'Warning: ref.measureLayout must be called with a ref to a native component.',\n );\n }\n\n return;\n }\n\n const toStateNode = getShadowNode(this);\n const fromStateNode = getShadowNode(relativeToNativeNode);\n\n if (toStateNode != null && fromStateNode != null) {\n nullthrows(getFabricUIManager()).measureLayout(\n toStateNode,\n fromStateNode,\n onFail != null ? onFail : noop,\n onSuccess != null ? onSuccess : noop,\n );\n }\n }\n\n setNativeProps(nativeProps: {...}): void {\n if (__DEV__) {\n warnForStyleProps(nativeProps, this.#viewConfig.validAttributes);\n }\n\n const updatePayload = createAttributePayload(\n nativeProps,\n this.#viewConfig.validAttributes,\n );\n\n const node = getShadowNode(this);\n\n if (node != null && updatePayload != null) {\n nullthrows(getFabricUIManager()).setNativeProps(node, updatePayload);\n }\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {AttributeConfiguration} from '../../Renderer/shims/ReactNativeTypes';\n\nexport default function warnForStyleProps(\n props: {...},\n validAttributes: AttributeConfiguration,\n): void {\n if (__DEV__) {\n for (const key in validAttributes.style) {\n // $FlowFixMe[invalid-computed-prop]\n if (!(validAttributes[key] || props[key] === undefined)) {\n console.error(\n 'You are setting the style `{ %s' +\n ': ... }` as a prop. You ' +\n 'should nest it in a style object. ' +\n 'E.g. `{ style: { %s' +\n ': ... } }`',\n key,\n key,\n );\n }\n }\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// flowlint unsafe-getters-setters:off\n\nimport type HTMLCollection from '../oldstylecollections/HTMLCollection';\n\nimport DOMRect from '../geometry/DOMRect';\nimport {createHTMLCollection} from '../oldstylecollections/HTMLCollection';\nimport ReadOnlyNode, {\n getChildNodes,\n getInstanceHandle,\n getShadowNode,\n} from './ReadOnlyNode';\nimport NativeDOM from './specs/NativeDOM';\nimport {getElementSibling} from './utilities/Traversal';\n\nexport default class ReadOnlyElement extends ReadOnlyNode {\n get childElementCount(): number {\n return getChildElements(this).length;\n }\n\n get children(): HTMLCollection {\n return createHTMLCollection(getChildElements(this));\n }\n\n get clientHeight(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const innerSize = NativeDOM.getInnerSize(node);\n return innerSize[1];\n }\n\n return 0;\n }\n\n get clientLeft(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const borderSize = NativeDOM.getBorderWidth(node);\n return borderSize[3];\n }\n\n return 0;\n }\n\n get clientTop(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const borderSize = NativeDOM.getBorderWidth(node);\n return borderSize[0];\n }\n\n return 0;\n }\n\n get clientWidth(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const innerSize = NativeDOM.getInnerSize(node);\n return innerSize[0];\n }\n\n return 0;\n }\n\n get firstElementChild(): ReadOnlyElement | null {\n const childElements = getChildElements(this);\n\n if (childElements.length === 0) {\n return null;\n }\n\n return childElements[0];\n }\n\n get id(): string {\n const instanceHandle = getInstanceHandle(this);\n // TODO: migrate off this private React API\n // $FlowExpectedError[incompatible-use]\n const props = instanceHandle?.stateNode?.canonical?.currentProps;\n return props?.id ?? props?.nativeID ?? '';\n }\n\n get lastElementChild(): ReadOnlyElement | null {\n const childElements = getChildElements(this);\n\n if (childElements.length === 0) {\n return null;\n }\n\n return childElements[childElements.length - 1];\n }\n\n get nextElementSibling(): ReadOnlyElement | null {\n return getElementSibling(this, 'next');\n }\n\n get nodeName(): string {\n return this.tagName;\n }\n\n get nodeType(): number {\n return ReadOnlyNode.ELEMENT_NODE;\n }\n\n get nodeValue(): string | null {\n return null;\n }\n\n set nodeValue(value: string): void {}\n\n get previousElementSibling(): ReadOnlyElement | null {\n return getElementSibling(this, 'previous');\n }\n\n get scrollHeight(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const scrollSize = NativeDOM.getScrollSize(node);\n return scrollSize[1];\n }\n\n return 0;\n }\n\n get scrollLeft(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const scrollPosition = NativeDOM.getScrollPosition(node);\n return scrollPosition[0];\n }\n\n return 0;\n }\n\n get scrollTop(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const scrollPosition = NativeDOM.getScrollPosition(node);\n return scrollPosition[1];\n }\n\n return 0;\n }\n\n get scrollWidth(): number {\n const node = getShadowNode(this);\n\n if (node != null) {\n const scrollSize = NativeDOM.getScrollSize(node);\n return scrollSize[0];\n }\n\n return 0;\n }\n\n get tagName(): string {\n const node = getShadowNode(this);\n\n if (node != null) {\n return NativeDOM.getTagName(node);\n }\n\n return '';\n }\n\n get textContent(): string | null {\n const shadowNode = getShadowNode(this);\n\n if (shadowNode != null) {\n return NativeDOM.getTextContent(shadowNode);\n }\n\n return '';\n }\n\n getBoundingClientRect(): DOMRect {\n return getBoundingClientRect(this, {includeTransform: true});\n }\n\n /**\n * Pointer Capture APIs\n */\n hasPointerCapture(pointerId: number): boolean {\n const node = getShadowNode(this);\n if (node != null) {\n return NativeDOM.hasPointerCapture(node, pointerId);\n }\n return false;\n }\n\n setPointerCapture(pointerId: number): void {\n const node = getShadowNode(this);\n if (node != null) {\n NativeDOM.setPointerCapture(node, pointerId);\n }\n }\n\n releasePointerCapture(pointerId: number): void {\n const node = getShadowNode(this);\n if (node != null) {\n NativeDOM.releasePointerCapture(node, pointerId);\n }\n }\n}\n\nfunction getChildElements(node: ReadOnlyNode): $ReadOnlyArray {\n // $FlowIssue[incompatible-call]\n return getChildNodes(node).filter(\n childNode => childNode instanceof ReadOnlyElement,\n );\n}\n\n/**\n * The public API for `getBoundingClientRect` always includes transform,\n * so we use this internal version to get the data without transform to\n * implement methods like `offsetWidth` and `offsetHeight`.\n */\nexport function getBoundingClientRect(\n node: ReadOnlyElement,\n {includeTransform}: {includeTransform: boolean},\n): DOMRect {\n const shadowNode = getShadowNode(node);\n\n if (shadowNode != null) {\n const rect = NativeDOM.getBoundingClientRect(shadowNode, includeTransform);\n return new DOMRect(rect[0], rect[1], rect[2], rect[3]);\n }\n\n // Empty rect if any of the above failed\n return new DOMRect(0, 0, 0, 0);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// flowlint unsafe-getters-setters:off\n\nimport type {\n InternalInstanceHandle,\n Node as ShadowNode,\n} from '../../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type NodeList from '../oldstylecollections/NodeList';\nimport type ReadOnlyElement from './ReadOnlyElement';\n\nimport {createNodeList} from '../oldstylecollections/NodeList';\nimport NativeDOM from './specs/NativeDOM';\n\n// We initialize this lazily to avoid a require cycle\n// (`ReadOnlyElement` also depends on `ReadOnlyNode`).\nlet ReadOnlyElementClass: Class;\n\nexport default class ReadOnlyNode {\n constructor(internalInstanceHandle: InternalInstanceHandle) {\n setInstanceHandle(this, internalInstanceHandle);\n }\n\n get childNodes(): NodeList {\n const childNodes = getChildNodes(this);\n return createNodeList(childNodes);\n }\n\n get firstChild(): ReadOnlyNode | null {\n const childNodes = getChildNodes(this);\n\n if (childNodes.length === 0) {\n return null;\n }\n\n return childNodes[0];\n }\n\n get isConnected(): boolean {\n const shadowNode = getShadowNode(this);\n\n if (shadowNode == null) {\n return false;\n }\n\n return NativeDOM.isConnected(shadowNode);\n }\n\n get lastChild(): ReadOnlyNode | null {\n const childNodes = getChildNodes(this);\n\n if (childNodes.length === 0) {\n return null;\n }\n\n return childNodes[childNodes.length - 1];\n }\n\n get nextSibling(): ReadOnlyNode | null {\n const [siblings, position] = getNodeSiblingsAndPosition(this);\n\n if (position === siblings.length - 1) {\n // this node is the last child of its parent, so there is no next sibling.\n return null;\n }\n\n return siblings[position + 1];\n }\n\n /**\n * @abstract\n */\n get nodeName(): string {\n throw new TypeError(\n '`nodeName` is abstract and must be implemented in a subclass of `ReadOnlyNode`',\n );\n }\n\n /**\n * @abstract\n */\n get nodeType(): number {\n throw new TypeError(\n '`nodeType` is abstract and must be implemented in a subclass of `ReadOnlyNode`',\n );\n }\n\n /**\n * @abstract\n */\n get nodeValue(): string | null {\n throw new TypeError(\n '`nodeValue` is abstract and must be implemented in a subclass of `ReadOnlyNode`',\n );\n }\n\n get parentElement(): ReadOnlyElement | null {\n const parentNode = this.parentNode;\n\n if (ReadOnlyElementClass == null) {\n // We initialize this lazily to avoid a require cycle.\n ReadOnlyElementClass = require('./ReadOnlyElement').default;\n }\n\n if (parentNode instanceof ReadOnlyElementClass) {\n return parentNode;\n }\n\n return null;\n }\n\n get parentNode(): ReadOnlyNode | null {\n const shadowNode = getShadowNode(this);\n\n if (shadowNode == null) {\n return null;\n }\n\n const parentInstanceHandle = NativeDOM.getParentNode(shadowNode);\n\n if (parentInstanceHandle == null) {\n return null;\n }\n\n return (\n getPublicInstanceFromInternalInstanceHandle(parentInstanceHandle) ?? null\n );\n }\n\n get previousSibling(): ReadOnlyNode | null {\n const [siblings, position] = getNodeSiblingsAndPosition(this);\n\n if (position === 0) {\n // this node is the first child of its parent, so there is no previous sibling.\n return null;\n }\n\n return siblings[position - 1];\n }\n\n /**\n * @abstract\n */\n get textContent(): string | null {\n throw new TypeError(\n '`textContent` is abstract and must be implemented in a subclass of `ReadOnlyNode`',\n );\n }\n\n compareDocumentPosition(otherNode: ReadOnlyNode): number {\n // Quick check to avoid having to call into Fabric if the nodes are the same.\n if (otherNode === this) {\n return 0;\n }\n\n const shadowNode = getShadowNode(this);\n const otherShadowNode = getShadowNode(otherNode);\n\n if (shadowNode == null || otherShadowNode == null) {\n return ReadOnlyNode.DOCUMENT_POSITION_DISCONNECTED;\n }\n\n return NativeDOM.compareDocumentPosition(shadowNode, otherShadowNode);\n }\n\n contains(otherNode: ReadOnlyNode): boolean {\n if (otherNode === this) {\n return true;\n }\n\n const position = this.compareDocumentPosition(otherNode);\n // eslint-disable-next-line no-bitwise\n return (position & ReadOnlyNode.DOCUMENT_POSITION_CONTAINED_BY) !== 0;\n }\n\n getRootNode(): ReadOnlyNode {\n // eslint-disable-next-line consistent-this\n let lastKnownParent: ReadOnlyNode = this;\n let nextPossibleParent: ?ReadOnlyNode = this.parentNode;\n\n while (nextPossibleParent != null) {\n lastKnownParent = nextPossibleParent;\n nextPossibleParent = nextPossibleParent.parentNode;\n }\n\n return lastKnownParent;\n }\n\n hasChildNodes(): boolean {\n return getChildNodes(this).length > 0;\n }\n\n /*\n * Node types, as returned by the `nodeType` property.\n */\n\n /**\n * Type of Element, HTMLElement and ReactNativeElement instances.\n */\n static ELEMENT_NODE: number = 1;\n /**\n * Currently Unused in React Native.\n */\n static ATTRIBUTE_NODE: number = 2;\n /**\n * Text nodes.\n */\n static TEXT_NODE: number = 3;\n /**\n * @deprecated Unused in React Native.\n */\n static CDATA_SECTION_NODE: number = 4;\n /**\n * @deprecated\n */\n static ENTITY_REFERENCE_NODE: number = 5;\n /**\n * @deprecated\n */\n static ENTITY_NODE: number = 6;\n /**\n * @deprecated Unused in React Native.\n */\n static PROCESSING_INSTRUCTION_NODE: number = 7;\n /**\n * @deprecated Unused in React Native.\n */\n static COMMENT_NODE: number = 8;\n /**\n * @deprecated Unused in React Native.\n */\n static DOCUMENT_NODE: number = 9;\n /**\n * @deprecated Unused in React Native.\n */\n static DOCUMENT_TYPE_NODE: number = 10;\n /**\n * @deprecated Unused in React Native.\n */\n static DOCUMENT_FRAGMENT_NODE: number = 11;\n /**\n * @deprecated\n */\n static NOTATION_NODE: number = 12;\n\n /*\n * Document position flags. Used to check the return value of\n * `compareDocumentPosition()`.\n */\n\n /**\n * Both nodes are in different documents.\n */\n static DOCUMENT_POSITION_DISCONNECTED: number = 1;\n /**\n * `otherNode` precedes the node in either a pre-order depth-first traversal of a tree containing both\n * (e.g., as an ancestor or previous sibling or a descendant of a previous sibling or previous sibling of an ancestor)\n * or (if they are disconnected) in an arbitrary but consistent ordering.\n */\n static DOCUMENT_POSITION_PRECEDING: number = 2;\n /**\n * `otherNode` follows the node in either a pre-order depth-first traversal of a tree containing both\n * (e.g., as a descendant or following sibling or a descendant of a following sibling or following sibling of an ancestor)\n * or (if they are disconnected) in an arbitrary but consistent ordering.\n */\n static DOCUMENT_POSITION_FOLLOWING: number = 4;\n /**\n * `otherNode` is an ancestor of the node.\n */\n static DOCUMENT_POSITION_CONTAINS: number = 8;\n /**\n * `otherNode` is a descendant of the node.\n */\n static DOCUMENT_POSITION_CONTAINED_BY: number = 16;\n /**\n * @deprecated Unused in React Native.\n */\n static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number = 32;\n}\n\nconst INSTANCE_HANDLE_KEY = Symbol('internalInstanceHandle');\n\nexport function getInstanceHandle(node: ReadOnlyNode): InternalInstanceHandle {\n // $FlowExpectedError[prop-missing]\n return node[INSTANCE_HANDLE_KEY];\n}\n\nfunction setInstanceHandle(\n node: ReadOnlyNode,\n instanceHandle: InternalInstanceHandle,\n): void {\n // $FlowExpectedError[prop-missing]\n node[INSTANCE_HANDLE_KEY] = instanceHandle;\n}\n\nexport function getShadowNode(node: ReadOnlyNode): ?ShadowNode {\n // Lazy import Fabric here to avoid DOM Node APIs classes from having side-effects.\n // With a static import we can't use these classes for Paper-only variants.\n const ReactFabric = require('../../../../../Libraries/Renderer/shims/ReactFabric');\n return ReactFabric.getNodeFromInternalInstanceHandle(getInstanceHandle(node));\n}\n\nexport function getChildNodes(\n node: ReadOnlyNode,\n): $ReadOnlyArray {\n const shadowNode = getShadowNode(node);\n\n if (shadowNode == null) {\n return [];\n }\n\n const childNodeInstanceHandles = NativeDOM.getChildNodes(shadowNode);\n return childNodeInstanceHandles\n .map(instanceHandle =>\n getPublicInstanceFromInternalInstanceHandle(instanceHandle),\n )\n .filter(Boolean);\n}\n\nfunction getNodeSiblingsAndPosition(\n node: ReadOnlyNode,\n): [$ReadOnlyArray, number] {\n const parent = node.parentNode;\n if (parent == null) {\n // This node is the root or it's disconnected.\n return [[node], 0];\n }\n\n const siblings = getChildNodes(parent);\n const position = siblings.indexOf(node);\n\n if (position === -1) {\n throw new TypeError(\"Missing node in parent's child node list\");\n }\n\n return [siblings, position];\n}\n\nexport function getPublicInstanceFromInternalInstanceHandle(\n instanceHandle: InternalInstanceHandle,\n): ?ReadOnlyNode {\n // Lazy import Fabric here to avoid DOM Node APIs classes from having side-effects.\n // With a static import we can't use these classes for Paper-only variants.\n const ReactFabric = require('../../../../../Libraries/Renderer/shims/ReactFabric');\n const mixedPublicInstance =\n ReactFabric.getPublicInstanceFromInternalInstanceHandle(instanceHandle);\n // $FlowExpectedError[incompatible-return] React defines public instances as \"mixed\" because it can't access the definition from React Native.\n return mixedPublicInstance;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {\n InternalInstanceHandle as InstanceHandle,\n Node as ShadowNode,\n} from '../../../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {TurboModule} from '../../../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../../../Libraries/TurboModule/TurboModuleRegistry';\nimport nullthrows from 'nullthrows';\n\nexport type MeasureInWindowOnSuccessCallback = (\n x: number,\n y: number,\n width: number,\n height: number,\n) => void;\n\nexport type MeasureOnSuccessCallback = (\n x: number,\n y: number,\n width: number,\n height: number,\n pageX: number,\n pageY: number,\n) => void;\n\nexport type MeasureLayoutOnSuccessCallback = (\n left: number,\n top: number,\n width: number,\n height: number,\n) => void;\n\nexport interface Spec extends TurboModule {\n +getParentNode: (\n shadowNode: mixed /* ShadowNode */,\n ) => mixed /* ?InstanceHandle */;\n\n +getChildNodes: (\n shadowNode: mixed /* ShadowNode */,\n ) => $ReadOnlyArray /* $ReadOnlyArray */;\n\n +isConnected: (shadowNode: mixed /* ShadowNode */) => boolean;\n\n +compareDocumentPosition: (\n shadowNode: mixed /* ShadowNode */,\n otherShadowNode: mixed /* ShadowNode */,\n ) => number;\n\n +getTextContent: (shadowNode: mixed /* ShadowNode */) => string;\n\n +getBoundingClientRect: (\n shadowNode: mixed /* ShadowNode */,\n includeTransform: boolean,\n ) => $ReadOnlyArray /* [x: number, y: number, width: number, height: number] */;\n\n +getOffset: (\n shadowNode: mixed /* ShadowNode */,\n ) => $ReadOnlyArray /* [offsetParent: ?InstanceHandle, top: number, left: number] */;\n\n +getScrollPosition: (\n shadowNode: mixed /* ShadowNode */,\n ) => $ReadOnlyArray /* [scrollLeft: number, scrollTop: number] */;\n\n +getScrollSize: (\n shadowNode: mixed /* ShadowNode */,\n ) => $ReadOnlyArray /* [scrollWidth: number, scrollHeight: number] */;\n\n +getInnerSize: (\n shadowNode: mixed /* ShadowNode */,\n ) => $ReadOnlyArray /* [width: number, height: number] */;\n\n +getBorderWidth: (\n shadowNode: mixed /* ShadowNode */,\n ) => $ReadOnlyArray /* [topWidth: number, rightWidth: number, bottomWidth: number, leftWidth: number] */;\n\n +getTagName: (shadowNode: mixed /* ShadowNode */) => string;\n\n +hasPointerCapture: (\n shadowNode: mixed /* ShadowNode */,\n pointerId: number,\n ) => boolean;\n\n +setPointerCapture: (\n shadowNode: mixed /* ShadowNode */,\n pointerId: number,\n ) => void;\n\n +releasePointerCapture: (\n shadowNode: mixed /* ShadowNode */,\n pointerId: number,\n ) => void;\n\n /**\n * Legacy layout APIs\n */\n\n +measure: (shadowNode: mixed, callback: MeasureOnSuccessCallback) => void;\n\n +measureInWindow: (\n shadowNode: mixed,\n callback: MeasureInWindowOnSuccessCallback,\n ) => void;\n\n +measureLayout: (\n shadowNode: mixed,\n relativeNode: mixed,\n onFail: () => void,\n onSuccess: MeasureLayoutOnSuccessCallback,\n ) => void;\n}\n\nconst RawNativeDOM = (TurboModuleRegistry.get('NativeDOMCxx'): ?Spec);\n\n// This is the actual interface of this module, but the native module codegen\n// isn't expressive enough yet.\nexport interface RefinedSpec {\n /**\n * This is a React Native implementation of `Node.prototype.parentNode`\n * (see https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode).\n *\n * If a version of the given shadow node is present in the current revision of\n * an active shadow tree, it returns the instance handle of its parent.\n * Otherwise, it returns `null`.\n */\n +getParentNode: (shadowNode: ShadowNode) => ?InstanceHandle;\n\n /**\n * This is a React Native implementation of `Node.prototype.childNodes`\n * (see https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes).\n *\n * If a version of the given shadow node is present in the current revision\n * of an active shadow tree, it returns an array of instance handles of its\n * children. Otherwise, it returns an empty array.\n */\n +getChildNodes: (shadowNode: ShadowNode) => $ReadOnlyArray;\n\n /**\n * This is a React Native implementation of `Node.prototype.isConnected`\n * (see https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected).\n *\n * Indicates whether a version of the given shadow node is present in the\n * current revision of an active shadow tree.\n */\n +isConnected: (shadowNode: ShadowNode) => boolean;\n\n /**\n * This is a React Native implementation of `Node.prototype.compareDocumentPosition`\n * (see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition).\n *\n * It uses the version of the shadow nodes that are present in the current\n * revision of the shadow tree (if any). If any of the nodes is not present,\n * it just indicates they are disconnected.\n */\n +compareDocumentPosition: (\n shadowNode: ShadowNode,\n otherShadowNode: ShadowNode,\n ) => number;\n\n /**\n * This is a React Native implementation of `Element.prototype.textContent`\n * (see https://developer.mozilla.org/en-US/docs/Web/API/Element/textContent).\n *\n * It uses the version of the shadow node that is present in the current\n * revision of the shadow tree.\n * If the version is present, is traverses all its children in DFS and\n * concatenates all the text contents. Otherwise, it returns an empty string.\n *\n * This is also used to access the text content of text nodes, which does not\n * need any traversal.\n */\n +getTextContent: (shadowNode: ShadowNode) => string;\n\n /**\n * This is a React Native implementation of `Element.prototype.getBoundingClientRect`\n * (see https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).\n *\n * This is similar to `measureInWindow`, except it's explicitly synchronous\n * (returns the result instead of passing it to a callback).\n *\n * It allows indicating whether to include transforms so it can also be used\n * to implement methods like [`offsetWidth`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth)\n * and [`offsetHeight`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight).\n */\n +getBoundingClientRect: (\n shadowNode: ShadowNode,\n includeTransform: boolean,\n ) => $ReadOnly<\n [\n /* x: */ number,\n /* y: */ number,\n /* width: */ number,\n /* height: */ number,\n ],\n >;\n\n /**\n * This is a method to access the offset information for a shadow node, to\n * implement these methods:\n * - `HTMLElement.prototype.offsetParent`: see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent.\n * - `HTMLElement.prototype.offsetTop`: see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop.\n * - `HTMLElement.prototype.offsetLeft`: see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft.\n *\n * It uses the version of the shadow node that is present in the current\n * revision of the shadow tree. If the node is not present or is not\n * displayed (because any of its ancestors or itself have 'display: none'),\n * it returns `undefined`. Otherwise, it returns its parent (as all nodes in\n * React Native are currently \"positioned\") and its offset relative to its\n * parent.\n */\n +getOffset: (\n shadowNode: ShadowNode,\n ) => $ReadOnly<\n [\n /* offsetParent: */ ?InstanceHandle,\n /* top: */ number,\n /* left: */ number,\n ],\n >;\n\n /**\n * This is a method to access scroll information for a shadow node, to\n * implement these methods:\n * - `Element.prototype.scrollLeft`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft.\n * - `Element.prototype.scrollTop`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop.\n *\n * It uses the version of the shadow node that is present in the current\n * revision of the shadow tree. If the node is not present or is not displayed\n * (because any of its ancestors or itself have 'display: none'), it returns\n * `undefined`. Otherwise, it returns the scroll position.\n */\n +getScrollPosition: (\n shadowNode: ShadowNode,\n ) => $ReadOnly<[/* scrollLeft: */ number, /* scrollTop: */ number]>;\n\n /**\n *\n * This is a method to access the scroll information of a shadow node, to\n * implement these methods:\n * - `Element.prototype.scrollWidth`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollWidth.\n * - `Element.prototype.scrollHeight`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight.\n *\n * It uses the version of the shadow node that is present in the current\n * revision of the shadow tree. If the node is not present or is not displayed\n * (because any of its ancestors or itself have 'display: none'), it returns\n * `undefined`. Otherwise, it returns the scroll size.\n */\n +getScrollSize: (\n shadowNode: ShadowNode,\n ) => $ReadOnly<[/* scrollWidth: */ number, /* scrollHeight: */ number]>;\n\n /**\n * This is a method to access the inner size of a shadow node, to implement\n * these methods:\n * - `Element.prototype.clientWidth`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth.\n * - `Element.prototype.clientHeight`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight.\n *\n * It uses the version of the shadow node that is present in the current\n * revision of the shadow tree. If the node is not present, it is not\n * displayed (because any of its ancestors or itself have 'display: none'), or\n * it has an inline display, it returns `undefined`. Otherwise, it returns its\n * inner size.\n */\n +getInnerSize: (\n shadowNode: ShadowNode,\n ) => $ReadOnly<[/* width: */ number, /* height: */ number]>;\n\n /**\n * This is a method to access the border size of a shadow node, to implement\n * these methods:\n * - `Element.prototype.clientLeft`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientLeft.\n * - `Element.prototype.clientTop`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientTop.\n *\n * It uses the version of the shadow node that is present in the current\n * revision of the shadow tree. If the node is not present, it is not\n * displayed (because any of its ancestors or itself have 'display: none'), or\n * it has an inline display, it returns `undefined`. Otherwise, it returns its\n * border size.\n */\n +getBorderWidth: (\n shadowNode: ShadowNode,\n ) => $ReadOnly<\n [\n /* topWidth: */ number,\n /* rightWidth: */ number,\n /* bottomWidth: */ number,\n /* leftWidth: */ number,\n ],\n >;\n\n /**\n * This is a method to access the normalized tag name of a shadow node, to\n * implement `Element.prototype.tagName` (see https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName).\n */\n +getTagName: (shadowNode: ShadowNode) => string;\n\n /**\n * Pointer Capture APIs\n */\n\n +hasPointerCapture: (shadowNode: ShadowNode, pointerId: number) => boolean;\n\n +setPointerCapture: (shadowNode: ShadowNode, pointerId: number) => void;\n\n +releasePointerCapture: (shadowNode: ShadowNode, pointerId: number) => void;\n\n /**\n * Legacy layout APIs\n */\n\n +measure: (\n shadowNode: ShadowNode,\n callback: MeasureOnSuccessCallback,\n ) => void;\n\n +measureInWindow: (\n shadowNode: ShadowNode,\n callback: MeasureInWindowOnSuccessCallback,\n ) => void;\n\n +measureLayout: (\n shadowNode: ShadowNode,\n relativeNode: ShadowNode,\n onFail: () => void,\n onSuccess: MeasureLayoutOnSuccessCallback,\n ) => void;\n}\n\nconst NativeDOM: RefinedSpec = {\n getParentNode(shadowNode) {\n // $FlowExpectedError[incompatible-cast]\n return (nullthrows(RawNativeDOM).getParentNode(\n shadowNode,\n ): ?InstanceHandle);\n },\n\n getChildNodes(shadowNode) {\n // $FlowExpectedError[incompatible-cast]\n return (nullthrows(RawNativeDOM).getChildNodes(\n shadowNode,\n ): $ReadOnlyArray);\n },\n\n isConnected(shadowNode) {\n return nullthrows(RawNativeDOM).isConnected(shadowNode);\n },\n\n compareDocumentPosition(shadowNode, otherShadowNode) {\n return nullthrows(RawNativeDOM).compareDocumentPosition(\n shadowNode,\n otherShadowNode,\n );\n },\n\n getTextContent(shadowNode) {\n return nullthrows(RawNativeDOM).getTextContent(shadowNode);\n },\n\n getBoundingClientRect(shadowNode, includeTransform: boolean) {\n // $FlowExpectedError[incompatible-cast]\n return (nullthrows(RawNativeDOM).getBoundingClientRect(\n shadowNode,\n includeTransform,\n ): $ReadOnly<\n [\n /* x: */ number,\n /* y: */ number,\n /* width: */ number,\n /* height: */ number,\n ],\n >);\n },\n\n getOffset(shadowNode) {\n // $FlowExpectedError[incompatible-cast]\n return (nullthrows(RawNativeDOM).getOffset(shadowNode): $ReadOnly<\n [\n /* offsetParent: */ ?InstanceHandle,\n /* top: */ number,\n /* left: */ number,\n ],\n >);\n },\n\n getScrollPosition(shadowNode) {\n // $FlowExpectedError[incompatible-cast]\n return (nullthrows(RawNativeDOM).getScrollPosition(shadowNode): $ReadOnly<\n [/* scrollLeft: */ number, /* scrollTop: */ number],\n >);\n },\n\n getScrollSize(shadowNode) {\n // $FlowExpectedError[incompatible-cast]\n return (nullthrows(RawNativeDOM).getScrollSize(shadowNode): $ReadOnly<\n [/* scrollWidth: */ number, /* scrollHeight: */ number],\n >);\n },\n\n getInnerSize(shadowNode) {\n // $FlowExpectedError[incompatible-cast]\n return (nullthrows(RawNativeDOM).getInnerSize(shadowNode): $ReadOnly<\n [/* width: */ number, /* height: */ number],\n >);\n },\n\n getBorderWidth(shadowNode) {\n // $FlowExpectedError[incompatible-cast]\n return (nullthrows(RawNativeDOM).getBorderWidth(shadowNode): $ReadOnly<\n [\n /* topWidth: */ number,\n /* rightWidth: */ number,\n /* bottomWidth: */ number,\n /* leftWidth: */ number,\n ],\n >);\n },\n\n getTagName(shadowNode) {\n return nullthrows(RawNativeDOM).getTagName(shadowNode);\n },\n\n hasPointerCapture(shadowNode, pointerId) {\n return nullthrows(RawNativeDOM).hasPointerCapture(shadowNode, pointerId);\n },\n\n setPointerCapture(shadowNode, pointerId) {\n return nullthrows(RawNativeDOM).setPointerCapture(shadowNode, pointerId);\n },\n\n releasePointerCapture(shadowNode, pointerId) {\n return nullthrows(RawNativeDOM).releasePointerCapture(\n shadowNode,\n pointerId,\n );\n },\n\n /**\n * Legacy layout APIs\n */\n\n measure(shadowNode, callback) {\n return nullthrows(RawNativeDOM).measure(shadowNode, callback);\n },\n\n measureInWindow(shadowNode, callback) {\n return nullthrows(RawNativeDOM).measureInWindow(shadowNode, callback);\n },\n\n measureLayout(shadowNode, relativeNode, onFail, onSuccess) {\n return nullthrows(RawNativeDOM).measureLayout(\n shadowNode,\n relativeNode,\n onFail,\n onSuccess,\n );\n },\n};\n\nexport default NativeDOM;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n// flowlint unsafe-getters-setters:off\n\nimport type {ArrayLike} from './ArrayLikeUtils';\n\nimport {\n createEntriesIterator,\n createKeyIterator,\n createValueIterator,\n} from './ArrayLikeUtils';\n\n// IMPORTANT: The Flow type definition for this module is defined in `NodeList.js.flow`\n// because Flow only supports indexers in classes in declaration files.\n\n// $FlowIssue[prop-missing] Flow doesn't understand [Symbol.iterator]() {} and thinks this class doesn't implement the Iterable interface.\nexport default class NodeList implements Iterable, ArrayLike {\n #length: number;\n\n /**\n * Use `createNodeList` to create instances of this class.\n *\n * @private This is not defined in the declaration file, so users will not see\n * the signature of the constructor.\n */\n constructor(elements: $ReadOnlyArray) {\n for (let i = 0; i < elements.length; i++) {\n Object.defineProperty(this, i, {\n value: elements[i],\n writable: false,\n });\n }\n this.#length = elements.length;\n }\n\n get length(): number {\n return this.#length;\n }\n\n item(index: number): T | null {\n if (index < 0 || index >= this.#length) {\n return null;\n }\n\n // assigning to the interface allows us to access the indexer property in a\n // type-safe way.\n // eslint-disable-next-line consistent-this\n const arrayLike: ArrayLike = this;\n return arrayLike[index];\n }\n\n entries(): Iterator<[number, T]> {\n return createEntriesIterator(this);\n }\n\n forEach(\n callbackFn: (value: T, index: number, array: NodeList) => mixed,\n thisArg?: ThisType,\n ): void {\n // assigning to the interface allows us to access the indexer property in a\n // type-safe way.\n // eslint-disable-next-line consistent-this\n const arrayLike: ArrayLike = this;\n\n for (let index = 0; index < this.#length; index++) {\n if (thisArg == null) {\n callbackFn(arrayLike[index], index, this);\n } else {\n callbackFn.call(thisArg, arrayLike[index], index, this);\n }\n }\n }\n\n keys(): Iterator {\n return createKeyIterator(this);\n }\n\n values(): Iterator {\n return createValueIterator(this);\n }\n\n // $FlowIssue[unsupported-syntax] Flow does not support computed properties in classes.\n [Symbol.iterator](): Iterator {\n return createValueIterator(this);\n }\n}\n\n/**\n * This is an internal method to create instances of `NodeList`,\n * which avoids leaking its constructor to end users.\n * We can do that because the external definition of `NodeList` lives in\n * `NodeList.js.flow`, not here.\n */\nexport function createNodeList(elements: $ReadOnlyArray): NodeList {\n return new NodeList(elements);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n/**\n * This definition is different from the current built-in type `$ArrayLike`\n * provided by Flow, in that this is an interface and that one is an object.\n *\n * The difference is important because, when using objects, Flow thinks\n * a `length` property would be copied over when using the spread operator,\n * which is incorrect.\n */\nexport interface ArrayLike extends Iterable {\n // This property should've been read-only as well, but Flow doesn't handle\n // read-only indexers correctly (thinks reads are writes and fails).\n [indexer: number]: T;\n +length: number;\n}\n\nexport function* createValueIterator(arrayLike: ArrayLike): Iterator {\n for (let i = 0; i < arrayLike.length; i++) {\n yield arrayLike[i];\n }\n}\n\nexport function* createKeyIterator(\n arrayLike: ArrayLike,\n): Iterator {\n for (let i = 0; i < arrayLike.length; i++) {\n yield i;\n }\n}\n\nexport function* createEntriesIterator(\n arrayLike: ArrayLike,\n): Iterator<[number, T]> {\n for (let i = 0; i < arrayLike.length; i++) {\n yield [i, arrayLike[i]];\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n// flowlint unsafe-getters-setters:off\n\nimport type {ArrayLike} from './ArrayLikeUtils';\n\nimport {createValueIterator} from './ArrayLikeUtils';\n\n// IMPORTANT: The type definition for this module is defined in `HTMLCollection.js.flow`\n// because Flow only supports indexers in classes in declaration files.\n\n// $FlowIssue[prop-missing] Flow doesn't understand [Symbol.iterator]() {} and thinks this class doesn't implement the Iterable interface.\nexport default class HTMLCollection implements Iterable, ArrayLike {\n #length: number;\n\n /**\n * Use `createHTMLCollection` to create instances of this class.\n *\n * @private This is not defined in the declaration file, so users will not see\n * the signature of the constructor.\n */\n constructor(elements: $ReadOnlyArray) {\n for (let i = 0; i < elements.length; i++) {\n Object.defineProperty(this, i, {\n value: elements[i],\n enumerable: true,\n configurable: false,\n writable: false,\n });\n }\n\n this.#length = elements.length;\n }\n\n get length(): number {\n return this.#length;\n }\n\n item(index: number): T | null {\n if (index < 0 || index >= this.#length) {\n return null;\n }\n\n // assigning to the interface allows us to access the indexer property in a\n // type-safe way.\n // eslint-disable-next-line consistent-this\n const arrayLike: ArrayLike = this;\n return arrayLike[index];\n }\n\n /**\n * @deprecated Unused in React Native.\n */\n namedItem(name: string): T | null {\n return null;\n }\n\n // $FlowIssue[unsupported-syntax] Flow does not support computed properties in classes.\n [Symbol.iterator](): Iterator {\n return createValueIterator(this);\n }\n}\n\n/**\n * This is an internal method to create instances of `HTMLCollection`,\n * which avoids leaking its constructor to end users.\n * We can do that because the external definition of `HTMLCollection` lives in\n * `HTMLCollection.js.flow`, not here.\n */\nexport function createHTMLCollection(\n elements: $ReadOnlyArray,\n): HTMLCollection {\n return new HTMLCollection(elements);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type ReadOnlyElement from '../ReadOnlyElement';\nimport type ReadOnlyNode from '../ReadOnlyNode';\n\nimport {getChildNodes} from '../ReadOnlyNode';\n\n// We initialize this lazily to avoid a require cycle\n// (`ReadOnlyElement` also depends on `Traversal`).\nlet ReadOnlyElementClass: Class;\n\nexport function getElementSibling(\n node: ReadOnlyNode,\n direction: 'next' | 'previous',\n): ReadOnlyElement | null {\n const parent = node.parentNode;\n if (parent == null) {\n // This node is the root or it's disconnected.\n return null;\n }\n\n const childNodes = getChildNodes(parent);\n\n const startPosition = childNodes.indexOf(node);\n if (startPosition === -1) {\n return null;\n }\n\n const increment = direction === 'next' ? 1 : -1;\n\n let position = startPosition + increment;\n\n if (ReadOnlyElementClass == null) {\n // We initialize this lazily to avoid a require cycle.\n ReadOnlyElementClass = require('../ReadOnlyElement').default;\n }\n\n while (\n childNodes[position] != null &&\n !(childNodes[position] instanceof ReadOnlyElementClass)\n ) {\n position = position + increment;\n }\n\n return childNodes[position] ?? null;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {\n HostComponent,\n INativeMethods,\n InternalInstanceHandle,\n MeasureInWindowOnSuccessCallback,\n MeasureLayoutOnSuccessCallback,\n MeasureOnSuccessCallback,\n ViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type {ElementRef} from 'react';\n\nimport TextInputState from '../../Components/TextInput/TextInputState';\nimport {getNodeFromInternalInstanceHandle} from '../../Renderer/shims/ReactFabric';\nimport {getFabricUIManager} from '../FabricUIManager';\nimport {create} from './ReactNativeAttributePayload';\nimport warnForStyleProps from './warnForStyleProps';\nimport nullthrows from 'nullthrows';\n\nconst {\n measure: fabricMeasure,\n measureInWindow: fabricMeasureInWindow,\n measureLayout: fabricMeasureLayout,\n getBoundingClientRect: fabricGetBoundingClientRect,\n setNativeProps,\n} = nullthrows(getFabricUIManager());\n\nconst noop = () => {};\n\n/**\n * This is used for refs on host components.\n */\nexport default class ReactFabricHostComponent implements INativeMethods {\n // These need to be accessible from `ReactFabricPublicInstanceUtils`.\n __nativeTag: number;\n __internalInstanceHandle: InternalInstanceHandle;\n\n _viewConfig: ViewConfig;\n\n constructor(\n tag: number,\n viewConfig: ViewConfig,\n internalInstanceHandle: InternalInstanceHandle,\n ) {\n this.__nativeTag = tag;\n this._viewConfig = viewConfig;\n this.__internalInstanceHandle = internalInstanceHandle;\n }\n\n blur() {\n // $FlowFixMe[incompatible-exact] Migrate all usages of `NativeMethods` to an interface to fix this.\n TextInputState.blurTextInput(this);\n }\n\n focus() {\n // $FlowFixMe[incompatible-exact] Migrate all usages of `NativeMethods` to an interface to fix this.\n TextInputState.focusTextInput(this);\n }\n\n measure(callback: MeasureOnSuccessCallback) {\n const node = getNodeFromInternalInstanceHandle(\n this.__internalInstanceHandle,\n );\n if (node != null) {\n fabricMeasure(node, callback);\n }\n }\n\n measureInWindow(callback: MeasureInWindowOnSuccessCallback) {\n const node = getNodeFromInternalInstanceHandle(\n this.__internalInstanceHandle,\n );\n if (node != null) {\n fabricMeasureInWindow(node, callback);\n }\n }\n\n measureLayout(\n relativeToNativeNode: number | ElementRef>,\n onSuccess: MeasureLayoutOnSuccessCallback,\n onFail?: () => void /* currently unused */,\n ) {\n if (\n typeof relativeToNativeNode === 'number' ||\n !(relativeToNativeNode instanceof ReactFabricHostComponent)\n ) {\n if (__DEV__) {\n console.error(\n 'Warning: ref.measureLayout must be called with a ref to a native component.',\n );\n }\n\n return;\n }\n\n const toStateNode = getNodeFromInternalInstanceHandle(\n this.__internalInstanceHandle,\n );\n const fromStateNode = getNodeFromInternalInstanceHandle(\n relativeToNativeNode.__internalInstanceHandle,\n );\n\n if (toStateNode != null && fromStateNode != null) {\n fabricMeasureLayout(\n toStateNode,\n fromStateNode,\n onFail != null ? onFail : noop,\n onSuccess != null ? onSuccess : noop,\n );\n }\n }\n\n unstable_getBoundingClientRect(): DOMRect {\n const node = getNodeFromInternalInstanceHandle(\n this.__internalInstanceHandle,\n );\n if (node != null) {\n const rect = fabricGetBoundingClientRect(node, true);\n\n if (rect) {\n return new DOMRect(rect[0], rect[1], rect[2], rect[3]);\n }\n }\n\n // Empty rect if any of the above failed\n return new DOMRect(0, 0, 0, 0);\n }\n\n setNativeProps(nativeProps: {...}): void {\n if (__DEV__) {\n warnForStyleProps(nativeProps, this._viewConfig.validAttributes);\n }\n const updatePayload = create(nativeProps, this._viewConfig.validAttributes);\n\n const node = getNodeFromInternalInstanceHandle(\n this.__internalInstanceHandle,\n );\n if (node != null && updatePayload != null) {\n setNativeProps(node, updatePayload);\n }\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// flowlint unsafe-getters-setters:off\n\nimport ReadOnlyCharacterData from './ReadOnlyCharacterData';\nimport ReadOnlyNode from './ReadOnlyNode';\n\nexport default class ReadOnlyText extends ReadOnlyCharacterData {\n /**\n * @override\n */\n get nodeName(): string {\n return '#text';\n }\n\n /**\n * @override\n */\n get nodeType(): number {\n return ReadOnlyNode.TEXT_NODE;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// flowlint unsafe-getters-setters:off\n\nimport type ReadOnlyElement from './ReadOnlyElement';\n\nimport ReadOnlyNode, {getShadowNode} from './ReadOnlyNode';\nimport NativeDOM from './specs/NativeDOM';\nimport {getElementSibling} from './utilities/Traversal';\n\nexport default class ReadOnlyCharacterData extends ReadOnlyNode {\n get nextElementSibling(): ReadOnlyElement | null {\n return getElementSibling(this, 'next');\n }\n\n get previousElementSibling(): ReadOnlyElement | null {\n return getElementSibling(this, 'previous');\n }\n\n get data(): string {\n const shadowNode = getShadowNode(this);\n\n if (shadowNode != null) {\n return NativeDOM.getTextContent(shadowNode);\n }\n\n return '';\n }\n\n get length(): number {\n return this.data.length;\n }\n\n /**\n * @override\n */\n get textContent(): string | null {\n return this.data;\n }\n\n /**\n * @override\n */\n get nodeValue(): string {\n return this.data;\n }\n\n substringData(offset: number, count: number): string {\n const data = this.data;\n if (offset < 0) {\n throw new TypeError(\n `Failed to execute 'substringData' on 'CharacterData': The offset ${offset} is negative.`,\n );\n }\n if (offset > data.length) {\n throw new TypeError(\n `Failed to execute 'substringData' on 'CharacterData': The offset ${offset} is greater than the node's length (${data.length}).`,\n );\n }\n let adjustedCount = count < 0 || count > data.length ? data.length : count;\n return data.slice(offset, offset + adjustedCount);\n }\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.native.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.native.development.js');\n}\n","/**\n * @license React\n * scheduler.native.production.min.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';function f(a,b){var c=a.length;a.push(b);a:for(;0>>1,e=a[d];if(0>>1;dg(E,c))ng(A,E)?(a[d]=A,a[n]=c,d=n):(a[d]=E,a[m]=c,d=m);else if(ng(A,c))a[d]=A,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var l;if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var p=performance;l=function(){return p.now()}}else{var q=Date,r=q.now();l=function(){return q.now()-r}}var u=[],v=[],w=1,x=null,y=3,z=!1,B=!1,C=!1,D=\"function\"===typeof setTimeout?setTimeout:null,F=\"function\"===typeof clearTimeout?clearTimeout:null,G=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function H(a){for(var b=h(v);null!==b;){if(null===b.callback)k(v);else if(b.startTime<=a)k(v),b.sortIndex=b.expirationTime,f(u,b);else break;b=h(v)}}function I(a){C=!1;H(a);if(!B)if(null!==h(u))B=!0,J=K,L||(L=!0,M());else{var b=h(v);null!==b&&N(I,b.startTime-a)}}\nfunction K(a,b){B=!1;C&&(C=!1,F(O),O=-1);z=!0;var c=y;try{a:{H(b);for(x=h(u);null!==x&&(!(x.expirationTime>b)||a&&!P());){var d=x.callback;if(\"function\"===typeof d){x.callback=null;y=x.priorityLevel;var e=d(x.expirationTime<=b);b=l();if(\"function\"===typeof e){x.callback=e;H(b);var t=!0;break a}else x===h(u)&&k(u),H(b)}else k(u);x=h(u)}if(null!==x)t=!0;else{var m=h(v);null!==m&&N(I,m.startTime-b);t=!1}}return t}finally{x=null,y=c,z=!1}}\nfunction Q(a,b,c){var d=l();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0d?(a.sortIndex=c,f(v,a),null===h(u)&&a===h(v)&&(C?(F(O),O=-1):C=!0,N(I,c-d))):(a.sortIndex=e,f(u,a),B||z||(B=!0,J=K,L||(L=!0,M())));return a}function R(a){a.callback=null}function S(){return y}\nvar L=!1,J=null,O=-1,T=-1;function P(){return 5>l()-T?!1:!0}function U(){}function V(){if(null!==J){var a=l();T=a;var b=!0;try{b=J(!0,a)}finally{b?M():(L=!1,J=null)}}else L=!1}var M;if(\"function\"===typeof G)M=function(){G(V)};else if(\"undefined\"!==typeof MessageChannel){var W=new MessageChannel,X=W.port2;W.port1.onmessage=V;M=function(){X.postMessage(null)}}else M=function(){D(V,0)};function N(a,b){O=D(function(){a(l())},b)}\nvar Y=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_UserBlockingPriority:2,aa=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_NormalPriority:3,ba=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_LowPriority:4,ca=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_ImmediatePriority:1,da=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_scheduleCallback:Q,ea=\"undefined\"!==\ntypeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_cancelCallback:R,fa=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_getCurrentPriorityLevel:S,ha=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_shouldYield:P,ia=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_requestPaint:U,ja=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_now:l;\nfunction Z(){throw Error(\"Not implemented.\");}exports.unstable_IdlePriority=\"undefined\"!==typeof nativeRuntimeScheduler?nativeRuntimeScheduler.unstable_IdlePriority:5;exports.unstable_ImmediatePriority=ca;exports.unstable_LowPriority=ba;exports.unstable_NormalPriority=aa;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=Y;exports.unstable_cancelCallback=ea;exports.unstable_continueExecution=Z;exports.unstable_forceFrameRate=Z;exports.unstable_getCurrentPriorityLevel=fa;\nexports.unstable_getFirstCallbackNode=Z;exports.unstable_next=Z;exports.unstable_now=ja;exports.unstable_pauseExecution=Z;exports.unstable_requestPaint=ia;exports.unstable_runWithPriority=Z;exports.unstable_scheduleCallback=da;exports.unstable_shouldYield=ha;exports.unstable_wrapCallback=Z;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nimport type {ExtendedError} from './ExtendedError';\n\nimport {SyntheticError, handleException} from './ExceptionsManager';\n\ntype ErrorInfo = {\n +componentStack?: ?string,\n // $FlowFixMe[unclear-type] unknown props and state.\n +errorBoundary?: ?React$Component,\n};\n\nexport function onUncaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {\n let error;\n\n // Typically, `errorValue` should be an error. However, other values such as\n // strings (or even null) are sometimes thrown.\n if (errorValue instanceof Error) {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (errorValue: ExtendedError);\n } else if (typeof errorValue === 'string') {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (new SyntheticError(errorValue): ExtendedError);\n } else {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (new SyntheticError('Unspecified error'): ExtendedError);\n }\n try {\n // $FlowFixMe[incompatible-use] this is in try/catch.\n error.componentStack = errorInfo.componentStack;\n error.isComponentError = true;\n } catch {\n // Ignored.\n }\n\n // Uncaught errors are fatal.\n handleException(error, true);\n}\n\nexport function onCaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {\n let error;\n\n // Typically, `errorValue` should be an error. However, other values such as\n // strings (or even null) are sometimes thrown.\n if (errorValue instanceof Error) {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (errorValue: ExtendedError);\n } else if (typeof errorValue === 'string') {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (new SyntheticError(errorValue): ExtendedError);\n } else {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (new SyntheticError('Unspecified error'): ExtendedError);\n }\n try {\n // $FlowFixMe[incompatible-use] this is in try/catch.\n error.componentStack = errorInfo.componentStack;\n error.isComponentError = true;\n } catch {\n // Ignored.\n }\n\n // Caught errors are not fatal.\n handleException(error, false);\n}\n\nexport function onRecoverableError(\n errorValue: mixed,\n errorInfo: ErrorInfo,\n): void {\n let error;\n\n // Typically, `errorValue` should be an error. However, other values such as\n // strings (or even null) are sometimes thrown.\n if (errorValue instanceof Error) {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (errorValue: ExtendedError);\n } else if (typeof errorValue === 'string') {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (new SyntheticError(errorValue): ExtendedError);\n } else {\n /* $FlowFixMe[class-object-subtyping] added when improving typing for\n * this parameters */\n error = (new SyntheticError('Unspecified error'): ExtendedError);\n }\n try {\n // $FlowFixMe[incompatible-use] this is in try/catch.\n error.componentStack = errorInfo.componentStack;\n error.isComponentError = true;\n } catch {\n // Ignored.\n }\n\n // Recoverable errors should only be warnings.\n // This will make it a soft error in LogBox.\n // TODO: improve the logging for recoverable errors in prod.\n console.warn(error);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @noformat\n * @nolint\n * @flow\n * @generated SignedSource<<475c7d864efc2948c6125ddb8a38a4fc>>\n */\n'use strict';\n\nimport type {ReactNativeType} from './ReactNativeTypes';\n\nlet ReactNative;\n\nif (__DEV__) {\n ReactNative = require('../implementations/ReactNativeRenderer-dev');\n} else {\n ReactNative = require('../implementations/ReactNativeRenderer-prod');\n}\n\nmodule.exports = (ReactNative: ReactNativeType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @noflow\n * @nolint\n * @providesModule ReactNativeRenderer-prod\n * @preventMunge\n * @generated SignedSource<>\n */\n\n\"use strict\";\nrequire(\"react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore\");\nvar ReactNativePrivateInterface = require(\"react-native/Libraries/ReactPrivate/ReactNativePrivateInterface\"),\n React = require(\"react\"),\n Scheduler = require(\"scheduler\"),\n isArrayImpl = Array.isArray,\n hasError = !1,\n caughtError = null,\n getFiberCurrentPropsFromNode$1 = null,\n getInstanceFromNode = null,\n getNodeFromInstance = null;\nfunction executeDispatch(event, listener, inst) {\n event.currentTarget = getNodeFromInstance(inst);\n try {\n listener(event);\n } catch (error) {\n hasError || ((hasError = !0), (caughtError = error));\n }\n event.currentTarget = null;\n}\nfunction executeDirectDispatch(event) {\n var dispatchListener = event._dispatchListeners,\n dispatchInstance = event._dispatchInstances;\n if (isArrayImpl(dispatchListener)) throw Error(\"Invalid `event`.\");\n event.currentTarget = dispatchListener\n ? getNodeFromInstance(dispatchInstance)\n : null;\n dispatchListener = dispatchListener ? dispatchListener(event) : null;\n event.currentTarget = null;\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n return dispatchListener;\n}\nvar assign = Object.assign;\nfunction functionThatReturnsTrue() {\n return !0;\n}\nfunction functionThatReturnsFalse() {\n return !1;\n}\nfunction SyntheticEvent(\n dispatchConfig,\n targetInst,\n nativeEvent,\n nativeEventTarget\n) {\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n this._dispatchInstances = this._dispatchListeners = null;\n dispatchConfig = this.constructor.Interface;\n for (var propName in dispatchConfig)\n dispatchConfig.hasOwnProperty(propName) &&\n ((targetInst = dispatchConfig[propName])\n ? (this[propName] = targetInst(nativeEvent))\n : \"target\" === propName\n ? (this.target = nativeEventTarget)\n : (this[propName] = nativeEvent[propName]));\n this.isDefaultPrevented = (\n null != nativeEvent.defaultPrevented\n ? nativeEvent.defaultPrevented\n : !1 === nativeEvent.returnValue\n )\n ? functionThatReturnsTrue\n : functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n}\nassign(SyntheticEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = !0;\n var event = this.nativeEvent;\n event &&\n (event.preventDefault\n ? event.preventDefault()\n : \"unknown\" !== typeof event.returnValue && (event.returnValue = !1),\n (this.isDefaultPrevented = functionThatReturnsTrue));\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n event &&\n (event.stopPropagation\n ? event.stopPropagation()\n : \"unknown\" !== typeof event.cancelBubble && (event.cancelBubble = !0),\n (this.isPropagationStopped = functionThatReturnsTrue));\n },\n persist: function () {\n this.isPersistent = functionThatReturnsTrue;\n },\n isPersistent: functionThatReturnsFalse,\n destructor: function () {\n var Interface = this.constructor.Interface,\n propName;\n for (propName in Interface) this[propName] = null;\n this.nativeEvent = this._targetInst = this.dispatchConfig = null;\n this.isPropagationStopped = this.isDefaultPrevented =\n functionThatReturnsFalse;\n this._dispatchInstances = this._dispatchListeners = null;\n }\n});\nSyntheticEvent.Interface = {\n type: null,\n target: null,\n currentTarget: function () {\n return null;\n },\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\nSyntheticEvent.extend = function (Interface) {\n function E() {}\n function Class() {\n return Super.apply(this, arguments);\n }\n var Super = this;\n E.prototype = Super.prototype;\n var prototype = new E();\n assign(prototype, Class.prototype);\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n Class.Interface = assign({}, Super.Interface, Interface);\n Class.extend = Super.extend;\n addEventPoolingTo(Class);\n return Class;\n};\naddEventPoolingTo(SyntheticEvent);\nfunction createOrGetPooledEvent(\n dispatchConfig,\n targetInst,\n nativeEvent,\n nativeInst\n) {\n if (this.eventPool.length) {\n var instance = this.eventPool.pop();\n this.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);\n return instance;\n }\n return new this(dispatchConfig, targetInst, nativeEvent, nativeInst);\n}\nfunction releasePooledEvent(event) {\n if (!(event instanceof this))\n throw Error(\n \"Trying to release an event instance into a pool of a different type.\"\n );\n event.destructor();\n 10 > this.eventPool.length && this.eventPool.push(event);\n}\nfunction addEventPoolingTo(EventConstructor) {\n EventConstructor.getPooled = createOrGetPooledEvent;\n EventConstructor.eventPool = [];\n EventConstructor.release = releasePooledEvent;\n}\nvar ResponderSyntheticEvent = SyntheticEvent.extend({\n touchHistory: function () {\n return null;\n }\n});\nfunction isStartish(topLevelType) {\n return \"topTouchStart\" === topLevelType;\n}\nfunction isMoveish(topLevelType) {\n return \"topTouchMove\" === topLevelType;\n}\nvar startDependencies = [\"topTouchStart\"],\n moveDependencies = [\"topTouchMove\"],\n endDependencies = [\"topTouchCancel\", \"topTouchEnd\"],\n touchBank = [],\n touchHistory = {\n touchBank: touchBank,\n numberActiveTouches: 0,\n indexOfSingleActiveTouch: -1,\n mostRecentTimeStamp: 0\n };\nfunction timestampForTouch(touch) {\n return touch.timeStamp || touch.timestamp;\n}\nfunction getTouchIdentifier(_ref) {\n _ref = _ref.identifier;\n if (null == _ref) throw Error(\"Touch object is missing identifier.\");\n return _ref;\n}\nfunction recordTouchStart(touch) {\n var identifier = getTouchIdentifier(touch),\n touchRecord = touchBank[identifier];\n touchRecord\n ? ((touchRecord.touchActive = !0),\n (touchRecord.startPageX = touch.pageX),\n (touchRecord.startPageY = touch.pageY),\n (touchRecord.startTimeStamp = timestampForTouch(touch)),\n (touchRecord.currentPageX = touch.pageX),\n (touchRecord.currentPageY = touch.pageY),\n (touchRecord.currentTimeStamp = timestampForTouch(touch)),\n (touchRecord.previousPageX = touch.pageX),\n (touchRecord.previousPageY = touch.pageY),\n (touchRecord.previousTimeStamp = timestampForTouch(touch)))\n : ((touchRecord = {\n touchActive: !0,\n startPageX: touch.pageX,\n startPageY: touch.pageY,\n startTimeStamp: timestampForTouch(touch),\n currentPageX: touch.pageX,\n currentPageY: touch.pageY,\n currentTimeStamp: timestampForTouch(touch),\n previousPageX: touch.pageX,\n previousPageY: touch.pageY,\n previousTimeStamp: timestampForTouch(touch)\n }),\n (touchBank[identifier] = touchRecord));\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n}\nfunction recordTouchMove(touch) {\n var touchRecord = touchBank[getTouchIdentifier(touch)];\n touchRecord &&\n ((touchRecord.touchActive = !0),\n (touchRecord.previousPageX = touchRecord.currentPageX),\n (touchRecord.previousPageY = touchRecord.currentPageY),\n (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),\n (touchRecord.currentPageX = touch.pageX),\n (touchRecord.currentPageY = touch.pageY),\n (touchRecord.currentTimeStamp = timestampForTouch(touch)),\n (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));\n}\nfunction recordTouchEnd(touch) {\n var touchRecord = touchBank[getTouchIdentifier(touch)];\n touchRecord &&\n ((touchRecord.touchActive = !1),\n (touchRecord.previousPageX = touchRecord.currentPageX),\n (touchRecord.previousPageY = touchRecord.currentPageY),\n (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),\n (touchRecord.currentPageX = touch.pageX),\n (touchRecord.currentPageY = touch.pageY),\n (touchRecord.currentTimeStamp = timestampForTouch(touch)),\n (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));\n}\nvar instrumentationCallback,\n ResponderTouchHistoryStore = {\n instrument: function (callback) {\n instrumentationCallback = callback;\n },\n recordTouchTrack: function (topLevelType, nativeEvent) {\n null != instrumentationCallback &&\n instrumentationCallback(topLevelType, nativeEvent);\n if (isMoveish(topLevelType))\n nativeEvent.changedTouches.forEach(recordTouchMove);\n else if (isStartish(topLevelType))\n nativeEvent.changedTouches.forEach(recordTouchStart),\n (touchHistory.numberActiveTouches = nativeEvent.touches.length),\n 1 === touchHistory.numberActiveTouches &&\n (touchHistory.indexOfSingleActiveTouch =\n nativeEvent.touches[0].identifier);\n else if (\n \"topTouchEnd\" === topLevelType ||\n \"topTouchCancel\" === topLevelType\n )\n if (\n (nativeEvent.changedTouches.forEach(recordTouchEnd),\n (touchHistory.numberActiveTouches = nativeEvent.touches.length),\n 1 === touchHistory.numberActiveTouches)\n )\n for (\n topLevelType = 0;\n topLevelType < touchBank.length;\n topLevelType++\n )\n if (\n ((nativeEvent = touchBank[topLevelType]),\n null != nativeEvent && nativeEvent.touchActive)\n ) {\n touchHistory.indexOfSingleActiveTouch = topLevelType;\n break;\n }\n },\n touchHistory: touchHistory\n };\nfunction accumulate(current, next) {\n if (null == next)\n throw Error(\"Accumulated items must not be null or undefined.\");\n return null == current\n ? next\n : isArrayImpl(current)\n ? current.concat(next)\n : isArrayImpl(next)\n ? [current].concat(next)\n : [current, next];\n}\nfunction accumulateInto(current, next) {\n if (null == next)\n throw Error(\"Accumulated items must not be null or undefined.\");\n if (null == current) return next;\n if (isArrayImpl(current)) {\n if (isArrayImpl(next)) return current.push.apply(current, next), current;\n current.push(next);\n return current;\n }\n return isArrayImpl(next) ? [current].concat(next) : [current, next];\n}\nfunction forEachAccumulated(arr, cb, scope) {\n Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);\n}\nvar responderInst = null,\n trackedTouchCount = 0;\nfunction changeResponder(nextResponderInst, blockHostResponder) {\n var oldResponderInst = responderInst;\n responderInst = nextResponderInst;\n if (null !== ResponderEventPlugin.GlobalResponderHandler)\n ResponderEventPlugin.GlobalResponderHandler.onChange(\n oldResponderInst,\n nextResponderInst,\n blockHostResponder\n );\n}\nvar eventTypes = {\n startShouldSetResponder: {\n phasedRegistrationNames: {\n bubbled: \"onStartShouldSetResponder\",\n captured: \"onStartShouldSetResponderCapture\"\n },\n dependencies: startDependencies\n },\n scrollShouldSetResponder: {\n phasedRegistrationNames: {\n bubbled: \"onScrollShouldSetResponder\",\n captured: \"onScrollShouldSetResponderCapture\"\n },\n dependencies: [\"topScroll\"]\n },\n selectionChangeShouldSetResponder: {\n phasedRegistrationNames: {\n bubbled: \"onSelectionChangeShouldSetResponder\",\n captured: \"onSelectionChangeShouldSetResponderCapture\"\n },\n dependencies: [\"topSelectionChange\"]\n },\n moveShouldSetResponder: {\n phasedRegistrationNames: {\n bubbled: \"onMoveShouldSetResponder\",\n captured: \"onMoveShouldSetResponderCapture\"\n },\n dependencies: moveDependencies\n },\n responderStart: {\n registrationName: \"onResponderStart\",\n dependencies: startDependencies\n },\n responderMove: {\n registrationName: \"onResponderMove\",\n dependencies: moveDependencies\n },\n responderEnd: {\n registrationName: \"onResponderEnd\",\n dependencies: endDependencies\n },\n responderRelease: {\n registrationName: \"onResponderRelease\",\n dependencies: endDependencies\n },\n responderTerminationRequest: {\n registrationName: \"onResponderTerminationRequest\",\n dependencies: []\n },\n responderGrant: { registrationName: \"onResponderGrant\", dependencies: [] },\n responderReject: { registrationName: \"onResponderReject\", dependencies: [] },\n responderTerminate: {\n registrationName: \"onResponderTerminate\",\n dependencies: []\n }\n};\nfunction getParent$1(inst) {\n do inst = inst.return;\n while (inst && 5 !== inst.tag);\n return inst ? inst : null;\n}\nfunction traverseTwoPhase$1(inst, fn, arg) {\n for (var path = []; inst; ) path.push(inst), (inst = getParent$1(inst));\n for (inst = path.length; 0 < inst--; ) fn(path[inst], \"captured\", arg);\n for (inst = 0; inst < path.length; inst++) fn(path[inst], \"bubbled\", arg);\n}\nfunction getListener$1(inst, registrationName) {\n inst = inst.stateNode;\n if (null === inst) return null;\n inst = getFiberCurrentPropsFromNode$1(inst);\n if (null === inst) return null;\n if ((inst = inst[registrationName]) && \"function\" !== typeof inst)\n throw Error(\n \"Expected `\" +\n registrationName +\n \"` listener to be a function, instead got a value of `\" +\n typeof inst +\n \"` type.\"\n );\n return inst;\n}\nfunction accumulateDirectionalDispatches$1(inst, phase, event) {\n if (\n (phase = getListener$1(\n inst,\n event.dispatchConfig.phasedRegistrationNames[phase]\n ))\n )\n (event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n phase\n )),\n (event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst\n ));\n}\nfunction accumulateDirectDispatchesSingle$1(event) {\n if (event && event.dispatchConfig.registrationName) {\n var inst = event._targetInst;\n if (inst && event && event.dispatchConfig.registrationName) {\n var listener = getListener$1(inst, event.dispatchConfig.registrationName);\n listener &&\n ((event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n listener\n )),\n (event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst\n )));\n }\n }\n}\nfunction accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n targetInst = targetInst ? getParent$1(targetInst) : null;\n traverseTwoPhase$1(targetInst, accumulateDirectionalDispatches$1, event);\n }\n}\nfunction accumulateTwoPhaseDispatchesSingle$1(event) {\n event &&\n event.dispatchConfig.phasedRegistrationNames &&\n traverseTwoPhase$1(\n event._targetInst,\n accumulateDirectionalDispatches$1,\n event\n );\n}\nvar ResponderEventPlugin = {\n _getResponder: function () {\n return responderInst;\n },\n eventTypes: eventTypes,\n extractEvents: function (\n topLevelType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n ) {\n if (isStartish(topLevelType)) trackedTouchCount += 1;\n else if (\n \"topTouchEnd\" === topLevelType ||\n \"topTouchCancel\" === topLevelType\n )\n if (0 <= trackedTouchCount) --trackedTouchCount;\n else return null;\n ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);\n if (\n targetInst &&\n ((\"topScroll\" === topLevelType && !nativeEvent.responderIgnoreScroll) ||\n (0 < trackedTouchCount && \"topSelectionChange\" === topLevelType) ||\n isStartish(topLevelType) ||\n isMoveish(topLevelType))\n ) {\n var shouldSetEventType = isStartish(topLevelType)\n ? eventTypes.startShouldSetResponder\n : isMoveish(topLevelType)\n ? eventTypes.moveShouldSetResponder\n : \"topSelectionChange\" === topLevelType\n ? eventTypes.selectionChangeShouldSetResponder\n : eventTypes.scrollShouldSetResponder;\n if (responderInst)\n b: {\n var JSCompiler_temp = responderInst;\n for (\n var depthA = 0, tempA = JSCompiler_temp;\n tempA;\n tempA = getParent$1(tempA)\n )\n depthA++;\n tempA = 0;\n for (var tempB = targetInst; tempB; tempB = getParent$1(tempB))\n tempA++;\n for (; 0 < depthA - tempA; )\n (JSCompiler_temp = getParent$1(JSCompiler_temp)), depthA--;\n for (; 0 < tempA - depthA; )\n (targetInst = getParent$1(targetInst)), tempA--;\n for (; depthA--; ) {\n if (\n JSCompiler_temp === targetInst ||\n JSCompiler_temp === targetInst.alternate\n )\n break b;\n JSCompiler_temp = getParent$1(JSCompiler_temp);\n targetInst = getParent$1(targetInst);\n }\n JSCompiler_temp = null;\n }\n else JSCompiler_temp = targetInst;\n targetInst = JSCompiler_temp;\n JSCompiler_temp = targetInst === responderInst;\n shouldSetEventType = ResponderSyntheticEvent.getPooled(\n shouldSetEventType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n );\n shouldSetEventType.touchHistory =\n ResponderTouchHistoryStore.touchHistory;\n JSCompiler_temp\n ? forEachAccumulated(\n shouldSetEventType,\n accumulateTwoPhaseDispatchesSingleSkipTarget\n )\n : forEachAccumulated(\n shouldSetEventType,\n accumulateTwoPhaseDispatchesSingle$1\n );\n b: {\n JSCompiler_temp = shouldSetEventType._dispatchListeners;\n targetInst = shouldSetEventType._dispatchInstances;\n if (isArrayImpl(JSCompiler_temp))\n for (\n depthA = 0;\n depthA < JSCompiler_temp.length &&\n !shouldSetEventType.isPropagationStopped();\n depthA++\n ) {\n if (\n JSCompiler_temp[depthA](shouldSetEventType, targetInst[depthA])\n ) {\n JSCompiler_temp = targetInst[depthA];\n break b;\n }\n }\n else if (\n JSCompiler_temp &&\n JSCompiler_temp(shouldSetEventType, targetInst)\n ) {\n JSCompiler_temp = targetInst;\n break b;\n }\n JSCompiler_temp = null;\n }\n shouldSetEventType._dispatchInstances = null;\n shouldSetEventType._dispatchListeners = null;\n shouldSetEventType.isPersistent() ||\n shouldSetEventType.constructor.release(shouldSetEventType);\n if (JSCompiler_temp && JSCompiler_temp !== responderInst)\n if (\n ((shouldSetEventType = ResponderSyntheticEvent.getPooled(\n eventTypes.responderGrant,\n JSCompiler_temp,\n nativeEvent,\n nativeEventTarget\n )),\n (shouldSetEventType.touchHistory =\n ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(\n shouldSetEventType,\n accumulateDirectDispatchesSingle$1\n ),\n (targetInst = !0 === executeDirectDispatch(shouldSetEventType)),\n responderInst)\n )\n if (\n ((depthA = ResponderSyntheticEvent.getPooled(\n eventTypes.responderTerminationRequest,\n responderInst,\n nativeEvent,\n nativeEventTarget\n )),\n (depthA.touchHistory = ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1),\n (tempA =\n !depthA._dispatchListeners || executeDirectDispatch(depthA)),\n depthA.isPersistent() || depthA.constructor.release(depthA),\n tempA)\n ) {\n depthA = ResponderSyntheticEvent.getPooled(\n eventTypes.responderTerminate,\n responderInst,\n nativeEvent,\n nativeEventTarget\n );\n depthA.touchHistory = ResponderTouchHistoryStore.touchHistory;\n forEachAccumulated(depthA, accumulateDirectDispatchesSingle$1);\n var JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n [shouldSetEventType, depthA]\n );\n changeResponder(JSCompiler_temp, targetInst);\n } else\n (shouldSetEventType = ResponderSyntheticEvent.getPooled(\n eventTypes.responderReject,\n JSCompiler_temp,\n nativeEvent,\n nativeEventTarget\n )),\n (shouldSetEventType.touchHistory =\n ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(\n shouldSetEventType,\n accumulateDirectDispatchesSingle$1\n ),\n (JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n shouldSetEventType\n ));\n else\n (JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n shouldSetEventType\n )),\n changeResponder(JSCompiler_temp, targetInst);\n else JSCompiler_temp$jscomp$0 = null;\n } else JSCompiler_temp$jscomp$0 = null;\n shouldSetEventType = responderInst && isStartish(topLevelType);\n JSCompiler_temp = responderInst && isMoveish(topLevelType);\n targetInst =\n responderInst &&\n (\"topTouchEnd\" === topLevelType || \"topTouchCancel\" === topLevelType);\n if (\n (shouldSetEventType = shouldSetEventType\n ? eventTypes.responderStart\n : JSCompiler_temp\n ? eventTypes.responderMove\n : targetInst\n ? eventTypes.responderEnd\n : null)\n )\n (shouldSetEventType = ResponderSyntheticEvent.getPooled(\n shouldSetEventType,\n responderInst,\n nativeEvent,\n nativeEventTarget\n )),\n (shouldSetEventType.touchHistory =\n ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(\n shouldSetEventType,\n accumulateDirectDispatchesSingle$1\n ),\n (JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n shouldSetEventType\n ));\n shouldSetEventType = responderInst && \"topTouchCancel\" === topLevelType;\n if (\n (topLevelType =\n responderInst &&\n !shouldSetEventType &&\n (\"topTouchEnd\" === topLevelType || \"topTouchCancel\" === topLevelType))\n )\n a: {\n if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length)\n for (\n JSCompiler_temp = 0;\n JSCompiler_temp < topLevelType.length;\n JSCompiler_temp++\n )\n if (\n ((targetInst = topLevelType[JSCompiler_temp].target),\n null !== targetInst &&\n void 0 !== targetInst &&\n 0 !== targetInst)\n ) {\n depthA = getInstanceFromNode(targetInst);\n b: {\n for (targetInst = responderInst; depthA; ) {\n if (\n targetInst === depthA ||\n targetInst === depthA.alternate\n ) {\n targetInst = !0;\n break b;\n }\n depthA = getParent$1(depthA);\n }\n targetInst = !1;\n }\n if (targetInst) {\n topLevelType = !1;\n break a;\n }\n }\n topLevelType = !0;\n }\n if (\n (topLevelType = shouldSetEventType\n ? eventTypes.responderTerminate\n : topLevelType\n ? eventTypes.responderRelease\n : null)\n )\n (nativeEvent = ResponderSyntheticEvent.getPooled(\n topLevelType,\n responderInst,\n nativeEvent,\n nativeEventTarget\n )),\n (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory),\n forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle$1),\n (JSCompiler_temp$jscomp$0 = accumulate(\n JSCompiler_temp$jscomp$0,\n nativeEvent\n )),\n changeResponder(null);\n return JSCompiler_temp$jscomp$0;\n },\n GlobalResponderHandler: null,\n injection: {\n injectGlobalResponderHandler: function (GlobalResponderHandler) {\n ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;\n }\n }\n },\n eventPluginOrder = null,\n namesToPlugins = {};\nfunction recomputePluginOrdering() {\n if (eventPluginOrder)\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName],\n pluginIndex = eventPluginOrder.indexOf(pluginName);\n if (-1 >= pluginIndex)\n throw Error(\n \"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" +\n (pluginName + \"`.\")\n );\n if (!plugins[pluginIndex]) {\n if (!pluginModule.extractEvents)\n throw Error(\n \"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" +\n (pluginName + \"` does not.\")\n );\n plugins[pluginIndex] = pluginModule;\n pluginIndex = pluginModule.eventTypes;\n for (var eventName in pluginIndex) {\n var JSCompiler_inline_result = void 0;\n var dispatchConfig = pluginIndex[eventName];\n if (eventNameDispatchConfigs.hasOwnProperty(eventName))\n throw Error(\n \"EventPluginRegistry: More than one plugin attempted to publish the same event name, `\" +\n (eventName + \"`.\")\n );\n eventNameDispatchConfigs[eventName] = dispatchConfig;\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n if (phasedRegistrationNames) {\n for (JSCompiler_inline_result in phasedRegistrationNames)\n phasedRegistrationNames.hasOwnProperty(\n JSCompiler_inline_result\n ) &&\n publishRegistrationName(\n phasedRegistrationNames[JSCompiler_inline_result],\n pluginModule\n );\n JSCompiler_inline_result = !0;\n } else\n dispatchConfig.registrationName\n ? (publishRegistrationName(\n dispatchConfig.registrationName,\n pluginModule\n ),\n (JSCompiler_inline_result = !0))\n : (JSCompiler_inline_result = !1);\n if (!JSCompiler_inline_result)\n throw Error(\n \"EventPluginRegistry: Failed to publish event `\" +\n eventName +\n \"` for plugin `\" +\n pluginName +\n \"`.\"\n );\n }\n }\n }\n}\nfunction publishRegistrationName(registrationName, pluginModule) {\n if (registrationNameModules[registrationName])\n throw Error(\n \"EventPluginRegistry: More than one plugin attempted to publish the same registration name, `\" +\n (registrationName + \"`.\")\n );\n registrationNameModules[registrationName] = pluginModule;\n}\nvar plugins = [],\n eventNameDispatchConfigs = {},\n registrationNameModules = {};\nfunction getListener(inst, registrationName) {\n inst = inst.stateNode;\n if (null === inst) return null;\n inst = getFiberCurrentPropsFromNode$1(inst);\n if (null === inst) return null;\n if ((inst = inst[registrationName]) && \"function\" !== typeof inst)\n throw Error(\n \"Expected `\" +\n registrationName +\n \"` listener to be a function, instead got a value of `\" +\n typeof inst +\n \"` type.\"\n );\n return inst;\n}\nvar customBubblingEventTypes =\n ReactNativePrivateInterface.ReactNativeViewConfigRegistry\n .customBubblingEventTypes,\n customDirectEventTypes =\n ReactNativePrivateInterface.ReactNativeViewConfigRegistry\n .customDirectEventTypes;\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n if (\n (phase = getListener(\n inst,\n event.dispatchConfig.phasedRegistrationNames[phase]\n ))\n )\n (event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n phase\n )),\n (event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst\n ));\n}\nfunction traverseTwoPhase(inst, fn, arg, skipBubbling) {\n for (var path = []; inst; ) {\n path.push(inst);\n do inst = inst.return;\n while (inst && 5 !== inst.tag);\n inst = inst ? inst : null;\n }\n for (inst = path.length; 0 < inst--; ) fn(path[inst], \"captured\", arg);\n if (skipBubbling) fn(path[0], \"bubbled\", arg);\n else\n for (inst = 0; inst < path.length; inst++) fn(path[inst], \"bubbled\", arg);\n}\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n event &&\n event.dispatchConfig.phasedRegistrationNames &&\n traverseTwoPhase(\n event._targetInst,\n accumulateDirectionalDispatches,\n event,\n !1\n );\n}\nfunction accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n var inst = event._targetInst;\n if (inst && event && event.dispatchConfig.registrationName) {\n var listener = getListener(inst, event.dispatchConfig.registrationName);\n listener &&\n ((event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n listener\n )),\n (event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst\n )));\n }\n }\n}\nif (eventPluginOrder)\n throw Error(\n \"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.\"\n );\neventPluginOrder = Array.prototype.slice.call([\n \"ResponderEventPlugin\",\n \"ReactNativeBridgeEventPlugin\"\n]);\nrecomputePluginOrdering();\nvar injectedNamesToPlugins$jscomp$inline_234 = {\n ResponderEventPlugin: ResponderEventPlugin,\n ReactNativeBridgeEventPlugin: {\n eventTypes: {},\n extractEvents: function (\n topLevelType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n ) {\n if (null == targetInst) return null;\n var bubbleDispatchConfig = customBubblingEventTypes[topLevelType],\n directDispatchConfig = customDirectEventTypes[topLevelType];\n if (!bubbleDispatchConfig && !directDispatchConfig)\n throw Error(\n 'Unsupported top level event type \"' + topLevelType + '\" dispatched'\n );\n topLevelType = SyntheticEvent.getPooled(\n bubbleDispatchConfig || directDispatchConfig,\n targetInst,\n nativeEvent,\n nativeEventTarget\n );\n if (bubbleDispatchConfig)\n null != topLevelType &&\n null != topLevelType.dispatchConfig.phasedRegistrationNames &&\n topLevelType.dispatchConfig.phasedRegistrationNames.skipBubbling\n ? topLevelType &&\n topLevelType.dispatchConfig.phasedRegistrationNames &&\n traverseTwoPhase(\n topLevelType._targetInst,\n accumulateDirectionalDispatches,\n topLevelType,\n !0\n )\n : forEachAccumulated(\n topLevelType,\n accumulateTwoPhaseDispatchesSingle\n );\n else if (directDispatchConfig)\n forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle);\n else return null;\n return topLevelType;\n }\n }\n },\n isOrderingDirty$jscomp$inline_235 = !1,\n pluginName$jscomp$inline_236;\nfor (pluginName$jscomp$inline_236 in injectedNamesToPlugins$jscomp$inline_234)\n if (\n injectedNamesToPlugins$jscomp$inline_234.hasOwnProperty(\n pluginName$jscomp$inline_236\n )\n ) {\n var pluginModule$jscomp$inline_237 =\n injectedNamesToPlugins$jscomp$inline_234[pluginName$jscomp$inline_236];\n if (\n !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_236) ||\n namesToPlugins[pluginName$jscomp$inline_236] !==\n pluginModule$jscomp$inline_237\n ) {\n if (namesToPlugins[pluginName$jscomp$inline_236])\n throw Error(\n \"EventPluginRegistry: Cannot inject two different event plugins using the same name, `\" +\n (pluginName$jscomp$inline_236 + \"`.\")\n );\n namesToPlugins[pluginName$jscomp$inline_236] =\n pluginModule$jscomp$inline_237;\n isOrderingDirty$jscomp$inline_235 = !0;\n }\n }\nisOrderingDirty$jscomp$inline_235 && recomputePluginOrdering();\nvar instanceCache = new Map(),\n instanceProps = new Map();\nfunction getInstanceFromTag(tag) {\n return instanceCache.get(tag) || null;\n}\nfunction batchedUpdatesImpl(fn, bookkeeping) {\n return fn(bookkeeping);\n}\nvar isInsideEventHandler = !1;\nfunction batchedUpdates$1(fn, bookkeeping) {\n if (isInsideEventHandler) return fn(bookkeeping);\n isInsideEventHandler = !0;\n try {\n return batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n isInsideEventHandler = !1;\n }\n}\nvar eventQueue = null;\nfunction executeDispatchesAndReleaseTopLevel(e) {\n if (e) {\n var dispatchListeners = e._dispatchListeners,\n dispatchInstances = e._dispatchInstances;\n if (isArrayImpl(dispatchListeners))\n for (\n var i = 0;\n i < dispatchListeners.length && !e.isPropagationStopped();\n i++\n )\n executeDispatch(e, dispatchListeners[i], dispatchInstances[i]);\n else\n dispatchListeners &&\n executeDispatch(e, dispatchListeners, dispatchInstances);\n e._dispatchListeners = null;\n e._dispatchInstances = null;\n e.isPersistent() || e.constructor.release(e);\n }\n}\nvar EMPTY_NATIVE_EVENT = {};\nfunction _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam) {\n var nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT,\n inst = getInstanceFromTag(rootNodeID),\n target = null;\n null != inst && (target = inst.stateNode);\n batchedUpdates$1(function () {\n var JSCompiler_inline_result = target;\n for (\n var events = null, legacyPlugins = plugins, i = 0;\n i < legacyPlugins.length;\n i++\n ) {\n var possiblePlugin = legacyPlugins[i];\n possiblePlugin &&\n (possiblePlugin = possiblePlugin.extractEvents(\n topLevelType,\n inst,\n nativeEvent,\n JSCompiler_inline_result\n )) &&\n (events = accumulateInto(events, possiblePlugin));\n }\n JSCompiler_inline_result = events;\n null !== JSCompiler_inline_result &&\n (eventQueue = accumulateInto(eventQueue, JSCompiler_inline_result));\n JSCompiler_inline_result = eventQueue;\n eventQueue = null;\n if (JSCompiler_inline_result) {\n forEachAccumulated(\n JSCompiler_inline_result,\n executeDispatchesAndReleaseTopLevel\n );\n if (eventQueue)\n throw Error(\n \"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.\"\n );\n if (hasError)\n throw (\n ((JSCompiler_inline_result = caughtError),\n (hasError = !1),\n (caughtError = null),\n JSCompiler_inline_result)\n );\n }\n });\n}\nReactNativePrivateInterface.RCTEventEmitter.register({\n receiveEvent: function (rootNodeID, topLevelType, nativeEventParam) {\n _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam);\n },\n receiveTouches: function (eventTopLevelType, touches, changedIndices) {\n if (\n \"topTouchEnd\" === eventTopLevelType ||\n \"topTouchCancel\" === eventTopLevelType\n ) {\n var JSCompiler_temp = [];\n for (var i = 0; i < changedIndices.length; i++) {\n var index$0 = changedIndices[i];\n JSCompiler_temp.push(touches[index$0]);\n touches[index$0] = null;\n }\n for (i = changedIndices = 0; i < touches.length; i++)\n (index$0 = touches[i]),\n null !== index$0 && (touches[changedIndices++] = index$0);\n touches.length = changedIndices;\n } else\n for (JSCompiler_temp = [], i = 0; i < changedIndices.length; i++)\n JSCompiler_temp.push(touches[changedIndices[i]]);\n for (\n changedIndices = 0;\n changedIndices < JSCompiler_temp.length;\n changedIndices++\n ) {\n i = JSCompiler_temp[changedIndices];\n i.changedTouches = JSCompiler_temp;\n i.touches = touches;\n index$0 = null;\n var target = i.target;\n null === target || void 0 === target || 1 > target || (index$0 = target);\n _receiveRootNodeIDEvent(index$0, eventTopLevelType, i);\n }\n }\n});\ngetFiberCurrentPropsFromNode$1 = function (stateNode) {\n return instanceProps.get(stateNode._nativeTag) || null;\n};\ngetInstanceFromNode = getInstanceFromTag;\ngetNodeFromInstance = function (inst) {\n inst = inst.stateNode;\n var tag = inst._nativeTag;\n void 0 === tag &&\n null != inst.canonical &&\n ((tag = inst.canonical.nativeTag), (inst = inst.canonical.publicInstance));\n if (!tag) throw Error(\"All native instances should have a tag.\");\n return inst;\n};\nResponderEventPlugin.injection.injectGlobalResponderHandler({\n onChange: function (from, to, blockNativeResponder) {\n null !== to\n ? ReactNativePrivateInterface.UIManager.setJSResponder(\n to.stateNode._nativeTag,\n blockNativeResponder\n )\n : ReactNativePrivateInterface.UIManager.clearJSResponder();\n }\n});\nvar ReactSharedInternals =\n React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,\n REACT_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_PROVIDER_TYPE = Symbol.for(\"react.provider\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nSymbol.for(\"react.scope\");\nSymbol.for(\"react.debug_trace_mode\");\nvar REACT_OFFSCREEN_TYPE = Symbol.for(\"react.offscreen\");\nSymbol.for(\"react.legacy_hidden\");\nSymbol.for(\"react.cache\");\nSymbol.for(\"react.tracing_marker\");\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nSymbol.for(\"react.client.reference\");\nfunction getNearestMountedFiber(fiber) {\n var node = fiber,\n nearestMounted = fiber;\n if (fiber.alternate) for (; node.return; ) node = node.return;\n else {\n fiber = node;\n do\n (node = fiber),\n 0 !== (node.flags & 4098) && (nearestMounted = node.return),\n (fiber = node.return);\n while (fiber);\n }\n return 3 === node.tag ? nearestMounted : null;\n}\nfunction assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber)\n throw Error(\"Unable to find node on an unmounted component.\");\n}\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n if (!alternate) {\n alternate = getNearestMountedFiber(fiber);\n if (null === alternate)\n throw Error(\"Unable to find node on an unmounted component.\");\n return alternate !== fiber ? null : fiber;\n }\n for (var a = fiber, b = alternate; ; ) {\n var parentA = a.return;\n if (null === parentA) break;\n var parentB = parentA.alternate;\n if (null === parentB) {\n b = parentA.return;\n if (null !== b) {\n a = b;\n continue;\n }\n break;\n }\n if (parentA.child === parentB.child) {\n for (parentB = parentA.child; parentB; ) {\n if (parentB === a) return assertIsMounted(parentA), fiber;\n if (parentB === b) return assertIsMounted(parentA), alternate;\n parentB = parentB.sibling;\n }\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n if (a.return !== b.return) (a = parentA), (b = parentB);\n else {\n for (var didFindChild = !1, child$1 = parentA.child; child$1; ) {\n if (child$1 === a) {\n didFindChild = !0;\n a = parentA;\n b = parentB;\n break;\n }\n if (child$1 === b) {\n didFindChild = !0;\n b = parentA;\n a = parentB;\n break;\n }\n child$1 = child$1.sibling;\n }\n if (!didFindChild) {\n for (child$1 = parentB.child; child$1; ) {\n if (child$1 === a) {\n didFindChild = !0;\n a = parentB;\n b = parentA;\n break;\n }\n if (child$1 === b) {\n didFindChild = !0;\n b = parentB;\n a = parentA;\n break;\n }\n child$1 = child$1.sibling;\n }\n if (!didFindChild)\n throw Error(\n \"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\"\n );\n }\n }\n if (a.alternate !== b)\n throw Error(\n \"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\"\n );\n }\n if (3 !== a.tag)\n throw Error(\"Unable to find node on an unmounted component.\");\n return a.stateNode.current === a ? fiber : alternate;\n}\nfunction findCurrentHostFiber(parent) {\n parent = findCurrentFiberUsingSlowPath(parent);\n return null !== parent ? findCurrentHostFiberImpl(parent) : null;\n}\nfunction findCurrentHostFiberImpl(node) {\n var tag = node.tag;\n if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;\n for (node = node.child; null !== node; ) {\n tag = findCurrentHostFiberImpl(node);\n if (null !== tag) return tag;\n node = node.sibling;\n }\n return null;\n}\nvar emptyObject = {},\n removedKeys = null,\n removedKeyCount = 0,\n deepDifferOptions = { unsafelyIgnoreFunctions: !0 };\nfunction defaultDiffer(prevProp, nextProp) {\n return \"object\" !== typeof nextProp || null === nextProp\n ? !0\n : ReactNativePrivateInterface.deepDiffer(\n prevProp,\n nextProp,\n deepDifferOptions\n );\n}\nfunction restoreDeletedValuesInNestedArray(\n updatePayload,\n node,\n validAttributes\n) {\n if (isArrayImpl(node))\n for (var i = node.length; i-- && 0 < removedKeyCount; )\n restoreDeletedValuesInNestedArray(\n updatePayload,\n node[i],\n validAttributes\n );\n else if (node && 0 < removedKeyCount)\n for (i in removedKeys)\n if (removedKeys[i]) {\n var nextProp = node[i];\n if (void 0 !== nextProp) {\n var attributeConfig = validAttributes[i];\n if (attributeConfig) {\n \"function\" === typeof nextProp && (nextProp = !0);\n \"undefined\" === typeof nextProp && (nextProp = null);\n if (\"object\" !== typeof attributeConfig)\n updatePayload[i] = nextProp;\n else if (\n \"function\" === typeof attributeConfig.diff ||\n \"function\" === typeof attributeConfig.process\n )\n (nextProp =\n \"function\" === typeof attributeConfig.process\n ? attributeConfig.process(nextProp)\n : nextProp),\n (updatePayload[i] = nextProp);\n removedKeys[i] = !1;\n removedKeyCount--;\n }\n }\n }\n}\nfunction diffNestedProperty(\n updatePayload,\n prevProp,\n nextProp,\n validAttributes\n) {\n if (!updatePayload && prevProp === nextProp) return updatePayload;\n if (!prevProp || !nextProp)\n return nextProp\n ? addNestedProperty(updatePayload, nextProp, validAttributes)\n : prevProp\n ? clearNestedProperty(updatePayload, prevProp, validAttributes)\n : updatePayload;\n if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp))\n return diffProperties(updatePayload, prevProp, nextProp, validAttributes);\n if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) {\n var minLength =\n prevProp.length < nextProp.length ? prevProp.length : nextProp.length,\n i;\n for (i = 0; i < minLength; i++)\n updatePayload = diffNestedProperty(\n updatePayload,\n prevProp[i],\n nextProp[i],\n validAttributes\n );\n for (; i < prevProp.length; i++)\n updatePayload = clearNestedProperty(\n updatePayload,\n prevProp[i],\n validAttributes\n );\n for (; i < nextProp.length; i++)\n updatePayload = addNestedProperty(\n updatePayload,\n nextProp[i],\n validAttributes\n );\n return updatePayload;\n }\n return isArrayImpl(prevProp)\n ? diffProperties(\n updatePayload,\n ReactNativePrivateInterface.flattenStyle(prevProp),\n nextProp,\n validAttributes\n )\n : diffProperties(\n updatePayload,\n prevProp,\n ReactNativePrivateInterface.flattenStyle(nextProp),\n validAttributes\n );\n}\nfunction addNestedProperty(updatePayload, nextProp, validAttributes) {\n if (!nextProp) return updatePayload;\n if (!isArrayImpl(nextProp))\n return diffProperties(\n updatePayload,\n emptyObject,\n nextProp,\n validAttributes\n );\n for (var i = 0; i < nextProp.length; i++)\n updatePayload = addNestedProperty(\n updatePayload,\n nextProp[i],\n validAttributes\n );\n return updatePayload;\n}\nfunction clearNestedProperty(updatePayload, prevProp, validAttributes) {\n if (!prevProp) return updatePayload;\n if (!isArrayImpl(prevProp))\n return diffProperties(\n updatePayload,\n prevProp,\n emptyObject,\n validAttributes\n );\n for (var i = 0; i < prevProp.length; i++)\n updatePayload = clearNestedProperty(\n updatePayload,\n prevProp[i],\n validAttributes\n );\n return updatePayload;\n}\nfunction diffProperties(updatePayload, prevProps, nextProps, validAttributes) {\n var attributeConfig, propKey;\n for (propKey in nextProps)\n if ((attributeConfig = validAttributes[propKey])) {\n var prevProp = prevProps[propKey];\n var nextProp = nextProps[propKey];\n \"function\" === typeof nextProp &&\n ((nextProp = !0), \"function\" === typeof prevProp && (prevProp = !0));\n \"undefined\" === typeof nextProp &&\n ((nextProp = null),\n \"undefined\" === typeof prevProp && (prevProp = null));\n removedKeys && (removedKeys[propKey] = !1);\n if (updatePayload && void 0 !== updatePayload[propKey])\n if (\"object\" !== typeof attributeConfig)\n updatePayload[propKey] = nextProp;\n else {\n if (\n \"function\" === typeof attributeConfig.diff ||\n \"function\" === typeof attributeConfig.process\n )\n (attributeConfig =\n \"function\" === typeof attributeConfig.process\n ? attributeConfig.process(nextProp)\n : nextProp),\n (updatePayload[propKey] = attributeConfig);\n }\n else if (prevProp !== nextProp)\n if (\"object\" !== typeof attributeConfig)\n defaultDiffer(prevProp, nextProp) &&\n ((updatePayload || (updatePayload = {}))[propKey] = nextProp);\n else if (\n \"function\" === typeof attributeConfig.diff ||\n \"function\" === typeof attributeConfig.process\n ) {\n if (\n void 0 === prevProp ||\n (\"function\" === typeof attributeConfig.diff\n ? attributeConfig.diff(prevProp, nextProp)\n : defaultDiffer(prevProp, nextProp))\n )\n (attributeConfig =\n \"function\" === typeof attributeConfig.process\n ? attributeConfig.process(nextProp)\n : nextProp),\n ((updatePayload || (updatePayload = {}))[propKey] =\n attributeConfig);\n } else\n (removedKeys = null),\n (removedKeyCount = 0),\n (updatePayload = diffNestedProperty(\n updatePayload,\n prevProp,\n nextProp,\n attributeConfig\n )),\n 0 < removedKeyCount &&\n updatePayload &&\n (restoreDeletedValuesInNestedArray(\n updatePayload,\n nextProp,\n attributeConfig\n ),\n (removedKeys = null));\n }\n for (var propKey$3 in prevProps)\n void 0 === nextProps[propKey$3] &&\n (!(attributeConfig = validAttributes[propKey$3]) ||\n (updatePayload && void 0 !== updatePayload[propKey$3]) ||\n ((prevProp = prevProps[propKey$3]),\n void 0 !== prevProp &&\n (\"object\" !== typeof attributeConfig ||\n \"function\" === typeof attributeConfig.diff ||\n \"function\" === typeof attributeConfig.process\n ? (((updatePayload || (updatePayload = {}))[propKey$3] = null),\n removedKeys || (removedKeys = {}),\n removedKeys[propKey$3] ||\n ((removedKeys[propKey$3] = !0), removedKeyCount++))\n : (updatePayload = clearNestedProperty(\n updatePayload,\n prevProp,\n attributeConfig\n )))));\n return updatePayload;\n}\nfunction mountSafeCallback_NOT_REALLY_SAFE(context, callback) {\n return function () {\n if (\n callback &&\n (\"boolean\" !== typeof context.__isMounted || context.__isMounted)\n )\n return callback.apply(context, arguments);\n };\n}\nvar ReactNativeFiberHostComponent = (function () {\n function ReactNativeFiberHostComponent(tag, viewConfig) {\n this.viewConfig = this._internalFiberInstanceHandleDEV = void 0;\n this._nativeTag = tag;\n this._children = [];\n this.viewConfig = viewConfig;\n }\n var _proto = ReactNativeFiberHostComponent.prototype;\n _proto.blur = function () {\n ReactNativePrivateInterface.TextInputState.blurTextInput(this);\n };\n _proto.focus = function () {\n ReactNativePrivateInterface.TextInputState.focusTextInput(this);\n };\n _proto.measure = function (callback) {\n ReactNativePrivateInterface.UIManager.measure(\n this._nativeTag,\n mountSafeCallback_NOT_REALLY_SAFE(this, callback)\n );\n };\n _proto.measureInWindow = function (callback) {\n ReactNativePrivateInterface.UIManager.measureInWindow(\n this._nativeTag,\n mountSafeCallback_NOT_REALLY_SAFE(this, callback)\n );\n };\n _proto.measureLayout = function (relativeToNativeNode, onSuccess, onFail) {\n if (\"number\" === typeof relativeToNativeNode)\n var relativeNode = relativeToNativeNode;\n else\n relativeToNativeNode._nativeTag &&\n (relativeNode = relativeToNativeNode._nativeTag);\n null != relativeNode &&\n ReactNativePrivateInterface.UIManager.measureLayout(\n this._nativeTag,\n relativeNode,\n mountSafeCallback_NOT_REALLY_SAFE(this, onFail),\n mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)\n );\n };\n _proto.setNativeProps = function (nativeProps) {\n nativeProps = diffProperties(\n null,\n emptyObject,\n nativeProps,\n this.viewConfig.validAttributes\n );\n null != nativeProps &&\n ReactNativePrivateInterface.UIManager.updateView(\n this._nativeTag,\n this.viewConfig.uiViewClassName,\n nativeProps\n );\n };\n return ReactNativeFiberHostComponent;\n })(),\n scheduleCallback$2 = Scheduler.unstable_scheduleCallback,\n cancelCallback$1 = Scheduler.unstable_cancelCallback,\n shouldYield = Scheduler.unstable_shouldYield,\n requestPaint = Scheduler.unstable_requestPaint,\n now = Scheduler.unstable_now,\n ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n NormalPriority = Scheduler.unstable_NormalPriority,\n IdlePriority = Scheduler.unstable_IdlePriority,\n rendererID = null,\n injectedHook = null;\nfunction onCommitRoot(root) {\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberRoot)\n try {\n injectedHook.onCommitFiberRoot(\n rendererID,\n root,\n void 0,\n 128 === (root.current.flags & 128)\n );\n } catch (err) {}\n}\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n log = Math.log,\n LN2 = Math.LN2;\nfunction clz32Fallback(x) {\n x >>>= 0;\n return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n}\nvar nextTransitionLane = 128,\n nextRetryLane = 4194304;\nfunction getHighestPriorityLanes(lanes) {\n var pendingSyncLanes = lanes & 42;\n if (0 !== pendingSyncLanes) return pendingSyncLanes;\n switch (lanes & -lanes) {\n case 1:\n return 1;\n case 2:\n return 2;\n case 4:\n return 4;\n case 8:\n return 8;\n case 16:\n return 16;\n case 32:\n return 32;\n case 64:\n return 64;\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return lanes & 4194176;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return lanes & 62914560;\n case 67108864:\n return 67108864;\n case 134217728:\n return 134217728;\n case 268435456:\n return 268435456;\n case 536870912:\n return 536870912;\n case 1073741824:\n return 0;\n default:\n return lanes;\n }\n}\nfunction getNextLanes(root, wipLanes) {\n var pendingLanes = root.pendingLanes;\n if (0 === pendingLanes) return 0;\n var nextLanes = 0,\n suspendedLanes = root.suspendedLanes;\n root = root.pingedLanes;\n var nonIdlePendingLanes = pendingLanes & 134217727;\n 0 !== nonIdlePendingLanes\n ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),\n 0 !== pendingLanes\n ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n : ((root &= nonIdlePendingLanes),\n 0 !== root && (nextLanes = getHighestPriorityLanes(root))))\n : ((pendingLanes &= ~suspendedLanes),\n 0 !== pendingLanes\n ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n : 0 !== root && (nextLanes = getHighestPriorityLanes(root)));\n return 0 === nextLanes\n ? 0\n : 0 !== wipLanes &&\n wipLanes !== nextLanes &&\n 0 === (wipLanes & suspendedLanes) &&\n ((suspendedLanes = nextLanes & -nextLanes),\n (root = wipLanes & -wipLanes),\n suspendedLanes >= root ||\n (32 === suspendedLanes && 0 !== (root & 4194176)))\n ? wipLanes\n : nextLanes;\n}\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case 1:\n case 2:\n case 4:\n case 8:\n return currentTime + 250;\n case 16:\n case 32:\n case 64:\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return currentTime + 5e3;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return -1;\n case 67108864:\n case 134217728:\n case 268435456:\n case 536870912:\n case 1073741824:\n return -1;\n default:\n return -1;\n }\n}\nfunction getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) {\n if (root.errorRecoveryDisabledLanes & originallyAttemptedLanes) return 0;\n root = root.pendingLanes & -536870913;\n return 0 !== root ? root : root & 536870912 ? 536870912 : 0;\n}\nfunction claimNextTransitionLane() {\n var lane = nextTransitionLane;\n nextTransitionLane <<= 1;\n 0 === (nextTransitionLane & 4194176) && (nextTransitionLane = 128);\n return lane;\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);\n return lane;\n}\nfunction createLaneMap(initial) {\n for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);\n return laneMap;\n}\nfunction markRootUpdated$1(root, updateLane) {\n root.pendingLanes |= updateLane;\n 268435456 !== updateLane &&\n ((root.suspendedLanes = 0), (root.pingedLanes = 0));\n}\nfunction markRootFinished(root, remainingLanes, spawnedLane) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes;\n root.suspendedLanes = 0;\n root.pingedLanes = 0;\n root.expiredLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n root.errorRecoveryDisabledLanes &= remainingLanes;\n root.shellSuspendCounter = 0;\n remainingLanes = root.entanglements;\n for (\n var expirationTimes = root.expirationTimes,\n hiddenUpdates = root.hiddenUpdates;\n 0 < noLongerPendingLanes;\n\n ) {\n var index$7 = 31 - clz32(noLongerPendingLanes),\n lane = 1 << index$7;\n remainingLanes[index$7] = 0;\n expirationTimes[index$7] = -1;\n var hiddenUpdatesForLane = hiddenUpdates[index$7];\n if (null !== hiddenUpdatesForLane)\n for (\n hiddenUpdates[index$7] = null, index$7 = 0;\n index$7 < hiddenUpdatesForLane.length;\n index$7++\n ) {\n var update = hiddenUpdatesForLane[index$7];\n null !== update && (update.lane &= -536870913);\n }\n noLongerPendingLanes &= ~lane;\n }\n 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);\n}\nfunction markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {\n root.pendingLanes |= spawnedLane;\n root.suspendedLanes &= ~spawnedLane;\n var spawnedLaneIndex = 31 - clz32(spawnedLane);\n root.entangledLanes |= spawnedLane;\n root.entanglements[spawnedLaneIndex] =\n root.entanglements[spawnedLaneIndex] |\n 1073741824 |\n (entangledLanes & 4194218);\n}\nfunction markRootEntangled(root, entangledLanes) {\n var rootEntangledLanes = (root.entangledLanes |= entangledLanes);\n for (root = root.entanglements; rootEntangledLanes; ) {\n var index$8 = 31 - clz32(rootEntangledLanes),\n lane = 1 << index$8;\n (lane & entangledLanes) | (root[index$8] & entangledLanes) &&\n (root[index$8] |= entangledLanes);\n rootEntangledLanes &= ~lane;\n }\n}\nvar currentUpdatePriority = 0;\nfunction lanesToEventPriority(lanes) {\n lanes &= -lanes;\n return 2 < lanes\n ? 8 < lanes\n ? 0 !== (lanes & 134217727)\n ? 32\n : 268435456\n : 8\n : 2;\n}\nfunction shim$1() {\n throw Error(\n \"The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.\"\n );\n}\nvar getViewConfigForType =\n ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,\n nextReactTag = 3;\nfunction allocateTag() {\n var tag = nextReactTag;\n 1 === tag % 10 && (tag += 2);\n nextReactTag = tag + 2;\n return tag;\n}\nfunction recursivelyUncacheFiberNode(node) {\n if (\"number\" === typeof node)\n instanceCache.delete(node), instanceProps.delete(node);\n else {\n var tag = node._nativeTag;\n instanceCache.delete(tag);\n instanceProps.delete(tag);\n node._children.forEach(recursivelyUncacheFiberNode);\n }\n}\nfunction finalizeInitialChildren(parentInstance) {\n if (0 === parentInstance._children.length) return !1;\n var nativeTags = parentInstance._children.map(function (child) {\n return \"number\" === typeof child ? child : child._nativeTag;\n });\n ReactNativePrivateInterface.UIManager.setChildren(\n parentInstance._nativeTag,\n nativeTags\n );\n return !1;\n}\nfunction getPublicInstance(instance) {\n return null != instance.canonical && null != instance.canonical.publicInstance\n ? instance.canonical.publicInstance\n : instance;\n}\nvar scheduleTimeout = setTimeout,\n cancelTimeout = clearTimeout,\n valueStack = [],\n index = -1;\nfunction createCursor(defaultValue) {\n return { current: defaultValue };\n}\nfunction pop(cursor) {\n 0 > index ||\n ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);\n}\nfunction push(cursor, value) {\n index++;\n valueStack[index] = cursor.current;\n cursor.current = value;\n}\nvar emptyContextObject = {};\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n contextStackCursor = createCursor(null),\n contextFiberStackCursor = createCursor(null),\n rootInstanceStackCursor = createCursor(null);\nfunction pushHostContainer(fiber, nextRootInstance) {\n push(rootInstanceStackCursor, nextRootInstance);\n push(contextFiberStackCursor, fiber);\n push(contextStackCursor, null);\n pop(contextStackCursor);\n push(contextStackCursor, { isInAParentText: !1 });\n}\nfunction popHostContainer() {\n pop(contextStackCursor);\n pop(contextFiberStackCursor);\n pop(rootInstanceStackCursor);\n}\nfunction pushHostContext(fiber) {\n var context = contextStackCursor.current;\n var JSCompiler_inline_result = fiber.type;\n JSCompiler_inline_result =\n \"AndroidTextInput\" === JSCompiler_inline_result ||\n \"RCTMultilineTextInputView\" === JSCompiler_inline_result ||\n \"RCTSinglelineTextInputView\" === JSCompiler_inline_result ||\n \"RCTText\" === JSCompiler_inline_result ||\n \"RCTVirtualText\" === JSCompiler_inline_result;\n JSCompiler_inline_result =\n context.isInAParentText !== JSCompiler_inline_result\n ? { isInAParentText: JSCompiler_inline_result }\n : context;\n context !== JSCompiler_inline_result &&\n (push(contextFiberStackCursor, fiber),\n push(contextStackCursor, JSCompiler_inline_result));\n}\nfunction popHostContext(fiber) {\n contextFiberStackCursor.current === fiber &&\n (pop(contextStackCursor), pop(contextFiberStackCursor));\n}\nvar hydrationErrors = null,\n concurrentQueues = [],\n concurrentQueuesIndex = 0,\n concurrentlyUpdatedLanes = 0;\nfunction finishQueueingConcurrentUpdates() {\n for (\n var endIndex = concurrentQueuesIndex,\n i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);\n i < endIndex;\n\n ) {\n var fiber = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var queue = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var update = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var lane = concurrentQueues[i];\n concurrentQueues[i++] = null;\n if (null !== queue && null !== update) {\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n }\n 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);\n }\n}\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n concurrentQueues[concurrentQueuesIndex++] = fiber;\n concurrentQueues[concurrentQueuesIndex++] = queue;\n concurrentQueues[concurrentQueuesIndex++] = update;\n concurrentQueues[concurrentQueuesIndex++] = lane;\n concurrentlyUpdatedLanes |= lane;\n fiber.lanes |= lane;\n fiber = fiber.alternate;\n null !== fiber && (fiber.lanes |= lane);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n enqueueUpdate$1(fiber, null, null, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n sourceFiber.lanes |= lane;\n var alternate = sourceFiber.alternate;\n null !== alternate && (alternate.lanes |= lane);\n for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )\n (parent.childLanes |= lane),\n (alternate = parent.alternate),\n null !== alternate && (alternate.childLanes |= lane),\n 22 === parent.tag &&\n ((sourceFiber = parent.stateNode),\n null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),\n (sourceFiber = parent),\n (parent = parent.return);\n isHidden &&\n null !== update &&\n 3 === sourceFiber.tag &&\n ((parent = sourceFiber.stateNode),\n (isHidden = 31 - clz32(lane)),\n (parent = parent.hiddenUpdates),\n (sourceFiber = parent[isHidden]),\n null === sourceFiber\n ? (parent[isHidden] = [update])\n : sourceFiber.push(update),\n (update.lane = lane | 536870912));\n}\nfunction getRootForUpdatedFiber(sourceFiber) {\n if (50 < nestedUpdateCount)\n throw (\n ((nestedUpdateCount = 0),\n (rootWithNestedUpdates = null),\n Error(\n \"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\"\n ))\n );\n for (var parent = sourceFiber.return; null !== parent; )\n (sourceFiber = parent), (parent = sourceFiber.return);\n return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;\n}\nvar firstScheduledRoot = null,\n lastScheduledRoot = null,\n didScheduleMicrotask = !1,\n mightHavePendingSyncWork = !1,\n isFlushingWork = !1,\n currentEventTransitionLane = 0;\nfunction ensureRootIsScheduled(root) {\n root !== lastScheduledRoot &&\n null === root.next &&\n (null === lastScheduledRoot\n ? (firstScheduledRoot = lastScheduledRoot = root)\n : (lastScheduledRoot = lastScheduledRoot.next = root));\n mightHavePendingSyncWork = !0;\n didScheduleMicrotask ||\n ((didScheduleMicrotask = !0),\n scheduleCallback$2(ImmediatePriority, processRootScheduleInMicrotask));\n scheduleTaskForRootDuringMicrotask(root, now());\n}\nfunction flushSyncWorkAcrossRoots_impl(onlyLegacy) {\n if (!isFlushingWork && mightHavePendingSyncWork) {\n var errors = null;\n isFlushingWork = !0;\n do {\n var didPerformSomeWork = !1;\n for (var root = firstScheduledRoot; null !== root; ) {\n if (!onlyLegacy || 0 === root.tag) {\n var workInProgressRootRenderLanes$11 = workInProgressRootRenderLanes,\n nextLanes = getNextLanes(\n root,\n root === workInProgressRoot ? workInProgressRootRenderLanes$11 : 0\n );\n if (0 !== (nextLanes & 3))\n try {\n didPerformSomeWork = !0;\n workInProgressRootRenderLanes$11 = root;\n if (0 !== (executionContext & 6))\n throw Error(\"Should not already be working.\");\n if (!flushPassiveEffects()) {\n var exitStatus = renderRootSync(\n workInProgressRootRenderLanes$11,\n nextLanes\n );\n if (\n 0 !== workInProgressRootRenderLanes$11.tag &&\n 2 === exitStatus\n ) {\n var originallyAttemptedLanes = nextLanes,\n errorRetryLanes = getLanesToRetrySynchronouslyOnError(\n workInProgressRootRenderLanes$11,\n originallyAttemptedLanes\n );\n 0 !== errorRetryLanes &&\n ((nextLanes = errorRetryLanes),\n (exitStatus = recoverFromConcurrentError(\n workInProgressRootRenderLanes$11,\n originallyAttemptedLanes,\n errorRetryLanes\n )));\n }\n if (1 === exitStatus)\n throw (\n ((originallyAttemptedLanes = workInProgressRootFatalError),\n prepareFreshStack(workInProgressRootRenderLanes$11, 0),\n markRootSuspended(\n workInProgressRootRenderLanes$11,\n nextLanes,\n 0\n ),\n ensureRootIsScheduled(workInProgressRootRenderLanes$11),\n originallyAttemptedLanes)\n );\n 6 === exitStatus\n ? markRootSuspended(\n workInProgressRootRenderLanes$11,\n nextLanes,\n workInProgressDeferredLane\n )\n : ((workInProgressRootRenderLanes$11.finishedWork =\n workInProgressRootRenderLanes$11.current.alternate),\n (workInProgressRootRenderLanes$11.finishedLanes =\n nextLanes),\n commitRoot(\n workInProgressRootRenderLanes$11,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n workInProgressDeferredLane\n ));\n }\n ensureRootIsScheduled(workInProgressRootRenderLanes$11);\n } catch (error) {\n null === errors ? (errors = [error]) : errors.push(error);\n }\n }\n root = root.next;\n }\n } while (didPerformSomeWork);\n isFlushingWork = !1;\n if (null !== errors) {\n if (1 < errors.length) {\n if (\"function\" === typeof AggregateError)\n throw new AggregateError(errors);\n for (onlyLegacy = 1; onlyLegacy < errors.length; onlyLegacy++)\n (didPerformSomeWork = throwError.bind(null, errors[onlyLegacy])),\n scheduleCallback$2(ImmediatePriority, didPerformSomeWork);\n }\n throw errors[0];\n }\n }\n}\nfunction throwError(error) {\n throw error;\n}\nfunction processRootScheduleInMicrotask() {\n mightHavePendingSyncWork = didScheduleMicrotask = !1;\n for (\n var currentTime = now(), prev = null, root = firstScheduledRoot;\n null !== root;\n\n ) {\n var next = root.next,\n nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n 0 === nextLanes\n ? ((root.next = null),\n null === prev ? (firstScheduledRoot = next) : (prev.next = next),\n null === next && (lastScheduledRoot = prev))\n : ((prev = root),\n 0 !== (nextLanes & 3) && (mightHavePendingSyncWork = !0));\n root = next;\n }\n currentEventTransitionLane = 0;\n flushSyncWorkAcrossRoots_impl(!1);\n}\nfunction scheduleTaskForRootDuringMicrotask(root, currentTime) {\n for (\n var suspendedLanes = root.suspendedLanes,\n pingedLanes = root.pingedLanes,\n expirationTimes = root.expirationTimes,\n lanes = root.pendingLanes & -62914561;\n 0 < lanes;\n\n ) {\n var index$5 = 31 - clz32(lanes),\n lane = 1 << index$5,\n expirationTime = expirationTimes[index$5];\n if (-1 === expirationTime) {\n if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))\n expirationTimes[index$5] = computeExpirationTime(lane, currentTime);\n } else expirationTime <= currentTime && (root.expiredLanes |= lane);\n lanes &= ~lane;\n }\n currentTime = workInProgressRoot;\n suspendedLanes = workInProgressRootRenderLanes;\n suspendedLanes = getNextLanes(\n root,\n root === currentTime ? suspendedLanes : 0\n );\n pingedLanes = root.callbackNode;\n if (\n 0 === suspendedLanes ||\n (root === currentTime && 2 === workInProgressSuspendedReason) ||\n null !== root.cancelPendingCommit\n )\n return (\n null !== pingedLanes &&\n null !== pingedLanes &&\n cancelCallback$1(pingedLanes),\n (root.callbackNode = null),\n (root.callbackPriority = 0)\n );\n if (0 !== (suspendedLanes & 3))\n return (\n null !== pingedLanes &&\n null !== pingedLanes &&\n cancelCallback$1(pingedLanes),\n (root.callbackPriority = 2),\n (root.callbackNode = null),\n 2\n );\n currentTime = suspendedLanes & -suspendedLanes;\n if (currentTime === root.callbackPriority) return currentTime;\n null !== pingedLanes && cancelCallback$1(pingedLanes);\n switch (lanesToEventPriority(suspendedLanes)) {\n case 2:\n suspendedLanes = ImmediatePriority;\n break;\n case 8:\n suspendedLanes = UserBlockingPriority;\n break;\n case 32:\n suspendedLanes = NormalPriority;\n break;\n case 268435456:\n suspendedLanes = IdlePriority;\n break;\n default:\n suspendedLanes = NormalPriority;\n }\n pingedLanes = performConcurrentWorkOnRoot.bind(null, root);\n suspendedLanes = scheduleCallback$2(suspendedLanes, pingedLanes);\n root.callbackPriority = currentTime;\n root.callbackNode = suspendedLanes;\n return currentTime;\n}\nvar hasForceUpdate = !1;\nfunction initializeUpdateQueue(fiber) {\n fiber.updateQueue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: { pending: null, lanes: 0, hiddenCallbacks: null },\n callbacks: null\n };\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n current = current.updateQueue;\n workInProgress.updateQueue === current &&\n (workInProgress.updateQueue = {\n baseState: current.baseState,\n firstBaseUpdate: current.firstBaseUpdate,\n lastBaseUpdate: current.lastBaseUpdate,\n shared: current.shared,\n callbacks: null\n });\n}\nfunction createUpdate(lane) {\n return { lane: lane, tag: 0, payload: null, callback: null, next: null };\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n if (null === updateQueue) return null;\n updateQueue = updateQueue.shared;\n if (0 !== (executionContext & 2)) {\n var pending = updateQueue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n updateQueue.pending = update;\n update = getRootForUpdatedFiber(fiber);\n markUpdateLaneFromFiberToRoot(fiber, null, lane);\n return update;\n }\n enqueueUpdate$1(fiber, updateQueue, update, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction entangleTransitions(root, fiber, lane) {\n fiber = fiber.updateQueue;\n if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) {\n var queueLanes = fiber.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n fiber.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n var queue = workInProgress.updateQueue,\n current = workInProgress.alternate;\n if (\n null !== current &&\n ((current = current.updateQueue), queue === current)\n ) {\n var newFirst = null,\n newLast = null;\n queue = queue.firstBaseUpdate;\n if (null !== queue) {\n do {\n var clone = {\n lane: queue.lane,\n tag: queue.tag,\n payload: queue.payload,\n callback: null,\n next: null\n };\n null === newLast\n ? (newFirst = newLast = clone)\n : (newLast = newLast.next = clone);\n queue = queue.next;\n } while (null !== queue);\n null === newLast\n ? (newFirst = newLast = capturedUpdate)\n : (newLast = newLast.next = capturedUpdate);\n } else newFirst = newLast = capturedUpdate;\n queue = {\n baseState: current.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: current.shared,\n callbacks: current.callbacks\n };\n workInProgress.updateQueue = queue;\n return;\n }\n workInProgress = queue.lastBaseUpdate;\n null === workInProgress\n ? (queue.firstBaseUpdate = capturedUpdate)\n : (workInProgress.next = capturedUpdate);\n queue.lastBaseUpdate = capturedUpdate;\n}\nfunction processUpdateQueue(\n workInProgress$jscomp$0,\n props,\n instance$jscomp$0,\n renderLanes\n) {\n var queue = workInProgress$jscomp$0.updateQueue;\n hasForceUpdate = !1;\n var firstBaseUpdate = queue.firstBaseUpdate,\n lastBaseUpdate = queue.lastBaseUpdate,\n pendingQueue = queue.shared.pending;\n if (null !== pendingQueue) {\n queue.shared.pending = null;\n var lastPendingUpdate = pendingQueue,\n firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null;\n null === lastBaseUpdate\n ? (firstBaseUpdate = firstPendingUpdate)\n : (lastBaseUpdate.next = firstPendingUpdate);\n lastBaseUpdate = lastPendingUpdate;\n var current = workInProgress$jscomp$0.alternate;\n null !== current &&\n ((current = current.updateQueue),\n (pendingQueue = current.lastBaseUpdate),\n pendingQueue !== lastBaseUpdate &&\n (null === pendingQueue\n ? (current.firstBaseUpdate = firstPendingUpdate)\n : (pendingQueue.next = firstPendingUpdate),\n (current.lastBaseUpdate = lastPendingUpdate)));\n }\n if (null !== firstBaseUpdate) {\n var newState = queue.baseState;\n lastBaseUpdate = 0;\n current = firstPendingUpdate = lastPendingUpdate = null;\n pendingQueue = firstBaseUpdate;\n do {\n var updateLane = pendingQueue.lane & -536870913,\n isHiddenUpdate = updateLane !== pendingQueue.lane;\n if (\n isHiddenUpdate\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n ) {\n null !== current &&\n (current = current.next =\n {\n lane: 0,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: null,\n next: null\n });\n a: {\n var workInProgress = workInProgress$jscomp$0,\n update = pendingQueue;\n updateLane = props;\n var instance = instance$jscomp$0;\n switch (update.tag) {\n case 1:\n workInProgress = update.payload;\n if (\"function\" === typeof workInProgress) {\n newState = workInProgress.call(instance, newState, updateLane);\n break a;\n }\n newState = workInProgress;\n break a;\n case 3:\n workInProgress.flags = (workInProgress.flags & -65537) | 128;\n case 0:\n workInProgress = update.payload;\n updateLane =\n \"function\" === typeof workInProgress\n ? workInProgress.call(instance, newState, updateLane)\n : workInProgress;\n if (null === updateLane || void 0 === updateLane) break a;\n newState = assign({}, newState, updateLane);\n break a;\n case 2:\n hasForceUpdate = !0;\n }\n }\n updateLane = pendingQueue.callback;\n null !== updateLane &&\n ((workInProgress$jscomp$0.flags |= 64),\n isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),\n (isHiddenUpdate = queue.callbacks),\n null === isHiddenUpdate\n ? (queue.callbacks = [updateLane])\n : isHiddenUpdate.push(updateLane));\n } else\n (isHiddenUpdate = {\n lane: updateLane,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: pendingQueue.callback,\n next: null\n }),\n null === current\n ? ((firstPendingUpdate = current = isHiddenUpdate),\n (lastPendingUpdate = newState))\n : (current = current.next = isHiddenUpdate),\n (lastBaseUpdate |= updateLane);\n pendingQueue = pendingQueue.next;\n if (null === pendingQueue)\n if (((pendingQueue = queue.shared.pending), null === pendingQueue))\n break;\n else\n (isHiddenUpdate = pendingQueue),\n (pendingQueue = isHiddenUpdate.next),\n (isHiddenUpdate.next = null),\n (queue.lastBaseUpdate = isHiddenUpdate),\n (queue.shared.pending = null);\n } while (1);\n null === current && (lastPendingUpdate = newState);\n queue.baseState = lastPendingUpdate;\n queue.firstBaseUpdate = firstPendingUpdate;\n queue.lastBaseUpdate = current;\n null === firstBaseUpdate && (queue.shared.lanes = 0);\n workInProgressRootSkippedLanes |= lastBaseUpdate;\n workInProgress$jscomp$0.lanes = lastBaseUpdate;\n workInProgress$jscomp$0.memoizedState = newState;\n }\n}\nfunction callCallback(callback, context) {\n if (\"function\" !== typeof callback)\n throw Error(\n \"Invalid argument passed as callback. Expected a function. Instead received: \" +\n callback\n );\n callback.call(context);\n}\nfunction commitCallbacks(updateQueue, context) {\n var callbacks = updateQueue.callbacks;\n if (null !== callbacks)\n for (\n updateQueue.callbacks = null, updateQueue = 0;\n updateQueue < callbacks.length;\n updateQueue++\n )\n callCallback(callbacks[updateQueue], context);\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) return !0;\n if (\n \"object\" !== typeof objA ||\n null === objA ||\n \"object\" !== typeof objB ||\n null === objB\n )\n return !1;\n var keysA = Object.keys(objA),\n keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return !1;\n for (keysB = 0; keysB < keysA.length; keysB++) {\n var currentKey = keysA[keysB];\n if (\n !hasOwnProperty.call(objB, currentKey) ||\n !objectIs(objA[currentKey], objB[currentKey])\n )\n return !1;\n }\n return !0;\n}\nfunction describeComponentFrame(name, ownerName) {\n var sourceInfo = \"\";\n ownerName && (sourceInfo = \" (created by \" + ownerName + \")\");\n return \"\\n in \" + (name || \"Unknown\") + sourceInfo;\n}\nfunction describeFunctionComponentFrame(fn) {\n return fn\n ? describeComponentFrame(fn.displayName || fn.name || null, null)\n : \"\";\n}\nfunction describeFiber(fiber) {\n switch (fiber.tag) {\n case 26:\n case 27:\n case 5:\n return describeComponentFrame(fiber.type, null);\n case 16:\n return describeComponentFrame(\"Lazy\", null);\n case 13:\n return describeComponentFrame(\"Suspense\", null);\n case 19:\n return describeComponentFrame(\"SuspenseList\", null);\n case 0:\n case 2:\n case 15:\n return describeFunctionComponentFrame(fiber.type);\n case 11:\n return describeFunctionComponentFrame(fiber.type.render);\n case 1:\n return (fiber = describeFunctionComponentFrame(fiber.type)), fiber;\n default:\n return \"\";\n }\n}\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = \"\";\n do\n (info += describeFiber(workInProgress)),\n (workInProgress = workInProgress.return);\n while (workInProgress);\n return info;\n } catch (x) {\n return \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n }\n}\nvar SuspenseException = Error(\n \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`\"\n ),\n SuspenseyCommitException = Error(\n \"Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.\"\n ),\n noopSuspenseyCommitThenable = { then: function () {} };\nfunction isThenableResolved(thenable) {\n thenable = thenable.status;\n return \"fulfilled\" === thenable || \"rejected\" === thenable;\n}\nfunction noop() {}\nfunction trackUsedThenable(thenableState, thenable, index) {\n index = thenableState[index];\n void 0 === index\n ? thenableState.push(thenable)\n : index !== thenable && (thenable.then(noop, noop), (thenable = index));\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n default:\n if (\"string\" === typeof thenable.status) thenable.then(noop, noop);\n else {\n thenableState = workInProgressRoot;\n if (null !== thenableState && 100 < thenableState.shellSuspendCounter)\n throw Error(\n \"async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\"\n );\n thenableState = thenable;\n thenableState.status = \"pending\";\n thenableState.then(\n function (fulfilledValue) {\n if (\"pending\" === thenable.status) {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = \"fulfilled\";\n fulfilledThenable.value = fulfilledValue;\n }\n },\n function (error) {\n if (\"pending\" === thenable.status) {\n var rejectedThenable = thenable;\n rejectedThenable.status = \"rejected\";\n rejectedThenable.reason = error;\n }\n }\n );\n }\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n }\n suspendedThenable = thenable;\n throw SuspenseException;\n }\n}\nvar suspendedThenable = null;\nfunction getSuspendedThenable() {\n if (null === suspendedThenable)\n throw Error(\n \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n );\n var thenable = suspendedThenable;\n suspendedThenable = null;\n return thenable;\n}\nfunction checkIfUseWrappedInAsyncCatch(rejectedReason) {\n if (rejectedReason === SuspenseException)\n throw Error(\n \"Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\"\n );\n}\nvar thenableState$1 = null,\n thenableIndexCounter$1 = 0;\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter$1;\n thenableIndexCounter$1 += 1;\n null === thenableState$1 && (thenableState$1 = []);\n return trackUsedThenable(thenableState$1, thenable, index);\n}\nfunction convertStringRefToCallbackRef(\n returnFiber,\n current,\n element,\n mixedRef\n) {\n function ref(value) {\n var refs = inst.refs;\n null === value ? delete refs[stringRef] : (refs[stringRef] = value);\n }\n var stringRef = \"\" + mixedRef;\n returnFiber = element._owner;\n if (!returnFiber)\n throw Error(\n \"Element ref was specified as a string (\" +\n stringRef +\n \") but no owner was set. This could happen for one of the following reasons:\\n1. You may be adding a ref to a function component\\n2. You may be adding a ref to a component that was not created inside a component's render method\\n3. You have multiple copies of React loaded\\nSee https://react.dev/link/refs-must-have-owner for more information.\"\n );\n if (1 !== returnFiber.tag)\n throw Error(\n \"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://react.dev/link/strict-mode-string-ref\"\n );\n var inst = returnFiber.stateNode;\n if (!inst)\n throw Error(\n \"Missing owner for string ref \" +\n stringRef +\n \". This error is likely caused by a bug in React. Please file an issue.\"\n );\n if (\n null !== current &&\n null !== current.ref &&\n \"function\" === typeof current.ref &&\n current.ref._stringRef === stringRef\n )\n return current.ref;\n ref._stringRef = stringRef;\n return ref;\n}\nfunction coerceRef(returnFiber, current, workInProgress, element) {\n var mixedRef = element.ref;\n returnFiber =\n \"string\" === typeof mixedRef ||\n \"number\" === typeof mixedRef ||\n \"boolean\" === typeof mixedRef\n ? convertStringRefToCallbackRef(returnFiber, current, element, mixedRef)\n : mixedRef;\n workInProgress.ref = returnFiber;\n}\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n returnFiber = Object.prototype.toString.call(newChild);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === returnFiber\n ? \"object with keys {\" + Object.keys(newChild).join(\", \") + \"}\"\n : returnFiber) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n}\nfunction resolveLazy(lazyType) {\n var init = lazyType._init;\n return init(lazyType._payload);\n}\nfunction createChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (shouldTrackSideEffects) {\n var deletions = returnFiber.deletions;\n null === deletions\n ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))\n : deletions.push(childToDelete);\n }\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) return null;\n for (; null !== currentFirstChild; )\n deleteChild(returnFiber, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return null;\n }\n function mapRemainingChildren(currentFirstChild) {\n for (var existingChildren = new Map(); null !== currentFirstChild; )\n null !== currentFirstChild.key\n ? existingChildren.set(currentFirstChild.key, currentFirstChild)\n : existingChildren.set(currentFirstChild.index, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n fiber = createWorkInProgress(fiber, pendingProps);\n fiber.index = 0;\n fiber.sibling = null;\n return fiber;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects)\n return (newFiber.flags |= 1048576), lastPlacedIndex;\n newIndex = newFiber.alternate;\n if (null !== newIndex)\n return (\n (newIndex = newIndex.index),\n newIndex < lastPlacedIndex\n ? ((newFiber.flags |= 33554434), lastPlacedIndex)\n : newIndex\n );\n newFiber.flags |= 33554434;\n return lastPlacedIndex;\n }\n function placeSingleChild(newFiber) {\n shouldTrackSideEffects &&\n null === newFiber.alternate &&\n (newFiber.flags |= 33554434);\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (null === current || 6 !== current.tag)\n return (\n (current = createFiberFromText(textContent, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, textContent);\n current.return = returnFiber;\n return current;\n }\n function updateElement(returnFiber, current, element, lanes) {\n var elementType = element.type;\n if (elementType === REACT_FRAGMENT_TYPE)\n return updateFragment(\n returnFiber,\n current,\n element.props.children,\n lanes,\n element.key\n );\n if (\n null !== current &&\n (current.elementType === elementType ||\n (\"object\" === typeof elementType &&\n null !== elementType &&\n elementType.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(elementType) === current.type))\n )\n return (\n (lanes = useFiber(current, element.props)),\n coerceRef(returnFiber, current, lanes, element),\n (lanes.return = returnFiber),\n lanes\n );\n lanes = createFiberFromTypeAndProps(\n element.type,\n element.key,\n element.props,\n null,\n returnFiber.mode,\n lanes\n );\n coerceRef(returnFiber, current, lanes, element);\n lanes.return = returnFiber;\n return lanes;\n }\n function updatePortal(returnFiber, current, portal, lanes) {\n if (\n null === current ||\n 4 !== current.tag ||\n current.stateNode.containerInfo !== portal.containerInfo ||\n current.stateNode.implementation !== portal.implementation\n )\n return (\n (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, portal.children || []);\n current.return = returnFiber;\n return current;\n }\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (null === current || 7 !== current.tag)\n return (\n (current = createFiberFromFragment(\n fragment,\n returnFiber.mode,\n lanes,\n key\n )),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, fragment);\n current.return = returnFiber;\n return current;\n }\n function createChild(returnFiber, newChild, lanes) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild\n )\n return (\n (newChild = createFiberFromText(\n \"\" + newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(returnFiber, null, lanes, newChild),\n (lanes.return = returnFiber),\n lanes\n );\n case REACT_PORTAL_TYPE:\n return (\n (newChild = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n case REACT_LAZY_TYPE:\n var init = newChild._init;\n return createChild(returnFiber, init(newChild._payload), lanes);\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (newChild = createFiberFromFragment(\n newChild,\n returnFiber.mode,\n lanes,\n null\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"function\" === typeof newChild.then)\n return createChild(returnFiber, unwrapThenable(newChild), lanes);\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return createChild(\n returnFiber,\n readContextDuringReconciliation(returnFiber, newChild, lanes),\n lanes\n );\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n var key = null !== oldFiber ? oldFiber.key : null;\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild\n )\n return null !== key\n ? null\n : updateTextNode(returnFiber, oldFiber, \"\" + newChild, lanes);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return newChild.key === key\n ? updateElement(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_PORTAL_TYPE:\n return newChild.key === key\n ? updatePortal(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_LAZY_TYPE:\n return (\n (key = newChild._init),\n updateSlot(returnFiber, oldFiber, key(newChild._payload), lanes)\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return null !== key\n ? null\n : updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n if (\"function\" === typeof newChild.then)\n return updateSlot(\n returnFiber,\n oldFiber,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateSlot(\n returnFiber,\n oldFiber,\n readContextDuringReconciliation(returnFiber, newChild, lanes),\n lanes\n );\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n return null;\n }\n function updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n lanes\n ) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild\n )\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateTextNode(returnFiber, existingChildren, \"\" + newChild, lanes)\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updateElement(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_PORTAL_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updatePortal(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_LAZY_TYPE:\n var init = newChild._init;\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n init(newChild._payload),\n lanes\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateFragment(returnFiber, existingChildren, newChild, lanes, null)\n );\n if (\"function\" === typeof newChild.then)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n readContextDuringReconciliation(returnFiber, newChild, lanes),\n lanes\n );\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n return null;\n }\n function reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChildren,\n lanes\n ) {\n for (\n var resultingFirstChild = null,\n previousNewFiber = null,\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null;\n null !== oldFiber && newIdx < newChildren.length;\n newIdx++\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n newChildren[newIdx],\n lanes\n );\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (resultingFirstChild = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length)\n return (\n deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild\n );\n if (null === oldFiber) {\n for (; newIdx < newChildren.length; newIdx++)\n (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),\n null !== oldFiber &&\n ((currentFirstChild = placeChild(\n oldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = oldFiber)\n : (previousNewFiber.sibling = oldFiber),\n (previousNewFiber = oldFiber));\n return resultingFirstChild;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n newIdx < newChildren.length;\n newIdx++\n )\n (nextOldFiber = updateFromMap(\n oldFiber,\n returnFiber,\n newIdx,\n newChildren[newIdx],\n lanes\n )),\n null !== nextOldFiber &&\n (shouldTrackSideEffects &&\n null !== nextOldFiber.alternate &&\n oldFiber.delete(\n null === nextOldFiber.key ? newIdx : nextOldFiber.key\n ),\n (currentFirstChild = placeChild(\n nextOldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = nextOldFiber)\n : (previousNewFiber.sibling = nextOldFiber),\n (previousNewFiber = nextOldFiber));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChildrenIterable,\n lanes\n ) {\n var iteratorFn = getIteratorFn(newChildrenIterable);\n if (\"function\" !== typeof iteratorFn)\n throw Error(\n \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"\n );\n newChildrenIterable = iteratorFn.call(newChildrenIterable);\n if (null == newChildrenIterable)\n throw Error(\"An iterable object provided no iterator.\");\n for (\n var previousNewFiber = (iteratorFn = null),\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null,\n step = newChildrenIterable.next();\n null !== oldFiber && !step.done;\n newIdx++, step = newChildrenIterable.next()\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (iteratorFn = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done)\n return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn;\n if (null === oldFiber) {\n for (; !step.done; newIdx++, step = newChildrenIterable.next())\n (step = createChild(returnFiber, step.value, lanes)),\n null !== step &&\n ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (iteratorFn = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n return iteratorFn;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n !step.done;\n newIdx++, step = newChildrenIterable.next()\n )\n (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),\n null !== step &&\n (shouldTrackSideEffects &&\n null !== step.alternate &&\n oldFiber.delete(null === step.key ? newIdx : step.key),\n (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (iteratorFn = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n return iteratorFn;\n }\n function reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n ) {\n \"object\" === typeof newChild &&\n null !== newChild &&\n newChild.type === REACT_FRAGMENT_TYPE &&\n null === newChild.key &&\n (newChild = newChild.props.children);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n a: {\n for (\n var key = newChild.key, child = currentFirstChild;\n null !== child;\n\n ) {\n if (child.key === key) {\n key = newChild.type;\n if (key === REACT_FRAGMENT_TYPE) {\n if (7 === child.tag) {\n deleteRemainingChildren(returnFiber, child.sibling);\n currentFirstChild = useFiber(\n child,\n newChild.props.children\n );\n currentFirstChild.return = returnFiber;\n returnFiber = currentFirstChild;\n break a;\n }\n } else if (\n child.elementType === key ||\n (\"object\" === typeof key &&\n null !== key &&\n key.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(key) === child.type)\n ) {\n deleteRemainingChildren(returnFiber, child.sibling);\n currentFirstChild = useFiber(child, newChild.props);\n coerceRef(returnFiber, child, currentFirstChild, newChild);\n currentFirstChild.return = returnFiber;\n returnFiber = currentFirstChild;\n break a;\n }\n deleteRemainingChildren(returnFiber, child);\n break;\n } else deleteChild(returnFiber, child);\n child = child.sibling;\n }\n newChild.type === REACT_FRAGMENT_TYPE\n ? ((currentFirstChild = createFiberFromFragment(\n newChild.props.children,\n returnFiber.mode,\n lanes,\n newChild.key\n )),\n (currentFirstChild.return = returnFiber),\n (returnFiber = currentFirstChild))\n : ((lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(returnFiber, currentFirstChild, lanes, newChild),\n (lanes.return = returnFiber),\n (returnFiber = lanes));\n }\n return placeSingleChild(returnFiber);\n case REACT_PORTAL_TYPE:\n a: {\n for (child = newChild.key; null !== currentFirstChild; ) {\n if (currentFirstChild.key === child)\n if (\n 4 === currentFirstChild.tag &&\n currentFirstChild.stateNode.containerInfo ===\n newChild.containerInfo &&\n currentFirstChild.stateNode.implementation ===\n newChild.implementation\n ) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n currentFirstChild = useFiber(\n currentFirstChild,\n newChild.children || []\n );\n currentFirstChild.return = returnFiber;\n returnFiber = currentFirstChild;\n break a;\n } else {\n deleteRemainingChildren(returnFiber, currentFirstChild);\n break;\n }\n else deleteChild(returnFiber, currentFirstChild);\n currentFirstChild = currentFirstChild.sibling;\n }\n currentFirstChild = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n lanes\n );\n currentFirstChild.return = returnFiber;\n returnFiber = currentFirstChild;\n }\n return placeSingleChild(returnFiber);\n case REACT_LAZY_TYPE:\n return (\n (child = newChild._init),\n reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n child(newChild._payload),\n lanes\n )\n );\n }\n if (isArrayImpl(newChild))\n return reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n if (getIteratorFn(newChild))\n return reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n if (\"function\" === typeof newChild.then)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n readContextDuringReconciliation(returnFiber, newChild, lanes),\n lanes\n );\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n return (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild\n ? ((newChild = \"\" + newChild),\n null !== currentFirstChild && 6 === currentFirstChild.tag\n ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),\n (currentFirstChild = useFiber(currentFirstChild, newChild)),\n (currentFirstChild.return = returnFiber),\n (returnFiber = currentFirstChild))\n : (deleteRemainingChildren(returnFiber, currentFirstChild),\n (currentFirstChild = createFiberFromText(\n newChild,\n returnFiber.mode,\n lanes\n )),\n (currentFirstChild.return = returnFiber),\n (returnFiber = currentFirstChild)),\n placeSingleChild(returnFiber))\n : deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return function (returnFiber, currentFirstChild, newChild, lanes) {\n thenableIndexCounter$1 = 0;\n returnFiber = reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n thenableState$1 = null;\n return returnFiber;\n };\n}\nvar reconcileChildFibers = createChildReconciler(!0),\n mountChildFibers = createChildReconciler(!1),\n currentTreeHiddenStackCursor = createCursor(null),\n prevEntangledRenderLanesCursor = createCursor(0);\nfunction pushHiddenContext(fiber, context) {\n fiber = entangledRenderLanes;\n push(prevEntangledRenderLanesCursor, fiber);\n push(currentTreeHiddenStackCursor, context);\n entangledRenderLanes = fiber | context.baseLanes;\n}\nfunction reuseHiddenContextOnStack() {\n push(prevEntangledRenderLanesCursor, entangledRenderLanes);\n push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);\n}\nfunction popHiddenContext() {\n entangledRenderLanes = prevEntangledRenderLanesCursor.current;\n pop(currentTreeHiddenStackCursor);\n pop(prevEntangledRenderLanesCursor);\n}\nvar suspenseHandlerStackCursor = createCursor(null),\n shellBoundary = null;\nfunction pushPrimaryTreeSuspenseHandler(handler) {\n var current = handler.alternate;\n push(suspenseStackCursor, suspenseStackCursor.current & 1);\n push(suspenseHandlerStackCursor, handler);\n null === shellBoundary &&\n (null === current || null !== currentTreeHiddenStackCursor.current\n ? (shellBoundary = handler)\n : null !== current.memoizedState && (shellBoundary = handler));\n}\nfunction pushOffscreenSuspenseHandler(fiber) {\n if (22 === fiber.tag) {\n if (\n (push(suspenseStackCursor, suspenseStackCursor.current),\n push(suspenseHandlerStackCursor, fiber),\n null === shellBoundary)\n ) {\n var current = fiber.alternate;\n null !== current &&\n null !== current.memoizedState &&\n (shellBoundary = fiber);\n }\n } else reuseSuspenseHandlerOnStack(fiber);\n}\nfunction reuseSuspenseHandlerOnStack() {\n push(suspenseStackCursor, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);\n}\nfunction popSuspenseHandler(fiber) {\n pop(suspenseHandlerStackCursor);\n shellBoundary === fiber && (shellBoundary = null);\n pop(suspenseStackCursor);\n}\nvar suspenseStackCursor = createCursor(0);\nfunction findFirstSuspended(row) {\n for (var node = row; null !== node; ) {\n if (13 === node.tag) {\n var state = node.memoizedState;\n if (null !== state && (null === state.dehydrated || shim$1() || shim$1()))\n return node;\n } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {\n if (0 !== (node.flags & 128)) return node;\n } else if (null !== node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === row) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === row) return null;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n return null;\n}\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,\n renderLanes = 0,\n currentlyRenderingFiber$1 = null,\n currentHook = null,\n workInProgressHook = null,\n didScheduleRenderPhaseUpdate = !1,\n didScheduleRenderPhaseUpdateDuringThisPass = !1,\n shouldDoubleInvokeUserFnsInHooksDEV = !1,\n thenableIndexCounter = 0,\n thenableState = null,\n globalClientIdCounter = 0;\nfunction throwInvalidHookError() {\n throw Error(\n \"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://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n}\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (null === prevDeps) return !1;\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)\n if (!objectIs(nextDeps[i], prevDeps[i])) return !1;\n return !0;\n}\nfunction renderWithHooks(\n current,\n workInProgress,\n Component,\n props,\n secondArg,\n nextRenderLanes\n) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber$1 = workInProgress;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = 0;\n ReactCurrentDispatcher$1.current =\n null === current || null === current.memoizedState\n ? HooksDispatcherOnMount\n : HooksDispatcherOnUpdate;\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n current = Component(props, secondArg);\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n didScheduleRenderPhaseUpdateDuringThisPass &&\n (current = renderWithHooksAgain(\n workInProgress,\n Component,\n props,\n secondArg\n ));\n finishRenderingHooks();\n return current;\n}\nfunction finishRenderingHooks() {\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;\n didScheduleRenderPhaseUpdate = !1;\n thenableIndexCounter = 0;\n thenableState = null;\n if (didRenderTooFewHooks)\n throw Error(\n \"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\"\n );\n}\nfunction renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n currentlyRenderingFiber$1 = workInProgress;\n var numberOfReRenders = 0;\n do {\n didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);\n thenableIndexCounter = 0;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n if (25 <= numberOfReRenders)\n throw Error(\n \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\"\n );\n numberOfReRenders += 1;\n workInProgressHook = currentHook = null;\n workInProgress.updateQueue = null;\n ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender;\n var children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n return children;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.flags &= -2053;\n current.lanes &= ~lanes;\n}\nfunction resetHooksOnUnwind(workInProgress) {\n if (didScheduleRenderPhaseUpdate) {\n for (\n workInProgress = workInProgress.memoizedState;\n null !== workInProgress;\n\n ) {\n var queue = workInProgress.queue;\n null !== queue && (queue.pending = null);\n workInProgress = workInProgress.next;\n }\n didScheduleRenderPhaseUpdate = !1;\n }\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n thenableIndexCounter = 0;\n thenableState = null;\n}\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook)\n : (workInProgressHook = workInProgressHook.next = hook);\n return workInProgressHook;\n}\nfunction updateWorkInProgressHook() {\n if (null === currentHook) {\n var nextCurrentHook = currentlyRenderingFiber$1.alternate;\n nextCurrentHook =\n null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;\n } else nextCurrentHook = currentHook.next;\n var nextWorkInProgressHook =\n null === workInProgressHook\n ? currentlyRenderingFiber$1.memoizedState\n : workInProgressHook.next;\n if (null !== nextWorkInProgressHook)\n (workInProgressHook = nextWorkInProgressHook),\n (currentHook = nextCurrentHook);\n else {\n if (null === nextCurrentHook) {\n if (null === currentlyRenderingFiber$1.alternate)\n throw Error(\n \"Update hook called on initial render. This is likely a bug in React. Please file an issue.\"\n );\n throw Error(\"Rendered more hooks than during the previous render.\");\n }\n currentHook = nextCurrentHook;\n nextCurrentHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook =\n nextCurrentHook)\n : (workInProgressHook = workInProgressHook.next = nextCurrentHook);\n }\n return workInProgressHook;\n}\nvar createFunctionComponentUpdateQueue;\ncreateFunctionComponentUpdateQueue = function () {\n return { lastEffect: null, events: null, stores: null };\n};\nfunction useThenable(thenable) {\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n null === thenableState && (thenableState = []);\n thenable = trackUsedThenable(thenableState, thenable, index);\n null === currentlyRenderingFiber$1.alternate &&\n (null === workInProgressHook\n ? null === currentlyRenderingFiber$1.memoizedState\n : null === workInProgressHook.next) &&\n (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount);\n return thenable;\n}\nfunction use(usable) {\n if (null !== usable && \"object\" === typeof usable) {\n if (\"function\" === typeof usable.then) return useThenable(usable);\n if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);\n }\n throw Error(\"An unsupported type was passed to use(): \" + String(usable));\n}\nfunction basicStateReducer(state, action) {\n return \"function\" === typeof action ? action(state) : action;\n}\nfunction updateReducer(reducer) {\n var hook = updateWorkInProgressHook(),\n current = currentHook,\n queue = hook.queue;\n if (null === queue)\n throw Error(\n \"Should have a queue. This is likely a bug in React. Please file an issue.\"\n );\n queue.lastRenderedReducer = reducer;\n var baseQueue = hook.baseQueue,\n pendingQueue = queue.pending;\n if (null !== pendingQueue) {\n if (null !== baseQueue) {\n var baseFirst = baseQueue.next;\n baseQueue.next = pendingQueue.next;\n pendingQueue.next = baseFirst;\n }\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n pendingQueue = hook.baseState;\n if (null === baseQueue) hook.memoizedState = pendingQueue;\n else {\n current = baseQueue.next;\n var newBaseQueueFirst = (baseFirst = null),\n newBaseQueueLast = null,\n update = current;\n do {\n var updateLane = update.lane & -536870913;\n if (\n updateLane !== update.lane\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n )\n null !== newBaseQueueLast &&\n (newBaseQueueLast = newBaseQueueLast.next =\n {\n lane: 0,\n revertLane: 0,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n (updateLane = update.action),\n shouldDoubleInvokeUserFnsInHooksDEV &&\n reducer(pendingQueue, updateLane),\n (pendingQueue = update.hasEagerState\n ? update.eagerState\n : reducer(pendingQueue, updateLane));\n else {\n var clone = {\n lane: updateLane,\n revertLane: update.revertLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n null === newBaseQueueLast\n ? ((newBaseQueueFirst = newBaseQueueLast = clone),\n (baseFirst = pendingQueue))\n : (newBaseQueueLast = newBaseQueueLast.next = clone);\n currentlyRenderingFiber$1.lanes |= updateLane;\n workInProgressRootSkippedLanes |= updateLane;\n }\n update = update.next;\n } while (null !== update && update !== current);\n null === newBaseQueueLast\n ? (baseFirst = pendingQueue)\n : (newBaseQueueLast.next = newBaseQueueFirst);\n objectIs(pendingQueue, hook.memoizedState) || (didReceiveUpdate = !0);\n hook.memoizedState = pendingQueue;\n hook.baseState = baseFirst;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = pendingQueue;\n }\n null === baseQueue && (queue.lanes = 0);\n return [hook.memoizedState, queue.dispatch];\n}\nfunction rerenderReducer(reducer) {\n var hook = updateWorkInProgressHook(),\n queue = hook.queue;\n if (null === queue)\n throw Error(\n \"Should have a queue. This is likely a bug in React. Please file an issue.\"\n );\n queue.lastRenderedReducer = reducer;\n var dispatch = queue.dispatch,\n lastRenderPhaseUpdate = queue.pending,\n newState = hook.memoizedState;\n if (null !== lastRenderPhaseUpdate) {\n queue.pending = null;\n var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);\n do (newState = reducer(newState, update.action)), (update = update.next);\n while (update !== lastRenderPhaseUpdate);\n objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);\n hook.memoizedState = newState;\n null === hook.baseQueue && (hook.baseState = newState);\n queue.lastRenderedState = newState;\n }\n return [newState, dispatch];\n}\nfunction updateSyncExternalStore(subscribe, getSnapshot) {\n var fiber = currentlyRenderingFiber$1,\n hook = updateWorkInProgressHook();\n var nextSnapshot = getSnapshot();\n var snapshotChanged = !objectIs(\n (currentHook || hook).memoizedState,\n nextSnapshot\n );\n snapshotChanged &&\n ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0));\n hook = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [\n subscribe\n ]);\n if (\n hook.getSnapshot !== getSnapshot ||\n snapshotChanged ||\n (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)\n ) {\n fiber.flags |= 2048;\n pushEffect(\n 9,\n updateStoreInstance.bind(null, fiber, hook, nextSnapshot, getSnapshot),\n { destroy: void 0 },\n null\n );\n if (null === workInProgressRoot)\n throw Error(\n \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\"\n );\n 0 !== (renderLanes & 60) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n return nextSnapshot;\n}\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= 16384;\n fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };\n getSnapshot = currentlyRenderingFiber$1.updateQueue;\n null === getSnapshot\n ? ((getSnapshot = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber$1.updateQueue = getSnapshot),\n (getSnapshot.stores = [fiber]))\n : ((renderedSnapshot = getSnapshot.stores),\n null === renderedSnapshot\n ? (getSnapshot.stores = [fiber])\n : renderedSnapshot.push(fiber));\n}\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n}\nfunction subscribeToStore(fiber, inst, subscribe) {\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n });\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root && scheduleUpdateOnFiber(root, fiber, 2);\n}\nfunction mountStateImpl(initialState) {\n var hook = mountWorkInProgressHook();\n if (\"function\" === typeof initialState) {\n var initialStateInitializer = initialState;\n initialState = initialStateInitializer();\n shouldDoubleInvokeUserFnsInHooksDEV && initialStateInitializer();\n }\n hook.memoizedState = hook.baseState = initialState;\n hook.queue = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n return hook;\n}\nfunction pushEffect(tag, create, inst, deps) {\n tag = { tag: tag, create: create, inst: inst, deps: deps, next: null };\n create = currentlyRenderingFiber$1.updateQueue;\n null === create\n ? ((create = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber$1.updateQueue = create),\n (create.lastEffect = tag.next = tag))\n : ((inst = create.lastEffect),\n null === inst\n ? (create.lastEffect = tag.next = tag)\n : ((deps = inst.next),\n (inst.next = tag),\n (tag.next = deps),\n (create.lastEffect = tag)));\n return tag;\n}\nfunction updateRef() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(\n 1 | hookFlags,\n create,\n { destroy: void 0 },\n void 0 === deps ? null : deps\n );\n}\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var inst = hook.memoizedState.inst;\n null !== currentHook &&\n null !== deps &&\n areHookInputsEqual(deps, currentHook.memoizedState.deps)\n ? (hook.memoizedState = pushEffect(hookFlags, create, inst, deps))\n : ((currentlyRenderingFiber$1.flags |= fiberFlags),\n (hook.memoizedState = pushEffect(1 | hookFlags, create, inst, deps)));\n}\nfunction mountEffect(create, deps) {\n mountEffectImpl(8390656, 8, create, deps);\n}\nfunction updateEffect(create, deps) {\n updateEffectImpl(2048, 8, create, deps);\n}\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(4, 2, create, deps);\n}\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(4, 4, create, deps);\n}\nfunction imperativeHandleEffect(create, ref) {\n if (\"function\" === typeof ref)\n return (\n (create = create()),\n ref(create),\n function () {\n ref(null);\n }\n );\n if (null !== ref && void 0 !== ref)\n return (\n (create = create()),\n (ref.current = create),\n function () {\n ref.current = null;\n }\n );\n}\nfunction updateImperativeHandle(ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);\n}\nfunction mountDebugValue() {}\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n hook.memoizedState = [callback, deps];\n return callback;\n}\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n prevState = nextCreate();\n shouldDoubleInvokeUserFnsInHooksDEV && nextCreate();\n hook.memoizedState = [prevState, deps];\n return prevState;\n}\nfunction mountDeferredValueImpl(hook, value, initialValue) {\n return void 0 !== initialValue && 0 === (renderLanes & 1073741824)\n ? ((hook.memoizedState = initialValue),\n (hook = requestDeferredLane()),\n (currentlyRenderingFiber$1.lanes |= hook),\n (workInProgressRootSkippedLanes |= hook),\n initialValue)\n : (hook.memoizedState = value);\n}\nfunction updateDeferredValueImpl(hook, prevValue, value, initialValue) {\n if (objectIs(value, prevValue)) return value;\n if (null !== currentTreeHiddenStackCursor.current)\n return (\n (hook = mountDeferredValueImpl(hook, value, initialValue)),\n objectIs(hook, prevValue) || (didReceiveUpdate = !0),\n hook\n );\n if (0 === (renderLanes & 42))\n return (didReceiveUpdate = !0), (hook.memoizedState = value);\n hook = requestDeferredLane();\n currentlyRenderingFiber$1.lanes |= hook;\n workInProgressRootSkippedLanes |= hook;\n return prevValue;\n}\nfunction startTransition(fiber, queue, pendingState, finishedState, callback) {\n var previousPriority = currentUpdatePriority;\n currentUpdatePriority =\n 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;\n var prevTransition = ReactCurrentBatchConfig$2.transition,\n currentTransition = { _callbacks: new Set() };\n ReactCurrentBatchConfig$2.transition = null;\n dispatchSetState(fiber, queue, pendingState);\n ReactCurrentBatchConfig$2.transition = currentTransition;\n try {\n dispatchSetState(fiber, queue, finishedState), callback();\n } catch (error) {\n throw error;\n } finally {\n (currentUpdatePriority = previousPriority),\n (ReactCurrentBatchConfig$2.transition = prevTransition);\n }\n}\nfunction updateId() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction dispatchReducerAction(fiber, queue, action) {\n var lane = requestUpdateLane(fiber);\n action = {\n lane: lane,\n revertLane: 0,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n isRenderPhaseUpdate(fiber)\n ? enqueueRenderPhaseUpdate(queue, action)\n : (enqueueUpdate$1(fiber, queue, action, lane),\n (action = getRootForUpdatedFiber(fiber)),\n null !== action &&\n (scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane)));\n}\nfunction dispatchSetState(fiber, queue, action) {\n var lane = requestUpdateLane(fiber),\n update = {\n lane: lane,\n revertLane: 0,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);\n else {\n var alternate = fiber.alternate;\n if (\n 0 === fiber.lanes &&\n (null === alternate || 0 === alternate.lanes) &&\n ((alternate = queue.lastRenderedReducer), null !== alternate)\n )\n try {\n var currentState = queue.lastRenderedState,\n eagerState = alternate(currentState, action);\n update.hasEagerState = !0;\n update.eagerState = eagerState;\n if (objectIs(eagerState, currentState)) {\n enqueueUpdate$1(fiber, queue, update, 0);\n null === workInProgressRoot && finishQueueingConcurrentUpdates();\n return;\n }\n } catch (error) {\n } finally {\n }\n enqueueUpdate$1(fiber, queue, update, lane);\n action = getRootForUpdatedFiber(fiber);\n null !== action &&\n (scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane));\n }\n}\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return (\n fiber === currentlyRenderingFiber$1 ||\n (null !== alternate && alternate === currentlyRenderingFiber$1)\n );\n}\nfunction enqueueRenderPhaseUpdate(queue, update) {\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =\n !0;\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n}\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (0 !== (lane & 4194176)) {\n var queueLanes = queue.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n queue.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n use: use,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError\n },\n HooksDispatcherOnMount = {\n readContext: readContext,\n use: use,\n useCallback: function (callback, deps) {\n mountWorkInProgressHook().memoizedState = [\n callback,\n void 0 === deps ? null : deps\n ];\n return callback;\n },\n useContext: readContext,\n useEffect: mountEffect,\n useImperativeHandle: function (ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n mountEffectImpl(\n 4194308,\n 4,\n imperativeHandleEffect.bind(null, create, ref),\n deps\n );\n },\n useLayoutEffect: function (create, deps) {\n return mountEffectImpl(4194308, 4, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n mountEffectImpl(4, 2, create, deps);\n },\n useMemo: function (nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var nextValue = nextCreate();\n shouldDoubleInvokeUserFnsInHooksDEV && nextCreate();\n hook.memoizedState = [nextValue, deps];\n return nextValue;\n },\n useReducer: function (reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n if (void 0 !== init) {\n var initialState = init(initialArg);\n shouldDoubleInvokeUserFnsInHooksDEV && init(initialArg);\n } else initialState = initialArg;\n hook.memoizedState = hook.baseState = initialState;\n reducer = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = reducer;\n reducer = reducer.dispatch = dispatchReducerAction.bind(\n null,\n currentlyRenderingFiber$1,\n reducer\n );\n return [hook.memoizedState, reducer];\n },\n useRef: function (initialValue) {\n var hook = mountWorkInProgressHook();\n initialValue = { current: initialValue };\n return (hook.memoizedState = initialValue);\n },\n useState: function (initialState) {\n initialState = mountStateImpl(initialState);\n var queue = initialState.queue,\n dispatch = dispatchSetState.bind(\n null,\n currentlyRenderingFiber$1,\n queue\n );\n queue.dispatch = dispatch;\n return [initialState.memoizedState, dispatch];\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = mountWorkInProgressHook();\n return mountDeferredValueImpl(hook, value, initialValue);\n },\n useTransition: function () {\n var stateHook = mountStateImpl(!1);\n stateHook = startTransition.bind(\n null,\n currentlyRenderingFiber$1,\n stateHook.queue,\n !0,\n !1\n );\n mountWorkInProgressHook().memoizedState = stateHook;\n return [!1, stateHook];\n },\n useSyncExternalStore: function (subscribe, getSnapshot) {\n var fiber = currentlyRenderingFiber$1,\n hook = mountWorkInProgressHook();\n var nextSnapshot = getSnapshot();\n if (null === workInProgressRoot)\n throw Error(\n \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\"\n );\n 0 !== (workInProgressRootRenderLanes & 60) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n hook.memoizedState = nextSnapshot;\n var inst = { value: nextSnapshot, getSnapshot: getSnapshot };\n hook.queue = inst;\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [\n subscribe\n ]);\n fiber.flags |= 2048;\n pushEffect(\n 9,\n updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot),\n { destroy: void 0 },\n null\n );\n return nextSnapshot;\n },\n useId: function () {\n var hook = mountWorkInProgressHook(),\n identifierPrefix = workInProgressRoot.identifierPrefix,\n globalClientId = globalClientIdCounter++;\n identifierPrefix =\n \":\" + identifierPrefix + \"r\" + globalClientId.toString(32) + \":\";\n return (hook.memoizedState = identifierPrefix);\n }\n },\n HooksDispatcherOnUpdate = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: updateReducer,\n useRef: updateRef,\n useState: function () {\n return updateReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = updateReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId\n },\n HooksDispatcherOnRerender = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: rerenderReducer,\n useRef: updateRef,\n useState: function () {\n return rerenderReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return null === currentHook\n ? mountDeferredValueImpl(hook, value, initialValue)\n : updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = rerenderReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId\n };\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n baseProps = assign({}, baseProps);\n Component = Component.defaultProps;\n for (var propName in Component)\n void 0 === baseProps[propName] &&\n (baseProps[propName] = Component[propName]);\n return baseProps;\n }\n return baseProps;\n}\nfunction applyDerivedStateFromProps(\n workInProgress,\n ctor,\n getDerivedStateFromProps,\n nextProps\n) {\n ctor = workInProgress.memoizedState;\n getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);\n getDerivedStateFromProps =\n null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps\n ? ctor\n : assign({}, ctor, getDerivedStateFromProps);\n workInProgress.memoizedState = getDerivedStateFromProps;\n 0 === workInProgress.lanes &&\n (workInProgress.updateQueue.baseState = getDerivedStateFromProps);\n}\nvar classComponentUpdater = {\n isMounted: function (component) {\n return (component = component._reactInternals)\n ? getNearestMountedFiber(component) === component\n : !1;\n },\n enqueueSetState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(inst),\n update = createUpdate(lane);\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueReplaceState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(inst),\n update = createUpdate(lane);\n update.tag = 1;\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueForceUpdate: function (inst, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(inst),\n update = createUpdate(lane);\n update.tag = 2;\n void 0 !== callback && null !== callback && (update.callback = callback);\n callback = enqueueUpdate(inst, update, lane);\n null !== callback &&\n (scheduleUpdateOnFiber(callback, inst, lane),\n entangleTransitions(callback, inst, lane));\n }\n};\nfunction checkShouldComponentUpdate(\n workInProgress,\n ctor,\n oldProps,\n newProps,\n oldState,\n newState,\n nextContext\n) {\n workInProgress = workInProgress.stateNode;\n return \"function\" === typeof workInProgress.shouldComponentUpdate\n ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)\n : ctor.prototype && ctor.prototype.isPureReactComponent\n ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)\n : !0;\n}\nfunction constructClassInstance(workInProgress, ctor, props) {\n var context = emptyContextObject,\n contextType = ctor.contextType;\n \"object\" === typeof contextType &&\n null !== contextType &&\n (context = readContext(contextType));\n ctor = new ctor(props, context);\n workInProgress.memoizedState =\n null !== ctor.state && void 0 !== ctor.state ? ctor.state : null;\n ctor.updater = classComponentUpdater;\n workInProgress.stateNode = ctor;\n ctor._reactInternals = workInProgress;\n return ctor;\n}\nfunction callComponentWillReceiveProps(\n workInProgress,\n instance,\n newProps,\n nextContext\n) {\n workInProgress = instance.state;\n \"function\" === typeof instance.componentWillReceiveProps &&\n instance.componentWillReceiveProps(newProps, nextContext);\n \"function\" === typeof instance.UNSAFE_componentWillReceiveProps &&\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n instance.state !== workInProgress &&\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n}\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = {};\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n instance.context =\n \"object\" === typeof contextType && null !== contextType\n ? readContext(contextType)\n : emptyContextObject;\n instance.state = workInProgress.memoizedState;\n contextType = ctor.getDerivedStateFromProps;\n \"function\" === typeof contextType &&\n (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps),\n (instance.state = workInProgress.memoizedState));\n \"function\" === typeof ctor.getDerivedStateFromProps ||\n \"function\" === typeof instance.getSnapshotBeforeUpdate ||\n (\"function\" !== typeof instance.UNSAFE_componentWillMount &&\n \"function\" !== typeof instance.componentWillMount) ||\n ((ctor = instance.state),\n \"function\" === typeof instance.componentWillMount &&\n instance.componentWillMount(),\n \"function\" === typeof instance.UNSAFE_componentWillMount &&\n instance.UNSAFE_componentWillMount(),\n ctor !== instance.state &&\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null),\n processUpdateQueue(workInProgress, newProps, instance, renderLanes),\n (instance.state = workInProgress.memoizedState));\n \"function\" === typeof instance.componentDidMount &&\n (workInProgress.flags |= 4194308);\n}\nvar CapturedStacks = new WeakMap();\nfunction createCapturedValueAtFiber(value, source) {\n if (\"object\" === typeof value && null !== value) {\n var stack = CapturedStacks.get(value);\n \"string\" !== typeof stack &&\n ((stack = getStackByFiberInDevAndProd(source)),\n CapturedStacks.set(value, stack));\n } else stack = getStackByFiberInDevAndProd(source);\n return { value: value, source: source, stack: stack, digest: null };\n}\nfunction createCapturedValueFromError(value, digest, stack) {\n \"string\" === typeof stack && CapturedStacks.set(value, stack);\n return {\n value: value,\n source: null,\n stack: null != stack ? stack : null,\n digest: null != digest ? digest : null\n };\n}\nif (\n \"function\" !==\n typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog\n)\n throw Error(\n \"Expected ReactFiberErrorDialog.showErrorDialog to be a function.\"\n );\nfunction logCapturedError(boundary, errorInfo) {\n try {\n !1 !==\n ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog({\n componentStack: null !== errorInfo.stack ? errorInfo.stack : \"\",\n error: errorInfo.value,\n errorBoundary:\n null !== boundary && 1 === boundary.tag ? boundary.stateNode : null\n }) && console.error(errorInfo.value);\n } catch (e) {\n setTimeout(function () {\n throw e;\n });\n }\n}\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n lane.payload = { element: null };\n var error = errorInfo.value;\n lane.callback = function () {\n hasUncaughtError || ((hasUncaughtError = !0), (firstUncaughtError = error));\n logCapturedError(fiber, errorInfo);\n };\n return lane;\n}\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n if (\"function\" === typeof getDerivedStateFromError) {\n var error = errorInfo.value;\n lane.payload = function () {\n return getDerivedStateFromError(error);\n };\n lane.callback = function () {\n logCapturedError(fiber, errorInfo);\n };\n }\n var inst = fiber.stateNode;\n null !== inst &&\n \"function\" === typeof inst.componentDidCatch &&\n (lane.callback = function () {\n logCapturedError(fiber, errorInfo);\n \"function\" !== typeof getDerivedStateFromError &&\n (null === legacyErrorBoundariesThatAlreadyFailed\n ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))\n : legacyErrorBoundariesThatAlreadyFailed.add(this));\n var stack = errorInfo.stack;\n this.componentDidCatch(errorInfo.value, {\n componentStack: null !== stack ? stack : \"\"\n });\n });\n return lane;\n}\nfunction throwException(\n root,\n returnFiber,\n sourceFiber,\n value,\n rootRenderLanes\n) {\n sourceFiber.flags |= 32768;\n if (\n null !== value &&\n \"object\" === typeof value &&\n \"function\" === typeof value.then\n ) {\n var tag = sourceFiber.tag;\n 0 !== (sourceFiber.mode & 1) ||\n (0 !== tag && 11 !== tag && 15 !== tag) ||\n ((tag = sourceFiber.alternate)\n ? ((sourceFiber.updateQueue = tag.updateQueue),\n (sourceFiber.memoizedState = tag.memoizedState),\n (sourceFiber.lanes = tag.lanes))\n : ((sourceFiber.updateQueue = null),\n (sourceFiber.memoizedState = null)));\n tag = suspenseHandlerStackCursor.current;\n if (null !== tag) {\n switch (tag.tag) {\n case 13:\n return (\n sourceFiber.mode & 1 &&\n (null === shellBoundary\n ? renderDidSuspendDelayIfPossible()\n : null === tag.alternate &&\n 0 === workInProgressRootExitStatus &&\n (workInProgressRootExitStatus = 3)),\n (tag.flags &= -257),\n 0 === (tag.mode & 1)\n ? tag === returnFiber\n ? (tag.flags |= 65536)\n : ((tag.flags |= 128),\n (sourceFiber.flags |= 131072),\n (sourceFiber.flags &= -52805),\n 1 === sourceFiber.tag &&\n (null === sourceFiber.alternate\n ? (sourceFiber.tag = 17)\n : ((returnFiber = createUpdate(2)),\n (returnFiber.tag = 2),\n enqueueUpdate(sourceFiber, returnFiber, 2))),\n (sourceFiber.lanes |= 2))\n : ((tag.flags |= 65536), (tag.lanes = rootRenderLanes)),\n value === noopSuspenseyCommitThenable\n ? (tag.flags |= 16384)\n : ((returnFiber = tag.updateQueue),\n null === returnFiber\n ? (tag.updateQueue = new Set([value]))\n : returnFiber.add(value),\n tag.mode & 1 &&\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n case 22:\n if (tag.mode & 1)\n return (\n (tag.flags |= 65536),\n value === noopSuspenseyCommitThenable\n ? (tag.flags |= 16384)\n : ((returnFiber = tag.updateQueue),\n null === returnFiber\n ? ((returnFiber = {\n transitions: null,\n markerInstances: null,\n retryQueue: new Set([value])\n }),\n (tag.updateQueue = returnFiber))\n : ((sourceFiber = returnFiber.retryQueue),\n null === sourceFiber\n ? (returnFiber.retryQueue = new Set([value]))\n : sourceFiber.add(value)),\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n }\n throw Error(\n \"Unexpected Suspense handler tag (\" +\n tag.tag +\n \"). This is a bug in React.\"\n );\n }\n if (1 === root.tag)\n return (\n attachPingListener(root, value, rootRenderLanes),\n renderDidSuspendDelayIfPossible(),\n !1\n );\n value = Error(\n \"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.\"\n );\n }\n root = value = createCapturedValueAtFiber(value, sourceFiber);\n 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);\n null === workInProgressRootConcurrentErrors\n ? (workInProgressRootConcurrentErrors = [root])\n : workInProgressRootConcurrentErrors.push(root);\n if (null === returnFiber) return !0;\n root = returnFiber;\n do {\n switch (root.tag) {\n case 3:\n return (\n (root.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (root.lanes |= rootRenderLanes),\n (rootRenderLanes = createRootErrorUpdate(\n root,\n value,\n rootRenderLanes\n )),\n enqueueCapturedUpdate(root, rootRenderLanes),\n !1\n );\n case 1:\n if (\n ((returnFiber = value),\n (sourceFiber = root.type),\n (tag = root.stateNode),\n 0 === (root.flags & 128) &&\n (\"function\" === typeof sourceFiber.getDerivedStateFromError ||\n (null !== tag &&\n \"function\" === typeof tag.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(tag)))))\n )\n return (\n (root.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (root.lanes |= rootRenderLanes),\n (rootRenderLanes = createClassErrorUpdate(\n root,\n returnFiber,\n rootRenderLanes\n )),\n enqueueCapturedUpdate(root, rootRenderLanes),\n !1\n );\n }\n root = root.return;\n } while (null !== root);\n return !1;\n}\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,\n SelectiveHydrationException = Error(\n \"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue.\"\n ),\n didReceiveUpdate = !1;\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n workInProgress.child =\n null === current\n ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)\n : reconcileChildFibers(\n workInProgress,\n current.child,\n nextChildren,\n renderLanes\n );\n}\nfunction updateForwardRef(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n Component = Component.render;\n var ref = workInProgress.ref;\n prepareToReadContext(workInProgress, renderLanes);\n nextProps = renderWithHooks(\n current,\n workInProgress,\n Component,\n nextProps,\n ref,\n renderLanes\n );\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null === current) {\n var type = Component.type;\n if (\n \"function\" === typeof type &&\n !shouldConstruct(type) &&\n void 0 === type.defaultProps &&\n null === Component.compare &&\n void 0 === Component.defaultProps\n )\n return (\n (workInProgress.tag = 15),\n (workInProgress.type = type),\n updateSimpleMemoComponent(\n current,\n workInProgress,\n type,\n nextProps,\n renderLanes\n )\n );\n current = createFiberFromTypeAndProps(\n Component.type,\n null,\n nextProps,\n workInProgress,\n workInProgress.mode,\n renderLanes\n );\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n }\n type = current.child;\n if (0 === (current.lanes & renderLanes)) {\n var prevProps = type.memoizedProps;\n Component = Component.compare;\n Component = null !== Component ? Component : shallowEqual;\n if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n workInProgress.flags |= 1;\n current = createWorkInProgress(type, nextProps);\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n}\nfunction updateSimpleMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null !== current) {\n var prevProps = current.memoizedProps;\n if (\n shallowEqual(prevProps, nextProps) &&\n current.ref === workInProgress.ref\n )\n if (\n ((didReceiveUpdate = !1),\n (workInProgress.pendingProps = nextProps = prevProps),\n 0 !== (current.lanes & renderLanes))\n )\n 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);\n else\n return (\n (workInProgress.lanes = current.lanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n }\n return updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n );\n}\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n nextChildren = nextProps.children,\n nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),\n prevState = null !== current ? current.memoizedState : null;\n markRef(current, workInProgress);\n if (\"hidden\" === nextProps.mode || nextIsDetached) {\n if (0 !== (workInProgress.flags & 128)) {\n renderLanes =\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;\n if (null !== current) {\n nextProps = workInProgress.child = current.child;\n for (nextChildren = 0; null !== nextProps; )\n (nextChildren =\n nextChildren | nextProps.lanes | nextProps.childLanes),\n (nextProps = nextProps.sibling);\n workInProgress.childLanes = nextChildren & ~renderLanes;\n } else (workInProgress.childLanes = 0), (workInProgress.child = null);\n return deferHiddenOffscreenComponent(\n current,\n workInProgress,\n renderLanes\n );\n }\n if (0 === (workInProgress.mode & 1))\n (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),\n reuseHiddenContextOnStack();\n else {\n if (0 === (renderLanes & 536870912))\n return (\n (workInProgress.lanes = workInProgress.childLanes = 536870912),\n deferHiddenOffscreenComponent(\n current,\n workInProgress,\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes\n )\n );\n workInProgress.memoizedState = { baseLanes: 0, cachePool: null };\n null !== prevState\n ? pushHiddenContext(workInProgress, prevState)\n : reuseHiddenContextOnStack();\n }\n pushOffscreenSuspenseHandler(workInProgress);\n } else\n null !== prevState\n ? (pushHiddenContext(workInProgress, prevState),\n reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.memoizedState = null))\n : (reuseHiddenContextOnStack(),\n reuseSuspenseHandlerOnStack(workInProgress));\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\nfunction deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes) {\n workInProgress.memoizedState = { baseLanes: nextBaseLanes, cachePool: null };\n reuseHiddenContextOnStack();\n pushOffscreenSuspenseHandler(workInProgress);\n return null;\n}\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n if (null === ref)\n null !== current &&\n null !== current.ref &&\n (workInProgress.flags |= 2097664);\n else {\n if (\"function\" !== typeof ref && \"object\" !== typeof ref)\n throw Error(\n \"Expected ref to be a function, an object returned by React.createRef(), or undefined/null.\"\n );\n if (null === current || current.ref !== ref)\n workInProgress.flags |= 2097664;\n }\n}\nfunction updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress, renderLanes);\n Component = renderWithHooks(\n current,\n workInProgress,\n Component,\n nextProps,\n void 0,\n renderLanes\n );\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, Component, renderLanes);\n return workInProgress.child;\n}\nfunction replayFunctionComponent(\n current,\n workInProgress,\n nextProps,\n Component,\n secondArg,\n renderLanes\n) {\n prepareToReadContext(workInProgress, renderLanes);\n nextProps = renderWithHooksAgain(\n workInProgress,\n Component,\n nextProps,\n secondArg\n );\n finishRenderingHooks();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateClassComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress, renderLanes);\n if (null === workInProgress.stateNode)\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),\n constructClassInstance(workInProgress, Component, nextProps),\n mountClassInstance(workInProgress, Component, nextProps, renderLanes),\n (nextProps = !0);\n else if (null === current) {\n var instance = workInProgress.stateNode,\n oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context,\n contextType = Component.contextType,\n nextContext = emptyContextObject;\n \"object\" === typeof contextType &&\n null !== contextType &&\n (nextContext = readContext(contextType));\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n (contextType =\n \"function\" === typeof getDerivedStateFromProps ||\n \"function\" === typeof instance.getSnapshotBeforeUpdate) ||\n (\"function\" !== typeof instance.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof instance.componentWillReceiveProps) ||\n ((oldProps !== nextProps || oldContext !== nextContext) &&\n callComponentWillReceiveProps(\n workInProgress,\n instance,\n nextProps,\n nextContext\n ));\n hasForceUpdate = !1;\n var oldState = workInProgress.memoizedState;\n instance.state = oldState;\n processUpdateQueue(workInProgress, nextProps, instance, renderLanes);\n oldContext = workInProgress.memoizedState;\n oldProps !== nextProps || oldState !== oldContext || hasForceUpdate\n ? (\"function\" === typeof getDerivedStateFromProps &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n getDerivedStateFromProps,\n nextProps\n ),\n (oldContext = workInProgress.memoizedState)),\n (oldProps =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n oldProps,\n nextProps,\n oldState,\n oldContext,\n nextContext\n ))\n ? (contextType ||\n (\"function\" !== typeof instance.UNSAFE_componentWillMount &&\n \"function\" !== typeof instance.componentWillMount) ||\n (\"function\" === typeof instance.componentWillMount &&\n instance.componentWillMount(),\n \"function\" === typeof instance.UNSAFE_componentWillMount &&\n instance.UNSAFE_componentWillMount()),\n \"function\" === typeof instance.componentDidMount &&\n (workInProgress.flags |= 4194308))\n : (\"function\" === typeof instance.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = oldContext)),\n (instance.props = nextProps),\n (instance.state = oldContext),\n (instance.context = nextContext),\n (nextProps = oldProps))\n : (\"function\" === typeof instance.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (nextProps = !1));\n } else {\n instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n nextContext = workInProgress.memoizedProps;\n contextType =\n workInProgress.type === workInProgress.elementType\n ? nextContext\n : resolveDefaultProps(workInProgress.type, nextContext);\n instance.props = contextType;\n getDerivedStateFromProps = workInProgress.pendingProps;\n var oldContext$jscomp$0 = instance.context;\n oldContext = Component.contextType;\n oldProps = emptyContextObject;\n \"object\" === typeof oldContext &&\n null !== oldContext &&\n (oldProps = readContext(oldContext));\n oldState = Component.getDerivedStateFromProps;\n (oldContext =\n \"function\" === typeof oldState ||\n \"function\" === typeof instance.getSnapshotBeforeUpdate) ||\n (\"function\" !== typeof instance.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof instance.componentWillReceiveProps) ||\n ((nextContext !== getDerivedStateFromProps ||\n oldContext$jscomp$0 !== oldProps) &&\n callComponentWillReceiveProps(\n workInProgress,\n instance,\n nextProps,\n oldProps\n ));\n hasForceUpdate = !1;\n oldContext$jscomp$0 = workInProgress.memoizedState;\n instance.state = oldContext$jscomp$0;\n processUpdateQueue(workInProgress, nextProps, instance, renderLanes);\n var newState = workInProgress.memoizedState;\n nextContext !== getDerivedStateFromProps ||\n oldContext$jscomp$0 !== newState ||\n hasForceUpdate\n ? (\"function\" === typeof oldState &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n oldState,\n nextProps\n ),\n (newState = workInProgress.memoizedState)),\n (contextType =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n contextType,\n nextProps,\n oldContext$jscomp$0,\n newState,\n oldProps\n ) ||\n !1)\n ? (oldContext ||\n (\"function\" !== typeof instance.UNSAFE_componentWillUpdate &&\n \"function\" !== typeof instance.componentWillUpdate) ||\n (\"function\" === typeof instance.componentWillUpdate &&\n instance.componentWillUpdate(nextProps, newState, oldProps),\n \"function\" === typeof instance.UNSAFE_componentWillUpdate &&\n instance.UNSAFE_componentWillUpdate(\n nextProps,\n newState,\n oldProps\n )),\n \"function\" === typeof instance.componentDidUpdate &&\n (workInProgress.flags |= 4),\n \"function\" === typeof instance.getSnapshotBeforeUpdate &&\n (workInProgress.flags |= 1024))\n : (\"function\" !== typeof instance.componentDidUpdate ||\n (nextContext === current.memoizedProps &&\n oldContext$jscomp$0 === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof instance.getSnapshotBeforeUpdate ||\n (nextContext === current.memoizedProps &&\n oldContext$jscomp$0 === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = newState)),\n (instance.props = nextProps),\n (instance.state = newState),\n (instance.context = oldProps),\n (nextProps = contextType))\n : (\"function\" !== typeof instance.componentDidUpdate ||\n (nextContext === current.memoizedProps &&\n oldContext$jscomp$0 === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof instance.getSnapshotBeforeUpdate ||\n (nextContext === current.memoizedProps &&\n oldContext$jscomp$0 === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (nextProps = !1));\n }\n return finishClassComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n !1,\n renderLanes\n );\n}\nfunction finishClassComponent(\n current,\n workInProgress,\n Component,\n shouldUpdate,\n hasContext,\n renderLanes\n) {\n markRef(current, workInProgress);\n hasContext = 0 !== (workInProgress.flags & 128);\n if (!shouldUpdate && !hasContext)\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n shouldUpdate = workInProgress.stateNode;\n ReactCurrentOwner$1.current = workInProgress;\n Component =\n hasContext && \"function\" !== typeof Component.getDerivedStateFromError\n ? null\n : shouldUpdate.render();\n workInProgress.flags |= 1;\n null !== current && hasContext\n ? ((workInProgress.child = reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n )),\n (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n Component,\n renderLanes\n )))\n : reconcileChildren(current, workInProgress, Component, renderLanes);\n workInProgress.memoizedState = shouldUpdate.state;\n return workInProgress.child;\n}\nvar SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 };\nfunction mountSuspenseOffscreenState(renderLanes) {\n return { baseLanes: renderLanes, cachePool: null };\n}\nfunction getRemainingWorkInPrimaryTree(\n current,\n primaryTreeDidDefer,\n renderLanes\n) {\n current = null !== current ? current.childLanes & ~renderLanes : 0;\n primaryTreeDidDefer && (current |= workInProgressDeferredLane);\n return current;\n}\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n showFallback = !1,\n didSuspend = 0 !== (workInProgress.flags & 128),\n JSCompiler_temp;\n (JSCompiler_temp = didSuspend) ||\n (JSCompiler_temp =\n null !== current && null === current.memoizedState\n ? !1\n : 0 !== (suspenseStackCursor.current & 2));\n JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));\n JSCompiler_temp = 0 !== (workInProgress.flags & 32);\n workInProgress.flags &= -33;\n if (null === current) {\n didSuspend = nextProps.children;\n nextProps = nextProps.fallback;\n if (showFallback) {\n reuseSuspenseHandlerOnStack(workInProgress);\n showFallback = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n didSuspend = { mode: \"hidden\", children: didSuspend };\n 0 === (showFallback & 1) && null !== progressedPrimaryFragment\n ? ((progressedPrimaryFragment.childLanes = 0),\n (progressedPrimaryFragment.pendingProps = didSuspend))\n : (progressedPrimaryFragment = createFiberFromOffscreen(\n didSuspend,\n showFallback,\n 0,\n null\n ));\n nextProps = createFiberFromFragment(\n nextProps,\n showFallback,\n renderLanes,\n null\n );\n progressedPrimaryFragment.return = workInProgress;\n nextProps.return = workInProgress;\n progressedPrimaryFragment.sibling = nextProps;\n workInProgress.child = progressedPrimaryFragment;\n showFallback = workInProgress.child;\n showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes);\n showFallback.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n );\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return nextProps;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n return mountSuspensePrimaryChildren(workInProgress, didSuspend);\n }\n progressedPrimaryFragment = current.memoizedState;\n if (null !== progressedPrimaryFragment) {\n var dehydrated = progressedPrimaryFragment.dehydrated;\n if (null !== dehydrated)\n return updateDehydratedSuspenseComponent(\n current,\n workInProgress,\n didSuspend,\n JSCompiler_temp,\n nextProps,\n dehydrated,\n progressedPrimaryFragment,\n renderLanes\n );\n }\n if (showFallback) {\n reuseSuspenseHandlerOnStack(workInProgress);\n showFallback = nextProps.fallback;\n didSuspend = workInProgress.mode;\n progressedPrimaryFragment = current.child;\n dehydrated = progressedPrimaryFragment.sibling;\n var primaryChildProps = { mode: \"hidden\", children: nextProps.children };\n 0 === (didSuspend & 1) && workInProgress.child !== progressedPrimaryFragment\n ? ((nextProps = workInProgress.child),\n (nextProps.childLanes = 0),\n (nextProps.pendingProps = primaryChildProps),\n (workInProgress.deletions = null))\n : ((nextProps = createWorkInProgress(\n progressedPrimaryFragment,\n primaryChildProps\n )),\n (nextProps.subtreeFlags =\n progressedPrimaryFragment.subtreeFlags & 31457280));\n null !== dehydrated\n ? (showFallback = createWorkInProgress(dehydrated, showFallback))\n : ((showFallback = createFiberFromFragment(\n showFallback,\n didSuspend,\n renderLanes,\n null\n )),\n (showFallback.flags |= 2));\n showFallback.return = workInProgress;\n nextProps.return = workInProgress;\n nextProps.sibling = showFallback;\n workInProgress.child = nextProps;\n nextProps = showFallback;\n showFallback = workInProgress.child;\n didSuspend = current.child.memoizedState;\n didSuspend =\n null === didSuspend\n ? mountSuspenseOffscreenState(renderLanes)\n : { baseLanes: didSuspend.baseLanes | renderLanes, cachePool: null };\n showFallback.memoizedState = didSuspend;\n showFallback.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n );\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return nextProps;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n JSCompiler_temp = current.child;\n current = JSCompiler_temp.sibling;\n JSCompiler_temp = createWorkInProgress(JSCompiler_temp, {\n mode: \"visible\",\n children: nextProps.children\n });\n 0 === (workInProgress.mode & 1) && (JSCompiler_temp.lanes = renderLanes);\n JSCompiler_temp.return = workInProgress;\n JSCompiler_temp.sibling = null;\n null !== current &&\n ((renderLanes = workInProgress.deletions),\n null === renderLanes\n ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))\n : renderLanes.push(current));\n workInProgress.child = JSCompiler_temp;\n workInProgress.memoizedState = null;\n return JSCompiler_temp;\n}\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren) {\n primaryChildren = createFiberFromOffscreen(\n { mode: \"visible\", children: primaryChildren },\n workInProgress.mode,\n 0,\n null\n );\n primaryChildren.return = workInProgress;\n return (workInProgress.child = primaryChildren);\n}\nfunction retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n recoverableError\n) {\n null !== recoverableError &&\n (null === hydrationErrors\n ? (hydrationErrors = [recoverableError])\n : hydrationErrors.push(recoverableError));\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n current = mountSuspensePrimaryChildren(\n workInProgress,\n workInProgress.pendingProps.children\n );\n current.flags |= 2;\n workInProgress.memoizedState = null;\n return current;\n}\nfunction updateDehydratedSuspenseComponent(\n current,\n workInProgress,\n didSuspend,\n didPrimaryChildrenDefer,\n nextProps,\n suspenseInstance,\n suspenseState,\n renderLanes\n) {\n if (didSuspend) {\n if (workInProgress.flags & 256)\n return (\n pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags &= -257),\n (didPrimaryChildrenDefer = createCapturedValueFromError(\n Error(\n \"There was an error while hydrating this Suspense boundary. Switched to client rendering.\"\n )\n )),\n retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n didPrimaryChildrenDefer\n )\n );\n if (null !== workInProgress.memoizedState)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n null\n );\n reuseSuspenseHandlerOnStack(workInProgress);\n suspenseState = nextProps.fallback;\n didSuspend = workInProgress.mode;\n nextProps = createFiberFromOffscreen(\n { mode: \"visible\", children: nextProps.children },\n didSuspend,\n 0,\n null\n );\n suspenseState = createFiberFromFragment(\n suspenseState,\n didSuspend,\n renderLanes,\n null\n );\n suspenseState.flags |= 2;\n nextProps.return = workInProgress;\n suspenseState.return = workInProgress;\n nextProps.sibling = suspenseState;\n workInProgress.child = nextProps;\n 0 !== (workInProgress.mode & 1) &&\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n nextProps = workInProgress.child;\n nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes);\n nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n didPrimaryChildrenDefer,\n renderLanes\n );\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return suspenseState;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n if (0 === (workInProgress.mode & 1))\n return retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n null\n );\n if (shim$1())\n return (\n (didPrimaryChildrenDefer = shim$1().digest),\n (suspenseState = Error(\n \"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.\"\n )),\n (suspenseState.digest = didPrimaryChildrenDefer),\n (didPrimaryChildrenDefer = createCapturedValueFromError(\n suspenseState,\n didPrimaryChildrenDefer,\n void 0\n )),\n retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n didPrimaryChildrenDefer\n )\n );\n didPrimaryChildrenDefer = 0 !== (renderLanes & current.childLanes);\n if (didReceiveUpdate || didPrimaryChildrenDefer) {\n didPrimaryChildrenDefer = workInProgressRoot;\n if (null !== didPrimaryChildrenDefer) {\n nextProps = renderLanes & -renderLanes;\n if (0 !== (nextProps & 42)) nextProps = 1;\n else\n switch (nextProps) {\n case 2:\n nextProps = 1;\n break;\n case 8:\n nextProps = 4;\n break;\n case 32:\n nextProps = 16;\n break;\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n nextProps = 64;\n break;\n case 268435456:\n nextProps = 134217728;\n break;\n default:\n nextProps = 0;\n }\n nextProps =\n 0 !==\n (nextProps & (didPrimaryChildrenDefer.suspendedLanes | renderLanes))\n ? 0\n : nextProps;\n if (0 !== nextProps && nextProps !== suspenseState.retryLane)\n throw (\n ((suspenseState.retryLane = nextProps),\n enqueueConcurrentRenderForLane(current, nextProps),\n scheduleUpdateOnFiber(didPrimaryChildrenDefer, current, nextProps),\n SelectiveHydrationException)\n );\n }\n shim$1() || renderDidSuspendDelayIfPossible();\n return retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes,\n null\n );\n }\n if (shim$1())\n return (\n (workInProgress.flags |= 128),\n (workInProgress.child = current.child),\n retryDehydratedSuspenseBoundary.bind(null, current),\n shim$1(),\n null\n );\n current = mountSuspensePrimaryChildren(workInProgress, nextProps.children);\n current.flags |= 4096;\n return current;\n}\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes |= renderLanes;\n var alternate = fiber.alternate;\n null !== alternate && (alternate.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\nfunction initSuspenseListRenderState(\n workInProgress,\n isBackwards,\n tail,\n lastContentRow,\n tailMode\n) {\n var renderState = workInProgress.memoizedState;\n null === renderState\n ? (workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode\n })\n : ((renderState.isBackwards = isBackwards),\n (renderState.rendering = null),\n (renderState.renderingStartTime = 0),\n (renderState.last = lastContentRow),\n (renderState.tail = tail),\n (renderState.tailMode = tailMode));\n}\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n revealOrder = nextProps.revealOrder,\n tailMode = nextProps.tail;\n reconcileChildren(current, workInProgress, nextProps.children, renderLanes);\n nextProps = suspenseStackCursor.current;\n if (0 !== (nextProps & 2))\n (nextProps = (nextProps & 1) | 2), (workInProgress.flags |= 128);\n else {\n if (null !== current && 0 !== (current.flags & 128))\n a: for (current = workInProgress.child; null !== current; ) {\n if (13 === current.tag)\n null !== current.memoizedState &&\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (19 === current.tag)\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (null !== current.child) {\n current.child.return = current;\n current = current.child;\n continue;\n }\n if (current === workInProgress) break a;\n for (; null === current.sibling; ) {\n if (null === current.return || current.return === workInProgress)\n break a;\n current = current.return;\n }\n current.sibling.return = current.return;\n current = current.sibling;\n }\n nextProps &= 1;\n }\n push(suspenseStackCursor, nextProps);\n if (0 === (workInProgress.mode & 1)) workInProgress.memoizedState = null;\n else\n switch (revealOrder) {\n case \"forwards\":\n renderLanes = workInProgress.child;\n for (revealOrder = null; null !== renderLanes; )\n (current = renderLanes.alternate),\n null !== current &&\n null === findFirstSuspended(current) &&\n (revealOrder = renderLanes),\n (renderLanes = renderLanes.sibling);\n renderLanes = revealOrder;\n null === renderLanes\n ? ((revealOrder = workInProgress.child),\n (workInProgress.child = null))\n : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));\n initSuspenseListRenderState(\n workInProgress,\n !1,\n revealOrder,\n renderLanes,\n tailMode\n );\n break;\n case \"backwards\":\n renderLanes = null;\n revealOrder = workInProgress.child;\n for (workInProgress.child = null; null !== revealOrder; ) {\n current = revealOrder.alternate;\n if (null !== current && null === findFirstSuspended(current)) {\n workInProgress.child = revealOrder;\n break;\n }\n current = revealOrder.sibling;\n revealOrder.sibling = renderLanes;\n renderLanes = revealOrder;\n revealOrder = current;\n }\n initSuspenseListRenderState(\n workInProgress,\n !0,\n renderLanes,\n null,\n tailMode\n );\n break;\n case \"together\":\n initSuspenseListRenderState(workInProgress, !1, null, null, void 0);\n break;\n default:\n workInProgress.memoizedState = null;\n }\n return workInProgress.child;\n}\nfunction resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {\n 0 === (workInProgress.mode & 1) &&\n null !== current &&\n ((current.alternate = null),\n (workInProgress.alternate = null),\n (workInProgress.flags |= 2));\n}\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n null !== current && (workInProgress.dependencies = current.dependencies);\n workInProgressRootSkippedLanes |= workInProgress.lanes;\n if (0 === (renderLanes & workInProgress.childLanes)) return null;\n if (null !== current && workInProgress.child !== current.child)\n throw Error(\"Resuming work not yet implemented.\");\n if (null !== workInProgress.child) {\n current = workInProgress.child;\n renderLanes = createWorkInProgress(current, current.pendingProps);\n workInProgress.child = renderLanes;\n for (renderLanes.return = workInProgress; null !== current.sibling; )\n (current = current.sibling),\n (renderLanes = renderLanes.sibling =\n createWorkInProgress(current, current.pendingProps)),\n (renderLanes.return = workInProgress);\n renderLanes.sibling = null;\n }\n return workInProgress.child;\n}\nfunction attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n) {\n switch (workInProgress.tag) {\n case 3:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n case 27:\n case 5:\n pushHostContext(workInProgress);\n break;\n case 4:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n case 10:\n var newValue = workInProgress.memoizedProps.value,\n context = workInProgress.type._context;\n push(valueCursor, context._currentValue);\n context._currentValue = newValue;\n break;\n case 13:\n newValue = workInProgress.memoizedState;\n if (null !== newValue) {\n if (null !== newValue.dehydrated)\n return (\n pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags |= 128),\n null\n );\n if (0 !== (renderLanes & workInProgress.child.childLanes))\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n pushPrimaryTreeSuspenseHandler(workInProgress);\n current = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n return null !== current ? current.sibling : null;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n break;\n case 19:\n newValue = 0 !== (renderLanes & workInProgress.childLanes);\n if (0 !== (current.flags & 128)) {\n if (newValue)\n return updateSuspenseListComponent(\n current,\n workInProgress,\n renderLanes\n );\n workInProgress.flags |= 128;\n }\n context = workInProgress.memoizedState;\n null !== context &&\n ((context.rendering = null),\n (context.tail = null),\n (context.lastEffect = null));\n push(suspenseStackCursor, suspenseStackCursor.current);\n if (newValue) break;\n else return null;\n case 22:\n case 23:\n return (\n (workInProgress.lanes = 0),\n updateOffscreenComponent(current, workInProgress, renderLanes)\n );\n }\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\nfunction beginWork(current, workInProgress, renderLanes) {\n if (null !== current)\n if (current.memoizedProps !== workInProgress.pendingProps)\n didReceiveUpdate = !0;\n else {\n if (\n 0 === (current.lanes & renderLanes) &&\n 0 === (workInProgress.flags & 128)\n )\n return (\n (didReceiveUpdate = !1),\n attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n )\n );\n didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;\n }\n else didReceiveUpdate = !1;\n workInProgress.lanes = 0;\n switch (workInProgress.tag) {\n case 2:\n var Component = workInProgress.type;\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);\n current = workInProgress.pendingProps;\n prepareToReadContext(workInProgress, renderLanes);\n var value = renderWithHooks(\n null,\n workInProgress,\n Component,\n current,\n void 0,\n renderLanes\n );\n workInProgress.flags |= 1;\n \"object\" === typeof value &&\n null !== value &&\n \"function\" === typeof value.render &&\n void 0 === value.$$typeof\n ? ((workInProgress.tag = 1),\n (workInProgress.memoizedState = null),\n (workInProgress.updateQueue = null),\n (workInProgress.memoizedState =\n null !== value.state && void 0 !== value.state\n ? value.state\n : null),\n initializeUpdateQueue(workInProgress),\n (value.updater = classComponentUpdater),\n (workInProgress.stateNode = value),\n (value._reactInternals = workInProgress),\n mountClassInstance(workInProgress, Component, current, renderLanes),\n (workInProgress = finishClassComponent(\n null,\n workInProgress,\n Component,\n !0,\n !1,\n renderLanes\n )))\n : ((workInProgress.tag = 0),\n reconcileChildren(null, workInProgress, value, renderLanes),\n (workInProgress = workInProgress.child));\n return workInProgress;\n case 16:\n Component = workInProgress.elementType;\n a: {\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);\n current = workInProgress.pendingProps;\n value = Component._init;\n Component = value(Component._payload);\n workInProgress.type = Component;\n value = workInProgress.tag = resolveLazyComponentTag(Component);\n current = resolveDefaultProps(Component, current);\n switch (value) {\n case 0:\n workInProgress = updateFunctionComponent(\n null,\n workInProgress,\n Component,\n current,\n renderLanes\n );\n break a;\n case 1:\n workInProgress = updateClassComponent(\n null,\n workInProgress,\n Component,\n current,\n renderLanes\n );\n break a;\n case 11:\n workInProgress = updateForwardRef(\n null,\n workInProgress,\n Component,\n current,\n renderLanes\n );\n break a;\n case 14:\n workInProgress = updateMemoComponent(\n null,\n workInProgress,\n Component,\n resolveDefaultProps(Component.type, current),\n renderLanes\n );\n break a;\n }\n throw Error(\n \"Element type is invalid. Received a promise that resolves to: \" +\n Component +\n \". Lazy element type must resolve to a class or function.\"\n );\n }\n return workInProgress;\n case 0:\n return (\n (Component = workInProgress.type),\n (value = workInProgress.pendingProps),\n (value =\n workInProgress.elementType === Component\n ? value\n : resolveDefaultProps(Component, value)),\n updateFunctionComponent(\n current,\n workInProgress,\n Component,\n value,\n renderLanes\n )\n );\n case 1:\n return (\n (Component = workInProgress.type),\n (value = workInProgress.pendingProps),\n (value =\n workInProgress.elementType === Component\n ? value\n : resolveDefaultProps(Component, value)),\n updateClassComponent(\n current,\n workInProgress,\n Component,\n value,\n renderLanes\n )\n );\n case 3:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n if (null === current)\n throw Error(\"Should have a current fiber. This is a bug in React.\");\n value = workInProgress.pendingProps;\n Component = workInProgress.memoizedState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, value, null, renderLanes);\n value = workInProgress.memoizedState.element;\n value === Component\n ? (workInProgress = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n ))\n : (reconcileChildren(current, workInProgress, value, renderLanes),\n (workInProgress = workInProgress.child));\n return workInProgress;\n case 26:\n case 27:\n case 5:\n return (\n pushHostContext(workInProgress),\n (Component = workInProgress.pendingProps.children),\n markRef(current, workInProgress),\n reconcileChildren(current, workInProgress, Component, renderLanes),\n workInProgress.child\n );\n case 6:\n return null;\n case 13:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n case 4:\n return (\n pushHostContainer(\n workInProgress,\n workInProgress.stateNode.containerInfo\n ),\n (Component = workInProgress.pendingProps),\n null === current\n ? (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n Component,\n renderLanes\n ))\n : reconcileChildren(current, workInProgress, Component, renderLanes),\n workInProgress.child\n );\n case 11:\n return (\n (Component = workInProgress.type),\n (value = workInProgress.pendingProps),\n (value =\n workInProgress.elementType === Component\n ? value\n : resolveDefaultProps(Component, value)),\n updateForwardRef(current, workInProgress, Component, value, renderLanes)\n );\n case 7:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps,\n renderLanes\n ),\n workInProgress.child\n );\n case 8:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 12:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 10:\n a: {\n Component = workInProgress.type._context;\n value = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps,\n newValue = value.value;\n push(valueCursor, Component._currentValue);\n Component._currentValue = newValue;\n if (null !== oldProps)\n if (objectIs(oldProps.value, newValue)) {\n if (oldProps.children === value.children) {\n workInProgress = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n break a;\n }\n } else\n for (\n oldProps = workInProgress.child,\n null !== oldProps && (oldProps.return = workInProgress);\n null !== oldProps;\n\n ) {\n var list = oldProps.dependencies;\n if (null !== list) {\n newValue = oldProps.child;\n for (\n var dependency = list.firstContext;\n null !== dependency;\n\n ) {\n if (dependency.context === Component) {\n if (1 === oldProps.tag) {\n dependency = createUpdate(renderLanes & -renderLanes);\n dependency.tag = 2;\n var updateQueue = oldProps.updateQueue;\n if (null !== updateQueue) {\n updateQueue = updateQueue.shared;\n var pending = updateQueue.pending;\n null === pending\n ? (dependency.next = dependency)\n : ((dependency.next = pending.next),\n (pending.next = dependency));\n updateQueue.pending = dependency;\n }\n }\n oldProps.lanes |= renderLanes;\n dependency = oldProps.alternate;\n null !== dependency && (dependency.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(\n oldProps.return,\n renderLanes,\n workInProgress\n );\n list.lanes |= renderLanes;\n break;\n }\n dependency = dependency.next;\n }\n } else if (10 === oldProps.tag)\n newValue =\n oldProps.type === workInProgress.type ? null : oldProps.child;\n else if (18 === oldProps.tag) {\n newValue = oldProps.return;\n if (null === newValue)\n throw Error(\n \"We just came from a parent so we must have had a parent. This is a bug in React.\"\n );\n newValue.lanes |= renderLanes;\n list = newValue.alternate;\n null !== list && (list.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(\n newValue,\n renderLanes,\n workInProgress\n );\n newValue = oldProps.sibling;\n } else newValue = oldProps.child;\n if (null !== newValue) newValue.return = oldProps;\n else\n for (newValue = oldProps; null !== newValue; ) {\n if (newValue === workInProgress) {\n newValue = null;\n break;\n }\n oldProps = newValue.sibling;\n if (null !== oldProps) {\n oldProps.return = newValue.return;\n newValue = oldProps;\n break;\n }\n newValue = newValue.return;\n }\n oldProps = newValue;\n }\n reconcileChildren(current, workInProgress, value.children, renderLanes);\n workInProgress = workInProgress.child;\n }\n return workInProgress;\n case 9:\n return (\n (value = workInProgress.type),\n (Component = workInProgress.pendingProps.children),\n prepareToReadContext(workInProgress, renderLanes),\n (value = readContext(value)),\n (Component = Component(value)),\n (workInProgress.flags |= 1),\n reconcileChildren(current, workInProgress, Component, renderLanes),\n workInProgress.child\n );\n case 14:\n return (\n (Component = workInProgress.type),\n (value = resolveDefaultProps(Component, workInProgress.pendingProps)),\n (value = resolveDefaultProps(Component.type, value)),\n updateMemoComponent(\n current,\n workInProgress,\n Component,\n value,\n renderLanes\n )\n );\n case 15:\n return updateSimpleMemoComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 17:\n return (\n (Component = workInProgress.type),\n (value = workInProgress.pendingProps),\n (value =\n workInProgress.elementType === Component\n ? value\n : resolveDefaultProps(Component, value)),\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),\n (workInProgress.tag = 1),\n prepareToReadContext(workInProgress, renderLanes),\n constructClassInstance(workInProgress, Component, value),\n mountClassInstance(workInProgress, Component, value, renderLanes),\n finishClassComponent(\n null,\n workInProgress,\n Component,\n !0,\n !1,\n renderLanes\n )\n );\n case 19:\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n case 22:\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n throw Error(\n \"Unknown unit of work tag (\" +\n workInProgress.tag +\n \"). This error is likely caused by a bug in React. Please file an issue.\"\n );\n}\nvar valueCursor = createCursor(null),\n currentlyRenderingFiber = null,\n lastContextDependency = null,\n lastFullyObservedContext = null;\nfunction resetContextDependencies() {\n lastFullyObservedContext =\n lastContextDependency =\n currentlyRenderingFiber =\n null;\n}\nfunction popProvider(context) {\n context._currentValue = valueCursor.current;\n pop(valueCursor);\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n for (; null !== parent; ) {\n var alternate = parent.alternate;\n (parent.childLanes & renderLanes) !== renderLanes\n ? ((parent.childLanes |= renderLanes),\n null !== alternate && (alternate.childLanes |= renderLanes))\n : null !== alternate &&\n (alternate.childLanes & renderLanes) !== renderLanes &&\n (alternate.childLanes |= renderLanes);\n if (parent === propagationRoot) break;\n parent = parent.return;\n }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastFullyObservedContext = lastContextDependency = null;\n workInProgress = workInProgress.dependencies;\n null !== workInProgress &&\n null !== workInProgress.firstContext &&\n (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0),\n (workInProgress.firstContext = null));\n}\nfunction readContext(context) {\n return readContextForConsumer(currentlyRenderingFiber, context);\n}\nfunction readContextDuringReconciliation(consumer, context, renderLanes) {\n null === currentlyRenderingFiber &&\n prepareToReadContext(consumer, renderLanes);\n return readContextForConsumer(consumer, context);\n}\nfunction readContextForConsumer(consumer, context) {\n var value = context._currentValue;\n if (lastFullyObservedContext !== context)\n if (\n ((context = { context: context, memoizedValue: value, next: null }),\n null === lastContextDependency)\n ) {\n if (null === consumer)\n throw Error(\n \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n );\n lastContextDependency = context;\n consumer.dependencies = { lanes: 0, firstContext: context };\n } else lastContextDependency = lastContextDependency.next = context;\n return value;\n}\nvar ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nfunction handleAsyncAction() {}\nfunction scheduleRetryEffect(workInProgress, retryQueue) {\n null !== retryQueue\n ? (workInProgress.flags |= 4)\n : workInProgress.flags & 16384 &&\n ((retryQueue =\n 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),\n (workInProgress.lanes |= retryQueue));\n}\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n switch (renderState.tailMode) {\n case \"hidden\":\n hasRenderedATailFallback = renderState.tail;\n for (var lastTailNode = null; null !== hasRenderedATailFallback; )\n null !== hasRenderedATailFallback.alternate &&\n (lastTailNode = hasRenderedATailFallback),\n (hasRenderedATailFallback = hasRenderedATailFallback.sibling);\n null === lastTailNode\n ? (renderState.tail = null)\n : (lastTailNode.sibling = null);\n break;\n case \"collapsed\":\n lastTailNode = renderState.tail;\n for (var lastTailNode$61 = null; null !== lastTailNode; )\n null !== lastTailNode.alternate && (lastTailNode$61 = lastTailNode),\n (lastTailNode = lastTailNode.sibling);\n null === lastTailNode$61\n ? hasRenderedATailFallback || null === renderState.tail\n ? (renderState.tail = null)\n : (renderState.tail.sibling = null)\n : (lastTailNode$61.sibling = null);\n }\n}\nfunction bubbleProperties(completedWork) {\n var didBailout =\n null !== completedWork.alternate &&\n completedWork.alternate.child === completedWork.child,\n newChildLanes = 0,\n subtreeFlags = 0;\n if (didBailout)\n for (var child$62 = completedWork.child; null !== child$62; )\n (newChildLanes |= child$62.lanes | child$62.childLanes),\n (subtreeFlags |= child$62.subtreeFlags & 31457280),\n (subtreeFlags |= child$62.flags & 31457280),\n (child$62.return = completedWork),\n (child$62 = child$62.sibling);\n else\n for (child$62 = completedWork.child; null !== child$62; )\n (newChildLanes |= child$62.lanes | child$62.childLanes),\n (subtreeFlags |= child$62.subtreeFlags),\n (subtreeFlags |= child$62.flags),\n (child$62.return = completedWork),\n (child$62 = child$62.sibling);\n completedWork.subtreeFlags |= subtreeFlags;\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps;\n switch (workInProgress.tag) {\n case 2:\n case 16:\n case 15:\n case 0:\n case 11:\n case 7:\n case 8:\n case 12:\n case 9:\n case 14:\n return bubbleProperties(workInProgress), null;\n case 1:\n return bubbleProperties(workInProgress), null;\n case 3:\n return (\n (renderLanes = workInProgress.stateNode),\n popHostContainer(),\n renderLanes.pendingContext &&\n ((renderLanes.context = renderLanes.pendingContext),\n (renderLanes.pendingContext = null)),\n (null !== current && null !== current.child) ||\n null === current ||\n (current.memoizedState.isDehydrated &&\n 0 === (workInProgress.flags & 256)) ||\n ((workInProgress.flags |= 1024),\n null !== hydrationErrors &&\n (queueRecoverableErrors(hydrationErrors),\n (hydrationErrors = null))),\n bubbleProperties(workInProgress),\n null\n );\n case 26:\n case 27:\n case 5:\n popHostContext(workInProgress);\n var type = workInProgress.type;\n if (null !== current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && (workInProgress.flags |= 4);\n else {\n if (!newProps) {\n if (null === workInProgress.stateNode)\n throw Error(\n \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\"\n );\n bubbleProperties(workInProgress);\n return null;\n }\n current = rootInstanceStackCursor.current;\n renderLanes = allocateTag();\n type = getViewConfigForType(type);\n var updatePayload = diffProperties(\n null,\n emptyObject,\n newProps,\n type.validAttributes\n );\n ReactNativePrivateInterface.UIManager.createView(\n renderLanes,\n type.uiViewClassName,\n current,\n updatePayload\n );\n current = new ReactNativeFiberHostComponent(\n renderLanes,\n type,\n workInProgress\n );\n instanceCache.set(renderLanes, workInProgress);\n instanceProps.set(renderLanes, newProps);\n a: for (renderLanes = workInProgress.child; null !== renderLanes; ) {\n if (5 === renderLanes.tag || 6 === renderLanes.tag)\n current._children.push(renderLanes.stateNode);\n else if (4 !== renderLanes.tag && null !== renderLanes.child) {\n renderLanes.child.return = renderLanes;\n renderLanes = renderLanes.child;\n continue;\n }\n if (renderLanes === workInProgress) break a;\n for (; null === renderLanes.sibling; ) {\n if (\n null === renderLanes.return ||\n renderLanes.return === workInProgress\n )\n break a;\n renderLanes = renderLanes.return;\n }\n renderLanes.sibling.return = renderLanes.return;\n renderLanes = renderLanes.sibling;\n }\n workInProgress.stateNode = current;\n finalizeInitialChildren(current) && (workInProgress.flags |= 4);\n }\n bubbleProperties(workInProgress);\n workInProgress.flags &= -16777217;\n return null;\n case 6:\n if (current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && (workInProgress.flags |= 4);\n else {\n if (\"string\" !== typeof newProps && null === workInProgress.stateNode)\n throw Error(\n \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\"\n );\n renderLanes = rootInstanceStackCursor.current;\n if (!contextStackCursor.current.isInAParentText)\n throw Error(\n \"Text strings must be rendered within a component.\"\n );\n current = allocateTag();\n ReactNativePrivateInterface.UIManager.createView(\n current,\n \"RCTRawText\",\n renderLanes,\n { text: newProps }\n );\n instanceCache.set(current, workInProgress);\n workInProgress.stateNode = current;\n }\n bubbleProperties(workInProgress);\n return null;\n case 13:\n newProps = workInProgress.memoizedState;\n if (\n null === current ||\n (null !== current.memoizedState &&\n null !== current.memoizedState.dehydrated)\n ) {\n if (null !== newProps && null !== newProps.dehydrated) {\n if (null === current) {\n throw Error(\n \"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.\"\n );\n throw Error(\n \"Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.\"\n );\n }\n 0 === (workInProgress.flags & 128) &&\n (workInProgress.memoizedState = null);\n workInProgress.flags |= 4;\n bubbleProperties(workInProgress);\n type = !1;\n } else\n null !== hydrationErrors &&\n (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)),\n (type = !0);\n if (!type) {\n if (workInProgress.flags & 256)\n return popSuspenseHandler(workInProgress), workInProgress;\n popSuspenseHandler(workInProgress);\n return null;\n }\n }\n popSuspenseHandler(workInProgress);\n if (0 !== (workInProgress.flags & 128))\n return (workInProgress.lanes = renderLanes), workInProgress;\n renderLanes = null !== newProps;\n renderLanes !== (null !== current && null !== current.memoizedState) &&\n renderLanes &&\n (workInProgress.child.flags |= 8192);\n scheduleRetryEffect(workInProgress, workInProgress.updateQueue);\n bubbleProperties(workInProgress);\n return null;\n case 4:\n return popHostContainer(), bubbleProperties(workInProgress), null;\n case 10:\n return (\n popProvider(workInProgress.type._context),\n bubbleProperties(workInProgress),\n null\n );\n case 17:\n return bubbleProperties(workInProgress), null;\n case 19:\n pop(suspenseStackCursor);\n type = workInProgress.memoizedState;\n if (null === type) return bubbleProperties(workInProgress), null;\n newProps = 0 !== (workInProgress.flags & 128);\n updatePayload = type.rendering;\n if (null === updatePayload)\n if (newProps) cutOffTailIfNeeded(type, !1);\n else {\n if (\n 0 !== workInProgressRootExitStatus ||\n (null !== current && 0 !== (current.flags & 128))\n )\n for (current = workInProgress.child; null !== current; ) {\n updatePayload = findFirstSuspended(current);\n if (null !== updatePayload) {\n workInProgress.flags |= 128;\n cutOffTailIfNeeded(type, !1);\n current = updatePayload.updateQueue;\n workInProgress.updateQueue = current;\n scheduleRetryEffect(workInProgress, current);\n workInProgress.subtreeFlags = 0;\n for (current = workInProgress.child; null !== current; )\n resetWorkInProgress(current, renderLanes),\n (current = current.sibling);\n push(\n suspenseStackCursor,\n (suspenseStackCursor.current & 1) | 2\n );\n return workInProgress.child;\n }\n current = current.sibling;\n }\n null !== type.tail &&\n now() > workInProgressRootRenderTargetTime &&\n ((workInProgress.flags |= 128),\n (newProps = !0),\n cutOffTailIfNeeded(type, !1),\n (workInProgress.lanes = 4194304));\n }\n else {\n if (!newProps)\n if (\n ((current = findFirstSuspended(updatePayload)), null !== current)\n ) {\n if (\n ((workInProgress.flags |= 128),\n (newProps = !0),\n (renderLanes = current.updateQueue),\n (workInProgress.updateQueue = renderLanes),\n scheduleRetryEffect(workInProgress, renderLanes),\n cutOffTailIfNeeded(type, !0),\n null === type.tail &&\n \"hidden\" === type.tailMode &&\n !updatePayload.alternate)\n )\n return bubbleProperties(workInProgress), null;\n } else\n 2 * now() - type.renderingStartTime >\n workInProgressRootRenderTargetTime &&\n 536870912 !== renderLanes &&\n ((workInProgress.flags |= 128),\n (newProps = !0),\n cutOffTailIfNeeded(type, !1),\n (workInProgress.lanes = 4194304));\n type.isBackwards\n ? ((updatePayload.sibling = workInProgress.child),\n (workInProgress.child = updatePayload))\n : ((renderLanes = type.last),\n null !== renderLanes\n ? (renderLanes.sibling = updatePayload)\n : (workInProgress.child = updatePayload),\n (type.last = updatePayload));\n }\n if (null !== type.tail)\n return (\n (workInProgress = type.tail),\n (type.rendering = workInProgress),\n (type.tail = workInProgress.sibling),\n (type.renderingStartTime = now()),\n (workInProgress.sibling = null),\n (renderLanes = suspenseStackCursor.current),\n push(\n suspenseStackCursor,\n newProps ? (renderLanes & 1) | 2 : renderLanes & 1\n ),\n workInProgress\n );\n bubbleProperties(workInProgress);\n return null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n (newProps = null !== workInProgress.memoizedState),\n null !== current\n ? (null !== current.memoizedState) !== newProps &&\n (workInProgress.flags |= 8192)\n : newProps && (workInProgress.flags |= 8192),\n newProps && 0 !== (workInProgress.mode & 1)\n ? 0 !== (renderLanes & 536870912) &&\n 0 === (workInProgress.flags & 128) &&\n (bubbleProperties(workInProgress),\n workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))\n : bubbleProperties(workInProgress),\n (renderLanes = workInProgress.updateQueue),\n null !== renderLanes &&\n scheduleRetryEffect(workInProgress, renderLanes.retryQueue),\n null\n );\n case 24:\n return null;\n case 25:\n return null;\n }\n throw Error(\n \"Unknown unit of work tag (\" +\n workInProgress.tag +\n \"). This error is likely caused by a bug in React. Please file an issue.\"\n );\n}\nfunction unwindWork(current, workInProgress) {\n switch (workInProgress.tag) {\n case 1:\n return (\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 3:\n return (\n popHostContainer(),\n (current = workInProgress.flags),\n 0 !== (current & 65536) && 0 === (current & 128)\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 26:\n case 27:\n case 5:\n return popHostContext(workInProgress), null;\n case 13:\n popSuspenseHandler(workInProgress);\n current = workInProgress.memoizedState;\n if (\n null !== current &&\n null !== current.dehydrated &&\n null === workInProgress.alternate\n )\n throw Error(\n \"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.\"\n );\n current = workInProgress.flags;\n return current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null;\n case 19:\n return pop(suspenseStackCursor), null;\n case 4:\n return popHostContainer(), null;\n case 10:\n return popProvider(workInProgress.type._context), null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 24:\n return null;\n case 25:\n return null;\n default:\n return null;\n }\n}\nfunction unwindInterruptedWork(current, interruptedWork) {\n switch (interruptedWork.tag) {\n case 3:\n popHostContainer();\n break;\n case 26:\n case 27:\n case 5:\n popHostContext(interruptedWork);\n break;\n case 4:\n popHostContainer();\n break;\n case 13:\n popSuspenseHandler(interruptedWork);\n break;\n case 19:\n pop(suspenseStackCursor);\n break;\n case 10:\n popProvider(interruptedWork.type._context);\n break;\n case 22:\n case 23:\n popSuspenseHandler(interruptedWork), popHiddenContext();\n }\n}\nvar offscreenSubtreeIsHidden = !1,\n offscreenSubtreeWasHidden = !1,\n PossiblyWeakSet = \"function\" === typeof WeakSet ? WeakSet : Set,\n nextEffect = null;\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n var ref = current.ref;\n if (null !== ref) {\n var instance = current.stateNode;\n switch (current.tag) {\n case 26:\n case 27:\n case 5:\n var instanceToUse = getPublicInstance(instance);\n break;\n default:\n instanceToUse = instance;\n }\n \"function\" === typeof ref\n ? (current.refCleanup = ref(instanceToUse))\n : (ref.current = instanceToUse);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref,\n refCleanup = current.refCleanup;\n if (null !== ref)\n if (\"function\" === typeof refCleanup)\n try {\n refCleanup();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n } finally {\n (current.refCleanup = null),\n (current = current.alternate),\n null != current && (current.refCleanup = null);\n }\n else if (\"function\" === typeof ref)\n try {\n ref(null);\n } catch (error$76) {\n captureCommitPhaseError(current, nearestMountedAncestor, error$76);\n }\n else ref.current = null;\n}\nfunction safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n try {\n destroy();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nvar shouldFireAfterActiveInstanceBlur = !1;\nfunction commitBeforeMutationEffects(root, firstChild) {\n for (nextEffect = firstChild; null !== nextEffect; )\n if (\n ((root = nextEffect),\n (firstChild = root.child),\n 0 !== (root.subtreeFlags & 1028) && null !== firstChild)\n )\n (firstChild.return = root), (nextEffect = firstChild);\n else\n for (; null !== nextEffect; ) {\n root = nextEffect;\n try {\n var current = root.alternate,\n flags = root.flags;\n switch (root.tag) {\n case 0:\n break;\n case 11:\n case 15:\n break;\n case 1:\n if (0 !== (flags & 1024) && null !== current) {\n var prevProps = current.memoizedProps,\n prevState = current.memoizedState,\n instance = root.stateNode,\n snapshot = instance.getSnapshotBeforeUpdate(\n root.elementType === root.type\n ? prevProps\n : resolveDefaultProps(root.type, prevProps),\n prevState\n );\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n break;\n case 3:\n break;\n case 5:\n case 26:\n case 27:\n case 6:\n case 4:\n case 17:\n break;\n default:\n if (0 !== (flags & 1024))\n throw Error(\n \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\"\n );\n }\n } catch (error) {\n captureCommitPhaseError(root, root.return, error);\n }\n firstChild = root.sibling;\n if (null !== firstChild) {\n firstChild.return = root.return;\n nextEffect = firstChild;\n break;\n }\n nextEffect = root.return;\n }\n current = shouldFireAfterActiveInstanceBlur;\n shouldFireAfterActiveInstanceBlur = !1;\n return current;\n}\nfunction commitHookEffectListUnmount(\n flags,\n finishedWork,\n nearestMountedAncestor\n) {\n var updateQueue = finishedWork.updateQueue;\n updateQueue = null !== updateQueue ? updateQueue.lastEffect : null;\n if (null !== updateQueue) {\n var effect = (updateQueue = updateQueue.next);\n do {\n if ((effect.tag & flags) === flags) {\n var inst = effect.inst,\n destroy = inst.destroy;\n void 0 !== destroy &&\n ((inst.destroy = void 0),\n safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy));\n }\n effect = effect.next;\n } while (effect !== updateQueue);\n }\n}\nfunction commitHookEffectListMount(flags, finishedWork) {\n finishedWork = finishedWork.updateQueue;\n finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;\n if (null !== finishedWork) {\n var effect = (finishedWork = finishedWork.next);\n do {\n if ((effect.tag & flags) === flags) {\n var create$77 = effect.create,\n inst = effect.inst;\n create$77 = create$77();\n inst.destroy = create$77;\n }\n effect = effect.next;\n } while (effect !== finishedWork);\n }\n}\nfunction commitHookLayoutEffects(finishedWork, hookFlags) {\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitClassCallbacks(finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n if (null !== updateQueue) {\n var instance = finishedWork.stateNode;\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitHookLayoutEffects(finishedWork, 5);\n break;\n case 1:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (flags & 4)\n if (((finishedRoot = finishedWork.stateNode), null === current))\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n else {\n var prevProps =\n finishedWork.elementType === finishedWork.type\n ? current.memoizedProps\n : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n current = current.memoizedState;\n try {\n finishedRoot.componentDidUpdate(\n prevProps,\n current,\n finishedRoot.__reactInternalSnapshotBeforeUpdate\n );\n } catch (error$78) {\n captureCommitPhaseError(\n finishedWork,\n finishedWork.return,\n error$78\n );\n }\n }\n flags & 64 && commitClassCallbacks(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 3:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (flags & 64 && ((flags = finishedWork.updateQueue), null !== flags)) {\n finishedRoot = null;\n if (null !== finishedWork.child)\n switch (finishedWork.child.tag) {\n case 27:\n case 5:\n finishedRoot = getPublicInstance(finishedWork.child.stateNode);\n break;\n case 1:\n finishedRoot = finishedWork.child.stateNode;\n }\n try {\n commitCallbacks(flags, finishedRoot);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 26:\n case 27:\n case 5:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n case 22:\n if (0 !== (finishedWork.mode & 1)) {\n if (\n ((prevProps =\n null !== finishedWork.memoizedState || offscreenSubtreeIsHidden),\n !prevProps)\n ) {\n current =\n (null !== current && null !== current.memoizedState) ||\n offscreenSubtreeWasHidden;\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevProps;\n (offscreenSubtreeWasHidden = current) &&\n !prevOffscreenSubtreeWasHidden\n ? recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n 0 !== (finishedWork.subtreeFlags & 8772)\n )\n : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n }\n } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 512 &&\n (\"manual\" === finishedWork.memoizedProps.mode\n ? safelyAttachRef(finishedWork, finishedWork.return)\n : safelyDetachRef(finishedWork, finishedWork.return));\n break;\n default:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n}\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n null !== alternate &&\n ((fiber.alternate = null), detachFiberAfterEffects(alternate));\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null;\n fiber.stateNode = null;\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null;\n fiber.updateQueue = null;\n}\nfunction isHostParent(fiber) {\n return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;\n}\nfunction getHostSibling(fiber) {\n a: for (;;) {\n for (; null === fiber.sibling; ) {\n if (null === fiber.return || isHostParent(fiber.return)) return null;\n fiber = fiber.return;\n }\n fiber.sibling.return = fiber.return;\n for (\n fiber = fiber.sibling;\n 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;\n\n ) {\n if (fiber.flags & 2) continue a;\n if (null === fiber.child || 4 === fiber.tag) continue a;\n else (fiber.child.return = fiber), (fiber = fiber.child);\n }\n if (!(fiber.flags & 2)) return fiber.stateNode;\n }\n}\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n if (((node = node.stateNode), before)) {\n if (\"number\" === typeof parent)\n throw Error(\"Container does not support insertBefore operation\");\n } else\n ReactNativePrivateInterface.UIManager.setChildren(parent, [\n \"number\" === typeof node ? node : node._nativeTag\n ]);\n else if (4 !== tag && ((node = node.child), null !== node))\n for (\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n (node = node.sibling);\n}\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n if (((node = node.stateNode), before)) {\n tag = parent._children;\n var index = tag.indexOf(node);\n 0 <= index\n ? (tag.splice(index, 1),\n (before = tag.indexOf(before)),\n tag.splice(before, 0, node),\n ReactNativePrivateInterface.UIManager.manageChildren(\n parent._nativeTag,\n [index],\n [before],\n [],\n [],\n []\n ))\n : ((before = tag.indexOf(before)),\n tag.splice(before, 0, node),\n ReactNativePrivateInterface.UIManager.manageChildren(\n parent._nativeTag,\n [],\n [],\n [\"number\" === typeof node ? node : node._nativeTag],\n [before],\n []\n ));\n } else\n (before = \"number\" === typeof node ? node : node._nativeTag),\n (tag = parent._children),\n (index = tag.indexOf(node)),\n 0 <= index\n ? (tag.splice(index, 1),\n tag.push(node),\n ReactNativePrivateInterface.UIManager.manageChildren(\n parent._nativeTag,\n [index],\n [tag.length - 1],\n [],\n [],\n []\n ))\n : (tag.push(node),\n ReactNativePrivateInterface.UIManager.manageChildren(\n parent._nativeTag,\n [],\n [],\n [before],\n [tag.length - 1],\n []\n ));\n else if (4 !== tag && ((node = node.child), null !== node))\n for (\n insertOrAppendPlacementNode(node, before, parent), node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);\n}\nvar hostParent = null,\n hostParentIsContainer = !1;\nfunction recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n parent\n) {\n for (parent = parent.child; null !== parent; )\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),\n (parent = parent.sibling);\n}\nfunction commitDeletionEffectsOnFiber(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n) {\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberUnmount)\n try {\n injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);\n } catch (err) {}\n switch (deletedFiber.tag) {\n case 26:\n case 27:\n case 5:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n case 6:\n var prevHostParent = hostParent,\n prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n null !== hostParent &&\n (hostParentIsContainer\n ? ((finishedRoot = hostParent),\n recursivelyUncacheFiberNode(deletedFiber.stateNode),\n ReactNativePrivateInterface.UIManager.manageChildren(\n finishedRoot,\n [],\n [],\n [],\n [],\n [0]\n ))\n : ((finishedRoot = hostParent),\n (nearestMountedAncestor = deletedFiber.stateNode),\n recursivelyUncacheFiberNode(nearestMountedAncestor),\n (deletedFiber = finishedRoot._children),\n (nearestMountedAncestor = deletedFiber.indexOf(\n nearestMountedAncestor\n )),\n deletedFiber.splice(nearestMountedAncestor, 1),\n ReactNativePrivateInterface.UIManager.manageChildren(\n finishedRoot._nativeTag,\n [],\n [],\n [],\n [],\n [nearestMountedAncestor]\n )));\n break;\n case 18:\n null !== hostParent && shim$1();\n break;\n case 4:\n prevHostParent = hostParent;\n prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = !0;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n break;\n case 0:\n case 11:\n case 14:\n case 15:\n if (\n !offscreenSubtreeWasHidden &&\n ((prevHostParent = deletedFiber.updateQueue),\n null !== prevHostParent &&\n ((prevHostParent = prevHostParent.lastEffect),\n null !== prevHostParent))\n ) {\n prevHostParentIsContainer = prevHostParent = prevHostParent.next;\n do {\n var tag = prevHostParentIsContainer.tag,\n inst = prevHostParentIsContainer.inst,\n destroy = inst.destroy;\n void 0 !== destroy &&\n (0 !== (tag & 2)\n ? ((inst.destroy = void 0),\n safelyCallDestroy(\n deletedFiber,\n nearestMountedAncestor,\n destroy\n ))\n : 0 !== (tag & 4) &&\n ((inst.destroy = void 0),\n safelyCallDestroy(\n deletedFiber,\n nearestMountedAncestor,\n destroy\n )));\n prevHostParentIsContainer = prevHostParentIsContainer.next;\n } while (prevHostParentIsContainer !== prevHostParent);\n }\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 1:\n if (\n !offscreenSubtreeWasHidden &&\n (safelyDetachRef(deletedFiber, nearestMountedAncestor),\n (prevHostParent = deletedFiber.stateNode),\n \"function\" === typeof prevHostParent.componentWillUnmount)\n )\n try {\n (prevHostParent.props = deletedFiber.memoizedProps),\n (prevHostParent.state = deletedFiber.memoizedState),\n prevHostParent.componentWillUnmount();\n } catch (error) {\n captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error);\n }\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 21:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 22:\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n deletedFiber.mode & 1\n ? ((offscreenSubtreeWasHidden =\n (prevHostParent = offscreenSubtreeWasHidden) ||\n null !== deletedFiber.memoizedState),\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n ),\n (offscreenSubtreeWasHidden = prevHostParent))\n : recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n default:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n }\n}\nfunction getRetryCache(finishedWork) {\n switch (finishedWork.tag) {\n case 13:\n case 19:\n var retryCache = finishedWork.stateNode;\n null === retryCache &&\n (retryCache = finishedWork.stateNode = new PossiblyWeakSet());\n return retryCache;\n case 22:\n return (\n (finishedWork = finishedWork.stateNode),\n (retryCache = finishedWork._retryCache),\n null === retryCache &&\n (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),\n retryCache\n );\n default:\n throw Error(\n \"Unexpected Suspense handler tag (\" +\n finishedWork.tag +\n \"). This is a bug in React.\"\n );\n }\n}\nfunction attachSuspenseRetryListeners(finishedWork, wakeables) {\n var retryCache = getRetryCache(finishedWork);\n wakeables.forEach(function (wakeable) {\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n retryCache.has(wakeable) ||\n (retryCache.add(wakeable), wakeable.then(retry, retry));\n });\n}\nfunction recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {\n var deletions = parentFiber.deletions;\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n try {\n var root = root$jscomp$0,\n returnFiber = parentFiber,\n parent = returnFiber;\n a: for (; null !== parent; ) {\n switch (parent.tag) {\n case 27:\n case 5:\n hostParent = parent.stateNode;\n hostParentIsContainer = !1;\n break a;\n case 3:\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = !0;\n break a;\n case 4:\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = !0;\n break a;\n }\n parent = parent.return;\n }\n if (null === hostParent)\n throw Error(\n \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\"\n );\n commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);\n hostParent = null;\n hostParentIsContainer = !1;\n var alternate = childToDelete.alternate;\n null !== alternate && (alternate.return = null);\n childToDelete.return = null;\n } catch (error) {\n captureCommitPhaseError(childToDelete, parentFiber, error);\n }\n }\n if (parentFiber.subtreeFlags & 12854)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitMutationEffectsOnFiber(finishedWork, root) {\n var current = finishedWork.alternate,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & 4) {\n try {\n commitHookEffectListUnmount(3, finishedWork, finishedWork.return),\n commitHookEffectListMount(3, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n try {\n commitHookEffectListUnmount(5, finishedWork, finishedWork.return);\n } catch (error$86) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error$86);\n }\n }\n break;\n case 1:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n null !== current &&\n safelyDetachRef(current, current.return);\n flags & 64 &&\n offscreenSubtreeIsHidden &&\n ((finishedWork = finishedWork.updateQueue),\n null !== finishedWork &&\n ((flags = finishedWork.callbacks),\n null !== flags &&\n ((current = finishedWork.shared.hiddenCallbacks),\n (finishedWork.shared.hiddenCallbacks =\n null === current ? flags : current.concat(flags)))));\n break;\n case 26:\n case 27:\n case 5:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n null !== current &&\n safelyDetachRef(current, current.return);\n if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) {\n var newProps = finishedWork.memoizedProps;\n current = null !== current ? current.memoizedProps : newProps;\n finishedWork.updateQueue = null;\n try {\n var viewConfig = flags.viewConfig;\n instanceProps.set(flags._nativeTag, newProps);\n var updatePayload = diffProperties(\n null,\n current,\n newProps,\n viewConfig.validAttributes\n );\n null != updatePayload &&\n ReactNativePrivateInterface.UIManager.updateView(\n flags._nativeTag,\n viewConfig.uiViewClassName,\n updatePayload\n );\n } catch (error$89) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error$89);\n }\n }\n break;\n case 6:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & 4) {\n if (null === finishedWork.stateNode)\n throw Error(\n \"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.\"\n );\n flags = finishedWork.stateNode;\n current = finishedWork.memoizedProps;\n try {\n ReactNativePrivateInterface.UIManager.updateView(\n flags,\n \"RCTRawText\",\n { text: current }\n );\n } catch (error$90) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error$90);\n }\n }\n break;\n case 3:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 4:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 13:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n finishedWork.child.flags & 8192 &&\n ((current = null !== current && null !== current.memoizedState),\n null === finishedWork.memoizedState ||\n current ||\n (globalMostRecentFallbackTime = now()));\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 22:\n flags & 512 &&\n null !== current &&\n safelyDetachRef(current, current.return);\n viewConfig = null !== finishedWork.memoizedState;\n updatePayload = null !== current && null !== current.memoizedState;\n if (finishedWork.mode & 1) {\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || viewConfig;\n offscreenSubtreeWasHidden =\n prevOffscreenSubtreeWasHidden || updatePayload;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n } else recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n root = finishedWork.stateNode;\n root._current = finishedWork;\n root._visibility &= -3;\n root._visibility |= root._pendingVisibility & 2;\n if (\n flags & 8192 &&\n ((root._visibility = viewConfig\n ? root._visibility & -2\n : root._visibility | 1),\n viewConfig &&\n ((root = offscreenSubtreeIsHidden || offscreenSubtreeWasHidden),\n null === current ||\n updatePayload ||\n root ||\n (0 !== (finishedWork.mode & 1) &&\n recursivelyTraverseDisappearLayoutEffects(finishedWork))),\n null === finishedWork.memoizedProps ||\n \"manual\" !== finishedWork.memoizedProps.mode)\n )\n a: for (current = null, root = finishedWork; ; ) {\n if (5 === root.tag) {\n if (null === current) {\n current = root;\n try {\n if (((newProps = root.stateNode), viewConfig)) {\n var viewConfig$jscomp$0 = newProps.viewConfig;\n var updatePayload$jscomp$0 = diffProperties(\n null,\n emptyObject,\n { style: { display: \"none\" } },\n viewConfig$jscomp$0.validAttributes\n );\n ReactNativePrivateInterface.UIManager.updateView(\n newProps._nativeTag,\n viewConfig$jscomp$0.uiViewClassName,\n updatePayload$jscomp$0\n );\n } else {\n var instance = root.stateNode,\n props = root.memoizedProps,\n viewConfig$jscomp$1 = instance.viewConfig,\n prevProps = assign({}, props, {\n style: [props.style, { display: \"none\" }]\n });\n var updatePayload$jscomp$1 = diffProperties(\n null,\n prevProps,\n props,\n viewConfig$jscomp$1.validAttributes\n );\n ReactNativePrivateInterface.UIManager.updateView(\n instance._nativeTag,\n viewConfig$jscomp$1.uiViewClassName,\n updatePayload$jscomp$1\n );\n }\n } catch (error) {\n captureCommitPhaseError(\n finishedWork,\n finishedWork.return,\n error\n );\n }\n }\n } else if (6 === root.tag) {\n if (null === current)\n try {\n throw Error(\"Not yet implemented.\");\n } catch (error$80) {\n captureCommitPhaseError(\n finishedWork,\n finishedWork.return,\n error$80\n );\n }\n } else if (\n ((22 !== root.tag && 23 !== root.tag) ||\n null === root.memoizedState ||\n root === finishedWork) &&\n null !== root.child\n ) {\n root.child.return = root;\n root = root.child;\n continue;\n }\n if (root === finishedWork) break a;\n for (; null === root.sibling; ) {\n if (null === root.return || root.return === finishedWork) break a;\n current === root && (current = null);\n root = root.return;\n }\n current === root && (current = null);\n root.sibling.return = root.return;\n root = root.sibling;\n }\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((current = flags.retryQueue),\n null !== current &&\n ((flags.retryQueue = null),\n attachSuspenseRetryListeners(finishedWork, current))));\n break;\n case 19:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 21:\n break;\n default:\n recursivelyTraverseMutationEffects(root, finishedWork),\n commitReconciliationEffects(finishedWork);\n }\n}\nfunction commitReconciliationEffects(finishedWork) {\n var flags = finishedWork.flags;\n if (flags & 2) {\n try {\n a: {\n for (var parent = finishedWork.return; null !== parent; ) {\n if (isHostParent(parent)) {\n var JSCompiler_inline_result = parent;\n break a;\n }\n parent = parent.return;\n }\n throw Error(\n \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\"\n );\n }\n switch (JSCompiler_inline_result.tag) {\n case 27:\n case 5:\n var parent$jscomp$0 = JSCompiler_inline_result.stateNode;\n JSCompiler_inline_result.flags & 32 &&\n (JSCompiler_inline_result.flags &= -33);\n var before = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0);\n break;\n case 3:\n case 4:\n var parent$81 = JSCompiler_inline_result.stateNode.containerInfo,\n before$82 = getHostSibling(finishedWork);\n insertOrAppendPlacementNodeIntoContainer(\n finishedWork,\n before$82,\n parent$81\n );\n break;\n default:\n throw Error(\n \"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.\"\n );\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n finishedWork.flags &= -3;\n }\n flags & 4096 && (finishedWork.flags &= -4097);\n}\nfunction recursivelyTraverseLayoutEffects(root, parentFiber) {\n if (parentFiber.subtreeFlags & 8772)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction recursivelyTraverseDisappearLayoutEffects(parentFiber) {\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedWork = parentFiber;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(4, finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 1:\n safelyDetachRef(finishedWork, finishedWork.return);\n var instance = finishedWork.stateNode;\n if (\"function\" === typeof instance.componentWillUnmount) {\n var current = finishedWork,\n nearestMountedAncestor = finishedWork.return;\n try {\n var current$jscomp$0 = current;\n instance.props = current$jscomp$0.memoizedProps;\n instance.state = current$jscomp$0.memoizedState;\n instance.componentWillUnmount();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n }\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 26:\n case 27:\n case 5:\n safelyDetachRef(finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 22:\n safelyDetachRef(finishedWork, finishedWork.return);\n null === finishedWork.memoizedState &&\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n default:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseReappearLayoutEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n commitHookLayoutEffects(finishedWork, 4);\n break;\n case 1:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n var instance = finishedWork.stateNode;\n if (\"function\" === typeof instance.componentDidMount)\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n finishedRoot = finishedWork.updateQueue;\n if (null !== finishedRoot) {\n var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;\n if (null !== hiddenCallbacks)\n for (\n finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0;\n finishedRoot < hiddenCallbacks.length;\n finishedRoot++\n )\n callCallback(hiddenCallbacks[finishedRoot], instance);\n }\n includeWorkInProgressEffects &&\n flags & 64 &&\n commitClassCallbacks(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 26:\n case 27:\n case 5:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n break;\n case 13:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n default:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitHookPassiveMountEffects(finishedWork, hookFlags) {\n try {\n commitHookEffectListMount(hookFlags, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction recursivelyTraversePassiveMountEffects(root, parentFiber) {\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveMountOnFiber(root, parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveMountOnFiber(finishedRoot, finishedWork) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork);\n flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9);\n break;\n case 3:\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork);\n break;\n case 23:\n break;\n case 22:\n flags = finishedWork.stateNode;\n null !== finishedWork.memoizedState\n ? flags._visibility & 4\n ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork)\n : finishedWork.mode & 1 ||\n ((flags._visibility |= 4),\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork))\n : flags._visibility & 4\n ? recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork)\n : ((flags._visibility |= 4),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork\n ));\n break;\n case 24:\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork);\n break;\n default:\n recursivelyTraversePassiveMountEffects(finishedRoot, finishedWork);\n }\n}\nfunction recursivelyTraverseReconnectPassiveEffects(\n finishedRoot$jscomp$0,\n parentFiber\n) {\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork);\n commitHookPassiveMountEffects(finishedWork, 8);\n break;\n case 23:\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState\n ? instance._visibility & 4\n ? recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork\n )\n : finishedWork.mode & 1 ||\n ((instance._visibility |= 4),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork\n ))\n : ((instance._visibility |= 4),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork\n ));\n break;\n case 24:\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork);\n break;\n default:\n recursivelyTraverseReconnectPassiveEffects(finishedRoot, finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nvar suspenseyCommitFlag = 8192;\nfunction recursivelyAccumulateSuspenseyCommit(parentFiber) {\n if (parentFiber.subtreeFlags & suspenseyCommitFlag)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n accumulateSuspenseyCommitOnFiber(parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction accumulateSuspenseyCommitOnFiber(fiber) {\n switch (fiber.tag) {\n case 26:\n recursivelyAccumulateSuspenseyCommit(fiber);\n if (fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState)\n throw Error(\n \"The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue.\"\n );\n break;\n case 5:\n recursivelyAccumulateSuspenseyCommit(fiber);\n break;\n case 3:\n case 4:\n recursivelyAccumulateSuspenseyCommit(fiber);\n break;\n case 22:\n if (null === fiber.memoizedState) {\n var current = fiber.alternate;\n null !== current && null !== current.memoizedState\n ? ((current = suspenseyCommitFlag),\n (suspenseyCommitFlag = 16777216),\n recursivelyAccumulateSuspenseyCommit(fiber),\n (suspenseyCommitFlag = current))\n : recursivelyAccumulateSuspenseyCommit(fiber);\n }\n break;\n default:\n recursivelyAccumulateSuspenseyCommit(fiber);\n }\n}\nfunction detachAlternateSiblings(parentFiber) {\n var previousFiber = parentFiber.alternate;\n if (\n null !== previousFiber &&\n ((parentFiber = previousFiber.child), null !== parentFiber)\n ) {\n previousFiber.child = null;\n do\n (previousFiber = parentFiber.sibling),\n (parentFiber.sibling = null),\n (parentFiber = previousFiber);\n while (null !== parentFiber);\n }\n}\nfunction recursivelyTraversePassiveUnmountEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveUnmountOnFiber(parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n finishedWork.flags & 2048 &&\n commitHookEffectListUnmount(9, finishedWork, finishedWork.return);\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState &&\n instance._visibility & 4 &&\n (null === finishedWork.return || 13 !== finishedWork.return.tag)\n ? ((instance._visibility &= -5),\n recursivelyTraverseDisconnectPassiveEffects(finishedWork))\n : recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n default:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n }\n}\nfunction recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n deletions = parentFiber;\n switch (deletions.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, deletions, deletions.return);\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n break;\n case 22:\n i = deletions.stateNode;\n i._visibility & 4 &&\n ((i._visibility &= -5),\n recursivelyTraverseDisconnectPassiveEffects(deletions));\n break;\n default:\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n deletedSubtreeRoot,\n nearestMountedAncestor\n) {\n for (; null !== nextEffect; ) {\n var fiber = nextEffect;\n switch (fiber.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);\n }\n var child = fiber.child;\n if (null !== child) (child.return = fiber), (nextEffect = child);\n else\n a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {\n child = nextEffect;\n var sibling = child.sibling,\n returnFiber = child.return;\n detachFiberAfterEffects(child);\n if (child === fiber) {\n nextEffect = null;\n break a;\n }\n if (null !== sibling) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n break a;\n }\n nextEffect = returnFiber;\n }\n }\n}\nvar PossiblyWeakMap = \"function\" === typeof WeakMap ? WeakMap : Map,\n ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,\n ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,\n executionContext = 0,\n workInProgressRoot = null,\n workInProgress = null,\n workInProgressRootRenderLanes = 0,\n workInProgressSuspendedReason = 0,\n workInProgressThrownValue = null,\n workInProgressRootDidAttachPingListener = !1,\n entangledRenderLanes = 0,\n workInProgressRootExitStatus = 0,\n workInProgressRootFatalError = null,\n workInProgressRootSkippedLanes = 0,\n workInProgressRootInterleavedUpdatedLanes = 0,\n workInProgressRootPingedLanes = 0,\n workInProgressDeferredLane = 0,\n workInProgressRootConcurrentErrors = null,\n workInProgressRootRecoverableErrors = null,\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1,\n globalMostRecentFallbackTime = 0,\n workInProgressRootRenderTargetTime = Infinity,\n workInProgressTransitions = null,\n hasUncaughtError = !1,\n firstUncaughtError = null,\n legacyErrorBoundariesThatAlreadyFailed = null,\n rootDoesHavePassiveEffects = !1,\n rootWithPendingPassiveEffects = null,\n pendingPassiveEffectsLanes = 0,\n nestedUpdateCount = 0,\n rootWithNestedUpdates = null;\nfunction requestUpdateLane(fiber) {\n if (0 === (fiber.mode & 1)) return 2;\n if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes)\n return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;\n fiber = ReactCurrentBatchConfig$1.transition;\n null !== fiber && fiber._callbacks.add(handleAsyncAction);\n if (null !== fiber)\n return (\n 0 === currentEventTransitionLane &&\n (currentEventTransitionLane = claimNextTransitionLane()),\n currentEventTransitionLane\n );\n fiber = currentUpdatePriority;\n return 0 !== fiber ? fiber : 32;\n}\nfunction requestDeferredLane() {\n 0 === workInProgressDeferredLane &&\n (workInProgressDeferredLane =\n 0 !== (workInProgressRootRenderLanes & 536870912)\n ? 536870912\n : claimNextTransitionLane());\n var suspenseHandler = suspenseHandlerStackCursor.current;\n null !== suspenseHandler && (suspenseHandler.flags |= 32);\n return workInProgressDeferredLane;\n}\nfunction scheduleUpdateOnFiber(root, fiber, lane) {\n if (\n (root === workInProgressRoot && 2 === workInProgressSuspendedReason) ||\n null !== root.cancelPendingCommit\n )\n prepareFreshStack(root, 0),\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane\n );\n markRootUpdated$1(root, lane);\n if (0 === (executionContext & 2) || root !== workInProgressRoot)\n root === workInProgressRoot &&\n (0 === (executionContext & 2) &&\n (workInProgressRootInterleavedUpdatedLanes |= lane),\n 4 === workInProgressRootExitStatus &&\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane\n )),\n ensureRootIsScheduled(root),\n 2 === lane &&\n 0 === executionContext &&\n 0 === (fiber.mode & 1) &&\n ((workInProgressRootRenderTargetTime = now() + 500),\n flushSyncWorkAcrossRoots_impl(!0));\n}\nfunction performConcurrentWorkOnRoot(root, didTimeout) {\n if (0 !== (executionContext & 6))\n throw Error(\"Should not already be working.\");\n var originalCallbackNode = root.callbackNode;\n if (flushPassiveEffects() && root.callbackNode !== originalCallbackNode)\n return null;\n var lanes = getNextLanes(\n root,\n root === workInProgressRoot ? workInProgressRootRenderLanes : 0\n );\n if (0 === lanes) return null;\n var exitStatus = (didTimeout =\n 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes) && !didTimeout)\n ? renderRootConcurrent(root, lanes)\n : renderRootSync(root, lanes);\n if (0 !== exitStatus) {\n var renderWasConcurrent = didTimeout;\n do {\n if (6 === exitStatus) markRootSuspended(root, lanes, 0);\n else {\n didTimeout = root.current.alternate;\n if (\n renderWasConcurrent &&\n !isRenderConsistentWithExternalStores(didTimeout)\n ) {\n exitStatus = renderRootSync(root, lanes);\n renderWasConcurrent = !1;\n continue;\n }\n if (2 === exitStatus) {\n renderWasConcurrent = lanes;\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(\n root,\n renderWasConcurrent\n );\n 0 !== errorRetryLanes &&\n ((lanes = errorRetryLanes),\n (exitStatus = recoverFromConcurrentError(\n root,\n renderWasConcurrent,\n errorRetryLanes\n )));\n }\n if (1 === exitStatus)\n throw (\n ((originalCallbackNode = workInProgressRootFatalError),\n prepareFreshStack(root, 0),\n markRootSuspended(root, lanes, 0),\n ensureRootIsScheduled(root),\n originalCallbackNode)\n );\n root.finishedWork = didTimeout;\n root.finishedLanes = lanes;\n a: {\n renderWasConcurrent = root;\n switch (exitStatus) {\n case 0:\n case 1:\n throw Error(\"Root did not complete. This is a bug in React.\");\n case 4:\n if ((lanes & 4194176) === lanes) {\n markRootSuspended(\n renderWasConcurrent,\n lanes,\n workInProgressDeferredLane\n );\n break a;\n }\n break;\n case 2:\n case 3:\n case 5:\n break;\n default:\n throw Error(\"Unknown root exit status.\");\n }\n if (\n (lanes & 62914560) === lanes &&\n 3 === exitStatus &&\n ((exitStatus = globalMostRecentFallbackTime + 300 - now()),\n 10 < exitStatus)\n ) {\n markRootSuspended(\n renderWasConcurrent,\n lanes,\n workInProgressDeferredLane\n );\n if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;\n renderWasConcurrent.timeoutHandle = scheduleTimeout(\n commitRootWhenReady.bind(\n null,\n renderWasConcurrent,\n didTimeout,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane\n ),\n exitStatus\n );\n break a;\n }\n commitRootWhenReady(\n renderWasConcurrent,\n didTimeout,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane\n );\n }\n }\n break;\n } while (1);\n }\n ensureRootIsScheduled(root);\n scheduleTaskForRootDuringMicrotask(root, now());\n root =\n root.callbackNode === originalCallbackNode\n ? performConcurrentWorkOnRoot.bind(null, root)\n : null;\n return root;\n}\nfunction recoverFromConcurrentError(\n root,\n originallyAttemptedLanes,\n errorRetryLanes\n) {\n var errorsFromFirstAttempt = workInProgressRootConcurrentErrors,\n JSCompiler_inline_result;\n (JSCompiler_inline_result = root.current.memoizedState.isDehydrated) &&\n (prepareFreshStack(root, errorRetryLanes).flags |= 256);\n errorRetryLanes = renderRootSync(root, errorRetryLanes);\n if (2 !== errorRetryLanes) {\n if (workInProgressRootDidAttachPingListener && !JSCompiler_inline_result)\n return (\n (root.errorRecoveryDisabledLanes |= originallyAttemptedLanes),\n (workInProgressRootInterleavedUpdatedLanes |= originallyAttemptedLanes),\n 4\n );\n root = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = errorsFromFirstAttempt;\n null !== root && queueRecoverableErrors(root);\n }\n return errorRetryLanes;\n}\nfunction queueRecoverableErrors(errors) {\n null === workInProgressRootRecoverableErrors\n ? (workInProgressRootRecoverableErrors = errors)\n : workInProgressRootRecoverableErrors.push.apply(\n workInProgressRootRecoverableErrors,\n errors\n );\n}\nfunction commitRootWhenReady(\n root,\n finishedWork,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n lanes,\n spawnedLane\n) {\n 0 === (lanes & 42) && accumulateSuspenseyCommitOnFiber(finishedWork);\n commitRoot(\n root,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane\n );\n}\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n for (var node = finishedWork; ; ) {\n if (node.flags & 16384) {\n var updateQueue = node.updateQueue;\n if (\n null !== updateQueue &&\n ((updateQueue = updateQueue.stores), null !== updateQueue)\n )\n for (var i = 0; i < updateQueue.length; i++) {\n var check = updateQueue[i],\n getSnapshot = check.getSnapshot;\n check = check.value;\n try {\n if (!objectIs(getSnapshot(), check)) return !1;\n } catch (error) {\n return !1;\n }\n }\n }\n updateQueue = node.child;\n if (node.subtreeFlags & 16384 && null !== updateQueue)\n (updateQueue.return = node), (node = updateQueue);\n else {\n if (node === finishedWork) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === finishedWork) return !0;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n return !0;\n}\nfunction markRootSuspended(root, suspendedLanes, spawnedLane) {\n suspendedLanes &= ~workInProgressRootPingedLanes;\n suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes;\n for (\n var expirationTimes = root.expirationTimes, lanes = suspendedLanes;\n 0 < lanes;\n\n ) {\n var index$6 = 31 - clz32(lanes),\n lane = 1 << index$6;\n expirationTimes[index$6] = -1;\n lanes &= ~lane;\n }\n 0 !== spawnedLane &&\n markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);\n}\nfunction resetWorkInProgressStack() {\n if (null !== workInProgress) {\n if (0 === workInProgressSuspendedReason)\n var interruptedWork = workInProgress.return;\n else\n (interruptedWork = workInProgress),\n resetContextDependencies(),\n resetHooksOnUnwind(interruptedWork),\n (thenableState$1 = null),\n (thenableIndexCounter$1 = 0),\n (interruptedWork = workInProgress);\n for (; null !== interruptedWork; )\n unwindInterruptedWork(interruptedWork.alternate, interruptedWork),\n (interruptedWork = interruptedWork.return);\n workInProgress = null;\n }\n}\nfunction prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = 0;\n var timeoutHandle = root.timeoutHandle;\n -1 !== timeoutHandle &&\n ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));\n timeoutHandle = root.cancelPendingCommit;\n null !== timeoutHandle &&\n ((root.cancelPendingCommit = null), timeoutHandle());\n resetWorkInProgressStack();\n workInProgressRoot = root;\n workInProgress = timeoutHandle = createWorkInProgress(root.current, null);\n workInProgressRootRenderLanes = lanes;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n workInProgressRootDidAttachPingListener = !1;\n workInProgressRootExitStatus = 0;\n workInProgressRootFatalError = null;\n workInProgressDeferredLane =\n workInProgressRootPingedLanes =\n workInProgressRootInterleavedUpdatedLanes =\n workInProgressRootSkippedLanes =\n 0;\n workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =\n null;\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1;\n 0 !== (lanes & 8) && (lanes |= lanes & 32);\n var allEntangledLanes = root.entangledLanes;\n if (0 !== allEntangledLanes)\n for (\n root = root.entanglements, allEntangledLanes &= lanes;\n 0 < allEntangledLanes;\n\n ) {\n var index$4 = 31 - clz32(allEntangledLanes),\n lane = 1 << index$4;\n lanes |= root[index$4];\n allEntangledLanes &= ~lane;\n }\n entangledRenderLanes = lanes;\n finishQueueingConcurrentUpdates();\n return timeoutHandle;\n}\nfunction handleThrow(root, thrownValue) {\n currentlyRenderingFiber$1 = null;\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n ReactCurrentOwner.current = null;\n thrownValue === SuspenseException\n ? ((thrownValue = getSuspendedThenable()),\n (root = suspenseHandlerStackCursor.current),\n (workInProgressSuspendedReason =\n (null !== root &&\n ((workInProgressRootRenderLanes & 4194176) ===\n workInProgressRootRenderLanes\n ? null !== shellBoundary\n : ((workInProgressRootRenderLanes & 62914560) !==\n workInProgressRootRenderLanes &&\n 0 === (workInProgressRootRenderLanes & 536870912)) ||\n root !== shellBoundary)) ||\n 0 !== (workInProgressRootSkippedLanes & 134217727) ||\n 0 !== (workInProgressRootInterleavedUpdatedLanes & 134217727)\n ? 3\n : 2))\n : thrownValue === SuspenseyCommitException\n ? ((thrownValue = getSuspendedThenable()),\n (workInProgressSuspendedReason = 4))\n : (workInProgressSuspendedReason =\n thrownValue === SelectiveHydrationException\n ? 8\n : null !== thrownValue &&\n \"object\" === typeof thrownValue &&\n \"function\" === typeof thrownValue.then\n ? 6\n : 1);\n workInProgressThrownValue = thrownValue;\n null === workInProgress &&\n ((workInProgressRootExitStatus = 1),\n (workInProgressRootFatalError = thrownValue));\n}\nfunction pushDispatcher() {\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = ContextOnlyDispatcher;\n return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;\n}\nfunction renderDidSuspendDelayIfPossible() {\n workInProgressRootExitStatus = 4;\n (0 === (workInProgressRootSkippedLanes & 134217727) &&\n 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||\n null === workInProgressRoot ||\n markRootSuspended(\n workInProgressRoot,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane\n );\n}\nfunction renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher();\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)\n (workInProgressTransitions = null), prepareFreshStack(root, lanes);\n lanes = !1;\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n var unitOfWork = workInProgress,\n thrownValue = workInProgressThrownValue;\n switch (workInProgressSuspendedReason) {\n case 8:\n resetWorkInProgressStack();\n workInProgressRootExitStatus = 6;\n break a;\n case 3:\n case 2:\n lanes ||\n null !== suspenseHandlerStackCursor.current ||\n (lanes = !0);\n default:\n (workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue);\n }\n }\n workLoopSync();\n break;\n } catch (thrownValue$94) {\n handleThrow(root, thrownValue$94);\n }\n while (1);\n lanes && root.shellSuspendCounter++;\n resetContextDependencies();\n executionContext = prevExecutionContext;\n ReactCurrentDispatcher.current = prevDispatcher;\n if (null !== workInProgress)\n throw Error(\n \"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.\"\n );\n workInProgressRoot = null;\n workInProgressRootRenderLanes = 0;\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n}\nfunction workLoopSync() {\n for (; null !== workInProgress; ) performUnitOfWork(workInProgress);\n}\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher();\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)\n (workInProgressTransitions = null),\n (workInProgressRootRenderTargetTime = now() + 500),\n prepareFreshStack(root, lanes);\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n lanes = workInProgress;\n var thrownValue = workInProgressThrownValue;\n b: switch (workInProgressSuspendedReason) {\n case 1:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue);\n break;\n case 2:\n if (isThenableResolved(thrownValue)) {\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(lanes);\n break;\n }\n lanes = function () {\n 2 === workInProgressSuspendedReason &&\n workInProgressRoot === root &&\n (workInProgressSuspendedReason = 7);\n ensureRootIsScheduled(root);\n };\n thrownValue.then(lanes, lanes);\n break a;\n case 3:\n workInProgressSuspendedReason = 7;\n break a;\n case 4:\n workInProgressSuspendedReason = 5;\n break a;\n case 7:\n isThenableResolved(thrownValue)\n ? ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n replaySuspendedUnitOfWork(lanes))\n : ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, lanes, thrownValue));\n break;\n case 5:\n switch (workInProgress.tag) {\n case 5:\n case 26:\n case 27:\n lanes = workInProgress;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n var sibling = lanes.sibling;\n if (null !== sibling) workInProgress = sibling;\n else {\n var returnFiber = lanes.return;\n null !== returnFiber\n ? ((workInProgress = returnFiber),\n completeUnitOfWork(returnFiber))\n : (workInProgress = null);\n }\n break b;\n }\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue);\n break;\n case 6:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue);\n break;\n case 8:\n resetWorkInProgressStack();\n workInProgressRootExitStatus = 6;\n break a;\n default:\n throw Error(\"Unexpected SuspendedReason. This is a bug in React.\");\n }\n }\n workLoopConcurrent();\n break;\n } catch (thrownValue$96) {\n handleThrow(root, thrownValue$96);\n }\n while (1);\n resetContextDependencies();\n ReactCurrentDispatcher.current = prevDispatcher;\n executionContext = prevExecutionContext;\n if (null !== workInProgress) return 0;\n workInProgressRoot = null;\n workInProgressRootRenderLanes = 0;\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n}\nfunction workLoopConcurrent() {\n for (; null !== workInProgress && !shouldYield(); )\n performUnitOfWork(workInProgress);\n}\nfunction performUnitOfWork(unitOfWork) {\n var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n ReactCurrentOwner.current = null;\n}\nfunction replaySuspendedUnitOfWork(unitOfWork) {\n var current = unitOfWork.alternate;\n switch (unitOfWork.tag) {\n case 2:\n unitOfWork.tag = 0;\n case 15:\n case 0:\n var Component = unitOfWork.type,\n unresolvedProps = unitOfWork.pendingProps;\n unresolvedProps =\n unitOfWork.elementType === Component\n ? unresolvedProps\n : resolveDefaultProps(Component, unresolvedProps);\n current = replayFunctionComponent(\n current,\n unitOfWork,\n unresolvedProps,\n Component,\n void 0,\n workInProgressRootRenderLanes\n );\n break;\n case 11:\n Component = unitOfWork.type.render;\n unresolvedProps = unitOfWork.pendingProps;\n unresolvedProps =\n unitOfWork.elementType === Component\n ? unresolvedProps\n : resolveDefaultProps(Component, unresolvedProps);\n current = replayFunctionComponent(\n current,\n unitOfWork,\n unresolvedProps,\n Component,\n unitOfWork.ref,\n workInProgressRootRenderLanes\n );\n break;\n case 5:\n resetHooksOnUnwind(unitOfWork);\n default:\n unwindInterruptedWork(current, unitOfWork),\n (unitOfWork = workInProgress =\n resetWorkInProgress(unitOfWork, entangledRenderLanes)),\n (current = beginWork(current, unitOfWork, entangledRenderLanes));\n }\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === current\n ? completeUnitOfWork(unitOfWork)\n : (workInProgress = current);\n ReactCurrentOwner.current = null;\n}\nfunction throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {\n resetContextDependencies();\n resetHooksOnUnwind(unitOfWork);\n thenableState$1 = null;\n thenableIndexCounter$1 = 0;\n var returnFiber = unitOfWork.return;\n try {\n if (\n throwException(\n root,\n returnFiber,\n unitOfWork,\n thrownValue,\n workInProgressRootRenderLanes\n )\n ) {\n workInProgressRootExitStatus = 1;\n workInProgressRootFatalError = thrownValue;\n workInProgress = null;\n return;\n }\n } catch (error) {\n if (null !== returnFiber) throw ((workInProgress = returnFiber), error);\n workInProgressRootExitStatus = 1;\n workInProgressRootFatalError = thrownValue;\n workInProgress = null;\n return;\n }\n if (unitOfWork.flags & 32768)\n a: {\n root = unitOfWork;\n do {\n unitOfWork = unwindWork(root.alternate, root);\n if (null !== unitOfWork) {\n unitOfWork.flags &= 32767;\n workInProgress = unitOfWork;\n break a;\n }\n root = root.return;\n null !== root &&\n ((root.flags |= 32768),\n (root.subtreeFlags = 0),\n (root.deletions = null));\n workInProgress = root;\n } while (null !== root);\n workInProgressRootExitStatus = 6;\n workInProgress = null;\n }\n else completeUnitOfWork(unitOfWork);\n}\nfunction completeUnitOfWork(unitOfWork) {\n var completedWork = unitOfWork;\n do {\n unitOfWork = completedWork.return;\n var next = completeWork(\n completedWork.alternate,\n completedWork,\n entangledRenderLanes\n );\n if (null !== next) {\n workInProgress = next;\n return;\n }\n completedWork = completedWork.sibling;\n if (null !== completedWork) {\n workInProgress = completedWork;\n return;\n }\n workInProgress = completedWork = unitOfWork;\n } while (null !== completedWork);\n 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);\n}\nfunction commitRoot(\n root,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane\n) {\n var previousUpdateLanePriority = currentUpdatePriority,\n prevTransition = ReactCurrentBatchConfig.transition;\n try {\n (ReactCurrentBatchConfig.transition = null),\n (currentUpdatePriority = 2),\n commitRootImpl(\n root,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n previousUpdateLanePriority,\n spawnedLane\n );\n } finally {\n (ReactCurrentBatchConfig.transition = prevTransition),\n (currentUpdatePriority = previousUpdateLanePriority);\n }\n return null;\n}\nfunction commitRootImpl(\n root,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n renderPriorityLevel,\n spawnedLane\n) {\n do flushPassiveEffects();\n while (null !== rootWithPendingPassiveEffects);\n if (0 !== (executionContext & 6))\n throw Error(\"Should not already be working.\");\n didIncludeRenderPhaseUpdate = root.finishedWork;\n transitions = root.finishedLanes;\n if (null === didIncludeRenderPhaseUpdate) return null;\n root.finishedWork = null;\n root.finishedLanes = 0;\n if (didIncludeRenderPhaseUpdate === root.current)\n throw Error(\n \"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\"\n );\n root.callbackNode = null;\n root.callbackPriority = 0;\n root.cancelPendingCommit = null;\n var remainingLanes =\n didIncludeRenderPhaseUpdate.lanes | didIncludeRenderPhaseUpdate.childLanes;\n remainingLanes |= concurrentlyUpdatedLanes;\n markRootFinished(root, remainingLanes, spawnedLane);\n root === workInProgressRoot &&\n ((workInProgress = workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0));\n (0 === (didIncludeRenderPhaseUpdate.subtreeFlags & 10256) &&\n 0 === (didIncludeRenderPhaseUpdate.flags & 10256)) ||\n rootDoesHavePassiveEffects ||\n ((rootDoesHavePassiveEffects = !0),\n scheduleCallback(NormalPriority, function () {\n flushPassiveEffects();\n return null;\n }));\n spawnedLane = 0 !== (didIncludeRenderPhaseUpdate.flags & 15990);\n if (0 !== (didIncludeRenderPhaseUpdate.subtreeFlags & 15990) || spawnedLane) {\n spawnedLane = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n remainingLanes = currentUpdatePriority;\n currentUpdatePriority = 2;\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n ReactCurrentOwner.current = null;\n commitBeforeMutationEffects(root, didIncludeRenderPhaseUpdate);\n commitMutationEffectsOnFiber(didIncludeRenderPhaseUpdate, root);\n root.current = didIncludeRenderPhaseUpdate;\n commitLayoutEffectOnFiber(\n root,\n didIncludeRenderPhaseUpdate.alternate,\n didIncludeRenderPhaseUpdate\n );\n requestPaint();\n executionContext = prevExecutionContext;\n currentUpdatePriority = remainingLanes;\n ReactCurrentBatchConfig.transition = spawnedLane;\n } else root.current = didIncludeRenderPhaseUpdate;\n rootDoesHavePassiveEffects &&\n ((rootDoesHavePassiveEffects = !1),\n (rootWithPendingPassiveEffects = root),\n (pendingPassiveEffectsLanes = transitions));\n remainingLanes = root.pendingLanes;\n 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);\n onCommitRoot(didIncludeRenderPhaseUpdate.stateNode, renderPriorityLevel);\n ensureRootIsScheduled(root);\n if (null !== recoverableErrors)\n for (\n renderPriorityLevel = root.onRecoverableError,\n didIncludeRenderPhaseUpdate = 0;\n didIncludeRenderPhaseUpdate < recoverableErrors.length;\n didIncludeRenderPhaseUpdate++\n )\n (spawnedLane = recoverableErrors[didIncludeRenderPhaseUpdate]),\n (remainingLanes = {\n digest: spawnedLane.digest,\n componentStack: spawnedLane.stack\n }),\n renderPriorityLevel(spawnedLane.value, remainingLanes);\n if (hasUncaughtError)\n throw (\n ((hasUncaughtError = !1),\n (root = firstUncaughtError),\n (firstUncaughtError = null),\n root)\n );\n 0 !== (pendingPassiveEffectsLanes & 3) &&\n 0 !== root.tag &&\n flushPassiveEffects();\n remainingLanes = root.pendingLanes;\n 0 !== (transitions & 4194218) && 0 !== (remainingLanes & 42)\n ? root === rootWithNestedUpdates\n ? nestedUpdateCount++\n : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))\n : (nestedUpdateCount = 0);\n flushSyncWorkAcrossRoots_impl(!1);\n return null;\n}\nfunction flushPassiveEffects() {\n if (null !== rootWithPendingPassiveEffects) {\n var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),\n prevTransition = ReactCurrentBatchConfig.transition,\n previousPriority = currentUpdatePriority;\n try {\n ReactCurrentBatchConfig.transition = null;\n currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority;\n if (null === rootWithPendingPassiveEffects)\n var JSCompiler_inline_result = !1;\n else {\n renderPriority = rootWithPendingPassiveEffects;\n rootWithPendingPassiveEffects = null;\n pendingPassiveEffectsLanes = 0;\n if (0 !== (executionContext & 6))\n throw Error(\"Cannot flush passive effects while already rendering.\");\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n commitPassiveUnmountOnFiber(renderPriority.current);\n commitPassiveMountOnFiber(renderPriority, renderPriority.current);\n executionContext = prevExecutionContext;\n flushSyncWorkAcrossRoots_impl(!1);\n if (\n injectedHook &&\n \"function\" === typeof injectedHook.onPostCommitFiberRoot\n )\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);\n } catch (err) {}\n JSCompiler_inline_result = !0;\n }\n return JSCompiler_inline_result;\n } finally {\n (currentUpdatePriority = previousPriority),\n (ReactCurrentBatchConfig.transition = prevTransition);\n }\n }\n return !1;\n}\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 2);\n rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);\n null !== rootFiber &&\n (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));\n}\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {\n if (3 === sourceFiber.tag)\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n else\n for (; null !== nearestMountedAncestor; ) {\n if (3 === nearestMountedAncestor.tag) {\n captureCommitPhaseErrorOnRoot(\n nearestMountedAncestor,\n sourceFiber,\n error\n );\n break;\n } else if (1 === nearestMountedAncestor.tag) {\n var instance = nearestMountedAncestor.stateNode;\n if (\n \"function\" ===\n typeof nearestMountedAncestor.type.getDerivedStateFromError ||\n (\"function\" === typeof instance.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(instance)))\n ) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n sourceFiber = createClassErrorUpdate(\n nearestMountedAncestor,\n sourceFiber,\n 2\n );\n nearestMountedAncestor = enqueueUpdate(\n nearestMountedAncestor,\n sourceFiber,\n 2\n );\n null !== nearestMountedAncestor &&\n (markRootUpdated$1(nearestMountedAncestor, 2),\n ensureRootIsScheduled(nearestMountedAncestor));\n break;\n }\n }\n nearestMountedAncestor = nearestMountedAncestor.return;\n }\n}\nfunction attachPingListener(root, wakeable, lanes) {\n var pingCache = root.pingCache;\n if (null === pingCache) {\n pingCache = root.pingCache = new PossiblyWeakMap();\n var threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else\n (threadIDs = pingCache.get(wakeable)),\n void 0 === threadIDs &&\n ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));\n threadIDs.has(lanes) ||\n ((workInProgressRootDidAttachPingListener = !0),\n threadIDs.add(lanes),\n (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),\n wakeable.then(root, root));\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n null !== pingCache && pingCache.delete(wakeable);\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n workInProgressRoot === root &&\n (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&\n (4 === workInProgressRootExitStatus ||\n (3 === workInProgressRootExitStatus &&\n (workInProgressRootRenderLanes & 62914560) ===\n workInProgressRootRenderLanes &&\n 300 > now() - globalMostRecentFallbackTime)\n ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)\n : (workInProgressRootPingedLanes |= pingedLanes));\n ensureRootIsScheduled(root);\n}\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n 0 === retryLane &&\n (retryLane = 0 === (boundaryFiber.mode & 1) ? 2 : claimNextRetryLane());\n boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n null !== boundaryFiber &&\n (markRootUpdated$1(boundaryFiber, retryLane),\n ensureRootIsScheduled(boundaryFiber));\n}\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState,\n retryLane = 0;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = 0;\n switch (boundaryFiber.tag) {\n case 13:\n var retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n break;\n case 19:\n retryCache = boundaryFiber.stateNode;\n break;\n case 22:\n retryCache = boundaryFiber.stateNode._retryCache;\n break;\n default:\n throw Error(\n \"Pinged unknown suspense boundary type. This is probably a bug in React.\"\n );\n }\n null !== retryCache && retryCache.delete(wakeable);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction scheduleCallback(priorityLevel, callback) {\n return scheduleCallback$2(priorityLevel, callback);\n}\nfunction FiberNode(tag, pendingProps, key, mode) {\n this.tag = tag;\n this.key = key;\n this.sibling =\n this.child =\n this.return =\n this.stateNode =\n this.type =\n this.elementType =\n null;\n this.index = 0;\n this.refCleanup = this.ref = null;\n this.pendingProps = pendingProps;\n this.dependencies =\n this.memoizedState =\n this.updateQueue =\n this.memoizedProps =\n null;\n this.mode = mode;\n this.subtreeFlags = this.flags = 0;\n this.deletions = null;\n this.childLanes = this.lanes = 0;\n this.alternate = null;\n}\nfunction createFiber(tag, pendingProps, key, mode) {\n return new FiberNode(tag, pendingProps, key, mode);\n}\nfunction shouldConstruct(Component) {\n Component = Component.prototype;\n return !(!Component || !Component.isReactComponent);\n}\nfunction resolveLazyComponentTag(Component) {\n if (\"function\" === typeof Component)\n return shouldConstruct(Component) ? 1 : 0;\n if (void 0 !== Component && null !== Component) {\n Component = Component.$$typeof;\n if (Component === REACT_FORWARD_REF_TYPE) return 11;\n if (Component === REACT_MEMO_TYPE) return 14;\n }\n return 2;\n}\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n null === workInProgress\n ? ((workInProgress = createFiber(\n current.tag,\n pendingProps,\n current.key,\n current.mode\n )),\n (workInProgress.elementType = current.elementType),\n (workInProgress.type = current.type),\n (workInProgress.stateNode = current.stateNode),\n (workInProgress.alternate = current),\n (current.alternate = workInProgress))\n : ((workInProgress.pendingProps = pendingProps),\n (workInProgress.type = current.type),\n (workInProgress.flags = 0),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null));\n workInProgress.flags = current.flags & 31457280;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n pendingProps = current.dependencies;\n workInProgress.dependencies =\n null === pendingProps\n ? null\n : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n workInProgress.refCleanup = current.refCleanup;\n return workInProgress;\n}\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n workInProgress.flags &= 31457282;\n var current = workInProgress.alternate;\n null === current\n ? ((workInProgress.childLanes = 0),\n (workInProgress.lanes = renderLanes),\n (workInProgress.child = null),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.memoizedProps = null),\n (workInProgress.memoizedState = null),\n (workInProgress.updateQueue = null),\n (workInProgress.dependencies = null),\n (workInProgress.stateNode = null))\n : ((workInProgress.childLanes = current.childLanes),\n (workInProgress.lanes = current.lanes),\n (workInProgress.child = current.child),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null),\n (workInProgress.memoizedProps = current.memoizedProps),\n (workInProgress.memoizedState = current.memoizedState),\n (workInProgress.updateQueue = current.updateQueue),\n (workInProgress.type = current.type),\n (renderLanes = current.dependencies),\n (workInProgress.dependencies =\n null === renderLanes\n ? null\n : {\n lanes: renderLanes.lanes,\n firstContext: renderLanes.firstContext\n }));\n return workInProgress;\n}\nfunction createFiberFromTypeAndProps(\n type,\n key,\n pendingProps,\n owner,\n mode,\n lanes\n) {\n var fiberTag = 2;\n owner = type;\n if (\"function\" === typeof type) shouldConstruct(type) && (fiberTag = 1);\n else if (\"string\" === typeof type) fiberTag = 5;\n else\n a: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n case REACT_STRICT_MODE_TYPE:\n fiberTag = 8;\n mode |= 8;\n 0 !== (mode & 1) && (mode |= 16);\n break;\n case REACT_PROFILER_TYPE:\n return (\n (type = createFiber(12, pendingProps, key, mode | 2)),\n (type.elementType = REACT_PROFILER_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_TYPE:\n return (\n (type = createFiber(13, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_LIST_TYPE:\n return (\n (type = createFiber(19, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_LIST_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n default:\n if (\"object\" === typeof type && null !== type)\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = 10;\n break a;\n case REACT_CONTEXT_TYPE:\n fiberTag = 9;\n break a;\n case REACT_CONSUMER_TYPE:\n case REACT_FORWARD_REF_TYPE:\n fiberTag = 11;\n break a;\n case REACT_MEMO_TYPE:\n fiberTag = 14;\n break a;\n case REACT_LAZY_TYPE:\n fiberTag = 16;\n owner = null;\n break a;\n }\n throw Error(\n \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" +\n ((null == type ? type : typeof type) + \".\")\n );\n }\n key = createFiber(fiberTag, pendingProps, key, mode);\n key.elementType = type;\n key.type = owner;\n key.lanes = lanes;\n return key;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n elements = createFiber(7, elements, key, mode);\n elements.lanes = lanes;\n return elements;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n pendingProps = createFiber(22, pendingProps, key, mode);\n pendingProps.elementType = REACT_OFFSCREEN_TYPE;\n pendingProps.lanes = lanes;\n var primaryChildInstance = {\n _visibility: 1,\n _pendingVisibility: 1,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null,\n _current: null,\n detach: function () {\n var fiber = primaryChildInstance._current;\n if (null === fiber)\n throw Error(\n \"Calling Offscreen.detach before instance handle has been set.\"\n );\n if (0 === (primaryChildInstance._pendingVisibility & 2)) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root &&\n ((primaryChildInstance._pendingVisibility |= 2),\n scheduleUpdateOnFiber(root, fiber, 2));\n }\n },\n attach: function () {\n var fiber = primaryChildInstance._current;\n if (null === fiber)\n throw Error(\n \"Calling Offscreen.detach before instance handle has been set.\"\n );\n if (0 !== (primaryChildInstance._pendingVisibility & 2)) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root &&\n ((primaryChildInstance._pendingVisibility &= -3),\n scheduleUpdateOnFiber(root, fiber, 2));\n }\n }\n };\n pendingProps.stateNode = primaryChildInstance;\n return pendingProps;\n}\nfunction createFiberFromText(content, mode, lanes) {\n content = createFiber(6, content, null, mode);\n content.lanes = lanes;\n return content;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n mode = createFiber(\n 4,\n null !== portal.children ? portal.children : [],\n portal.key,\n mode\n );\n mode.lanes = lanes;\n mode.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n implementation: portal.implementation\n };\n return mode;\n}\nfunction FiberRootNode(\n containerInfo,\n tag,\n hydrate,\n identifierPrefix,\n onRecoverableError,\n formState\n) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.finishedWork =\n this.pingCache =\n this.current =\n this.pendingChildren =\n null;\n this.timeoutHandle = -1;\n this.callbackNode =\n this.next =\n this.pendingContext =\n this.context =\n this.cancelPendingCommit =\n null;\n this.callbackPriority = 0;\n this.expirationTimes = createLaneMap(-1);\n this.entangledLanes =\n this.shellSuspendCounter =\n this.errorRecoveryDisabledLanes =\n this.finishedLanes =\n this.expiredLanes =\n this.pingedLanes =\n this.suspendedLanes =\n this.pendingLanes =\n 0;\n this.entanglements = createLaneMap(0);\n this.hiddenUpdates = createLaneMap(null);\n this.identifierPrefix = identifierPrefix;\n this.onRecoverableError = onRecoverableError;\n this.formState = formState;\n this.incompleteTransitions = new Map();\n}\nfunction createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\nfunction findHostInstance(component) {\n var fiber = component._reactInternals;\n if (void 0 === fiber) {\n if (\"function\" === typeof component.render)\n throw Error(\"Unable to find node on an unmounted component.\");\n component = Object.keys(component).join(\",\");\n throw Error(\n \"Argument appears to not be a ReactComponent. Keys: \" + component\n );\n }\n component = findCurrentHostFiber(fiber);\n return null === component ? null : getPublicInstance(component.stateNode);\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n parentComponent = container.current;\n var lane = requestUpdateLane(parentComponent);\n null === container.context\n ? (container.context = emptyContextObject)\n : (container.pendingContext = emptyContextObject);\n container = createUpdate(lane);\n container.payload = { element: element };\n callback = void 0 === callback ? null : callback;\n null !== callback && (container.callback = callback);\n element = enqueueUpdate(parentComponent, container, lane);\n null !== element &&\n (scheduleUpdateOnFiber(element, parentComponent, lane),\n entangleTransitions(element, parentComponent, lane));\n return lane;\n}\nfunction emptyFindFiberByHostInstance() {\n return null;\n}\nfunction findNodeHandle(componentOrHandle) {\n if (null == componentOrHandle) return null;\n if (\"number\" === typeof componentOrHandle) return componentOrHandle;\n if (componentOrHandle._nativeTag) return componentOrHandle._nativeTag;\n if (\n null != componentOrHandle.canonical &&\n null != componentOrHandle.canonical.nativeTag\n )\n return componentOrHandle.canonical.nativeTag;\n var nativeTag =\n ReactNativePrivateInterface.getNativeTagFromPublicInstance(\n componentOrHandle\n );\n if (nativeTag) return nativeTag;\n componentOrHandle = findHostInstance(componentOrHandle);\n return null == componentOrHandle\n ? componentOrHandle\n : null != componentOrHandle._nativeTag\n ? componentOrHandle._nativeTag\n : ReactNativePrivateInterface.getNativeTagFromPublicInstance(\n componentOrHandle\n );\n}\nfunction getInspectorDataForInstance() {\n throw Error(\"getInspectorDataForInstance() is not available in production\");\n}\nfunction onRecoverableError(error) {\n console.error(error);\n}\nfunction unmountComponentAtNode(containerTag) {\n var root = roots.get(containerTag);\n root &&\n updateContainer(null, root, null, function () {\n roots.delete(containerTag);\n });\n}\nbatchedUpdatesImpl = function (fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= 1;\n try {\n return fn(a);\n } finally {\n (executionContext = prevExecutionContext),\n 0 === executionContext &&\n ((workInProgressRootRenderTargetTime = now() + 500),\n flushSyncWorkAcrossRoots_impl(!0));\n }\n};\nvar roots = new Map(),\n devToolsConfig$jscomp$inline_1100 = {\n findFiberByHostInstance: getInstanceFromTag,\n bundleType: 0,\n version: \"18.3.0-canary-9372c6311-20240315\",\n rendererPackageName: \"react-native-renderer\",\n rendererConfig: {\n getInspectorDataForInstance: getInspectorDataForInstance,\n getInspectorDataForViewTag: function () {\n throw Error(\n \"getInspectorDataForViewTag() is not available in production\"\n );\n },\n getInspectorDataForViewAtPoint: function () {\n throw Error(\n \"getInspectorDataForViewAtPoint() is not available in production.\"\n );\n }.bind(null, findNodeHandle)\n }\n };\nvar internals$jscomp$inline_1342 = {\n bundleType: devToolsConfig$jscomp$inline_1100.bundleType,\n version: devToolsConfig$jscomp$inline_1100.version,\n rendererPackageName: devToolsConfig$jscomp$inline_1100.rendererPackageName,\n rendererConfig: devToolsConfig$jscomp$inline_1100.rendererConfig,\n overrideHookState: null,\n overrideHookStateDeletePath: null,\n overrideHookStateRenamePath: null,\n overrideProps: null,\n overridePropsDeletePath: null,\n overridePropsRenamePath: null,\n setErrorHandler: null,\n setSuspenseHandler: null,\n scheduleUpdate: null,\n currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,\n findHostInstanceByFiber: function (fiber) {\n fiber = findCurrentHostFiber(fiber);\n return null === fiber ? null : fiber.stateNode;\n },\n findFiberByHostInstance:\n devToolsConfig$jscomp$inline_1100.findFiberByHostInstance ||\n emptyFindFiberByHostInstance,\n findHostInstancesForRefresh: null,\n scheduleRefresh: null,\n scheduleRoot: null,\n setRefreshHandler: null,\n getCurrentFiber: null,\n reconcilerVersion: \"18.3.0-canary-9372c6311-20240315\"\n};\nif (\"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {\n var hook$jscomp$inline_1343 = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (\n !hook$jscomp$inline_1343.isDisabled &&\n hook$jscomp$inline_1343.supportsFiber\n )\n try {\n (rendererID = hook$jscomp$inline_1343.inject(\n internals$jscomp$inline_1342\n )),\n (injectedHook = hook$jscomp$inline_1343);\n } catch (err) {}\n}\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n computeComponentStackForErrorReporting: function (reactTag) {\n return (reactTag = getInstanceFromTag(reactTag))\n ? getStackByFiberInDevAndProd(reactTag)\n : \"\";\n }\n};\nexports.createPortal = function (children, containerTag) {\n return createPortal$1(\n children,\n containerTag,\n null,\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null\n );\n};\nexports.dispatchCommand = function (handle, command, args) {\n var nativeTag =\n null != handle._nativeTag\n ? handle._nativeTag\n : ReactNativePrivateInterface.getNativeTagFromPublicInstance(handle);\n null != nativeTag &&\n ((handle = ReactNativePrivateInterface.getNodeFromPublicInstance(handle)),\n null != handle\n ? nativeFabricUIManager.dispatchCommand(handle, command, args)\n : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand(\n nativeTag,\n command,\n args\n ));\n};\nexports.findHostInstance_DEPRECATED = function (componentOrHandle) {\n return null == componentOrHandle\n ? null\n : componentOrHandle.canonical && componentOrHandle.canonical.publicInstance\n ? componentOrHandle.canonical.publicInstance\n : componentOrHandle._nativeTag\n ? componentOrHandle\n : findHostInstance(componentOrHandle);\n};\nexports.findNodeHandle = findNodeHandle;\nexports.getInspectorDataForInstance = getInspectorDataForInstance;\nexports.isChildPublicInstance = function () {\n throw Error(\"isChildPublicInstance() is not available in production.\");\n};\nexports.render = function (element, containerTag, callback) {\n var root = roots.get(containerTag);\n if (!root) {\n root = new FiberRootNode(containerTag, 0, !1, \"\", onRecoverableError, null);\n var JSCompiler_inline_result = createFiber(3, null, null, 0);\n root.current = JSCompiler_inline_result;\n JSCompiler_inline_result.stateNode = root;\n JSCompiler_inline_result.memoizedState = {\n element: null,\n isDehydrated: !1,\n cache: null\n };\n initializeUpdateQueue(JSCompiler_inline_result);\n roots.set(containerTag, root);\n }\n updateContainer(element, root, null, callback);\n a: if (((element = root.current), element.child))\n switch (element.child.tag) {\n case 27:\n case 5:\n element = getPublicInstance(element.child.stateNode);\n break a;\n default:\n element = element.child.stateNode;\n }\n else element = null;\n return element;\n};\nexports.sendAccessibilityEvent = function (handle, eventType) {\n var nativeTag =\n null != handle._nativeTag\n ? handle._nativeTag\n : ReactNativePrivateInterface.getNativeTagFromPublicInstance(handle);\n null != nativeTag &&\n ((handle = ReactNativePrivateInterface.getNodeFromPublicInstance(handle)),\n null != handle\n ? nativeFabricUIManager.sendAccessibilityEvent(handle, eventType)\n : ReactNativePrivateInterface.legacySendAccessibilityEvent(\n nativeTag,\n eventType\n ));\n};\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unmountComponentAtNodeAndRemoveContainer = function (containerTag) {\n unmountComponentAtNode(containerTag);\n ReactNativePrivateInterface.UIManager.removeRootView(containerTag);\n};\nexports.unstable_batchedUpdates = batchedUpdates$1;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\nimport type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';\nimport type {ViewProps} from '../View/ViewPropTypes';\n\nimport StyleSheet, {type ColorValue} from '../../StyleSheet/StyleSheet';\nimport Platform from '../../Utilities/Platform';\nimport View from '../View/View';\nimport * as React from 'react';\n\nconst PlatformActivityIndicator =\n Platform.OS === 'android'\n ? require('../ProgressBarAndroid/ProgressBarAndroid')\n : require('./ActivityIndicatorViewNativeComponent').default;\n\nconst GRAY = '#999999';\n\ntype IndicatorSize = number | 'small' | 'large';\n\ntype IOSProps = $ReadOnly<{|\n /**\n Whether the indicator should hide when not animating.\n\n @platform ios\n */\n hidesWhenStopped?: ?boolean,\n|}>;\ntype Props = $ReadOnly<{|\n ...ViewProps,\n ...IOSProps,\n\n /**\n \tWhether to show the indicator (`true`) or hide it (`false`).\n */\n animating?: ?boolean,\n\n /**\n The foreground color of the spinner.\n\n @default {@platform android} `null` (system accent default color)\n @default {@platform ios} '#999999'\n */\n color?: ?ColorValue,\n\n /**\n Size of the indicator.\n\n @type enum(`'small'`, `'large'`)\n @type {@platform android} number\n */\n size?: ?IndicatorSize,\n|}>;\n\nconst ActivityIndicator = (\n {\n animating = true,\n color = Platform.OS === 'ios' ? GRAY : null,\n hidesWhenStopped = true,\n onLayout,\n size = 'small',\n style,\n ...restProps\n }: Props,\n forwardedRef?: any,\n) => {\n let sizeStyle;\n let sizeProp;\n\n switch (size) {\n case 'small':\n sizeStyle = styles.sizeSmall;\n sizeProp = 'small';\n break;\n case 'large':\n sizeStyle = styles.sizeLarge;\n sizeProp = 'large';\n break;\n default:\n sizeStyle = {height: size, width: size};\n break;\n }\n\n const nativeProps = {\n animating,\n color,\n hidesWhenStopped,\n ...restProps,\n ref: forwardedRef,\n style: sizeStyle,\n size: sizeProp,\n };\n\n const androidProps = {\n styleAttr: 'Normal',\n indeterminate: true,\n };\n\n return (\n \n {Platform.OS === 'android' ? (\n // $FlowFixMe[prop-missing] Flow doesn't know when this is the android component\n \n ) : (\n /* $FlowFixMe[prop-missing] (>=0.106.0 site=react_native_android_fb) This comment\n * suppresses an error found when Flow v0.106 was deployed. To see the\n * error, delete this comment and run Flow. */\n \n )}\n \n );\n};\n\n/**\n Displays a circular loading indicator.\n\n ```SnackPlayer name=ActivityIndicator%20Example\n import React from 'react';\n import {ActivityIndicator, StyleSheet, View} from 'react-native';\n\n const App = () => (\n \n \n \n \n \n \n );\n\n const styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n },\n horizontal: {\n flexDirection: 'row',\n justifyContent: 'space-around',\n padding: 10,\n },\n });\n\n export default App;\n```\n*/\n\nconst ActivityIndicatorWithRef: React.AbstractComponent<\n Props,\n HostComponent,\n> = React.forwardRef(ActivityIndicator);\nActivityIndicatorWithRef.displayName = 'ActivityIndicator';\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n sizeSmall: {\n width: 20,\n height: 20,\n },\n sizeLarge: {\n width: 36,\n height: 36,\n },\n});\n\nexport default ActivityIndicatorWithRef;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\nimport type {ViewProps} from '../View/ViewPropTypes';\n\nimport ProgressBarAndroidNativeComponent from './ProgressBarAndroidNativeComponent';\n\nconst React = require('react');\n\nexport type ProgressBarAndroidProps = $ReadOnly<{|\n ...ViewProps,\n\n /**\n * Style of the ProgressBar and whether it shows indeterminate progress (e.g. spinner).\n *\n * `indeterminate` can only be false if `styleAttr` is Horizontal, and requires a\n * `progress` value.\n */\n ...\n | {|\n styleAttr: 'Horizontal',\n indeterminate: false,\n progress: number,\n |}\n | {|\n typeAttr:\n | 'Horizontal'\n | 'Normal'\n | 'Small'\n | 'Large'\n | 'Inverse'\n | 'SmallInverse'\n | 'LargeInverse',\n indeterminate: true,\n |},\n /**\n * Whether to show the ProgressBar (true, the default) or hide it (false).\n */\n animating?: ?boolean,\n /**\n * Color of the progress bar.\n */\n color?: ?ColorValue,\n /**\n * Used to locate this view in end-to-end tests.\n */\n testID?: ?string,\n|}>;\n\n/**\n * React component that wraps the Android-only `ProgressBar`. This component is\n * used to indicate that the app is loading or there is activity in the app.\n *\n * Example:\n *\n * ```\n * render: function() {\n * var progressBar =\n * \n * \n * ;\n\n * return (\n * \n * );\n * },\n * ```\n */\nconst ProgressBarAndroid = (\n {\n styleAttr = 'Normal',\n indeterminate = true,\n animating = true,\n ...restProps\n }: ProgressBarAndroidProps,\n forwardedRef: ?React.Ref,\n) => {\n return (\n \n );\n};\n\nconst ProgressBarAndroidToExport = React.forwardRef(ProgressBarAndroid);\n\nmodule.exports =\n /* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an\n * error found when Flow v0.89 was deployed. To see the error, delete this\n * comment and run Flow. */\n (ProgressBarAndroidToExport: typeof ProgressBarAndroidNativeComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/ProgressBarAndroidNativeComponent';\nimport ProgressBarAndroidNativeComponent from '../../../src/private/specs/components/ProgressBarAndroidNativeComponent';\nexport default ProgressBarAndroidNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';\nimport type {\n Double,\n WithDefault,\n} from '../../../../Libraries/Types/CodegenTypes';\n\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n //Props\n styleAttr?: string,\n typeAttr?: string,\n indeterminate: boolean,\n progress?: WithDefault,\n animating?: WithDefault,\n color?: ?ColorValue,\n testID?: WithDefault,\n|}>;\n\nexport default (codegenNativeComponent('AndroidProgressBar', {\n interfaceOnly: true,\n}): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n// TODO: move this file to shims/ReactNative (requires React update and sync)\n\nimport type {HostComponent} from '../../Libraries/Renderer/shims/ReactNativeTypes';\n\nimport requireNativeComponent from '../../Libraries/ReactNative/requireNativeComponent';\nimport UIManager from '../ReactNative/UIManager';\n\n// TODO: import from CodegenSchema once workspaces are enabled\ntype Options = $ReadOnly<{|\n interfaceOnly?: boolean,\n paperComponentName?: string,\n paperComponentNameDeprecated?: string,\n excludedPlatforms?: $ReadOnlyArray<'iOS' | 'android'>,\n|}>;\n\nexport type NativeComponentType = HostComponent;\n\n// If this function runs then that means the view configs were not\n// generated at build time using `GenerateViewConfigJs.js`. Thus\n// we need to `requireNativeComponent` to get the view configs from view managers.\n// `requireNativeComponent` is not available in Bridgeless mode.\n// e.g. This function runs at runtime if `codegenNativeComponent` was not called\n// from a file suffixed with NativeComponent.js.\nfunction codegenNativeComponent(\n componentName: string,\n options?: Options,\n): NativeComponentType {\n if (global.RN$Bridgeless === true && __DEV__) {\n console.warn(\n `Codegen didn't run for ${componentName}. This will be an error in the future. Make sure you are using @react-native/babel-preset when building your JavaScript code.`,\n );\n }\n\n let componentNameInUse =\n options && options.paperComponentName != null\n ? options.paperComponentName\n : componentName;\n\n if (options != null && options.paperComponentNameDeprecated != null) {\n if (UIManager.hasViewManagerConfig(componentName)) {\n componentNameInUse = componentName;\n } else if (\n options.paperComponentNameDeprecated != null &&\n UIManager.hasViewManagerConfig(options.paperComponentNameDeprecated)\n ) {\n // $FlowFixMe[incompatible-type]\n componentNameInUse = options.paperComponentNameDeprecated;\n } else {\n throw new Error(\n `Failed to find native component for either ${componentName} or ${\n options.paperComponentNameDeprecated ?? '(unknown)'\n }`,\n );\n }\n }\n\n return (requireNativeComponent(\n // $FlowFixMe[incompatible-call]\n componentNameInUse,\n ): HostComponent);\n}\n\nexport default codegenNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {HostComponent} from '../Renderer/shims/ReactNativeTypes';\n\nconst createReactNativeComponentClass = require('../Renderer/shims/createReactNativeComponentClass');\nconst getNativeComponentAttributes = require('./getNativeComponentAttributes');\n\n/**\n * Creates values that can be used like React components which represent native\n * view managers. You should create JavaScript modules that wrap these values so\n * that the results are memoized. Example:\n *\n * const View = requireNativeComponent('RCTView');\n *\n */\n\nconst requireNativeComponent = (uiViewClassName: string): HostComponent =>\n ((createReactNativeComponentClass(uiViewClassName, () =>\n getNativeComponentAttributes(uiViewClassName),\n ): any): HostComponent);\n\nexport default requireNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @noformat\n * @nolint\n * @flow strict-local\n * @generated SignedSource<<62e766b69d440dab0a2d249f0cea38e0>>\n */\n\n'use strict';\n\nimport {ReactNativeViewConfigRegistry} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface';\nimport {type ViewConfig} from './ReactNativeTypes';\n\nconst {register} = ReactNativeViewConfigRegistry;\n\n/**\n * Creates a renderable ReactNative host component.\n * Use this method for view configs that are loaded from UIManager.\n * Use createReactNativeComponentClass() for view configs defined within JavaScript.\n *\n * @param {string} config iOS View configuration.\n * @private\n */\nconst createReactNativeComponentClass = function (\n name: string,\n callback: () => ViewConfig,\n): string {\n return register(name, callback);\n};\n\nmodule.exports = createReactNativeComponentClass;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/ActivityIndicatorViewNativeComponent';\nimport ActivityIndicatorViewNativeComponent from '../../../src/private/specs/components/ActivityIndicatorViewNativeComponent';\nexport default ActivityIndicatorViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';\nimport type {WithDefault} from '../../../../Libraries/Types/CodegenTypes';\n\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n /**\n * Whether the indicator should hide when not animating (true by default).\n *\n * See https://reactnative.dev/docs/activityindicator#hideswhenstopped-ios\n */\n hidesWhenStopped?: WithDefault,\n\n /**\n * Whether to show the indicator (true, the default) or hide it (false).\n *\n * See https://reactnative.dev/docs/activityindicator#animating\n */\n animating?: WithDefault,\n\n /**\n * The foreground color of the spinner (default is gray).\n *\n * See https://reactnative.dev/docs/activityindicator#color\n */\n color?: ?ColorValue,\n\n /**\n * Size of the indicator (default is 'small').\n * Passing a number to the size prop is only supported on Android.\n *\n * See https://reactnative.dev/docs/activityindicator#size\n */\n size?: WithDefault<'small' | 'large', 'small'>,\n|}>;\n\nexport default (codegenNativeComponent('ActivityIndicatorView', {\n paperComponentName: 'RCTActivityIndicatorView',\n}): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nimport type {TextStyleProp, ViewStyleProp} from '../StyleSheet/StyleSheet';\nimport type {PressEvent} from '../Types/CoreEventTypes';\nimport type {\n AccessibilityActionEvent,\n AccessibilityActionInfo,\n AccessibilityState,\n} from './View/ViewAccessibility';\n\nimport StyleSheet, {type ColorValue} from '../StyleSheet/StyleSheet';\nimport Text from '../Text/Text';\nimport Platform from '../Utilities/Platform';\nimport TouchableNativeFeedback from './Touchable/TouchableNativeFeedback';\nimport TouchableOpacity from './Touchable/TouchableOpacity';\nimport View from './View/View';\nimport invariant from 'invariant';\nimport * as React from 'react';\n\ntype ButtonProps = $ReadOnly<{|\n /**\n Text to display inside the button. On Android the given title will be\n converted to the uppercased form.\n */\n title: string,\n\n /**\n Handler to be called when the user taps the button. The first function\n argument is an event in form of [PressEvent](pressevent).\n */\n onPress: (event?: PressEvent) => mixed,\n\n /**\n If `true`, doesn't play system sound on touch.\n\n @platform android\n\n @default false\n */\n touchSoundDisabled?: ?boolean,\n\n /**\n Color of the text (iOS), or background color of the button (Android).\n\n @default {@platform android} '#2196F3'\n @default {@platform ios} '#007AFF'\n */\n color?: ?ColorValue,\n\n /**\n TV preferred focus.\n\n @platform tv\n\n @default false\n */\n hasTVPreferredFocus?: ?boolean,\n\n /**\n Designates the next view to receive focus when the user navigates down. See\n the [Android documentation][android:nextFocusDown].\n\n [android:nextFocusDown]:\n https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusDown\n\n @platform android, tv\n */\n nextFocusDown?: ?number,\n\n /**\n Designates the next view to receive focus when the user navigates forward.\n See the [Android documentation][android:nextFocusForward].\n\n [android:nextFocusForward]:\n https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusForward\n\n @platform android, tv\n */\n nextFocusForward?: ?number,\n\n /**\n Designates the next view to receive focus when the user navigates left. See\n the [Android documentation][android:nextFocusLeft].\n\n [android:nextFocusLeft]:\n https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusLeft\n\n @platform android, tv\n */\n nextFocusLeft?: ?number,\n\n /**\n Designates the next view to receive focus when the user navigates right. See\n the [Android documentation][android:nextFocusRight].\n\n [android:nextFocusRight]:\n https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusRight\n\n @platform android, tv\n */\n nextFocusRight?: ?number,\n\n /**\n Designates the next view to receive focus when the user navigates up. See\n the [Android documentation][android:nextFocusUp].\n\n [android:nextFocusUp]:\n https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusUp\n\n @platform android, tv\n */\n nextFocusUp?: ?number,\n\n /**\n Text to display for blindness accessibility features.\n */\n accessibilityLabel?: ?string,\n /**\n * Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel\n * https://github.com/facebook/react-native/issues/34424\n */\n 'aria-label'?: ?string,\n /**\n If `true`, disable all interactions for this component.\n\n @default false\n */\n disabled?: ?boolean,\n\n /**\n Used to locate this view in end-to-end tests.\n */\n testID?: ?string,\n\n /**\n * Accessibility props.\n */\n accessible?: ?boolean,\n accessibilityActions?: ?$ReadOnlyArray,\n onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed,\n accessibilityState?: ?AccessibilityState,\n\n /**\n * alias for accessibilityState\n *\n * see https://reactnative.dev/docs/accessibility#accessibilitystate\n */\n 'aria-busy'?: ?boolean,\n 'aria-checked'?: ?boolean | 'mixed',\n 'aria-disabled'?: ?boolean,\n 'aria-expanded'?: ?boolean,\n 'aria-selected'?: ?boolean,\n\n /**\n * [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services.\n */\n importantForAccessibility?: ?('auto' | 'yes' | 'no' | 'no-hide-descendants'),\n accessibilityHint?: ?string,\n accessibilityLanguage?: ?Stringish,\n|}>;\n\n/**\n A basic button component that should render nicely on any platform. Supports a\n minimal level of customization.\n\n If this button doesn't look right for your app, you can build your own button\n using [TouchableOpacity](touchableopacity) or\n [TouchableWithoutFeedback](touchablewithoutfeedback). For inspiration, look at\n the [source code for this button component][button:source]. Or, take a look at\n the [wide variety of button components built by the community]\n [button:examples].\n\n [button:source]:\n https://github.com/facebook/react-native/blob/HEAD/Libraries/Components/Button.js\n\n [button:examples]:\n https://js.coach/?menu%5Bcollections%5D=React%20Native&page=1&query=button\n\n ```jsx\n \n ```\n\n ```SnackPlayer name=Button%20Example\n import React from 'react';\n import { StyleSheet, Button, View, SafeAreaView, Text, Alert } from 'react-native';\n\n const Separator = () => (\n \n );\n\n const App = () => (\n \n \n \n The title and onPress handler are required. It is recommended to set accessibilityLabel to help make your app usable by everyone.\n \n Alert.alert('Simple Button pressed')}\n />\n \n \n \n \n Adjust the color in a way that looks standard on each platform. On iOS, the color prop controls the color of the text. On Android, the color adjusts the background color of the button.\n \n Alert.alert('Button with adjusted color pressed')}\n />\n \n \n \n \n All interaction for the component are disabled.\n \n Alert.alert('Cannot press this one')}\n />\n \n \n \n \n This layout strategy lets the title define the width of the button.\n \n \n Alert.alert('Left button pressed')}\n />\n Alert.alert('Right button pressed')}\n />\n \n \n \n );\n\n const styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n marginHorizontal: 16,\n },\n title: {\n textAlign: 'center',\n marginVertical: 8,\n },\n fixToText: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n separator: {\n marginVertical: 8,\n borderBottomColor: '#737373',\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n });\n\n export default App;\n ```\n */\n\nconst Touchable: typeof TouchableNativeFeedback | typeof TouchableOpacity =\n Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity;\n\nconst Button: React.AbstractComponent<\n ButtonProps,\n React.ElementRef,\n> = React.forwardRef((props: ButtonProps, ref) => {\n const {\n accessibilityLabel,\n accessibilityState,\n 'aria-busy': ariaBusy,\n 'aria-checked': ariaChecked,\n 'aria-disabled': ariaDisabled,\n 'aria-expanded': ariaExpanded,\n 'aria-label': ariaLabel,\n 'aria-selected': ariaSelected,\n importantForAccessibility,\n color,\n onPress,\n touchSoundDisabled,\n title,\n hasTVPreferredFocus,\n nextFocusDown,\n nextFocusForward,\n nextFocusLeft,\n nextFocusRight,\n nextFocusUp,\n testID,\n accessible,\n accessibilityActions,\n accessibilityHint,\n accessibilityLanguage,\n onAccessibilityAction,\n } = props;\n const buttonStyles: Array = [styles.button];\n const textStyles: Array = [styles.text];\n if (color) {\n if (Platform.OS === 'ios') {\n textStyles.push({color: color});\n } else {\n buttonStyles.push({backgroundColor: color});\n }\n }\n\n let _accessibilityState = {\n busy: ariaBusy ?? accessibilityState?.busy,\n checked: ariaChecked ?? accessibilityState?.checked,\n disabled: ariaDisabled ?? accessibilityState?.disabled,\n expanded: ariaExpanded ?? accessibilityState?.expanded,\n selected: ariaSelected ?? accessibilityState?.selected,\n };\n\n const disabled =\n props.disabled != null ? props.disabled : _accessibilityState?.disabled;\n\n _accessibilityState =\n disabled !== _accessibilityState?.disabled\n ? {..._accessibilityState, disabled}\n : _accessibilityState;\n\n if (disabled) {\n buttonStyles.push(styles.buttonDisabled);\n textStyles.push(styles.textDisabled);\n }\n\n invariant(\n typeof title === 'string',\n 'The title prop of a Button must be a string',\n );\n const formattedTitle =\n Platform.OS === 'android' ? title.toUpperCase() : title;\n\n // If `no` is specified for `importantForAccessibility`, it will be changed to `no-hide-descendants` because the text inside should not be focused.\n const _importantForAccessibility =\n importantForAccessibility === 'no'\n ? 'no-hide-descendants'\n : importantForAccessibility;\n\n return (\n \n \n \n {formattedTitle}\n \n \n \n );\n});\n\nButton.displayName = 'Button';\n\nconst styles = StyleSheet.create({\n button: Platform.select({\n ios: {},\n android: {\n elevation: 4,\n // Material design blue from https://material.google.com/style/color.html#color-color-palette\n backgroundColor: '#2196F3',\n borderRadius: 2,\n },\n }),\n text: {\n textAlign: 'center',\n margin: 8,\n ...Platform.select({\n ios: {\n // iOS blue from https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/\n color: '#007AFF',\n fontSize: 18,\n },\n android: {\n color: 'white',\n fontWeight: '500',\n },\n }),\n },\n buttonDisabled: Platform.select({\n ios: {},\n android: {\n elevation: 0,\n backgroundColor: '#dfdfdf',\n },\n }),\n textDisabled: Platform.select({\n ios: {\n color: '#cdcdcd',\n },\n android: {\n color: '#a1a1a1',\n },\n }),\n});\n\nexport default Button;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {PressEvent} from '../Types/CoreEventTypes';\nimport type {TextProps} from './TextProps';\n\nimport * as PressabilityDebug from '../Pressability/PressabilityDebug';\nimport usePressability from '../Pressability/usePressability';\nimport flattenStyle from '../StyleSheet/flattenStyle';\nimport processColor from '../StyleSheet/processColor';\nimport Platform from '../Utilities/Platform';\nimport TextAncestor from './TextAncestor';\nimport {NativeText, NativeVirtualText} from './TextNativeComponent';\nimport * as React from 'react';\nimport {useContext, useMemo, useState} from 'react';\n\n/**\n * Text is the fundamental component for displaying text.\n *\n * @see https://reactnative.dev/docs/text\n */\nconst Text: React.AbstractComponent<\n TextProps,\n React.ElementRef,\n> = React.forwardRef((props: TextProps, forwardedRef) => {\n const {\n accessible,\n accessibilityLabel,\n accessibilityState,\n allowFontScaling,\n 'aria-busy': ariaBusy,\n 'aria-checked': ariaChecked,\n 'aria-disabled': ariaDisabled,\n 'aria-expanded': ariaExpanded,\n 'aria-label': ariaLabel,\n 'aria-selected': ariaSelected,\n ellipsizeMode,\n disabled,\n id,\n nativeID,\n numberOfLines,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n onResponderTerminationRequest,\n onStartShouldSetResponder,\n pressRetentionOffset,\n selectable,\n selectionColor,\n suppressHighlighting,\n style,\n ...restProps\n } = props;\n\n const [isHighlighted, setHighlighted] = useState(false);\n\n const _accessibilityLabel = ariaLabel ?? accessibilityLabel;\n\n let _accessibilityState: ?TextProps['accessibilityState'] =\n accessibilityState;\n if (\n ariaBusy != null ||\n ariaChecked != null ||\n ariaDisabled != null ||\n ariaExpanded != null ||\n ariaSelected != null\n ) {\n if (_accessibilityState != null) {\n _accessibilityState = {\n busy: ariaBusy ?? _accessibilityState.busy,\n checked: ariaChecked ?? _accessibilityState.checked,\n disabled: ariaDisabled ?? _accessibilityState.disabled,\n expanded: ariaExpanded ?? _accessibilityState.expanded,\n selected: ariaSelected ?? _accessibilityState.selected,\n };\n } else {\n _accessibilityState = {\n busy: ariaBusy,\n checked: ariaChecked,\n disabled: ariaDisabled,\n expanded: ariaExpanded,\n selected: ariaSelected,\n };\n }\n }\n\n const _accessibilityStateDisabled = _accessibilityState?.disabled;\n const _disabled = disabled ?? _accessibilityStateDisabled;\n\n const isPressable =\n (onPress != null ||\n onLongPress != null ||\n onStartShouldSetResponder != null) &&\n _disabled !== true;\n\n const initialized = useLazyInitialization(isPressable);\n const config = useMemo(() => {\n if (!initialized) {\n return null;\n }\n\n let _onPressIn = onPressIn;\n let _onPressOut = onPressOut;\n\n // Updating isHighlighted causes unnecessary re-renders for platforms that don't use it\n // in the best case, and cause issues with text selection in the worst case. Forcing\n // the isHighlighted prop to false on all platforms except iOS.\n if (Platform.OS === 'ios') {\n _onPressIn = (event: PressEvent) => {\n setHighlighted(suppressHighlighting == null || !suppressHighlighting);\n onPressIn?.(event);\n };\n\n _onPressOut = (event: PressEvent) => {\n setHighlighted(false);\n onPressOut?.(event);\n };\n }\n\n return {\n disabled: !isPressable,\n pressRectOffset: pressRetentionOffset,\n onLongPress,\n onPress,\n onPressIn: _onPressIn,\n onPressOut: _onPressOut,\n };\n }, [\n initialized,\n isPressable,\n pressRetentionOffset,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting,\n ]);\n\n const eventHandlers = usePressability(config);\n const eventHandlersForText = useMemo(\n () =>\n eventHandlers == null\n ? null\n : {\n onResponderGrant(event: PressEvent) {\n eventHandlers.onResponderGrant(event);\n if (onResponderGrant != null) {\n onResponderGrant(event);\n }\n },\n onResponderMove(event: PressEvent) {\n eventHandlers.onResponderMove(event);\n if (onResponderMove != null) {\n onResponderMove(event);\n }\n },\n onResponderRelease(event: PressEvent) {\n eventHandlers.onResponderRelease(event);\n if (onResponderRelease != null) {\n onResponderRelease(event);\n }\n },\n onResponderTerminate(event: PressEvent) {\n eventHandlers.onResponderTerminate(event);\n if (onResponderTerminate != null) {\n onResponderTerminate(event);\n }\n },\n onClick: eventHandlers.onClick,\n onResponderTerminationRequest:\n onResponderTerminationRequest != null\n ? onResponderTerminationRequest\n : eventHandlers.onResponderTerminationRequest,\n onStartShouldSetResponder:\n onStartShouldSetResponder != null\n ? onStartShouldSetResponder\n : eventHandlers.onStartShouldSetResponder,\n },\n [\n eventHandlers,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n onResponderTerminationRequest,\n onStartShouldSetResponder,\n ],\n );\n\n // TODO: Move this processing to the view configuration.\n const _selectionColor =\n selectionColor == null ? null : processColor(selectionColor);\n\n let _style = style;\n if (__DEV__) {\n if (PressabilityDebug.isEnabled() && onPress != null) {\n _style = [style, {color: 'magenta'}];\n }\n }\n\n let _numberOfLines = numberOfLines;\n if (_numberOfLines != null && !(_numberOfLines >= 0)) {\n if (__DEV__) {\n console.error(\n `'numberOfLines' in must be a non-negative number, received: ${_numberOfLines}. The value will be set to 0.`,\n );\n }\n _numberOfLines = 0;\n }\n\n let _selectable = selectable;\n const processedStyle = flattenStyle(_style);\n if (processedStyle != null) {\n if (typeof processedStyle.fontWeight === 'number') {\n // $FlowFixMe[cannot-write]\n processedStyle.fontWeight = processedStyle.fontWeight.toString();\n }\n\n if (processedStyle.userSelect != null) {\n _selectable = userSelectToSelectableMap[processedStyle.userSelect];\n // $FlowFixMe[cannot-write]\n delete processedStyle.userSelect;\n }\n\n if (processedStyle.verticalAlign != null) {\n // $FlowFixMe[cannot-write]\n processedStyle.textAlignVertical =\n verticalAlignToTextAlignVerticalMap[processedStyle.verticalAlign];\n // $FlowFixMe[cannot-write]\n delete processedStyle.verticalAlign;\n }\n }\n\n const _nativeID = id ?? nativeID;\n\n const hasTextAncestor = useContext(TextAncestor);\n if (hasTextAncestor) {\n return (\n \n );\n }\n\n // If the disabled prop and accessibilityState.disabled are out of sync but not both in\n // falsy states we need to update the accessibilityState object to use the disabled prop.\n if (\n _disabled !== _accessibilityStateDisabled &&\n ((_disabled != null && _disabled !== false) ||\n (_accessibilityStateDisabled != null &&\n _accessibilityStateDisabled !== false))\n ) {\n _accessibilityState = {..._accessibilityState, disabled: _disabled};\n }\n\n const _accessible = Platform.select({\n ios: accessible !== false,\n android:\n accessible == null ? onPress != null || onLongPress != null : accessible,\n default: accessible,\n });\n\n return (\n \n \n \n );\n});\n\nText.displayName = 'Text';\n\n/**\n * Returns false until the first time `newValue` is true, after which this will\n * always return true. This is necessary to lazily initialize `Pressability` so\n * we do not eagerly create one for every pressable `Text` component.\n */\nfunction useLazyInitialization(newValue: boolean): boolean {\n const [oldValue, setValue] = useState(newValue);\n if (!oldValue && newValue) {\n setValue(newValue);\n }\n return oldValue;\n}\n\nconst userSelectToSelectableMap = {\n auto: true,\n text: true,\n none: false,\n contain: true,\n all: true,\n};\n\nconst verticalAlignToTextAlignVerticalMap = {\n auto: 'auto',\n top: 'top',\n bottom: 'bottom',\n middle: 'center',\n};\n\nmodule.exports = Text;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ColorValue} from '../StyleSheet/StyleSheet';\n\nimport View from '../Components/View/View';\nimport normalizeColor from '../StyleSheet/normalizeColor';\nimport {type RectOrSize, normalizeRect} from '../StyleSheet/Rect';\nimport * as React from 'react';\n\ntype Props = $ReadOnly<{|\n color: ColorValue,\n hitSlop: ?RectOrSize,\n|}>;\n\n/**\n * Displays a debug overlay to visualize press targets when enabled via the\n * React Native Inspector. Calls to this module should be guarded by `__DEV__`,\n * for example:\n *\n * return (\n * \n * {children}\n * {__DEV__ ? (\n * \n * ) : null}\n * \n * );\n *\n */\nexport function PressabilityDebugView(props: Props): React.Node {\n if (__DEV__) {\n if (isEnabled()) {\n const normalizedColor = normalizeColor(props.color);\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n const baseColor =\n '#' + (normalizedColor ?? 0).toString(16).padStart(8, '0');\n const hitSlop = normalizeRect(props.hitSlop);\n return (\n \n );\n }\n }\n return null;\n}\n\nlet isDebugEnabled = false;\n\nexport function isEnabled(): boolean {\n if (__DEV__) {\n return isDebugEnabled;\n }\n return false;\n}\n\nexport function setEnabled(value: boolean): void {\n if (__DEV__) {\n isDebugEnabled = value;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport Pressability, {\n type EventHandlers,\n type PressabilityConfig,\n} from './Pressability';\nimport {useEffect, useRef} from 'react';\n\n/**\n * Creates a persistent instance of `Pressability` that automatically configures\n * itself and resets. Accepts null `config` to support lazy initialization. Once\n * initialized, will not un-initialize until the component has been unmounted.\n *\n * In order to use `usePressability`, do the following:\n *\n * const config = useMemo(...);\n * const eventHandlers = usePressability(config);\n * const pressableView = ;\n *\n */\nexport default function usePressability(\n config: ?PressabilityConfig,\n): ?EventHandlers {\n const pressabilityRef = useRef(null);\n if (config != null && pressabilityRef.current == null) {\n pressabilityRef.current = new Pressability(config);\n }\n const pressability = pressabilityRef.current;\n\n // On the initial mount, this is a no-op. On updates, `pressability` will be\n // re-configured to use the new configuration.\n useEffect(() => {\n if (config != null && pressability != null) {\n pressability.configure(config);\n }\n }, [config, pressability]);\n\n // On unmount, reset pending state and timers inside `pressability`. This is\n // a separate effect because we do not want to reset when `config` changes.\n useEffect(() => {\n if (pressability != null) {\n return () => {\n pressability.reset();\n };\n }\n }, [pressability]);\n\n return pressability == null ? null : pressability.getEventHandlers();\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {HostComponent} from '../Renderer/shims/ReactNativeTypes';\nimport type {\n BlurEvent,\n FocusEvent,\n MouseEvent,\n PressEvent,\n} from '../Types/CoreEventTypes';\n\nimport SoundManager from '../Components/Sound/SoundManager';\nimport ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags';\nimport UIManager from '../ReactNative/UIManager';\nimport {type RectOrSize, normalizeRect} from '../StyleSheet/Rect';\nimport {type PointerEvent} from '../Types/CoreEventTypes';\nimport Platform from '../Utilities/Platform';\nimport {isHoverEnabled} from './HoverState';\nimport PressabilityPerformanceEventEmitter from './PressabilityPerformanceEventEmitter.js';\nimport {type PressabilityTouchSignal as TouchSignal} from './PressabilityTypes.js';\nimport invariant from 'invariant';\nimport * as React from 'react';\n\nexport type PressabilityConfig = $ReadOnly<{|\n /**\n * Whether a press gesture can be interrupted by a parent gesture such as a\n * scroll event. Defaults to true.\n */\n cancelable?: ?boolean,\n\n /**\n * Whether to disable initialization of the press gesture.\n */\n disabled?: ?boolean,\n\n /**\n * Amount to extend the `VisualRect` by to create `HitRect`.\n */\n hitSlop?: ?RectOrSize,\n\n /**\n * Amount to extend the `HitRect` by to create `PressRect`.\n */\n pressRectOffset?: ?RectOrSize,\n\n /**\n * Whether to disable the systemm sound when `onPress` fires on Android.\n **/\n android_disableSound?: ?boolean,\n\n /**\n * Duration to wait after hover in before calling `onHoverIn`.\n */\n delayHoverIn?: ?number,\n\n /**\n * Duration to wait after hover out before calling `onHoverOut`.\n */\n delayHoverOut?: ?number,\n\n /**\n * Duration (in addition to `delayPressIn`) after which a press gesture is\n * considered a long press gesture. Defaults to 500 (milliseconds).\n */\n delayLongPress?: ?number,\n\n /**\n * Duration to wait after press down before calling `onPressIn`.\n */\n delayPressIn?: ?number,\n\n /**\n * Duration to wait after letting up before calling `onPressOut`.\n */\n delayPressOut?: ?number,\n\n /**\n * Minimum duration to wait between calling `onPressIn` and `onPressOut`.\n */\n minPressDuration?: ?number,\n\n /**\n * Called after the element loses focus.\n */\n onBlur?: ?(event: BlurEvent) => mixed,\n\n /**\n * Called after the element is focused.\n */\n onFocus?: ?(event: FocusEvent) => mixed,\n\n /**\n * Called when the hover is activated to provide visual feedback.\n */\n onHoverIn?: ?(event: MouseEvent) => mixed,\n\n /**\n * Called when the hover is deactivated to undo visual feedback.\n */\n onHoverOut?: ?(event: MouseEvent) => mixed,\n\n /**\n * Called when a long press gesture has been triggered.\n */\n onLongPress?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when a press gesture has been triggered.\n */\n onPress?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when the press is activated to provide visual feedback.\n */\n onPressIn?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when the press location moves. (This should rarely be used.)\n */\n onPressMove?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when the press is deactivated to undo visual feedback.\n */\n onPressOut?: ?(event: PressEvent) => mixed,\n\n /**\n * Whether to prevent any other native components from becoming responder\n * while this pressable is responder.\n */\n blockNativeResponder?: ?boolean,\n|}>;\n\nexport type EventHandlers = $ReadOnly<{|\n onBlur: (event: BlurEvent) => void,\n onClick: (event: PressEvent) => void,\n onFocus: (event: FocusEvent) => void,\n onMouseEnter?: (event: MouseEvent) => void,\n onMouseLeave?: (event: MouseEvent) => void,\n onPointerEnter?: (event: PointerEvent) => void,\n onPointerLeave?: (event: PointerEvent) => void,\n onResponderGrant: (event: PressEvent) => void | boolean,\n onResponderMove: (event: PressEvent) => void,\n onResponderRelease: (event: PressEvent) => void,\n onResponderTerminate: (event: PressEvent) => void,\n onResponderTerminationRequest: () => boolean,\n onStartShouldSetResponder: () => boolean,\n|}>;\n\ntype TouchState =\n | 'NOT_RESPONDER'\n | 'RESPONDER_INACTIVE_PRESS_IN'\n | 'RESPONDER_INACTIVE_PRESS_OUT'\n | 'RESPONDER_ACTIVE_PRESS_IN'\n | 'RESPONDER_ACTIVE_PRESS_OUT'\n | 'RESPONDER_ACTIVE_LONG_PRESS_IN'\n | 'RESPONDER_ACTIVE_LONG_PRESS_OUT'\n | 'ERROR';\n\nconst Transitions = Object.freeze({\n NOT_RESPONDER: {\n DELAY: 'ERROR',\n RESPONDER_GRANT: 'RESPONDER_INACTIVE_PRESS_IN',\n RESPONDER_RELEASE: 'ERROR',\n RESPONDER_TERMINATED: 'ERROR',\n ENTER_PRESS_RECT: 'ERROR',\n LEAVE_PRESS_RECT: 'ERROR',\n LONG_PRESS_DETECTED: 'ERROR',\n },\n RESPONDER_INACTIVE_PRESS_IN: {\n DELAY: 'RESPONDER_ACTIVE_PRESS_IN',\n RESPONDER_GRANT: 'ERROR',\n RESPONDER_RELEASE: 'NOT_RESPONDER',\n RESPONDER_TERMINATED: 'NOT_RESPONDER',\n ENTER_PRESS_RECT: 'RESPONDER_INACTIVE_PRESS_IN',\n LEAVE_PRESS_RECT: 'RESPONDER_INACTIVE_PRESS_OUT',\n LONG_PRESS_DETECTED: 'ERROR',\n },\n RESPONDER_INACTIVE_PRESS_OUT: {\n DELAY: 'RESPONDER_ACTIVE_PRESS_OUT',\n RESPONDER_GRANT: 'ERROR',\n RESPONDER_RELEASE: 'NOT_RESPONDER',\n RESPONDER_TERMINATED: 'NOT_RESPONDER',\n ENTER_PRESS_RECT: 'RESPONDER_INACTIVE_PRESS_IN',\n LEAVE_PRESS_RECT: 'RESPONDER_INACTIVE_PRESS_OUT',\n LONG_PRESS_DETECTED: 'ERROR',\n },\n RESPONDER_ACTIVE_PRESS_IN: {\n DELAY: 'ERROR',\n RESPONDER_GRANT: 'ERROR',\n RESPONDER_RELEASE: 'NOT_RESPONDER',\n RESPONDER_TERMINATED: 'NOT_RESPONDER',\n ENTER_PRESS_RECT: 'RESPONDER_ACTIVE_PRESS_IN',\n LEAVE_PRESS_RECT: 'RESPONDER_ACTIVE_PRESS_OUT',\n LONG_PRESS_DETECTED: 'RESPONDER_ACTIVE_LONG_PRESS_IN',\n },\n RESPONDER_ACTIVE_PRESS_OUT: {\n DELAY: 'ERROR',\n RESPONDER_GRANT: 'ERROR',\n RESPONDER_RELEASE: 'NOT_RESPONDER',\n RESPONDER_TERMINATED: 'NOT_RESPONDER',\n ENTER_PRESS_RECT: 'RESPONDER_ACTIVE_PRESS_IN',\n LEAVE_PRESS_RECT: 'RESPONDER_ACTIVE_PRESS_OUT',\n LONG_PRESS_DETECTED: 'ERROR',\n },\n RESPONDER_ACTIVE_LONG_PRESS_IN: {\n DELAY: 'ERROR',\n RESPONDER_GRANT: 'ERROR',\n RESPONDER_RELEASE: 'NOT_RESPONDER',\n RESPONDER_TERMINATED: 'NOT_RESPONDER',\n ENTER_PRESS_RECT: 'RESPONDER_ACTIVE_LONG_PRESS_IN',\n LEAVE_PRESS_RECT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT',\n LONG_PRESS_DETECTED: 'RESPONDER_ACTIVE_LONG_PRESS_IN',\n },\n RESPONDER_ACTIVE_LONG_PRESS_OUT: {\n DELAY: 'ERROR',\n RESPONDER_GRANT: 'ERROR',\n RESPONDER_RELEASE: 'NOT_RESPONDER',\n RESPONDER_TERMINATED: 'NOT_RESPONDER',\n ENTER_PRESS_RECT: 'RESPONDER_ACTIVE_LONG_PRESS_IN',\n LEAVE_PRESS_RECT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT',\n LONG_PRESS_DETECTED: 'ERROR',\n },\n ERROR: {\n DELAY: 'NOT_RESPONDER',\n RESPONDER_GRANT: 'RESPONDER_INACTIVE_PRESS_IN',\n RESPONDER_RELEASE: 'NOT_RESPONDER',\n RESPONDER_TERMINATED: 'NOT_RESPONDER',\n ENTER_PRESS_RECT: 'NOT_RESPONDER',\n LEAVE_PRESS_RECT: 'NOT_RESPONDER',\n LONG_PRESS_DETECTED: 'NOT_RESPONDER',\n },\n});\n\nconst isActiveSignal = (signal: TouchState) =>\n signal === 'RESPONDER_ACTIVE_PRESS_IN' ||\n signal === 'RESPONDER_ACTIVE_LONG_PRESS_IN';\n\nconst isActivationSignal = (signal: TouchState) =>\n signal === 'RESPONDER_ACTIVE_PRESS_OUT' ||\n signal === 'RESPONDER_ACTIVE_PRESS_IN';\n\nconst isPressInSignal = (signal: TouchState) =>\n signal === 'RESPONDER_INACTIVE_PRESS_IN' ||\n signal === 'RESPONDER_ACTIVE_PRESS_IN' ||\n signal === 'RESPONDER_ACTIVE_LONG_PRESS_IN';\n\nconst isTerminalSignal = (signal: TouchSignal) =>\n signal === 'RESPONDER_TERMINATED' || signal === 'RESPONDER_RELEASE';\n\nconst DEFAULT_LONG_PRESS_DELAY_MS = 500;\nconst DEFAULT_PRESS_RECT_OFFSETS = {\n bottom: 30,\n left: 20,\n right: 20,\n top: 20,\n};\nconst DEFAULT_MIN_PRESS_DURATION = 130;\n\nconst DEFAULT_LONG_PRESS_DEACTIVATION_DISTANCE = 10;\nlet longPressDeactivationDistance = DEFAULT_LONG_PRESS_DEACTIVATION_DISTANCE;\n\n/**\n * Pressability implements press handling capabilities.\n *\n * =========================== Pressability Tutorial ===========================\n *\n * The `Pressability` class helps you create press interactions by analyzing the\n * geometry of elements and observing when another responder (e.g. ScrollView)\n * has stolen the touch lock. It offers hooks for your component to provide\n * interaction feedback to the user:\n *\n * - When a press has activated (e.g. highlight an element)\n * - When a press has deactivated (e.g. un-highlight an element)\n * - When a press should trigger an action, meaning it activated and deactivated\n * while within the geometry of the element without the lock being stolen.\n *\n * A high quality interaction isn't as simple as you might think. There should\n * be a slight delay before activation. Moving your finger beyond an element's\n * bounds should trigger deactivation, but moving the same finger back within an\n * element's bounds should trigger reactivation.\n *\n * This should be consumed by functional components using `usePressability`. The\n * following steps are only relevant for using `Pressability` in classes:\n *\n * 1. Instantiate `Pressability` and store it on your component's state.\n *\n * state = {\n * pressability: new Pressability({\n * // ...\n * }),\n * };\n *\n * 2. Choose the rendered component who should collect the press events. On that\n * element, spread `pressability.getEventHandlers()` into its props.\n *\n * return (\n * \n * );\n *\n * 3. Update `Pressability` when your component mounts, updates, and unmounts.\n *\n * componentDidMount() {\n * this.state.pressability.configure(...);\n * }\n *\n * componentDidUpdate() {\n * this.state.pressability.configure(...);\n * }\n *\n * componentWillUnmount() {\n * this.state.pressability.reset();\n * }\n *\n * ==================== Pressability Implementation Details ====================\n *\n * `Pressability` only assumes that there exists a `HitRect` node. The `PressRect`\n * is an abstract box that is extended beyond the `HitRect`.\n *\n * # Geometry\n *\n * ┌────────────────────────┐\n * │ ┌──────────────────┐ │ - Presses start anywhere within `HitRect`, which\n * │ │ ┌────────────┐ │ │ is expanded via the prop `hitSlop`.\n * │ │ │ VisualRect │ │ │\n * │ │ └────────────┘ │ │ - When pressed down for sufficient amount of time\n * │ │ HitRect │ │ before letting up, `VisualRect` activates for\n * │ └──────────────────┘ │ as long as the press stays within `PressRect`.\n * │ PressRect o │\n * └────────────────────│───┘\n * Out Region └────── `PressRect`, which is expanded via the prop\n * `pressRectOffset`, allows presses to move\n * beyond `HitRect` while maintaining activation\n * and being eligible for a \"press\".\n *\n * # State Machine\n *\n * ┌───────────────┐ ◀──── RESPONDER_RELEASE\n * │ NOT_RESPONDER │\n * └───┬───────────┘ ◀──── RESPONDER_TERMINATED\n * │\n * │ RESPONDER_GRANT (HitRect)\n * │\n * ▼\n * ┌─────────────────────┐ ┌───────────────────┐ ┌───────────────────┐\n * │ RESPONDER_INACTIVE_ │ DELAY │ RESPONDER_ACTIVE_ │ T + DELAY │ RESPONDER_ACTIVE_ │\n * │ PRESS_IN ├────────▶ │ PRESS_IN ├────────────▶ │ LONG_PRESS_IN │\n * └─┬───────────────────┘ └─┬─────────────────┘ └─┬─────────────────┘\n * │ ▲ │ ▲ │ ▲\n * │LEAVE_ │ │LEAVE_ │ │LEAVE_ │\n * │PRESS_RECT │ENTER_ │PRESS_RECT │ENTER_ │PRESS_RECT │ENTER_\n * │ │PRESS_RECT │ │PRESS_RECT │ │PRESS_RECT\n * ▼ │ ▼ │ ▼ │\n * ┌─────────────┴───────┐ ┌─────────────┴─────┐ ┌─────────────┴─────┐\n * │ RESPONDER_INACTIVE_ │ DELAY │ RESPONDER_ACTIVE_ │ │ RESPONDER_ACTIVE_ │\n * │ PRESS_OUT ├────────▶ │ PRESS_OUT │ │ LONG_PRESS_OUT │\n * └─────────────────────┘ └───────────────────┘ └───────────────────┘\n *\n * T + DELAY => LONG_PRESS_DELAY + DELAY\n *\n * Not drawn are the side effects of each transition. The most important side\n * effect is the invocation of `onPress` and `onLongPress` that occur when a\n * responder is release while in the \"press in\" states.\n */\nexport default class Pressability {\n _config: PressabilityConfig;\n _eventHandlers: ?EventHandlers = null;\n _hoverInDelayTimeout: ?TimeoutID = null;\n _hoverOutDelayTimeout: ?TimeoutID = null;\n _isHovered: boolean = false;\n _longPressDelayTimeout: ?TimeoutID = null;\n _pressDelayTimeout: ?TimeoutID = null;\n _pressOutDelayTimeout: ?TimeoutID = null;\n _responderID: ?number | React.ElementRef> = null;\n _responderRegion: ?$ReadOnly<{|\n bottom: number,\n left: number,\n right: number,\n top: number,\n |}> = null;\n _touchActivatePosition: ?$ReadOnly<{|\n pageX: number,\n pageY: number,\n |}>;\n _touchActivateTime: ?number;\n _touchState: TouchState = 'NOT_RESPONDER';\n\n constructor(config: PressabilityConfig) {\n this.configure(config);\n }\n\n configure(config: PressabilityConfig): void {\n this._config = config;\n }\n\n /**\n * Resets any pending timers. This should be called on unmount.\n */\n reset(): void {\n this._cancelHoverInDelayTimeout();\n this._cancelHoverOutDelayTimeout();\n this._cancelLongPressDelayTimeout();\n this._cancelPressDelayTimeout();\n this._cancelPressOutDelayTimeout();\n\n // Ensure that, if any async event handlers are fired after unmount\n // due to a race, we don't call any configured callbacks.\n this._config = Object.freeze({});\n }\n\n /**\n * Returns a set of props to spread into the interactive element.\n */\n getEventHandlers(): EventHandlers {\n if (this._eventHandlers == null) {\n this._eventHandlers = this._createEventHandlers();\n }\n return this._eventHandlers;\n }\n\n static setLongPressDeactivationDistance(distance: number): void {\n longPressDeactivationDistance = distance;\n }\n\n _createEventHandlers(): EventHandlers {\n const focusEventHandlers = {\n onBlur: (event: BlurEvent): void => {\n const {onBlur} = this._config;\n if (onBlur != null) {\n onBlur(event);\n }\n },\n onFocus: (event: FocusEvent): void => {\n const {onFocus} = this._config;\n if (onFocus != null) {\n onFocus(event);\n }\n },\n };\n\n const responderEventHandlers = {\n onStartShouldSetResponder: (): boolean => {\n const {disabled} = this._config;\n return !disabled ?? true;\n },\n\n onResponderGrant: (event: PressEvent): void | boolean => {\n event.persist();\n\n this._cancelPressOutDelayTimeout();\n\n this._responderID = event.currentTarget;\n this._touchState = 'NOT_RESPONDER';\n this._receiveSignal('RESPONDER_GRANT', event);\n\n const delayPressIn = normalizeDelay(this._config.delayPressIn);\n if (delayPressIn > 0) {\n this._pressDelayTimeout = setTimeout(() => {\n this._receiveSignal('DELAY', event);\n }, delayPressIn);\n } else {\n this._receiveSignal('DELAY', event);\n }\n\n const delayLongPress = normalizeDelay(\n this._config.delayLongPress,\n 10,\n DEFAULT_LONG_PRESS_DELAY_MS - delayPressIn,\n );\n this._longPressDelayTimeout = setTimeout(() => {\n this._handleLongPress(event);\n }, delayLongPress + delayPressIn);\n\n return this._config.blockNativeResponder === true;\n },\n\n onResponderMove: (event: PressEvent): void => {\n const {onPressMove} = this._config;\n if (onPressMove != null) {\n onPressMove(event);\n }\n\n // Region may not have finished being measured, yet.\n const responderRegion = this._responderRegion;\n if (responderRegion == null) {\n return;\n }\n\n const touch = getTouchFromPressEvent(event);\n if (touch == null) {\n this._cancelLongPressDelayTimeout();\n this._receiveSignal('LEAVE_PRESS_RECT', event);\n return;\n }\n\n if (this._touchActivatePosition != null) {\n const deltaX = this._touchActivatePosition.pageX - touch.pageX;\n const deltaY = this._touchActivatePosition.pageY - touch.pageY;\n if (Math.hypot(deltaX, deltaY) > longPressDeactivationDistance) {\n this._cancelLongPressDelayTimeout();\n }\n }\n\n if (this._isTouchWithinResponderRegion(touch, responderRegion)) {\n this._receiveSignal('ENTER_PRESS_RECT', event);\n } else {\n this._cancelLongPressDelayTimeout();\n this._receiveSignal('LEAVE_PRESS_RECT', event);\n }\n },\n\n onResponderRelease: (event: PressEvent): void => {\n this._receiveSignal('RESPONDER_RELEASE', event);\n },\n\n onResponderTerminate: (event: PressEvent): void => {\n this._receiveSignal('RESPONDER_TERMINATED', event);\n },\n\n onResponderTerminationRequest: (): boolean => {\n const {cancelable} = this._config;\n return cancelable ?? true;\n },\n\n onClick: (event: PressEvent): void => {\n // If event has `pointerType`, it was emitted from a PointerEvent and\n // we should ignore it to avoid triggering `onPress` twice.\n if (event?.nativeEvent?.hasOwnProperty?.('pointerType')) {\n return;\n }\n\n // for non-pointer click events (e.g. accessibility clicks), we should only dispatch when we're the \"real\" target\n // in particular, we shouldn't respond to clicks from nested pressables\n if (event?.currentTarget !== event?.target) {\n event?.stopPropagation();\n return;\n }\n\n const {onPress, disabled} = this._config;\n if (onPress != null && disabled !== true) {\n onPress(event);\n }\n },\n };\n\n if (process.env.NODE_ENV === 'test') {\n // We are setting this in order to find this node in ReactNativeTestTools\n // $FlowFixMe[prop-missing]\n responderEventHandlers.onStartShouldSetResponder.testOnly_pressabilityConfig =\n () => this._config;\n }\n\n if (\n ReactNativeFeatureFlags.shouldPressibilityUseW3CPointerEventsForHover()\n ) {\n const hoverPointerEvents = {\n onPointerEnter: (undefined: void | (PointerEvent => void)),\n onPointerLeave: (undefined: void | (PointerEvent => void)),\n };\n const {onHoverIn, onHoverOut} = this._config;\n if (onHoverIn != null) {\n hoverPointerEvents.onPointerEnter = (event: PointerEvent) => {\n this._isHovered = true;\n this._cancelHoverOutDelayTimeout();\n if (onHoverIn != null) {\n const delayHoverIn = normalizeDelay(this._config.delayHoverIn);\n if (delayHoverIn > 0) {\n event.persist();\n this._hoverInDelayTimeout = setTimeout(() => {\n onHoverIn(convertPointerEventToMouseEvent(event));\n }, delayHoverIn);\n } else {\n onHoverIn(convertPointerEventToMouseEvent(event));\n }\n }\n };\n }\n if (onHoverOut != null) {\n hoverPointerEvents.onPointerLeave = (event: PointerEvent) => {\n if (this._isHovered) {\n this._isHovered = false;\n this._cancelHoverInDelayTimeout();\n if (onHoverOut != null) {\n const delayHoverOut = normalizeDelay(this._config.delayHoverOut);\n if (delayHoverOut > 0) {\n event.persist();\n this._hoverOutDelayTimeout = setTimeout(() => {\n onHoverOut(convertPointerEventToMouseEvent(event));\n }, delayHoverOut);\n } else {\n onHoverOut(convertPointerEventToMouseEvent(event));\n }\n }\n }\n };\n }\n return {\n ...focusEventHandlers,\n ...responderEventHandlers,\n ...hoverPointerEvents,\n };\n } else {\n const mouseEventHandlers =\n Platform.OS === 'ios' || Platform.OS === 'android'\n ? null\n : {\n onMouseEnter: (event: MouseEvent): void => {\n if (isHoverEnabled()) {\n this._isHovered = true;\n this._cancelHoverOutDelayTimeout();\n const {onHoverIn} = this._config;\n if (onHoverIn != null) {\n const delayHoverIn = normalizeDelay(\n this._config.delayHoverIn,\n );\n if (delayHoverIn > 0) {\n event.persist();\n this._hoverInDelayTimeout = setTimeout(() => {\n onHoverIn(event);\n }, delayHoverIn);\n } else {\n onHoverIn(event);\n }\n }\n }\n },\n\n onMouseLeave: (event: MouseEvent): void => {\n if (this._isHovered) {\n this._isHovered = false;\n this._cancelHoverInDelayTimeout();\n const {onHoverOut} = this._config;\n if (onHoverOut != null) {\n const delayHoverOut = normalizeDelay(\n this._config.delayHoverOut,\n );\n if (delayHoverOut > 0) {\n event.persist();\n this._hoverInDelayTimeout = setTimeout(() => {\n onHoverOut(event);\n }, delayHoverOut);\n } else {\n onHoverOut(event);\n }\n }\n }\n },\n };\n return {\n ...focusEventHandlers,\n ...responderEventHandlers,\n ...mouseEventHandlers,\n };\n }\n }\n\n /**\n * Receives a state machine signal, performs side effects of the transition\n * and stores the new state. Validates the transition as well.\n */\n _receiveSignal(signal: TouchSignal, event: PressEvent): void {\n // Especially on iOS, not all events have timestamps associated.\n // For telemetry purposes, this doesn't matter too much, as long as *some* do.\n // Since the native timestamp is integral for logging telemetry, just skip\n // events if they don't have a timestamp attached.\n if (event.nativeEvent.timestamp != null) {\n PressabilityPerformanceEventEmitter.emitEvent(() => {\n return {\n signal,\n nativeTimestamp: event.nativeEvent.timestamp,\n };\n });\n }\n\n const prevState = this._touchState;\n const nextState = Transitions[prevState]?.[signal];\n if (this._responderID == null && signal === 'RESPONDER_RELEASE') {\n return;\n }\n invariant(\n nextState != null && nextState !== 'ERROR',\n 'Pressability: Invalid signal `%s` for state `%s` on responder: %s',\n signal,\n prevState,\n typeof this._responderID === 'number'\n ? this._responderID\n : '<>',\n );\n if (prevState !== nextState) {\n this._performTransitionSideEffects(prevState, nextState, signal, event);\n this._touchState = nextState;\n }\n }\n\n /**\n * Performs a transition between touchable states and identify any activations\n * or deactivations (and callback invocations).\n */\n _performTransitionSideEffects(\n prevState: TouchState,\n nextState: TouchState,\n signal: TouchSignal,\n event: PressEvent,\n ): void {\n if (isTerminalSignal(signal)) {\n this._touchActivatePosition = null;\n this._cancelLongPressDelayTimeout();\n }\n\n const isInitialTransition =\n prevState === 'NOT_RESPONDER' &&\n nextState === 'RESPONDER_INACTIVE_PRESS_IN';\n\n const isActivationTransition =\n !isActivationSignal(prevState) && isActivationSignal(nextState);\n\n if (isInitialTransition || isActivationTransition) {\n this._measureResponderRegion();\n }\n\n if (isPressInSignal(prevState) && signal === 'LONG_PRESS_DETECTED') {\n const {onLongPress} = this._config;\n if (onLongPress != null) {\n onLongPress(event);\n }\n }\n\n const isPrevActive = isActiveSignal(prevState);\n const isNextActive = isActiveSignal(nextState);\n\n if (!isPrevActive && isNextActive) {\n this._activate(event);\n } else if (isPrevActive && !isNextActive) {\n this._deactivate(event);\n }\n\n if (isPressInSignal(prevState) && signal === 'RESPONDER_RELEASE') {\n // If we never activated (due to delays), activate and deactivate now.\n if (!isNextActive && !isPrevActive) {\n this._activate(event);\n this._deactivate(event);\n }\n const {onLongPress, onPress, android_disableSound} = this._config;\n if (onPress != null) {\n const isPressCanceledByLongPress =\n onLongPress != null && prevState === 'RESPONDER_ACTIVE_LONG_PRESS_IN';\n if (!isPressCanceledByLongPress) {\n if (Platform.OS === 'android' && android_disableSound !== true) {\n SoundManager.playTouchSound();\n }\n onPress(event);\n }\n }\n }\n\n this._cancelPressDelayTimeout();\n }\n\n _activate(event: PressEvent): void {\n const {onPressIn} = this._config;\n const {pageX, pageY} = getTouchFromPressEvent(event);\n this._touchActivatePosition = {pageX, pageY};\n this._touchActivateTime = Date.now();\n if (onPressIn != null) {\n onPressIn(event);\n }\n }\n\n _deactivate(event: PressEvent): void {\n const {onPressOut} = this._config;\n if (onPressOut != null) {\n const minPressDuration = normalizeDelay(\n this._config.minPressDuration,\n 0,\n DEFAULT_MIN_PRESS_DURATION,\n );\n const pressDuration = Date.now() - (this._touchActivateTime ?? 0);\n const delayPressOut = Math.max(\n minPressDuration - pressDuration,\n normalizeDelay(this._config.delayPressOut),\n );\n if (delayPressOut > 0) {\n event.persist();\n this._pressOutDelayTimeout = setTimeout(() => {\n onPressOut(event);\n }, delayPressOut);\n } else {\n onPressOut(event);\n }\n }\n this._touchActivateTime = null;\n }\n\n _measureResponderRegion(): void {\n if (this._responderID == null) {\n return;\n }\n\n if (typeof this._responderID === 'number') {\n UIManager.measure(this._responderID, this._measureCallback);\n } else {\n this._responderID.measure(this._measureCallback);\n }\n }\n\n _measureCallback = (\n left: number,\n top: number,\n width: number,\n height: number,\n pageX: number,\n pageY: number,\n ) => {\n if (!left && !top && !width && !height && !pageX && !pageY) {\n return;\n }\n this._responderRegion = {\n bottom: pageY + height,\n left: pageX,\n right: pageX + width,\n top: pageY,\n };\n };\n\n _isTouchWithinResponderRegion(\n touch: $PropertyType,\n responderRegion: $ReadOnly<{|\n bottom: number,\n left: number,\n right: number,\n top: number,\n |}>,\n ): boolean {\n const hitSlop = normalizeRect(this._config.hitSlop);\n const pressRectOffset = normalizeRect(this._config.pressRectOffset);\n\n let regionBottom = responderRegion.bottom;\n let regionLeft = responderRegion.left;\n let regionRight = responderRegion.right;\n let regionTop = responderRegion.top;\n\n if (hitSlop != null) {\n if (hitSlop.bottom != null) {\n regionBottom += hitSlop.bottom;\n }\n if (hitSlop.left != null) {\n regionLeft -= hitSlop.left;\n }\n if (hitSlop.right != null) {\n regionRight += hitSlop.right;\n }\n if (hitSlop.top != null) {\n regionTop -= hitSlop.top;\n }\n }\n\n regionBottom +=\n pressRectOffset?.bottom ?? DEFAULT_PRESS_RECT_OFFSETS.bottom;\n regionLeft -= pressRectOffset?.left ?? DEFAULT_PRESS_RECT_OFFSETS.left;\n regionRight += pressRectOffset?.right ?? DEFAULT_PRESS_RECT_OFFSETS.right;\n regionTop -= pressRectOffset?.top ?? DEFAULT_PRESS_RECT_OFFSETS.top;\n\n return (\n touch.pageX > regionLeft &&\n touch.pageX < regionRight &&\n touch.pageY > regionTop &&\n touch.pageY < regionBottom\n );\n }\n\n _handleLongPress(event: PressEvent): void {\n if (\n this._touchState === 'RESPONDER_ACTIVE_PRESS_IN' ||\n this._touchState === 'RESPONDER_ACTIVE_LONG_PRESS_IN'\n ) {\n this._receiveSignal('LONG_PRESS_DETECTED', event);\n }\n }\n\n _cancelHoverInDelayTimeout(): void {\n if (this._hoverInDelayTimeout != null) {\n clearTimeout(this._hoverInDelayTimeout);\n this._hoverInDelayTimeout = null;\n }\n }\n\n _cancelHoverOutDelayTimeout(): void {\n if (this._hoverOutDelayTimeout != null) {\n clearTimeout(this._hoverOutDelayTimeout);\n this._hoverOutDelayTimeout = null;\n }\n }\n\n _cancelLongPressDelayTimeout(): void {\n if (this._longPressDelayTimeout != null) {\n clearTimeout(this._longPressDelayTimeout);\n this._longPressDelayTimeout = null;\n }\n }\n\n _cancelPressDelayTimeout(): void {\n if (this._pressDelayTimeout != null) {\n clearTimeout(this._pressDelayTimeout);\n this._pressDelayTimeout = null;\n }\n }\n\n _cancelPressOutDelayTimeout(): void {\n if (this._pressOutDelayTimeout != null) {\n clearTimeout(this._pressOutDelayTimeout);\n this._pressOutDelayTimeout = null;\n }\n }\n}\n\nfunction normalizeDelay(\n delay: ?number,\n min: number = 0,\n fallback: number = 0,\n): number {\n return Math.max(min, delay ?? fallback);\n}\n\nconst getTouchFromPressEvent = (event: PressEvent) => {\n const {changedTouches, touches} = event.nativeEvent;\n\n if (touches != null && touches.length > 0) {\n return touches[0];\n }\n if (changedTouches != null && changedTouches.length > 0) {\n return changedTouches[0];\n }\n return event.nativeEvent;\n};\n\nfunction convertPointerEventToMouseEvent(input: PointerEvent): MouseEvent {\n const {clientX, clientY} = input.nativeEvent;\n return {\n ...input,\n nativeEvent: {\n clientX,\n clientY,\n pageX: clientX,\n pageY: clientY,\n timestamp: input.timeStamp,\n },\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport NativeSoundManager from './NativeSoundManager';\n\nconst SoundManager = {\n playTouchSound: function (): void {\n if (NativeSoundManager) {\n NativeSoundManager.playTouchSound();\n }\n },\n};\n\nmodule.exports = SoundManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeSoundManager';\nimport NativeSoundManager from '../../../src/private/specs/modules/NativeSoundManager';\nexport default NativeSoundManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\n/**\n * Native Module used for playing sounds in native platform.\n */\nexport interface Spec extends TurboModule {\n +playTouchSound: () => void;\n}\n\nexport default (TurboModuleRegistry.get('SoundManager'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport type FeatureFlags = {|\n /**\n * Function used to enable / disable W3C pointer event emitting in React Native.\n * If enabled you must also flip the equivalent native flags on each platform:\n * iOS -> RCTSetDispatchW3CPointerEvents\n * Android -> ReactFeatureFlags.dispatchPointerEvents\n */\n shouldEmitW3CPointerEvents: () => boolean,\n /**\n * Function used to enable / disable Pressibility from using W3C Pointer Events\n * for its hover callbacks\n */\n shouldPressibilityUseW3CPointerEventsForHover: () => boolean,\n|};\n\nconst ReactNativeFeatureFlags: FeatureFlags = {\n shouldEmitW3CPointerEvents: () => false,\n shouldPressibilityUseW3CPointerEventsForHover: () => false,\n};\n\nmodule.exports = ReactNativeFeatureFlags;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport {type PressabilityTouchSignal as TouchSignal} from './PressabilityTypes.js';\n\nexport type PressabilityPerformanceEvent = $ReadOnly<{|\n signal: TouchSignal,\n nativeTimestamp: number,\n|}>;\nexport type PressabilityPerformanceEventListener =\n PressabilityPerformanceEvent => void;\n\nclass PressabilityPerformanceEventEmitter {\n _listeners: Array = [];\n\n constructor() {}\n\n addListener(listener: PressabilityPerformanceEventListener): void {\n this._listeners.push(listener);\n }\n\n removeListener(listener: PressabilityPerformanceEventListener): void {\n const index = this._listeners.indexOf(listener);\n if (index > -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n emitEvent(constructEvent: () => PressabilityPerformanceEvent): void {\n if (this._listeners.length === 0) {\n return;\n }\n\n const event = constructEvent();\n this._listeners.forEach(listener => listener(event));\n }\n}\n\nconst PressabilityPerformanceEventEmitterSingleton: PressabilityPerformanceEventEmitter =\n new PressabilityPerformanceEventEmitter();\n\nexport default PressabilityPerformanceEventEmitterSingleton;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport Platform from '../Utilities/Platform';\n\nlet isEnabled = false;\n\nif (Platform.OS === 'web') {\n const canUseDOM = Boolean(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement,\n );\n\n if (canUseDOM) {\n /**\n * Web browsers emulate mouse events (and hover states) after touch events.\n * This code infers when the currently-in-use modality supports hover\n * (including for multi-modality devices) and considers \"hover\" to be enabled\n * if a mouse movement occurs more than 1 second after the last touch event.\n * This threshold is long enough to account for longer delays between the\n * browser firing touch and mouse events on low-powered devices.\n */\n const HOVER_THRESHOLD_MS = 1000;\n let lastTouchTimestamp = 0;\n\n const enableHover = () => {\n if (isEnabled || Date.now() - lastTouchTimestamp < HOVER_THRESHOLD_MS) {\n return;\n }\n isEnabled = true;\n };\n\n const disableHover = () => {\n lastTouchTimestamp = Date.now();\n if (isEnabled) {\n isEnabled = false;\n }\n };\n\n document.addEventListener('touchstart', disableHover, true);\n document.addEventListener('touchmove', disableHover, true);\n document.addEventListener('mousemove', enableHover, true);\n }\n}\n\nexport function isHoverEnabled(): boolean {\n return isEnabled;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nexport type Rect = $ReadOnly<{|\n bottom?: ?number,\n left?: ?number,\n right?: ?number,\n top?: ?number,\n|}>;\n\nexport type RectOrSize = Rect | number;\n\nexport function createSquare(size: number): Rect {\n return {bottom: size, left: size, right: size, top: size};\n}\n\nexport function normalizeRect(rectOrSize: ?RectOrSize): ?Rect {\n return typeof rectOrSize === 'number' ? createSquare(rectOrSize) : rectOrSize;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {HostComponent} from '../Renderer/shims/ReactNativeTypes';\nimport type {ProcessedColorValue} from '../StyleSheet/processColor';\nimport type {PressEvent} from '../Types/CoreEventTypes';\nimport type {TextProps} from './TextProps';\n\nimport {createViewConfig} from '../NativeComponent/ViewConfig';\nimport UIManager from '../ReactNative/UIManager';\nimport createReactNativeComponentClass from '../Renderer/shims/createReactNativeComponentClass';\n\ntype NativeTextProps = $ReadOnly<{\n ...TextProps,\n isHighlighted?: ?boolean,\n selectionColor?: ?ProcessedColorValue,\n onClick?: ?(event: PressEvent) => mixed,\n // This is only needed for platforms that optimize text hit testing, e.g.,\n // react-native-windows. It can be used to only hit test virtual text spans\n // that have pressable events attached to them.\n isPressable?: ?boolean,\n}>;\n\nconst textViewConfig = {\n validAttributes: {\n isHighlighted: true,\n isPressable: true,\n numberOfLines: true,\n ellipsizeMode: true,\n allowFontScaling: true,\n dynamicTypeRamp: true,\n maxFontSizeMultiplier: true,\n disabled: true,\n selectable: true,\n selectionColor: true,\n adjustsFontSizeToFit: true,\n minimumFontScale: true,\n textBreakStrategy: true,\n onTextLayout: true,\n onInlineViewLayout: true,\n dataDetectorType: true,\n android_hyphenationFrequency: true,\n lineBreakStrategyIOS: true,\n },\n directEventTypes: {\n topTextLayout: {\n registrationName: 'onTextLayout',\n },\n topInlineViewLayout: {\n registrationName: 'onInlineViewLayout',\n },\n },\n uiViewClassName: 'RCTText',\n};\n\nconst virtualTextViewConfig = {\n validAttributes: {\n isHighlighted: true,\n isPressable: true,\n maxFontSizeMultiplier: true,\n },\n uiViewClassName: 'RCTVirtualText',\n};\n\nexport const NativeText: HostComponent =\n (createReactNativeComponentClass('RCTText', () =>\n createViewConfig(textViewConfig),\n ): any);\n\nexport const NativeVirtualText: HostComponent =\n !global.RN$Bridgeless && !UIManager.hasViewManagerConfig('RCTVirtualText')\n ? NativeText\n : (createReactNativeComponentClass('RCTVirtualText', () =>\n createViewConfig(virtualTextViewConfig),\n ): any);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {PressEvent} from '../../Types/CoreEventTypes';\nimport typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';\n\nimport View from '../../Components/View/View';\nimport Pressability, {\n type PressabilityConfig,\n} from '../../Pressability/Pressability';\nimport {PressabilityDebugView} from '../../Pressability/PressabilityDebug';\nimport {findHostInstance_DEPRECATED} from '../../ReactNative/RendererProxy';\nimport processColor from '../../StyleSheet/processColor';\nimport Platform from '../../Utilities/Platform';\nimport {Commands} from '../View/ViewNativeComponent';\nimport invariant from 'invariant';\nimport * as React from 'react';\n\ntype Props = $ReadOnly<{|\n ...React.ElementConfig,\n\n /**\n * Determines the type of background drawable that's going to be used to\n * display feedback. It takes an object with `type` property and extra data\n * depending on the `type`. It's recommended to use one of the static\n * methods to generate that dictionary.\n */\n background?: ?(\n | $ReadOnly<{|\n type: 'ThemeAttrAndroid',\n attribute:\n | 'selectableItemBackground'\n | 'selectableItemBackgroundBorderless',\n rippleRadius: ?number,\n |}>\n | $ReadOnly<{|\n type: 'RippleAndroid',\n color: ?number,\n borderless: boolean,\n rippleRadius: ?number,\n |}>\n ),\n\n /**\n * TV preferred focus (see documentation for the View component).\n */\n hasTVPreferredFocus?: ?boolean,\n\n /**\n * TV next focus down (see documentation for the View component).\n */\n nextFocusDown?: ?number,\n\n /**\n * TV next focus forward (see documentation for the View component).\n */\n nextFocusForward?: ?number,\n\n /**\n * TV next focus left (see documentation for the View component).\n */\n nextFocusLeft?: ?number,\n\n /**\n * TV next focus right (see documentation for the View component).\n */\n nextFocusRight?: ?number,\n\n /**\n * TV next focus up (see documentation for the View component).\n */\n nextFocusUp?: ?number,\n\n /**\n * Set to true to add the ripple effect to the foreground of the view, instead\n * of the background. This is useful if one of your child views has a\n * background of its own, or you're e.g. displaying images, and you don't want\n * the ripple to be covered by them.\n *\n * Check TouchableNativeFeedback.canUseNativeForeground() first, as this is\n * only available on Android 6.0 and above. If you try to use this on older\n * versions, this will fallback to background.\n */\n useForeground?: ?boolean,\n|}>;\n\ntype State = $ReadOnly<{|\n pressability: Pressability,\n|}>;\n\nclass TouchableNativeFeedback extends React.Component {\n /**\n * Creates a value for the `background` prop that uses the Android theme's\n * default background for selectable elements.\n */\n static SelectableBackground: (rippleRadius: ?number) => $ReadOnly<{|\n attribute: 'selectableItemBackground',\n type: 'ThemeAttrAndroid',\n rippleRadius: ?number,\n |}> = (rippleRadius: ?number) => ({\n type: 'ThemeAttrAndroid',\n attribute: 'selectableItemBackground',\n rippleRadius,\n });\n\n /**\n * Creates a value for the `background` prop that uses the Android theme's\n * default background for borderless selectable elements. Requires API 21+.\n */\n static SelectableBackgroundBorderless: (rippleRadius: ?number) => $ReadOnly<{|\n attribute: 'selectableItemBackgroundBorderless',\n type: 'ThemeAttrAndroid',\n rippleRadius: ?number,\n |}> = (rippleRadius: ?number) => ({\n type: 'ThemeAttrAndroid',\n attribute: 'selectableItemBackgroundBorderless',\n rippleRadius,\n });\n\n /**\n * Creates a value for the `background` prop that uses the Android ripple with\n * the supplied color. If `borderless` is true, the ripple will render outside\n * of the view bounds. Requires API 21+.\n */\n static Ripple: (\n color: string,\n borderless: boolean,\n rippleRadius: ?number,\n ) => $ReadOnly<{|\n borderless: boolean,\n color: ?number,\n rippleRadius: ?number,\n type: 'RippleAndroid',\n |}> = (color: string, borderless: boolean, rippleRadius: ?number) => {\n const processedColor = processColor(color);\n invariant(\n processedColor == null || typeof processedColor === 'number',\n 'Unexpected color given for Ripple color',\n );\n return {\n type: 'RippleAndroid',\n // $FlowFixMe[incompatible-type]\n color: processedColor,\n borderless,\n rippleRadius,\n };\n };\n\n /**\n * Whether `useForeground` is supported.\n */\n static canUseNativeForeground: () => boolean = () =>\n Platform.OS === 'android';\n\n state: State = {\n pressability: new Pressability(this._createPressabilityConfig()),\n };\n\n _createPressabilityConfig(): PressabilityConfig {\n const accessibilityStateDisabled =\n this.props['aria-disabled'] ?? this.props.accessibilityState?.disabled;\n return {\n cancelable: !this.props.rejectResponderTermination,\n disabled:\n this.props.disabled != null\n ? this.props.disabled\n : accessibilityStateDisabled,\n hitSlop: this.props.hitSlop,\n delayLongPress: this.props.delayLongPress,\n delayPressIn: this.props.delayPressIn,\n delayPressOut: this.props.delayPressOut,\n minPressDuration: 0,\n pressRectOffset: this.props.pressRetentionOffset,\n android_disableSound: this.props.touchSoundDisabled,\n onLongPress: this.props.onLongPress,\n onPress: this.props.onPress,\n onPressIn: event => {\n if (Platform.OS === 'android') {\n this._dispatchHotspotUpdate(event);\n this._dispatchPressedStateChange(true);\n }\n if (this.props.onPressIn != null) {\n this.props.onPressIn(event);\n }\n },\n onPressMove: event => {\n if (Platform.OS === 'android') {\n this._dispatchHotspotUpdate(event);\n }\n },\n onPressOut: event => {\n if (Platform.OS === 'android') {\n this._dispatchPressedStateChange(false);\n }\n if (this.props.onPressOut != null) {\n this.props.onPressOut(event);\n }\n },\n };\n }\n\n _dispatchPressedStateChange(pressed: boolean): void {\n if (Platform.OS === 'android') {\n const hostComponentRef = findHostInstance_DEPRECATED(this);\n if (hostComponentRef == null) {\n console.warn(\n 'Touchable: Unable to find HostComponent instance. ' +\n 'Has your Touchable component been unmounted?',\n );\n } else {\n Commands.setPressed(hostComponentRef, pressed);\n }\n }\n }\n\n _dispatchHotspotUpdate(event: PressEvent): void {\n if (Platform.OS === 'android') {\n const {locationX, locationY} = event.nativeEvent;\n const hostComponentRef = findHostInstance_DEPRECATED(this);\n if (hostComponentRef == null) {\n console.warn(\n 'Touchable: Unable to find HostComponent instance. ' +\n 'Has your Touchable component been unmounted?',\n );\n } else {\n Commands.hotspotUpdate(\n hostComponentRef,\n locationX ?? 0,\n locationY ?? 0,\n );\n }\n }\n }\n\n render(): React.Node {\n const element = React.Children.only<$FlowFixMe>(this.props.children);\n const children: Array = [element.props.children];\n if (__DEV__) {\n if (element.type === View) {\n children.push(\n ,\n );\n }\n }\n\n // BACKWARD-COMPATIBILITY: Focus and blur events were never supported before\n // adopting `Pressability`, so preserve that behavior.\n const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} =\n this.state.pressability.getEventHandlers();\n\n let _accessibilityState = {\n busy: this.props['aria-busy'] ?? this.props.accessibilityState?.busy,\n checked:\n this.props['aria-checked'] ?? this.props.accessibilityState?.checked,\n disabled:\n this.props['aria-disabled'] ?? this.props.accessibilityState?.disabled,\n expanded:\n this.props['aria-expanded'] ?? this.props.accessibilityState?.expanded,\n selected:\n this.props['aria-selected'] ?? this.props.accessibilityState?.selected,\n };\n\n _accessibilityState =\n this.props.disabled != null\n ? {\n ..._accessibilityState,\n disabled: this.props.disabled,\n }\n : _accessibilityState;\n\n const accessibilityValue = {\n max: this.props['aria-valuemax'] ?? this.props.accessibilityValue?.max,\n min: this.props['aria-valuemin'] ?? this.props.accessibilityValue?.min,\n now: this.props['aria-valuenow'] ?? this.props.accessibilityValue?.now,\n text: this.props['aria-valuetext'] ?? this.props.accessibilityValue?.text,\n };\n\n const accessibilityLiveRegion =\n this.props['aria-live'] === 'off'\n ? 'none'\n : this.props['aria-live'] ?? this.props.accessibilityLiveRegion;\n\n const accessibilityLabel =\n this.props['aria-label'] ?? this.props.accessibilityLabel;\n return React.cloneElement(\n element,\n {\n ...eventHandlersWithoutBlurAndFocus,\n ...getBackgroundProp(\n this.props.background === undefined\n ? TouchableNativeFeedback.SelectableBackground()\n : this.props.background,\n this.props.useForeground === true,\n ),\n accessible: this.props.accessible !== false,\n accessibilityHint: this.props.accessibilityHint,\n accessibilityLanguage: this.props.accessibilityLanguage,\n accessibilityLabel: accessibilityLabel,\n accessibilityRole: this.props.accessibilityRole,\n accessibilityState: _accessibilityState,\n accessibilityActions: this.props.accessibilityActions,\n onAccessibilityAction: this.props.onAccessibilityAction,\n accessibilityValue: accessibilityValue,\n importantForAccessibility:\n this.props['aria-hidden'] === true\n ? 'no-hide-descendants'\n : this.props.importantForAccessibility,\n accessibilityViewIsModal:\n this.props['aria-modal'] ?? this.props.accessibilityViewIsModal,\n accessibilityLiveRegion: accessibilityLiveRegion,\n accessibilityElementsHidden:\n this.props['aria-hidden'] ?? this.props.accessibilityElementsHidden,\n hasTVPreferredFocus: this.props.hasTVPreferredFocus,\n hitSlop: this.props.hitSlop,\n focusable:\n this.props.focusable !== false &&\n this.props.onPress !== undefined &&\n !this.props.disabled,\n nativeID: this.props.id ?? this.props.nativeID,\n nextFocusDown: this.props.nextFocusDown,\n nextFocusForward: this.props.nextFocusForward,\n nextFocusLeft: this.props.nextFocusLeft,\n nextFocusRight: this.props.nextFocusRight,\n nextFocusUp: this.props.nextFocusUp,\n onLayout: this.props.onLayout,\n testID: this.props.testID,\n },\n ...children,\n );\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n this.state.pressability.configure(this._createPressabilityConfig());\n }\n\n componentDidMount(): mixed {\n this.state.pressability.configure(this._createPressabilityConfig());\n }\n\n componentWillUnmount(): void {\n this.state.pressability.reset();\n }\n}\n\nconst getBackgroundProp =\n Platform.OS === 'android'\n ? /* $FlowFixMe[missing-local-annot] The type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n (background, useForeground: boolean) =>\n useForeground && TouchableNativeFeedback.canUseNativeForeground()\n ? {nativeForegroundAndroid: background}\n : {nativeBackgroundAndroid: background}\n : /* $FlowFixMe[missing-local-annot] The type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n (background, useForeground: boolean) => null;\n\nTouchableNativeFeedback.displayName = 'TouchableNativeFeedback';\n\nmodule.exports = TouchableNativeFeedback;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ViewStyleProp} from '../../StyleSheet/StyleSheet';\nimport typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';\n\nimport Animated from '../../Animated/Animated';\nimport Easing from '../../Animated/Easing';\nimport Pressability, {\n type PressabilityConfig,\n} from '../../Pressability/Pressability';\nimport {PressabilityDebugView} from '../../Pressability/PressabilityDebug';\nimport flattenStyle from '../../StyleSheet/flattenStyle';\nimport Platform from '../../Utilities/Platform';\nimport * as React from 'react';\n\ntype TVProps = $ReadOnly<{|\n hasTVPreferredFocus?: ?boolean,\n nextFocusDown?: ?number,\n nextFocusForward?: ?number,\n nextFocusLeft?: ?number,\n nextFocusRight?: ?number,\n nextFocusUp?: ?number,\n|}>;\n\ntype Props = $ReadOnly<{|\n ...React.ElementConfig,\n ...TVProps,\n\n activeOpacity?: ?number,\n style?: ?ViewStyleProp,\n\n hostRef?: ?React.Ref,\n|}>;\n\ntype State = $ReadOnly<{|\n anim: Animated.Value,\n pressability: Pressability,\n|}>;\n\n/**\n * A wrapper for making views respond properly to touches.\n * On press down, the opacity of the wrapped view is decreased, dimming it.\n *\n * Opacity is controlled by wrapping the children in an Animated.View, which is\n * added to the view hierarchy. Be aware that this can affect layout.\n *\n * Example:\n *\n * ```\n * renderButton: function() {\n * return (\n * \n * \n * \n * );\n * },\n * ```\n * ### Example\n *\n * ```ReactNativeWebPlayer\n * import React, { Component } from 'react'\n * import {\n * AppRegistry,\n * StyleSheet,\n * TouchableOpacity,\n * Text,\n * View,\n * } from 'react-native'\n *\n * class App extends Component {\n * state = { count: 0 }\n *\n * onPress = () => {\n * this.setState(state => ({\n * count: state.count + 1\n * }));\n * };\n *\n * render() {\n * return (\n * \n * \n * Touch Here \n * \n * \n * \n * { this.state.count !== 0 ? this.state.count: null}\n * \n * \n * \n * )\n * }\n * }\n *\n * const styles = StyleSheet.create({\n * container: {\n * flex: 1,\n * justifyContent: 'center',\n * paddingHorizontal: 10\n * },\n * button: {\n * alignItems: 'center',\n * backgroundColor: '#DDDDDD',\n * padding: 10\n * },\n * countContainer: {\n * alignItems: 'center',\n * padding: 10\n * },\n * countText: {\n * color: '#FF00FF'\n * }\n * })\n *\n * AppRegistry.registerComponent('App', () => App)\n * ```\n *\n */\nclass TouchableOpacity extends React.Component {\n state: State = {\n anim: new Animated.Value(this._getChildStyleOpacityWithDefault()),\n pressability: new Pressability(this._createPressabilityConfig()),\n };\n\n _createPressabilityConfig(): PressabilityConfig {\n return {\n cancelable: !this.props.rejectResponderTermination,\n disabled:\n this.props.disabled ??\n this.props['aria-disabled'] ??\n this.props.accessibilityState?.disabled,\n hitSlop: this.props.hitSlop,\n delayLongPress: this.props.delayLongPress,\n delayPressIn: this.props.delayPressIn,\n delayPressOut: this.props.delayPressOut,\n minPressDuration: 0,\n pressRectOffset: this.props.pressRetentionOffset,\n onBlur: event => {\n if (Platform.isTV) {\n this._opacityInactive(250);\n }\n if (this.props.onBlur != null) {\n this.props.onBlur(event);\n }\n },\n onFocus: event => {\n if (Platform.isTV) {\n this._opacityActive(150);\n }\n if (this.props.onFocus != null) {\n this.props.onFocus(event);\n }\n },\n onLongPress: this.props.onLongPress,\n onPress: this.props.onPress,\n onPressIn: event => {\n this._opacityActive(\n event.dispatchConfig.registrationName === 'onResponderGrant'\n ? 0\n : 150,\n );\n if (this.props.onPressIn != null) {\n this.props.onPressIn(event);\n }\n },\n onPressOut: event => {\n this._opacityInactive(250);\n if (this.props.onPressOut != null) {\n this.props.onPressOut(event);\n }\n },\n };\n }\n\n /**\n * Animate the touchable to a new opacity.\n */\n _setOpacityTo(toValue: number, duration: number): void {\n Animated.timing(this.state.anim, {\n toValue,\n duration,\n easing: Easing.inOut(Easing.quad),\n useNativeDriver: true,\n }).start();\n }\n\n _opacityActive(duration: number): void {\n this._setOpacityTo(this.props.activeOpacity ?? 0.2, duration);\n }\n\n _opacityInactive(duration: number): void {\n this._setOpacityTo(this._getChildStyleOpacityWithDefault(), duration);\n }\n\n _getChildStyleOpacityWithDefault(): number {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n // $FlowFixMe[prop-missing]\n const opacity = flattenStyle(this.props.style)?.opacity;\n return typeof opacity === 'number' ? opacity : 1;\n }\n\n render(): React.Node {\n // BACKWARD-COMPATIBILITY: Focus and blur events were never supported before\n // adopting `Pressability`, so preserve that behavior.\n const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} =\n this.state.pressability.getEventHandlers();\n\n let _accessibilityState = {\n busy: this.props['aria-busy'] ?? this.props.accessibilityState?.busy,\n checked:\n this.props['aria-checked'] ?? this.props.accessibilityState?.checked,\n disabled:\n this.props['aria-disabled'] ?? this.props.accessibilityState?.disabled,\n expanded:\n this.props['aria-expanded'] ?? this.props.accessibilityState?.expanded,\n selected:\n this.props['aria-selected'] ?? this.props.accessibilityState?.selected,\n };\n\n _accessibilityState =\n this.props.disabled != null\n ? {\n ..._accessibilityState,\n disabled: this.props.disabled,\n }\n : _accessibilityState;\n\n const accessibilityValue = {\n max: this.props['aria-valuemax'] ?? this.props.accessibilityValue?.max,\n min: this.props['aria-valuemin'] ?? this.props.accessibilityValue?.min,\n now: this.props['aria-valuenow'] ?? this.props.accessibilityValue?.now,\n text: this.props['aria-valuetext'] ?? this.props.accessibilityValue?.text,\n };\n\n const accessibilityLiveRegion =\n this.props['aria-live'] === 'off'\n ? 'none'\n : this.props['aria-live'] ?? this.props.accessibilityLiveRegion;\n\n const accessibilityLabel =\n this.props['aria-label'] ?? this.props.accessibilityLabel;\n return (\n \n {this.props.children}\n {__DEV__ ? (\n \n ) : null}\n \n );\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n this.state.pressability.configure(this._createPressabilityConfig());\n if (\n this.props.disabled !== prevProps.disabled ||\n // $FlowFixMe[underconstrained-implicit-instantiation]\n // $FlowFixMe[prop-missing]\n flattenStyle(prevProps.style)?.opacity !==\n // $FlowFixMe[underconstrained-implicit-instantiation]\n // $FlowFixMe[prop-missing]\n flattenStyle(this.props.style)?.opacity\n ) {\n this._opacityInactive(250);\n }\n }\n\n componentDidMount(): void {\n this.state.pressability.configure(this._createPressabilityConfig());\n }\n\n componentWillUnmount(): void {\n this.state.pressability.reset();\n this.state.anim.resetAnimation();\n }\n}\n\nconst Touchable: React.AbstractComponent<\n Props,\n React.ElementRef,\n> = React.forwardRef((props, ref) => (\n \n));\n\nTouchable.displayName = 'TouchableOpacity';\n\nmodule.exports = Touchable;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nexport type {CompositeAnimation, Numeric} from './AnimatedImplementation';\n\nimport typeof AnimatedFlatList from './components/AnimatedFlatList';\nimport typeof AnimatedImage from './components/AnimatedImage';\nimport typeof AnimatedScrollView from './components/AnimatedScrollView';\nimport typeof AnimatedSectionList from './components/AnimatedSectionList';\nimport typeof AnimatedText from './components/AnimatedText';\nimport typeof AnimatedView from './components/AnimatedView';\n\nimport Platform from '../Utilities/Platform';\nimport AnimatedImplementation from './AnimatedImplementation';\nimport AnimatedMock from './AnimatedMock';\n\nconst Animated: typeof AnimatedImplementation = Platform.isDisableAnimations\n ? AnimatedMock\n : AnimatedImplementation;\n\nexport default {\n get FlatList(): AnimatedFlatList {\n return require('./components/AnimatedFlatList').default;\n },\n get Image(): AnimatedImage {\n return require('./components/AnimatedImage').default;\n },\n get ScrollView(): AnimatedScrollView {\n return require('./components/AnimatedScrollView').default;\n },\n get SectionList(): AnimatedSectionList {\n return require('./components/AnimatedSectionList').default;\n },\n get Text(): AnimatedText {\n return require('./components/AnimatedText').default;\n },\n get View(): AnimatedView {\n return require('./components/AnimatedView').default;\n },\n ...Animated,\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {EventConfig, Mapping} from './AnimatedEvent';\nimport type {\n AnimationConfig,\n EndCallback,\n EndResult,\n} from './animations/Animation';\nimport type {DecayAnimationConfig} from './animations/DecayAnimation';\nimport type {SpringAnimationConfig} from './animations/SpringAnimation';\nimport type {TimingAnimationConfig} from './animations/TimingAnimation';\n\nimport {AnimatedEvent, attachNativeEvent} from './AnimatedEvent';\nimport DecayAnimation from './animations/DecayAnimation';\nimport SpringAnimation from './animations/SpringAnimation';\nimport TimingAnimation from './animations/TimingAnimation';\nimport createAnimatedComponent from './createAnimatedComponent';\nimport AnimatedAddition from './nodes/AnimatedAddition';\nimport AnimatedColor from './nodes/AnimatedColor';\nimport AnimatedDiffClamp from './nodes/AnimatedDiffClamp';\nimport AnimatedDivision from './nodes/AnimatedDivision';\nimport AnimatedInterpolation from './nodes/AnimatedInterpolation';\nimport AnimatedModulo from './nodes/AnimatedModulo';\nimport AnimatedMultiplication from './nodes/AnimatedMultiplication';\nimport AnimatedNode from './nodes/AnimatedNode';\nimport AnimatedSubtraction from './nodes/AnimatedSubtraction';\nimport AnimatedTracking from './nodes/AnimatedTracking';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\n\nexport type CompositeAnimation = {\n start: (callback?: ?EndCallback) => void,\n stop: () => void,\n reset: () => void,\n _startNativeLoop: (iterations?: number) => void,\n _isUsingNativeDriver: () => boolean,\n ...\n};\n\nconst add = function (\n a: AnimatedNode | number,\n b: AnimatedNode | number,\n): AnimatedAddition {\n return new AnimatedAddition(a, b);\n};\n\nconst subtract = function (\n a: AnimatedNode | number,\n b: AnimatedNode | number,\n): AnimatedSubtraction {\n return new AnimatedSubtraction(a, b);\n};\n\nconst divide = function (\n a: AnimatedNode | number,\n b: AnimatedNode | number,\n): AnimatedDivision {\n return new AnimatedDivision(a, b);\n};\n\nconst multiply = function (\n a: AnimatedNode | number,\n b: AnimatedNode | number,\n): AnimatedMultiplication {\n return new AnimatedMultiplication(a, b);\n};\n\nconst modulo = function (a: AnimatedNode, modulus: number): AnimatedModulo {\n return new AnimatedModulo(a, modulus);\n};\n\nconst diffClamp = function (\n a: AnimatedNode,\n min: number,\n max: number,\n): AnimatedDiffClamp {\n return new AnimatedDiffClamp(a, min, max);\n};\n\nconst _combineCallbacks = function (\n callback: ?EndCallback,\n config: $ReadOnly<{...AnimationConfig, ...}>,\n) {\n if (callback && config.onComplete) {\n return (...args: Array) => {\n config.onComplete && config.onComplete(...args);\n callback && callback(...args);\n };\n } else {\n return callback || config.onComplete;\n }\n};\n\nconst maybeVectorAnim = function (\n value: AnimatedValue | AnimatedValueXY | AnimatedColor,\n config: Object,\n anim: (value: AnimatedValue, config: Object) => CompositeAnimation,\n): ?CompositeAnimation {\n if (value instanceof AnimatedValueXY) {\n const configX = {...config};\n const configY = {...config};\n for (const key in config) {\n const {x, y} = config[key];\n if (x !== undefined && y !== undefined) {\n configX[key] = x;\n configY[key] = y;\n }\n }\n const aX = anim((value: AnimatedValueXY).x, configX);\n const aY = anim((value: AnimatedValueXY).y, configY);\n // We use `stopTogether: false` here because otherwise tracking will break\n // because the second animation will get stopped before it can update.\n return parallel([aX, aY], {stopTogether: false});\n } else if (value instanceof AnimatedColor) {\n const configR = {...config};\n const configG = {...config};\n const configB = {...config};\n const configA = {...config};\n for (const key in config) {\n const {r, g, b, a} = config[key];\n if (\n r !== undefined &&\n g !== undefined &&\n b !== undefined &&\n a !== undefined\n ) {\n configR[key] = r;\n configG[key] = g;\n configB[key] = b;\n configA[key] = a;\n }\n }\n const aR = anim((value: AnimatedColor).r, configR);\n const aG = anim((value: AnimatedColor).g, configG);\n const aB = anim((value: AnimatedColor).b, configB);\n const aA = anim((value: AnimatedColor).a, configA);\n // We use `stopTogether: false` here because otherwise tracking will break\n // because the second animation will get stopped before it can update.\n return parallel([aR, aG, aB, aA], {stopTogether: false});\n }\n return null;\n};\n\nconst spring = function (\n value: AnimatedValue | AnimatedValueXY | AnimatedColor,\n config: SpringAnimationConfig,\n): CompositeAnimation {\n const start = function (\n animatedValue: AnimatedValue | AnimatedValueXY | AnimatedColor,\n configuration: SpringAnimationConfig,\n callback?: ?EndCallback,\n ): void {\n callback = _combineCallbacks(callback, configuration);\n const singleValue: any = animatedValue;\n const singleConfig: any = configuration;\n singleValue.stopTracking();\n if (configuration.toValue instanceof AnimatedNode) {\n singleValue.track(\n new AnimatedTracking(\n singleValue,\n configuration.toValue,\n SpringAnimation,\n singleConfig,\n callback,\n ),\n );\n } else {\n singleValue.animate(new SpringAnimation(singleConfig), callback);\n }\n };\n return (\n maybeVectorAnim(value, config, spring) || {\n start: function (callback?: ?EndCallback): void {\n start(value, config, callback);\n },\n\n stop: function (): void {\n value.stopAnimation();\n },\n\n reset: function (): void {\n value.resetAnimation();\n },\n\n _startNativeLoop: function (iterations?: number): void {\n const singleConfig = {...config, iterations};\n start(value, singleConfig);\n },\n\n _isUsingNativeDriver: function (): boolean {\n return config.useNativeDriver || false;\n },\n }\n );\n};\n\nconst timing = function (\n value: AnimatedValue | AnimatedValueXY | AnimatedColor,\n config: TimingAnimationConfig,\n): CompositeAnimation {\n const start = function (\n animatedValue: AnimatedValue | AnimatedValueXY | AnimatedColor,\n configuration: TimingAnimationConfig,\n callback?: ?EndCallback,\n ): void {\n callback = _combineCallbacks(callback, configuration);\n const singleValue: any = animatedValue;\n const singleConfig: any = configuration;\n singleValue.stopTracking();\n if (configuration.toValue instanceof AnimatedNode) {\n singleValue.track(\n new AnimatedTracking(\n singleValue,\n configuration.toValue,\n TimingAnimation,\n singleConfig,\n callback,\n ),\n );\n } else {\n singleValue.animate(new TimingAnimation(singleConfig), callback);\n }\n };\n\n return (\n maybeVectorAnim(value, config, timing) || {\n start: function (callback?: ?EndCallback): void {\n start(value, config, callback);\n },\n\n stop: function (): void {\n value.stopAnimation();\n },\n\n reset: function (): void {\n value.resetAnimation();\n },\n\n _startNativeLoop: function (iterations?: number): void {\n const singleConfig = {...config, iterations};\n start(value, singleConfig);\n },\n\n _isUsingNativeDriver: function (): boolean {\n return config.useNativeDriver || false;\n },\n }\n );\n};\n\nconst decay = function (\n value: AnimatedValue | AnimatedValueXY | AnimatedColor,\n config: DecayAnimationConfig,\n): CompositeAnimation {\n const start = function (\n animatedValue: AnimatedValue | AnimatedValueXY | AnimatedColor,\n configuration: DecayAnimationConfig,\n callback?: ?EndCallback,\n ): void {\n callback = _combineCallbacks(callback, configuration);\n const singleValue: any = animatedValue;\n const singleConfig: any = configuration;\n singleValue.stopTracking();\n singleValue.animate(new DecayAnimation(singleConfig), callback);\n };\n\n return (\n maybeVectorAnim(value, config, decay) || {\n start: function (callback?: ?EndCallback): void {\n start(value, config, callback);\n },\n\n stop: function (): void {\n value.stopAnimation();\n },\n\n reset: function (): void {\n value.resetAnimation();\n },\n\n _startNativeLoop: function (iterations?: number): void {\n const singleConfig = {...config, iterations};\n start(value, singleConfig);\n },\n\n _isUsingNativeDriver: function (): boolean {\n return config.useNativeDriver || false;\n },\n }\n );\n};\n\nconst sequence = function (\n animations: Array,\n): CompositeAnimation {\n let current = 0;\n return {\n start: function (callback?: ?EndCallback) {\n const onComplete = function (result: EndResult) {\n if (!result.finished) {\n callback && callback(result);\n return;\n }\n\n current++;\n\n if (current === animations.length) {\n // if the start is called, even without a reset, it should start from the beginning\n current = 0;\n callback && callback(result);\n return;\n }\n\n animations[current].start(onComplete);\n };\n\n if (animations.length === 0) {\n callback && callback({finished: true});\n } else {\n animations[current].start(onComplete);\n }\n },\n\n stop: function () {\n if (current < animations.length) {\n animations[current].stop();\n }\n },\n\n reset: function () {\n animations.forEach((animation, idx) => {\n if (idx <= current) {\n animation.reset();\n }\n });\n current = 0;\n },\n\n _startNativeLoop: function () {\n throw new Error(\n 'Loops run using the native driver cannot contain Animated.sequence animations',\n );\n },\n\n _isUsingNativeDriver: function (): boolean {\n return false;\n },\n };\n};\n\ntype ParallelConfig = {\n // If one is stopped, stop all. default: true\n stopTogether?: boolean,\n ...\n};\nconst parallel = function (\n animations: Array,\n config?: ?ParallelConfig,\n): CompositeAnimation {\n let doneCount = 0;\n // Make sure we only call stop() at most once for each animation\n const hasEnded: {[number]: boolean} = {};\n const stopTogether = !(config && config.stopTogether === false);\n\n const result = {\n start: function (callback?: ?EndCallback) {\n if (doneCount === animations.length) {\n callback && callback({finished: true});\n return;\n }\n\n animations.forEach((animation, idx) => {\n const cb = function (endResult: EndResult) {\n hasEnded[idx] = true;\n doneCount++;\n if (doneCount === animations.length) {\n doneCount = 0;\n callback && callback(endResult);\n return;\n }\n\n if (!endResult.finished && stopTogether) {\n result.stop();\n }\n };\n\n if (!animation) {\n cb({finished: true});\n } else {\n animation.start(cb);\n }\n });\n },\n\n stop: function (): void {\n animations.forEach((animation, idx) => {\n !hasEnded[idx] && animation.stop();\n hasEnded[idx] = true;\n });\n },\n\n reset: function (): void {\n animations.forEach((animation, idx) => {\n animation.reset();\n hasEnded[idx] = false;\n doneCount = 0;\n });\n },\n\n _startNativeLoop: function (): empty {\n throw new Error(\n 'Loops run using the native driver cannot contain Animated.parallel animations',\n );\n },\n\n _isUsingNativeDriver: function (): boolean {\n return false;\n },\n };\n\n return result;\n};\n\nconst delay = function (time: number): CompositeAnimation {\n // Would be nice to make a specialized implementation\n return timing(new AnimatedValue(0), {\n toValue: 0,\n delay: time,\n duration: 0,\n useNativeDriver: false,\n });\n};\n\nconst stagger = function (\n time: number,\n animations: Array,\n): CompositeAnimation {\n return parallel(\n animations.map((animation, i) => {\n return sequence([delay(time * i), animation]);\n }),\n );\n};\n\ntype LoopAnimationConfig = {\n iterations: number,\n resetBeforeIteration?: boolean,\n ...\n};\n\nconst loop = function (\n animation: CompositeAnimation,\n // $FlowFixMe[prop-missing]\n {iterations = -1, resetBeforeIteration = true}: LoopAnimationConfig = {},\n): CompositeAnimation {\n let isFinished = false;\n let iterationsSoFar = 0;\n return {\n start: function (callback?: ?EndCallback) {\n const restart = function (result: EndResult = {finished: true}): void {\n if (\n isFinished ||\n iterationsSoFar === iterations ||\n result.finished === false\n ) {\n callback && callback(result);\n } else {\n iterationsSoFar++;\n resetBeforeIteration && animation.reset();\n animation.start(restart);\n }\n };\n if (!animation || iterations === 0) {\n callback && callback({finished: true});\n } else {\n if (animation._isUsingNativeDriver()) {\n animation._startNativeLoop(iterations);\n } else {\n restart(); // Start looping recursively on the js thread\n }\n }\n },\n\n stop: function (): void {\n isFinished = true;\n animation.stop();\n },\n\n reset: function (): void {\n iterationsSoFar = 0;\n isFinished = false;\n animation.reset();\n },\n\n _startNativeLoop: function () {\n throw new Error(\n 'Loops run using the native driver cannot contain Animated.loop animations',\n );\n },\n\n _isUsingNativeDriver: function (): boolean {\n return animation._isUsingNativeDriver();\n },\n };\n};\n\nfunction forkEvent(\n event: ?AnimatedEvent | ?Function,\n listener: Function,\n): AnimatedEvent | Function {\n if (!event) {\n return listener;\n } else if (event instanceof AnimatedEvent) {\n event.__addListener(listener);\n return event;\n } else {\n return (...args) => {\n typeof event === 'function' && event(...args);\n listener(...args);\n };\n }\n}\n\nfunction unforkEvent(\n event: ?AnimatedEvent | ?Function,\n listener: Function,\n): void {\n if (event && event instanceof AnimatedEvent) {\n event.__removeListener(listener);\n }\n}\n\nconst event = function (\n argMapping: $ReadOnlyArray,\n config: EventConfig,\n): any {\n const animatedEvent = new AnimatedEvent(argMapping, config);\n if (animatedEvent.__isNative) {\n return animatedEvent;\n } else {\n return animatedEvent.__getHandler();\n }\n};\n\n// All types of animated nodes that represent scalar numbers and can be interpolated (etc)\ntype AnimatedNumeric =\n | AnimatedAddition\n | AnimatedDiffClamp\n | AnimatedDivision\n | AnimatedInterpolation\n | AnimatedModulo\n | AnimatedMultiplication\n | AnimatedSubtraction\n | AnimatedValue;\n\nexport type {AnimatedNumeric as Numeric};\n\n/**\n * The `Animated` library is designed to make animations fluid, powerful, and\n * easy to build and maintain. `Animated` focuses on declarative relationships\n * between inputs and outputs, with configurable transforms in between, and\n * simple `start`/`stop` methods to control time-based animation execution.\n * If additional transforms are added, be sure to include them in\n * AnimatedMock.js as well.\n *\n * See https://reactnative.dev/docs/animated\n */\nexport default {\n /**\n * Standard value class for driving animations. Typically initialized with\n * `new Animated.Value(0);`\n *\n * See https://reactnative.dev/docs/animated#value\n */\n Value: AnimatedValue,\n /**\n * 2D value class for driving 2D animations, such as pan gestures.\n *\n * See https://reactnative.dev/docs/animatedvaluexy\n */\n ValueXY: AnimatedValueXY,\n /**\n * Value class for driving color animations.\n */\n Color: AnimatedColor,\n /**\n * Exported to use the Interpolation type in flow.\n *\n * See https://reactnative.dev/docs/animated#interpolation\n */\n Interpolation: AnimatedInterpolation,\n /**\n * Exported for ease of type checking. All animated values derive from this\n * class.\n *\n * See https://reactnative.dev/docs/animated#node\n */\n Node: AnimatedNode,\n\n /**\n * Animates a value from an initial velocity to zero based on a decay\n * coefficient.\n *\n * See https://reactnative.dev/docs/animated#decay\n */\n decay,\n /**\n * Animates a value along a timed easing curve. The Easing module has tons of\n * predefined curves, or you can use your own function.\n *\n * See https://reactnative.dev/docs/animated#timing\n */\n timing,\n /**\n * Animates a value according to an analytical spring model based on\n * damped harmonic oscillation.\n *\n * See https://reactnative.dev/docs/animated#spring\n */\n spring,\n\n /**\n * Creates a new Animated value composed from two Animated values added\n * together.\n *\n * See https://reactnative.dev/docs/animated#add\n */\n add,\n\n /**\n * Creates a new Animated value composed by subtracting the second Animated\n * value from the first Animated value.\n *\n * See https://reactnative.dev/docs/animated#subtract\n */\n subtract,\n\n /**\n * Creates a new Animated value composed by dividing the first Animated value\n * by the second Animated value.\n *\n * See https://reactnative.dev/docs/animated#divide\n */\n divide,\n\n /**\n * Creates a new Animated value composed from two Animated values multiplied\n * together.\n *\n * See https://reactnative.dev/docs/animated#multiply\n */\n multiply,\n\n /**\n * Creates a new Animated value that is the (non-negative) modulo of the\n * provided Animated value.\n *\n * See https://reactnative.dev/docs/animated#modulo\n */\n modulo,\n\n /**\n * Create a new Animated value that is limited between 2 values. It uses the\n * difference between the last value so even if the value is far from the\n * bounds it will start changing when the value starts getting closer again.\n *\n * See https://reactnative.dev/docs/animated#diffclamp\n */\n diffClamp,\n\n /**\n * Starts an animation after the given delay.\n *\n * See https://reactnative.dev/docs/animated#delay\n */\n delay,\n /**\n * Starts an array of animations in order, waiting for each to complete\n * before starting the next. If the current running animation is stopped, no\n * following animations will be started.\n *\n * See https://reactnative.dev/docs/animated#sequence\n */\n sequence,\n /**\n * Starts an array of animations all at the same time. By default, if one\n * of the animations is stopped, they will all be stopped. You can override\n * this with the `stopTogether` flag.\n *\n * See https://reactnative.dev/docs/animated#parallel\n */\n parallel,\n /**\n * Array of animations may run in parallel (overlap), but are started in\n * sequence with successive delays. Nice for doing trailing effects.\n *\n * See https://reactnative.dev/docs/animated#stagger\n */\n stagger,\n /**\n * Loops a given animation continuously, so that each time it reaches the\n * end, it resets and begins again from the start.\n *\n * See https://reactnative.dev/docs/animated#loop\n */\n loop,\n\n /**\n * Takes an array of mappings and extracts values from each arg accordingly,\n * then calls `setValue` on the mapped outputs.\n *\n * See https://reactnative.dev/docs/animated#event\n */\n event,\n\n /**\n * Make any React component Animatable. Used to create `Animated.View`, etc.\n *\n * See https://reactnative.dev/docs/animated#createanimatedcomponent\n */\n createAnimatedComponent,\n\n /**\n * Imperative API to attach an animated value to an event on a view. Prefer\n * using `Animated.event` with `useNativeDrive: true` if possible.\n *\n * See https://reactnative.dev/docs/animated#attachnativeevent\n */\n attachNativeEvent,\n\n /**\n * Advanced imperative API for snooping on animated events that are passed in\n * through props. Use values directly where possible.\n *\n * See https://reactnative.dev/docs/animated#forkevent\n */\n forkEvent,\n unforkEvent,\n\n /**\n * Expose Event class, so it can be used as a type for type checkers.\n */\n Event: AnimatedEvent,\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type AnimatedValue from '../nodes/AnimatedValue';\nimport type {AnimationConfig, EndCallback} from './Animation';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport Animation from './Animation';\n\nexport type DecayAnimationConfig = {\n ...AnimationConfig,\n velocity:\n | number\n | {\n x: number,\n y: number,\n ...\n },\n deceleration?: number,\n};\n\nexport type DecayAnimationConfigSingle = {\n ...AnimationConfig,\n velocity: number,\n deceleration?: number,\n};\n\nexport default class DecayAnimation extends Animation {\n _startTime: number;\n _lastValue: number;\n _fromValue: number;\n _deceleration: number;\n _velocity: number;\n _onUpdate: (value: number) => void;\n _animationFrame: any;\n _useNativeDriver: boolean;\n _platformConfig: ?PlatformConfig;\n\n constructor(config: DecayAnimationConfigSingle) {\n super();\n this._deceleration = config.deceleration ?? 0.998;\n this._velocity = config.velocity;\n this._useNativeDriver = NativeAnimatedHelper.shouldUseNativeDriver(config);\n this._platformConfig = config.platformConfig;\n this.__isInteraction = config.isInteraction ?? !this._useNativeDriver;\n this.__iterations = config.iterations ?? 1;\n }\n\n __getNativeAnimationConfig(): {|\n deceleration: number,\n iterations: number,\n platformConfig: ?PlatformConfig,\n type: $TEMPORARY$string<'decay'>,\n velocity: number,\n |} {\n return {\n type: 'decay',\n deceleration: this._deceleration,\n velocity: this._velocity,\n iterations: this.__iterations,\n platformConfig: this._platformConfig,\n };\n }\n\n start(\n fromValue: number,\n onUpdate: (value: number) => void,\n onEnd: ?EndCallback,\n previousAnimation: ?Animation,\n animatedValue: AnimatedValue,\n ): void {\n this.__active = true;\n this._lastValue = fromValue;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n this._startTime = Date.now();\n\n if (!this._useNativeDriver && animatedValue.__isNative === true) {\n throw new Error(\n 'Attempting to run JS driven animation on animated node ' +\n 'that has been moved to \"native\" earlier by starting an ' +\n 'animation with `useNativeDriver: true`',\n );\n }\n\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n\n onUpdate(): void {\n const now = Date.now();\n\n const value =\n this._fromValue +\n (this._velocity / (1 - this._deceleration)) *\n (1 - Math.exp(-(1 - this._deceleration) * (now - this._startTime)));\n\n this._onUpdate(value);\n\n if (Math.abs(this._lastValue - value) < 0.1) {\n this.__debouncedOnEnd({finished: true});\n return;\n }\n\n this._lastValue = value;\n if (this.__active) {\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n\n stop(): void {\n super.stop();\n this.__active = false;\n global.cancelAnimationFrame(this._animationFrame);\n this.__debouncedOnEnd({finished: false});\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {EventSubscription} from '../vendor/emitter/EventEmitter';\nimport type {EventConfig} from './AnimatedEvent';\nimport type {AnimationConfig, EndCallback} from './animations/Animation';\nimport type {\n AnimatedNodeConfig,\n AnimatingNodeConfig,\n EventMapping,\n} from './NativeAnimatedModule';\nimport type {InterpolationConfigType} from './nodes/AnimatedInterpolation';\n\nimport * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';\nimport Platform from '../Utilities/Platform';\nimport NativeAnimatedNonTurboModule from './NativeAnimatedModule';\nimport NativeAnimatedTurboModule from './NativeAnimatedTurboModule';\nimport invariant from 'invariant';\n\n// TODO T69437152 @petetheheat - Delete this fork when Fabric ships to 100%.\nconst NativeAnimatedModule =\n NativeAnimatedNonTurboModule ?? NativeAnimatedTurboModule;\n\nlet __nativeAnimatedNodeTagCount = 1; /* used for animated nodes */\nlet __nativeAnimationIdCount = 1; /* used for started animations */\n\nlet nativeEventEmitter;\n\nlet waitingForQueuedOperations = new Set();\nlet queueOperations = false;\nlet queue: Array<() => void> = [];\n// $FlowFixMe\nlet singleOpQueue: Array = [];\n\nconst useSingleOpBatching =\n Platform.OS === 'android' &&\n !!NativeAnimatedModule?.queueAndExecuteBatchedOperations &&\n ReactNativeFeatureFlags.animatedShouldUseSingleOp();\nlet flushQueueTimeout = null;\n\nconst eventListenerGetValueCallbacks: {\n [number]: (value: number) => void,\n} = {};\nconst eventListenerAnimationFinishedCallbacks: {\n [number]: EndCallback,\n} = {};\nlet globalEventEmitterGetValueListener: ?EventSubscription = null;\nlet globalEventEmitterAnimationFinishedListener: ?EventSubscription = null;\n\nconst nativeOps: ?typeof NativeAnimatedModule = useSingleOpBatching\n ? ((function () {\n const apis = [\n 'createAnimatedNode', // 1\n 'updateAnimatedNodeConfig', // 2\n 'getValue', // 3\n 'startListeningToAnimatedNodeValue', // 4\n 'stopListeningToAnimatedNodeValue', // 5\n 'connectAnimatedNodes', // 6\n 'disconnectAnimatedNodes', // 7\n 'startAnimatingNode', // 8\n 'stopAnimation', // 9\n 'setAnimatedNodeValue', // 10\n 'setAnimatedNodeOffset', // 11\n 'flattenAnimatedNodeOffset', // 12\n 'extractAnimatedNodeOffset', // 13\n 'connectAnimatedNodeToView', // 14\n 'disconnectAnimatedNodeFromView', // 15\n 'restoreDefaultValues', // 16\n 'dropAnimatedNode', // 17\n 'addAnimatedEventToView', // 18\n 'removeAnimatedEventFromView', // 19\n 'addListener', // 20\n 'removeListener', // 21\n ];\n return apis.reduce<{[string]: number}>((acc, functionName, i) => {\n // These indices need to be kept in sync with the indices in native (see NativeAnimatedModule in Java, or the equivalent for any other native platform).\n // $FlowFixMe[prop-missing]\n acc[functionName] = i + 1;\n return acc;\n }, {});\n })(): $FlowFixMe)\n : NativeAnimatedModule;\n\n/**\n * Wrappers around NativeAnimatedModule to provide flow and autocomplete support for\n * the native module methods, and automatic queue management on Android\n */\nconst API = {\n getValue: function (\n tag: number,\n saveValueCallback: (value: number) => void,\n ): void {\n invariant(nativeOps, 'Native animated module is not available');\n if (useSingleOpBatching) {\n if (saveValueCallback) {\n eventListenerGetValueCallbacks[tag] = saveValueCallback;\n }\n // $FlowFixMe\n API.queueOperation(nativeOps.getValue, tag);\n } else {\n API.queueOperation(nativeOps.getValue, tag, saveValueCallback);\n }\n },\n setWaitingForIdentifier: function (id: string): void {\n waitingForQueuedOperations.add(id);\n queueOperations = true;\n if (\n ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush() &&\n flushQueueTimeout\n ) {\n clearTimeout(flushQueueTimeout);\n }\n },\n unsetWaitingForIdentifier: function (id: string): void {\n waitingForQueuedOperations.delete(id);\n\n if (waitingForQueuedOperations.size === 0) {\n queueOperations = false;\n API.disableQueue();\n }\n },\n disableQueue: function (): void {\n invariant(nativeOps, 'Native animated module is not available');\n\n if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush()) {\n const prevTimeout = flushQueueTimeout;\n clearImmediate(prevTimeout);\n flushQueueTimeout = setImmediate(API.flushQueue);\n } else {\n API.flushQueue();\n }\n },\n flushQueue: function (): void {\n // TODO: (T136971132)\n invariant(\n NativeAnimatedModule || process.env.NODE_ENV === 'test',\n 'Native animated module is not available',\n );\n flushQueueTimeout = null;\n\n // Early returns before calling any APIs\n if (useSingleOpBatching && singleOpQueue.length === 0) {\n return;\n }\n if (!useSingleOpBatching && queue.length === 0) {\n return;\n }\n\n if (useSingleOpBatching) {\n // Set up event listener for callbacks if it's not set up\n if (\n !globalEventEmitterGetValueListener ||\n !globalEventEmitterAnimationFinishedListener\n ) {\n setupGlobalEventEmitterListeners();\n }\n // Single op batching doesn't use callback functions, instead we\n // use RCTDeviceEventEmitter. This reduces overhead of sending lots of\n // JSI functions across to native code; but also, TM infrastructure currently\n // does not support packing a function into native arrays.\n NativeAnimatedModule?.queueAndExecuteBatchedOperations?.(singleOpQueue);\n singleOpQueue.length = 0;\n } else {\n Platform.OS === 'android' &&\n NativeAnimatedModule?.startOperationBatch?.();\n\n for (let q = 0, l = queue.length; q < l; q++) {\n queue[q]();\n }\n queue.length = 0;\n Platform.OS === 'android' &&\n NativeAnimatedModule?.finishOperationBatch?.();\n }\n },\n queueOperation: , Fn: (...Args) => void>(\n fn: Fn,\n ...args: Args\n ): void => {\n if (useSingleOpBatching) {\n // Get the command ID from the queued function, and push that ID and any arguments needed to execute the operation\n // $FlowFixMe: surprise, fn is actually a number\n singleOpQueue.push(fn, ...args);\n return;\n }\n\n // If queueing is explicitly on, *or* the queue has not yet\n // been flushed, use the queue. This is to prevent operations\n // from being executed out of order.\n if (queueOperations || queue.length !== 0) {\n queue.push(() => fn(...args));\n } else {\n fn(...args);\n }\n },\n createAnimatedNode: function (tag: number, config: AnimatedNodeConfig): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.createAnimatedNode, tag, config);\n },\n updateAnimatedNodeConfig: function (\n tag: number,\n config: AnimatedNodeConfig,\n ): void {\n invariant(nativeOps, 'Native animated module is not available');\n if (nativeOps.updateAnimatedNodeConfig) {\n API.queueOperation(nativeOps.updateAnimatedNodeConfig, tag, config);\n }\n },\n startListeningToAnimatedNodeValue: function (tag: number) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.startListeningToAnimatedNodeValue, tag);\n },\n stopListeningToAnimatedNodeValue: function (tag: number) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.stopListeningToAnimatedNodeValue, tag);\n },\n connectAnimatedNodes: function (parentTag: number, childTag: number): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.connectAnimatedNodes, parentTag, childTag);\n },\n disconnectAnimatedNodes: function (\n parentTag: number,\n childTag: number,\n ): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.disconnectAnimatedNodes, parentTag, childTag);\n },\n startAnimatingNode: function (\n animationId: number,\n nodeTag: number,\n config: AnimatingNodeConfig,\n endCallback: EndCallback,\n ): void {\n invariant(nativeOps, 'Native animated module is not available');\n if (useSingleOpBatching) {\n if (endCallback) {\n eventListenerAnimationFinishedCallbacks[animationId] = endCallback;\n }\n // $FlowFixMe\n API.queueOperation(\n // $FlowFixMe[incompatible-call]\n nativeOps.startAnimatingNode,\n animationId,\n nodeTag,\n config,\n );\n } else {\n API.queueOperation(\n nativeOps.startAnimatingNode,\n animationId,\n nodeTag,\n config,\n endCallback,\n );\n }\n },\n stopAnimation: function (animationId: number) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.stopAnimation, animationId);\n },\n setAnimatedNodeValue: function (nodeTag: number, value: number): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.setAnimatedNodeValue, nodeTag, value);\n },\n setAnimatedNodeOffset: function (nodeTag: number, offset: number): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.setAnimatedNodeOffset, nodeTag, offset);\n },\n flattenAnimatedNodeOffset: function (nodeTag: number): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.flattenAnimatedNodeOffset, nodeTag);\n },\n extractAnimatedNodeOffset: function (nodeTag: number): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.extractAnimatedNodeOffset, nodeTag);\n },\n connectAnimatedNodeToView: function (nodeTag: number, viewTag: number): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.connectAnimatedNodeToView, nodeTag, viewTag);\n },\n disconnectAnimatedNodeFromView: function (\n nodeTag: number,\n viewTag: number,\n ): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(\n nativeOps.disconnectAnimatedNodeFromView,\n nodeTag,\n viewTag,\n );\n },\n restoreDefaultValues: function (nodeTag: number): void {\n invariant(nativeOps, 'Native animated module is not available');\n // Backwards compat with older native runtimes, can be removed later.\n if (nativeOps.restoreDefaultValues != null) {\n API.queueOperation(nativeOps.restoreDefaultValues, nodeTag);\n }\n },\n dropAnimatedNode: function (tag: number): void {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.dropAnimatedNode, tag);\n },\n addAnimatedEventToView: function (\n viewTag: number,\n eventName: string,\n eventMapping: EventMapping,\n ) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(\n nativeOps.addAnimatedEventToView,\n viewTag,\n eventName,\n eventMapping,\n );\n },\n removeAnimatedEventFromView(\n viewTag: number,\n eventName: string,\n animatedNodeTag: number,\n ) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(\n nativeOps.removeAnimatedEventFromView,\n viewTag,\n eventName,\n animatedNodeTag,\n );\n },\n};\n\nfunction setupGlobalEventEmitterListeners() {\n globalEventEmitterGetValueListener = RCTDeviceEventEmitter.addListener(\n 'onNativeAnimatedModuleGetValue',\n params => {\n const {tag} = params;\n const callback = eventListenerGetValueCallbacks[tag];\n if (!callback) {\n return;\n }\n callback(params.value);\n delete eventListenerGetValueCallbacks[tag];\n },\n );\n globalEventEmitterAnimationFinishedListener =\n RCTDeviceEventEmitter.addListener(\n 'onNativeAnimatedModuleAnimationFinished',\n params => {\n // TODO: remove Array.isArray once native changes have propagated\n const animations = Array.isArray(params) ? params : [params];\n for (const animation of animations) {\n const {animationId} = animation;\n const callback = eventListenerAnimationFinishedCallbacks[animationId];\n if (callback) {\n callback(animation);\n delete eventListenerAnimationFinishedCallbacks[animationId];\n }\n }\n },\n );\n}\n\n/**\n * Styles allowed by the native animated implementation.\n *\n * In general native animated implementation should support any numeric or color property that\n * doesn't need to be updated through the shadow view hierarchy (all non-layout properties).\n */\nconst SUPPORTED_COLOR_STYLES = {\n backgroundColor: true,\n borderBottomColor: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n borderStartColor: true,\n borderTopColor: true,\n color: true,\n tintColor: true,\n};\n\nconst SUPPORTED_STYLES = {\n ...SUPPORTED_COLOR_STYLES,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderEndEndRadius: true,\n borderEndStartRadius: true,\n borderRadius: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n borderStartEndRadius: true,\n borderStartStartRadius: true,\n elevation: true,\n opacity: true,\n transform: true,\n zIndex: true,\n /* ios styles */\n shadowOpacity: true,\n shadowRadius: true,\n /* legacy android transform properties */\n scaleX: true,\n scaleY: true,\n translateX: true,\n translateY: true,\n};\n\nconst SUPPORTED_TRANSFORMS = {\n translateX: true,\n translateY: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n rotate: true,\n rotateX: true,\n rotateY: true,\n rotateZ: true,\n perspective: true,\n skewX: true,\n skewY: true,\n matrix: ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform(),\n};\n\nconst SUPPORTED_INTERPOLATION_PARAMS = {\n inputRange: true,\n outputRange: true,\n extrapolate: true,\n extrapolateRight: true,\n extrapolateLeft: true,\n};\n\nfunction addWhitelistedStyleProp(prop: string): void {\n // $FlowFixMe[prop-missing]\n SUPPORTED_STYLES[prop] = true;\n}\n\nfunction addWhitelistedTransformProp(prop: string): void {\n // $FlowFixMe[prop-missing]\n SUPPORTED_TRANSFORMS[prop] = true;\n}\n\nfunction addWhitelistedInterpolationParam(param: string): void {\n // $FlowFixMe[prop-missing]\n SUPPORTED_INTERPOLATION_PARAMS[param] = true;\n}\n\nfunction isSupportedColorStyleProp(prop: string): boolean {\n // $FlowFixMe[invalid-computed-prop]\n return SUPPORTED_COLOR_STYLES[prop] === true;\n}\n\nfunction isSupportedStyleProp(prop: string): boolean {\n // $FlowFixMe[invalid-computed-prop]\n return SUPPORTED_STYLES[prop] === true;\n}\n\nfunction isSupportedTransformProp(prop: string): boolean {\n // $FlowFixMe[invalid-computed-prop]\n return SUPPORTED_TRANSFORMS[prop] === true;\n}\n\nfunction isSupportedInterpolationParam(param: string): boolean {\n // $FlowFixMe[invalid-computed-prop]\n return SUPPORTED_INTERPOLATION_PARAMS[param] === true;\n}\n\nfunction validateTransform(\n configs: Array<\n | {\n type: 'animated',\n property: string,\n nodeTag: ?number,\n ...\n }\n | {\n type: 'static',\n property: string,\n value: number | string,\n ...\n },\n >,\n): void {\n configs.forEach(config => {\n if (!isSupportedTransformProp(config.property)) {\n throw new Error(\n `Property '${config.property}' is not supported by native animated module`,\n );\n }\n });\n}\n\nfunction validateStyles(styles: {[key: string]: ?number, ...}): void {\n for (const key in styles) {\n if (!isSupportedStyleProp(key)) {\n throw new Error(\n `Style property '${key}' is not supported by native animated module`,\n );\n }\n }\n}\n\nfunction validateInterpolation(\n config: InterpolationConfigType,\n): void {\n for (const key in config) {\n if (!isSupportedInterpolationParam(key)) {\n throw new Error(\n `Interpolation property '${key}' is not supported by native animated module`,\n );\n }\n }\n}\n\nfunction generateNewNodeTag(): number {\n return __nativeAnimatedNodeTagCount++;\n}\n\nfunction generateNewAnimationId(): number {\n return __nativeAnimationIdCount++;\n}\n\nfunction assertNativeAnimatedModule(): void {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n}\n\nlet _warnedMissingNativeAnimated = false;\n\nfunction shouldUseNativeDriver(\n config: $ReadOnly<{...AnimationConfig, ...}> | EventConfig,\n): boolean {\n if (config.useNativeDriver == null) {\n console.warn(\n 'Animated: `useNativeDriver` was not specified. This is a required ' +\n 'option and must be explicitly set to `true` or `false`',\n );\n }\n\n if (config.useNativeDriver === true && !NativeAnimatedModule) {\n if (process.env.NODE_ENV !== 'test') {\n if (!_warnedMissingNativeAnimated) {\n console.warn(\n 'Animated: `useNativeDriver` is not supported because the native ' +\n 'animated module is missing. Falling back to JS-based animation. To ' +\n 'resolve this, add `RCTAnimation` module to this app, or remove ' +\n '`useNativeDriver`. ' +\n 'Make sure to run `bundle exec pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md',\n );\n _warnedMissingNativeAnimated = true;\n }\n }\n return false;\n }\n\n return config.useNativeDriver || false;\n}\n\nfunction transformDataType(value: number | string): number | string {\n // Change the string type to number type so we can reuse the same logic in\n // iOS and Android platform\n if (typeof value !== 'string') {\n return value;\n }\n\n // Normalize degrees and radians to a number expressed in radians\n if (value.endsWith('deg')) {\n const degrees = parseFloat(value) || 0;\n return (degrees * Math.PI) / 180.0;\n } else if (value.endsWith('rad')) {\n return parseFloat(value) || 0;\n } else {\n return value;\n }\n}\n\nexport default {\n API,\n isSupportedColorStyleProp,\n isSupportedStyleProp,\n isSupportedTransformProp,\n isSupportedInterpolationParam,\n addWhitelistedStyleProp,\n addWhitelistedTransformProp,\n addWhitelistedInterpolationParam,\n validateStyles,\n validateTransform,\n validateInterpolation,\n generateNewNodeTag,\n generateNewAnimationId,\n assertNativeAnimatedModule,\n shouldUseNativeDriver,\n transformDataType,\n // $FlowExpectedError[unsafe-getters-setters] - unsafe getter lint suppression\n // $FlowExpectedError[missing-type-arg] - unsafe getter lint suppression\n get nativeEventEmitter(): NativeEventEmitter {\n if (!nativeEventEmitter) {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n nativeEventEmitter = new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeAnimatedModule,\n );\n }\n return nativeEventEmitter;\n },\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeAnimatedModule';\nimport NativeAnimatedModule from '../../src/private/specs/modules/NativeAnimatedModule';\nexport default NativeAnimatedModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport shouldUseTurboAnimatedModule from '../../../../Libraries/Animated/shouldUseTurboAnimatedModule';\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\ntype EndResult = {finished: boolean, value?: number, ...};\ntype EndCallback = (result: EndResult) => void;\ntype SaveValueCallback = (value: number) => void;\n\nexport type EventMapping = {|\n nativeEventPath: Array,\n animatedValueTag: ?number,\n|};\n\n// The config has different keys depending on the type of the Node\n// TODO(T54896888): Make these types strict\nexport type AnimatedNodeConfig = Object;\nexport type AnimatingNodeConfig = Object;\n\nexport interface Spec extends TurboModule {\n +startOperationBatch: () => void;\n +finishOperationBatch: () => void;\n +createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void;\n +updateAnimatedNodeConfig?: (tag: number, config: AnimatedNodeConfig) => void;\n +getValue: (tag: number, saveValueCallback: SaveValueCallback) => void;\n +startListeningToAnimatedNodeValue: (tag: number) => void;\n +stopListeningToAnimatedNodeValue: (tag: number) => void;\n +connectAnimatedNodes: (parentTag: number, childTag: number) => void;\n +disconnectAnimatedNodes: (parentTag: number, childTag: number) => void;\n +startAnimatingNode: (\n animationId: number,\n nodeTag: number,\n config: AnimatingNodeConfig,\n endCallback: EndCallback,\n ) => void;\n +stopAnimation: (animationId: number) => void;\n +setAnimatedNodeValue: (nodeTag: number, value: number) => void;\n +setAnimatedNodeOffset: (nodeTag: number, offset: number) => void;\n +flattenAnimatedNodeOffset: (nodeTag: number) => void;\n +extractAnimatedNodeOffset: (nodeTag: number) => void;\n +connectAnimatedNodeToView: (nodeTag: number, viewTag: number) => void;\n +disconnectAnimatedNodeFromView: (nodeTag: number, viewTag: number) => void;\n +restoreDefaultValues: (nodeTag: number) => void;\n +dropAnimatedNode: (tag: number) => void;\n +addAnimatedEventToView: (\n viewTag: number,\n eventName: string,\n eventMapping: EventMapping,\n ) => void;\n +removeAnimatedEventFromView: (\n viewTag: number,\n eventName: string,\n animatedNodeTag: number,\n ) => void;\n\n // Events\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n\n // All of the above in a batched mode\n +queueAndExecuteBatchedOperations?: (operationsAndArgs: Array) => void;\n}\n\nconst NativeModule: ?Spec = !shouldUseTurboAnimatedModule()\n ? TurboModuleRegistry.get('NativeAnimatedModule')\n : null;\nexport default NativeModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport Platform from '../Utilities/Platform';\n\nfunction shouldUseTurboAnimatedModule(): boolean {\n return Platform.OS === 'ios' && global.RN$Bridgeless === true;\n}\n\nexport default shouldUseTurboAnimatedModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeAnimatedTurboModule';\nimport NativeAnimatedTurboModule from '../../src/private/specs/modules/NativeAnimatedTurboModule';\nexport default NativeAnimatedTurboModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport shouldUseTurboAnimatedModule from '../../../../Libraries/Animated/shouldUseTurboAnimatedModule';\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\ntype EndResult = {finished: boolean, value?: number, ...};\ntype EndCallback = (result: EndResult) => void;\ntype SaveValueCallback = (value: number) => void;\n\nexport type EventMapping = {|\n nativeEventPath: Array,\n animatedValueTag: ?number,\n|};\n\n// The config has different keys depending on the type of the Node\n// TODO(T54896888): Make these types strict\nexport type AnimatedNodeConfig = Object;\nexport type AnimatingNodeConfig = Object;\n\nexport interface Spec extends TurboModule {\n +startOperationBatch: () => void;\n +finishOperationBatch: () => void;\n +createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void;\n +updateAnimatedNodeConfig?: (tag: number, config: AnimatedNodeConfig) => void;\n +getValue: (tag: number, saveValueCallback: SaveValueCallback) => void;\n +startListeningToAnimatedNodeValue: (tag: number) => void;\n +stopListeningToAnimatedNodeValue: (tag: number) => void;\n +connectAnimatedNodes: (parentTag: number, childTag: number) => void;\n +disconnectAnimatedNodes: (parentTag: number, childTag: number) => void;\n +startAnimatingNode: (\n animationId: number,\n nodeTag: number,\n config: AnimatingNodeConfig,\n endCallback: EndCallback,\n ) => void;\n +stopAnimation: (animationId: number) => void;\n +setAnimatedNodeValue: (nodeTag: number, value: number) => void;\n +setAnimatedNodeOffset: (nodeTag: number, offset: number) => void;\n +flattenAnimatedNodeOffset: (nodeTag: number) => void;\n +extractAnimatedNodeOffset: (nodeTag: number) => void;\n +connectAnimatedNodeToView: (nodeTag: number, viewTag: number) => void;\n +disconnectAnimatedNodeFromView: (nodeTag: number, viewTag: number) => void;\n +restoreDefaultValues: (nodeTag: number) => void;\n +dropAnimatedNode: (tag: number) => void;\n +addAnimatedEventToView: (\n viewTag: number,\n eventName: string,\n eventMapping: EventMapping,\n ) => void;\n +removeAnimatedEventFromView: (\n viewTag: number,\n eventName: string,\n animatedNodeTag: number,\n ) => void;\n\n // Events\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n\n // All of the above in a batched mode\n +queueAndExecuteBatchedOperations?: (operationsAndArgs: Array) => void;\n}\n\nconst NativeModule: ?Spec = shouldUseTurboAnimatedModule()\n ? TurboModuleRegistry.get('NativeAnimatedTurboModule')\n : null;\n\nexport default NativeModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type AnimatedNode from '../nodes/AnimatedNode';\nimport type AnimatedValue from '../nodes/AnimatedValue';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedProps from '../nodes/AnimatedProps';\n\nexport type EndResult = {finished: boolean, value?: number, ...};\nexport type EndCallback = (result: EndResult) => void;\n\nexport type AnimationConfig = {\n isInteraction?: boolean,\n useNativeDriver: boolean,\n platformConfig?: PlatformConfig,\n onComplete?: ?EndCallback,\n iterations?: number,\n};\n\nlet startNativeAnimationNextId = 1;\n\n// Important note: start() and stop() will only be called at most once.\n// Once an animation has been stopped or finished its course, it will\n// not be reused.\nexport default class Animation {\n __active: boolean;\n __isInteraction: boolean;\n __onEnd: ?EndCallback;\n __iterations: number;\n\n _nativeId: number;\n\n start(\n fromValue: number,\n onUpdate: (value: number) => void,\n onEnd: ?EndCallback,\n previousAnimation: ?Animation,\n animatedValue: AnimatedValue,\n ): void {}\n\n stop(): void {\n if (this._nativeId) {\n NativeAnimatedHelper.API.stopAnimation(this._nativeId);\n }\n }\n\n __getNativeAnimationConfig(): any {\n // Subclasses that have corresponding animation implementation done in native\n // should override this method\n throw new Error('This animation type cannot be offloaded to native');\n }\n\n // Helper function for subclasses to make sure onEnd is only called once.\n __debouncedOnEnd(result: EndResult): void {\n const onEnd = this.__onEnd;\n this.__onEnd = null;\n onEnd && onEnd(result);\n }\n\n __findAnimatedPropsNodes(node: AnimatedNode): Array {\n const result = [];\n\n if (node instanceof AnimatedProps) {\n result.push(node);\n return result;\n }\n\n for (const child of node.__getChildren()) {\n result.push(...this.__findAnimatedPropsNodes(child));\n }\n\n return result;\n }\n\n __startNativeAnimation(animatedValue: AnimatedValue): void {\n const startNativeAnimationWaitId = `${startNativeAnimationNextId}:startAnimation`;\n startNativeAnimationNextId += 1;\n NativeAnimatedHelper.API.setWaitingForIdentifier(\n startNativeAnimationWaitId,\n );\n try {\n const config = this.__getNativeAnimationConfig();\n animatedValue.__makeNative(config.platformConfig);\n this._nativeId = NativeAnimatedHelper.generateNewAnimationId();\n NativeAnimatedHelper.API.startAnimatingNode(\n this._nativeId,\n animatedValue.__getNativeTag(),\n config,\n result => {\n this.__debouncedOnEnd(result);\n\n // When using natively driven animations, once the animation completes,\n // we need to ensure that the JS side nodes are synced with the updated\n // values.\n const {value} = result;\n if (value != null) {\n animatedValue.__onAnimatedValueUpdateReceived(value);\n\n // Once the JS side node is synced with the updated values, trigger an\n // update on the AnimatedProps nodes to call any registered callbacks.\n this.__findAnimatedPropsNodes(animatedValue).forEach(node =>\n node.update(),\n );\n }\n },\n );\n } catch (e) {\n throw e;\n } finally {\n NativeAnimatedHelper.API.unsetWaitingForIdentifier(\n startNativeAnimationWaitId,\n );\n }\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\n\nimport {findNodeHandle} from '../../ReactNative/RendererProxy';\nimport {AnimatedEvent} from '../AnimatedEvent';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedObject, {hasAnimatedNode} from './AnimatedObject';\nimport AnimatedStyle from './AnimatedStyle';\nimport invariant from 'invariant';\n\nfunction createAnimatedProps(inputProps: Object): Object {\n const props: Object = {};\n for (const key in inputProps) {\n const value = inputProps[key];\n if (key === 'style') {\n props[key] = new AnimatedStyle(value);\n } else if (value instanceof AnimatedNode) {\n props[key] = value;\n } else if (hasAnimatedNode(value)) {\n props[key] = new AnimatedObject(value);\n } else {\n props[key] = value;\n }\n }\n return props;\n}\n\nexport default class AnimatedProps extends AnimatedNode {\n _props: Object;\n _animatedView: any;\n _callback: () => void;\n\n constructor(props: Object, callback: () => void) {\n super();\n this._props = createAnimatedProps(props);\n this._callback = callback;\n }\n\n __getValue(): Object {\n const props: {[string]: any | ((...args: any) => void)} = {};\n for (const key in this._props) {\n const value = this._props[key];\n if (value instanceof AnimatedNode) {\n props[key] = value.__getValue();\n } else if (value instanceof AnimatedEvent) {\n props[key] = value.__getHandler();\n } else {\n props[key] = value;\n }\n }\n\n return props;\n }\n\n __getAnimatedValue(): Object {\n const props: {[string]: any} = {};\n for (const key in this._props) {\n const value = this._props[key];\n if (value instanceof AnimatedNode) {\n props[key] = value.__getAnimatedValue();\n }\n }\n return props;\n }\n\n __attach(): void {\n for (const key in this._props) {\n const value = this._props[key];\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n }\n\n __detach(): void {\n if (this.__isNative && this._animatedView) {\n this.__disconnectAnimatedView();\n }\n for (const key in this._props) {\n const value = this._props[key];\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n super.__detach();\n }\n\n update(): void {\n this._callback();\n }\n\n __makeNative(platformConfig: ?PlatformConfig): void {\n for (const key in this._props) {\n const value = this._props[key];\n if (value instanceof AnimatedNode) {\n value.__makeNative(platformConfig);\n }\n }\n\n if (!this.__isNative) {\n this.__isNative = true;\n\n // Since this does not call the super.__makeNative, we need to store the\n // supplied platformConfig here, before calling __connectAnimatedView\n // where it will be needed to traverse the graph of attached values.\n super.__setPlatformConfig(platformConfig);\n\n if (this._animatedView) {\n this.__connectAnimatedView();\n }\n }\n }\n\n setNativeView(animatedView: any): void {\n if (this._animatedView === animatedView) {\n return;\n }\n this._animatedView = animatedView;\n if (this.__isNative) {\n this.__connectAnimatedView();\n }\n }\n\n __connectAnimatedView(): void {\n invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n const nativeViewTag: ?number = findNodeHandle(this._animatedView);\n invariant(\n nativeViewTag != null,\n 'Unable to locate attached view in the native tree',\n );\n NativeAnimatedHelper.API.connectAnimatedNodeToView(\n this.__getNativeTag(),\n nativeViewTag,\n );\n }\n\n __disconnectAnimatedView(): void {\n invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n const nativeViewTag: ?number = findNodeHandle(this._animatedView);\n invariant(\n nativeViewTag != null,\n 'Unable to locate attached view in the native tree',\n );\n NativeAnimatedHelper.API.disconnectAnimatedNodeFromView(\n this.__getNativeTag(),\n nativeViewTag,\n );\n }\n\n __restoreDefaultValues(): void {\n // When using the native driver, view properties need to be restored to\n // their default values manually since react no longer tracks them. This\n // is needed to handle cases where a prop driven by native animated is removed\n // after having been changed natively by an animation.\n if (this.__isNative) {\n NativeAnimatedHelper.API.restoreDefaultValues(this.__getNativeTag());\n }\n }\n\n __getNativeConfig(): Object {\n const propsConfig: {[string]: number} = {};\n for (const propKey in this._props) {\n const value = this._props[propKey];\n if (value instanceof AnimatedNode) {\n value.__makeNative(this.__getPlatformConfig());\n propsConfig[propKey] = value.__getNativeTag();\n }\n }\n return {\n type: 'props',\n props: propsConfig,\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport invariant from 'invariant';\n\nconst NativeAnimatedAPI = NativeAnimatedHelper.API;\n\ntype ValueListenerCallback = (state: {value: number, ...}) => mixed;\n\nlet _uniqueId = 1;\n\n// Note(vjeux): this would be better as an interface but flow doesn't\n// support them yet\nexport default class AnimatedNode {\n _listeners: {[key: string]: ValueListenerCallback, ...};\n _platformConfig: ?PlatformConfig;\n __nativeAnimatedValueListener: ?any;\n __attach(): void {}\n __detach(): void {\n this.removeAllListeners();\n if (this.__isNative && this.__nativeTag != null) {\n NativeAnimatedHelper.API.dropAnimatedNode(this.__nativeTag);\n this.__nativeTag = undefined;\n }\n }\n __getValue(): any {}\n __getAnimatedValue(): any {\n return this.__getValue();\n }\n __addChild(child: AnimatedNode) {}\n __removeChild(child: AnimatedNode) {}\n __getChildren(): $ReadOnlyArray {\n return [];\n }\n\n /* Methods and props used by native Animated impl */\n __isNative: boolean;\n __nativeTag: ?number;\n __shouldUpdateListenersForNewNativeTag: boolean;\n\n constructor() {\n this._listeners = {};\n }\n\n __makeNative(platformConfig: ?PlatformConfig): void {\n if (!this.__isNative) {\n throw new Error('This node cannot be made a \"native\" animated node');\n }\n\n this._platformConfig = platformConfig;\n if (this.hasListeners()) {\n this._startListeningToNativeValueUpdates();\n }\n }\n\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to\n * synchronously read the value because it might be driven natively.\n *\n * See https://reactnative.dev/docs/animatedvalue#addlistener\n */\n addListener(callback: (value: any) => mixed): string {\n const id = String(_uniqueId++);\n this._listeners[id] = callback;\n if (this.__isNative) {\n this._startListeningToNativeValueUpdates();\n }\n return id;\n }\n\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n *\n * See https://reactnative.dev/docs/animatedvalue#removelistener\n */\n removeListener(id: string): void {\n delete this._listeners[id];\n if (this.__isNative && !this.hasListeners()) {\n this._stopListeningForNativeValueUpdates();\n }\n }\n\n /**\n * Remove all registered listeners.\n *\n * See https://reactnative.dev/docs/animatedvalue#removealllisteners\n */\n removeAllListeners(): void {\n this._listeners = {};\n if (this.__isNative) {\n this._stopListeningForNativeValueUpdates();\n }\n }\n\n hasListeners(): boolean {\n return !!Object.keys(this._listeners).length;\n }\n\n _startListeningToNativeValueUpdates() {\n if (\n this.__nativeAnimatedValueListener &&\n !this.__shouldUpdateListenersForNewNativeTag\n ) {\n return;\n }\n\n if (this.__shouldUpdateListenersForNewNativeTag) {\n this.__shouldUpdateListenersForNewNativeTag = false;\n this._stopListeningForNativeValueUpdates();\n }\n\n NativeAnimatedAPI.startListeningToAnimatedNodeValue(this.__getNativeTag());\n this.__nativeAnimatedValueListener =\n NativeAnimatedHelper.nativeEventEmitter.addListener(\n 'onAnimatedValueUpdate',\n data => {\n if (data.tag !== this.__getNativeTag()) {\n return;\n }\n this.__onAnimatedValueUpdateReceived(data.value);\n },\n );\n }\n\n __onAnimatedValueUpdateReceived(value: number) {\n this.__callListeners(value);\n }\n\n __callListeners(value: number): void {\n for (const key in this._listeners) {\n this._listeners[key]({value});\n }\n }\n\n _stopListeningForNativeValueUpdates() {\n if (!this.__nativeAnimatedValueListener) {\n return;\n }\n\n this.__nativeAnimatedValueListener.remove();\n this.__nativeAnimatedValueListener = null;\n NativeAnimatedAPI.stopListeningToAnimatedNodeValue(this.__getNativeTag());\n }\n\n __getNativeTag(): number {\n NativeAnimatedHelper.assertNativeAnimatedModule();\n invariant(\n this.__isNative,\n 'Attempt to get native tag from node not marked as \"native\"',\n );\n\n const nativeTag =\n this.__nativeTag ?? NativeAnimatedHelper.generateNewNodeTag();\n\n if (this.__nativeTag == null) {\n this.__nativeTag = nativeTag;\n const config = this.__getNativeConfig();\n if (this._platformConfig) {\n config.platformConfig = this._platformConfig;\n }\n NativeAnimatedHelper.API.createAnimatedNode(nativeTag, config);\n this.__shouldUpdateListenersForNewNativeTag = true;\n }\n\n return nativeTag;\n }\n __getNativeConfig(): Object {\n throw new Error(\n 'This JS animated node type cannot be used as native animated node',\n );\n }\n\n toJSON(): any {\n return this.__getValue();\n }\n\n __getPlatformConfig(): ?PlatformConfig {\n return this._platformConfig;\n }\n __setPlatformConfig(platformConfig: ?PlatformConfig) {\n this._platformConfig = platformConfig;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n * @oncall react_native\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport * as React from 'react';\n\nconst MAX_DEPTH = 5;\n\nfunction isPlainObject(value: any): boolean {\n return (\n value !== null &&\n typeof value === 'object' &&\n Object.getPrototypeOf(value).isPrototypeOf(Object)\n );\n}\n\n// Recurse through values, executing fn for any AnimatedNodes\nfunction visit(value: any, fn: any => void, depth: number = 0): void {\n if (depth >= MAX_DEPTH) {\n return;\n }\n\n if (value instanceof AnimatedNode) {\n fn(value);\n } else if (Array.isArray(value)) {\n value.forEach(element => {\n visit(element, fn, depth + 1);\n });\n } else if (isPlainObject(value)) {\n Object.values(value).forEach(element => {\n visit(element, fn, depth + 1);\n });\n }\n}\n\n// Returns a copy of value with a transformation fn applied to any AnimatedNodes\nfunction mapAnimatedNodes(value: any, fn: any => any, depth: number = 0): any {\n if (depth >= MAX_DEPTH) {\n return value;\n }\n\n if (value instanceof AnimatedNode) {\n return fn(value);\n } else if (Array.isArray(value)) {\n return value.map(element => mapAnimatedNodes(element, fn, depth + 1));\n } else if (isPlainObject(value)) {\n const result: {[string]: any} = {};\n for (const key in value) {\n result[key] = mapAnimatedNodes(value[key], fn, depth + 1);\n }\n return result;\n } else {\n return value;\n }\n}\n\nexport function hasAnimatedNode(value: any, depth: number = 0): boolean {\n if (depth >= MAX_DEPTH) {\n return false;\n }\n\n if (value instanceof AnimatedNode) {\n return true;\n } else if (Array.isArray(value)) {\n for (const element of value) {\n if (hasAnimatedNode(element, depth + 1)) {\n return true;\n }\n }\n } else if (isPlainObject(value)) {\n // Don't consider React elements\n if (React.isValidElement(value)) {\n return false;\n }\n for (const key in value) {\n if (hasAnimatedNode(value[key], depth + 1)) {\n return true;\n }\n }\n }\n return false;\n}\n\nexport default class AnimatedObject extends AnimatedWithChildren {\n _value: any;\n\n constructor(value: any) {\n super();\n this._value = value;\n }\n\n __getValue(): any {\n return mapAnimatedNodes(this._value, node => {\n return node.__getValue();\n });\n }\n\n __getAnimatedValue(): any {\n return mapAnimatedNodes(this._value, node => {\n return node.__getAnimatedValue();\n });\n }\n\n __attach(): void {\n super.__attach();\n visit(this._value, node => {\n node.__addChild(this);\n });\n }\n\n __detach(): void {\n visit(this._value, node => {\n node.__removeChild(this);\n });\n super.__detach();\n }\n\n __makeNative(platformConfig: ?PlatformConfig): void {\n visit(this._value, value => {\n value.__makeNative(platformConfig);\n });\n super.__makeNative(platformConfig);\n }\n\n __getNativeConfig(): any {\n return {\n type: 'object',\n value: mapAnimatedNodes(this._value, node => {\n return {nodeTag: node.__getNativeTag()};\n }),\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedNode from './AnimatedNode';\n\nexport default class AnimatedWithChildren extends AnimatedNode {\n _children: Array;\n\n constructor() {\n super();\n this._children = [];\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n if (!this.__isNative) {\n this.__isNative = true;\n for (const child of this._children) {\n child.__makeNative(platformConfig);\n NativeAnimatedHelper.API.connectAnimatedNodes(\n this.__getNativeTag(),\n child.__getNativeTag(),\n );\n }\n }\n super.__makeNative(platformConfig);\n }\n\n __addChild(child: AnimatedNode): void {\n if (this._children.length === 0) {\n this.__attach();\n }\n this._children.push(child);\n if (this.__isNative) {\n // Only accept \"native\" animated nodes as children\n child.__makeNative(this.__getPlatformConfig());\n NativeAnimatedHelper.API.connectAnimatedNodes(\n this.__getNativeTag(),\n child.__getNativeTag(),\n );\n }\n }\n\n __removeChild(child: AnimatedNode): void {\n const index = this._children.indexOf(child);\n if (index === -1) {\n console.warn(\"Trying to remove a child that doesn't exist\");\n return;\n }\n if (this.__isNative && child.__isNative) {\n NativeAnimatedHelper.API.disconnectAnimatedNodes(\n this.__getNativeTag(),\n child.__getNativeTag(),\n );\n }\n this._children.splice(index, 1);\n if (this._children.length === 0) {\n this.__detach();\n }\n }\n\n __getChildren(): $ReadOnlyArray {\n return this._children;\n }\n\n __callListeners(value: number): void {\n super.__callListeners(value);\n if (!this.__isNative) {\n for (const child of this._children) {\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n if (child.__getValue) {\n child.__callListeners(child.__getValue());\n }\n }\n }\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\n\nimport * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';\nimport flattenStyle from '../../StyleSheet/flattenStyle';\nimport Platform from '../../Utilities/Platform';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedObject, {hasAnimatedNode} from './AnimatedObject';\nimport AnimatedTransform from './AnimatedTransform';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nfunction createAnimatedStyle(\n inputStyle: any,\n keepUnanimatedValues: boolean,\n): Object {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n const style = flattenStyle(inputStyle);\n const animatedStyles: any = {};\n for (const key in style) {\n const value = style[key];\n if (value != null && key === 'transform') {\n animatedStyles[key] =\n ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform()\n ? new AnimatedObject(value)\n : new AnimatedTransform(value);\n } else if (value instanceof AnimatedNode) {\n animatedStyles[key] = value;\n } else if (hasAnimatedNode(value)) {\n animatedStyles[key] = new AnimatedObject(value);\n } else if (keepUnanimatedValues) {\n animatedStyles[key] = value;\n }\n }\n return animatedStyles;\n}\n\nexport default class AnimatedStyle extends AnimatedWithChildren {\n _inputStyle: any;\n _style: Object;\n\n constructor(style: any) {\n super();\n this._inputStyle = style;\n this._style = createAnimatedStyle(style, Platform.OS !== 'web');\n }\n\n __getValue(): Object | Array {\n const result: {[string]: any} = {};\n for (const key in this._style) {\n const value = this._style[key];\n if (value instanceof AnimatedNode) {\n result[key] = value.__getValue();\n } else {\n result[key] = value;\n }\n }\n\n return Platform.OS === 'web' ? [this._inputStyle, result] : result;\n }\n\n __getAnimatedValue(): Object {\n const result: {[string]: any} = {};\n for (const key in this._style) {\n const value = this._style[key];\n if (value instanceof AnimatedNode) {\n result[key] = value.__getAnimatedValue();\n }\n }\n return result;\n }\n\n __attach(): void {\n for (const key in this._style) {\n const value = this._style[key];\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n }\n\n __detach(): void {\n for (const key in this._style) {\n const value = this._style[key];\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n super.__detach();\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n for (const key in this._style) {\n const value = this._style[key];\n if (value instanceof AnimatedNode) {\n value.__makeNative(platformConfig);\n }\n }\n super.__makeNative(platformConfig);\n }\n\n __getNativeConfig(): Object {\n const styleConfig: {[string]: ?number} = {};\n for (const styleKey in this._style) {\n if (this._style[styleKey] instanceof AnimatedNode) {\n const style = this._style[styleKey];\n style.__makeNative(this.__getPlatformConfig());\n styleConfig[styleKey] = style.__getNativeTag();\n }\n // Non-animated styles are set using `setNativeProps`, no need\n // to pass those as a part of the node config\n }\n NativeAnimatedHelper.validateStyles(styleConfig);\n return {\n type: 'style',\n style: styleConfig,\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport default class AnimatedTransform extends AnimatedWithChildren {\n _transforms: $ReadOnlyArray;\n\n constructor(transforms: $ReadOnlyArray) {\n super();\n this._transforms = transforms;\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this._transforms.forEach(transform => {\n for (const key in transform) {\n const value = transform[key];\n if (value instanceof AnimatedNode) {\n value.__makeNative(platformConfig);\n }\n }\n });\n super.__makeNative(platformConfig);\n }\n\n __getValue(): $ReadOnlyArray {\n return this._get(animatedNode => animatedNode.__getValue());\n }\n\n __getAnimatedValue(): $ReadOnlyArray {\n return this._get(animatedNode => animatedNode.__getAnimatedValue());\n }\n\n __attach(): void {\n this._transforms.forEach(transform => {\n for (const key in transform) {\n const value = transform[key];\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n });\n }\n\n __detach(): void {\n this._transforms.forEach(transform => {\n for (const key in transform) {\n const value = transform[key];\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n });\n super.__detach();\n }\n\n __getNativeConfig(): any {\n const transConfigs: Array = [];\n\n this._transforms.forEach(transform => {\n for (const key in transform) {\n const value = transform[key];\n if (value instanceof AnimatedNode) {\n transConfigs.push({\n type: 'animated',\n property: key,\n nodeTag: value.__getNativeTag(),\n });\n } else {\n transConfigs.push({\n type: 'static',\n property: key,\n value: NativeAnimatedHelper.transformDataType(value),\n });\n }\n }\n });\n\n NativeAnimatedHelper.validateTransform(transConfigs);\n return {\n type: 'transform',\n transforms: transConfigs,\n };\n }\n\n _get(getter: AnimatedNode => any): $ReadOnlyArray {\n return this._transforms.map(transform => {\n const result: {[string]: any} = {};\n for (const key in transform) {\n const value = transform[key];\n if (value instanceof AnimatedNode) {\n result[key] = getter(value);\n } else if (Array.isArray(value)) {\n result[key] = value.map(element => {\n if (element instanceof AnimatedNode) {\n return getter(element);\n } else {\n return element;\n }\n });\n } else if (typeof value === 'object') {\n result[key] = {};\n for (const [nestedKey, nestedValue] of Object.entries(value)) {\n if (nestedValue instanceof AnimatedNode) {\n result[key][nestedKey] = getter(nestedValue);\n } else {\n result[key][nestedKey] = nestedValue;\n }\n }\n } else {\n result[key] = value;\n }\n }\n return result;\n });\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from './AnimatedPlatformConfig';\n\nimport {findNodeHandle} from '../ReactNative/RendererProxy';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\nimport invariant from 'invariant';\n\nexport type Mapping =\n | {[key: string]: Mapping, ...}\n | AnimatedValue\n | AnimatedValueXY;\nexport type EventConfig = {\n listener?: ?Function,\n useNativeDriver: boolean,\n platformConfig?: PlatformConfig,\n};\n\nexport function attachNativeEvent(\n viewRef: any,\n eventName: string,\n argMapping: $ReadOnlyArray,\n platformConfig: ?PlatformConfig,\n): {detach: () => void} {\n // Find animated values in `argMapping` and create an array representing their\n // key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].\n const eventMappings = [];\n\n const traverse = (value: mixed, path: Array) => {\n if (value instanceof AnimatedValue) {\n value.__makeNative(platformConfig);\n\n eventMappings.push({\n nativeEventPath: path,\n animatedValueTag: value.__getNativeTag(),\n });\n } else if (value instanceof AnimatedValueXY) {\n traverse(value.x, path.concat('x'));\n traverse(value.y, path.concat('y'));\n } else if (typeof value === 'object') {\n for (const key in value) {\n traverse(value[key], path.concat(key));\n }\n }\n };\n\n invariant(\n argMapping[0] && argMapping[0].nativeEvent,\n 'Native driven events only support animated values contained inside `nativeEvent`.',\n );\n\n // Assume that the event containing `nativeEvent` is always the first argument.\n traverse(argMapping[0].nativeEvent, []);\n\n const viewTag = findNodeHandle(viewRef);\n if (viewTag != null) {\n eventMappings.forEach(mapping => {\n NativeAnimatedHelper.API.addAnimatedEventToView(\n viewTag,\n eventName,\n mapping,\n );\n });\n }\n\n return {\n detach() {\n if (viewTag != null) {\n eventMappings.forEach(mapping => {\n NativeAnimatedHelper.API.removeAnimatedEventFromView(\n viewTag,\n eventName,\n // $FlowFixMe[incompatible-call]\n mapping.animatedValueTag,\n );\n });\n }\n },\n };\n}\n\nfunction validateMapping(argMapping: $ReadOnlyArray, args: any) {\n const validate = (recMapping: ?Mapping, recEvt: any, key: string) => {\n if (recMapping instanceof AnimatedValue) {\n invariant(\n typeof recEvt === 'number',\n 'Bad mapping of event key ' +\n key +\n ', should be number but got ' +\n typeof recEvt,\n );\n return;\n }\n if (recMapping instanceof AnimatedValueXY) {\n invariant(\n typeof recEvt.x === 'number' && typeof recEvt.y === 'number',\n 'Bad mapping of event key ' + key + ', should be XY but got ' + recEvt,\n );\n return;\n }\n if (typeof recEvt === 'number') {\n invariant(\n recMapping instanceof AnimatedValue,\n 'Bad mapping of type ' +\n typeof recMapping +\n ' for key ' +\n key +\n ', event value must map to AnimatedValue',\n );\n return;\n }\n invariant(\n typeof recMapping === 'object',\n 'Bad mapping of type ' + typeof recMapping + ' for key ' + key,\n );\n invariant(\n typeof recEvt === 'object',\n 'Bad event of type ' + typeof recEvt + ' for key ' + key,\n );\n for (const mappingKey in recMapping) {\n validate(recMapping[mappingKey], recEvt[mappingKey], mappingKey);\n }\n };\n\n invariant(\n args.length >= argMapping.length,\n 'Event has less arguments than mapping',\n );\n argMapping.forEach((mapping, idx) => {\n validate(mapping, args[idx], 'arg' + idx);\n });\n}\n\nexport class AnimatedEvent {\n _argMapping: $ReadOnlyArray;\n _listeners: Array = [];\n _attachedEvent: ?{detach: () => void, ...};\n __isNative: boolean;\n __platformConfig: ?PlatformConfig;\n\n constructor(argMapping: $ReadOnlyArray, config: EventConfig) {\n this._argMapping = argMapping;\n\n if (config == null) {\n console.warn('Animated.event now requires a second argument for options');\n config = {useNativeDriver: false};\n }\n\n if (config.listener) {\n this.__addListener(config.listener);\n }\n this._attachedEvent = null;\n this.__isNative = NativeAnimatedHelper.shouldUseNativeDriver(config);\n this.__platformConfig = config.platformConfig;\n }\n\n __addListener(callback: Function): void {\n this._listeners.push(callback);\n }\n\n __removeListener(callback: Function): void {\n this._listeners = this._listeners.filter(listener => listener !== callback);\n }\n\n __attach(viewRef: any, eventName: string): void {\n invariant(\n this.__isNative,\n 'Only native driven events need to be attached.',\n );\n\n this._attachedEvent = attachNativeEvent(\n viewRef,\n eventName,\n this._argMapping,\n this.__platformConfig,\n );\n }\n\n __detach(viewTag: any, eventName: string): void {\n invariant(\n this.__isNative,\n 'Only native driven events need to be detached.',\n );\n\n this._attachedEvent && this._attachedEvent.detach();\n }\n\n __getHandler(): any | ((...args: any) => void) {\n if (this.__isNative) {\n if (__DEV__) {\n let validatedMapping = false;\n return (...args: any) => {\n if (!validatedMapping) {\n validateMapping(this._argMapping, args);\n validatedMapping = true;\n }\n this._callListeners(...args);\n };\n } else {\n return this._callListeners;\n }\n }\n\n let validatedMapping = false;\n return (...args: any) => {\n if (__DEV__ && !validatedMapping) {\n validateMapping(this._argMapping, args);\n validatedMapping = true;\n }\n\n const traverse = (\n recMapping: ?(Mapping | AnimatedValue),\n recEvt: any,\n ) => {\n if (recMapping instanceof AnimatedValue) {\n if (typeof recEvt === 'number') {\n recMapping.setValue(recEvt);\n }\n } else if (recMapping instanceof AnimatedValueXY) {\n if (typeof recEvt === 'object') {\n traverse(recMapping.x, recEvt.x);\n traverse(recMapping.y, recEvt.y);\n }\n } else if (typeof recMapping === 'object') {\n for (const mappingKey in recMapping) {\n /* $FlowFixMe[prop-missing] (>=0.120.0) This comment suppresses an\n * error found when Flow v0.120 was deployed. To see the error,\n * delete this comment and run Flow. */\n traverse(recMapping[mappingKey], recEvt[mappingKey]);\n }\n }\n };\n this._argMapping.forEach((mapping, idx) => {\n traverse(mapping, args[idx]);\n });\n\n this._callListeners(...args);\n };\n }\n\n _callListeners = (...args: any) => {\n this._listeners.forEach(listener => listener(...args));\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type Animation, {EndCallback} from '../animations/Animation';\nimport type {InterpolationConfigType} from './AnimatedInterpolation';\nimport type AnimatedNode from './AnimatedNode';\nimport type AnimatedTracking from './AnimatedTracking';\n\nimport InteractionManager from '../../Interaction/InteractionManager';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport type AnimatedValueConfig = $ReadOnly<{\n useNativeDriver: boolean,\n}>;\n\nconst NativeAnimatedAPI = NativeAnimatedHelper.API;\n\n/**\n * Animated works by building a directed acyclic graph of dependencies\n * transparently when you render your Animated components.\n *\n * new Animated.Value(0)\n * .interpolate() .interpolate() new Animated.Value(1)\n * opacity translateY scale\n * style transform\n * View#234 style\n * View#123\n *\n * A) Top Down phase\n * When an Animated.Value is updated, we recursively go down through this\n * graph in order to find leaf nodes: the views that we flag as needing\n * an update.\n *\n * B) Bottom Up phase\n * When a view is flagged as needing an update, we recursively go back up\n * in order to build the new value that it needs. The reason why we need\n * this two-phases process is to deal with composite props such as\n * transform which can receive values from multiple parents.\n */\nexport function flushValue(rootNode: AnimatedNode): void {\n const leaves = new Set<{update: () => void, ...}>();\n function findAnimatedStyles(node: AnimatedNode) {\n // $FlowFixMe[prop-missing]\n if (typeof node.update === 'function') {\n leaves.add((node: any));\n } else {\n node.__getChildren().forEach(findAnimatedStyles);\n }\n }\n findAnimatedStyles(rootNode);\n leaves.forEach(leaf => leaf.update());\n}\n\n/**\n * Some operations are executed only on batch end, which is _mostly_ scheduled when\n * Animated component props change. For some of the changes which require immediate execution\n * (e.g. setValue), we create a separate batch in case none is scheduled.\n */\nfunction _executeAsAnimatedBatch(id: string, operation: () => void) {\n NativeAnimatedAPI.setWaitingForIdentifier(id);\n operation();\n NativeAnimatedAPI.unsetWaitingForIdentifier(id);\n}\n\n/**\n * Standard value for driving animations. One `Animated.Value` can drive\n * multiple properties in a synchronized fashion, but can only be driven by one\n * mechanism at a time. Using a new mechanism (e.g. starting a new animation,\n * or calling `setValue`) will stop any previous ones.\n *\n * See https://reactnative.dev/docs/animatedvalue\n */\nexport default class AnimatedValue extends AnimatedWithChildren {\n _value: number;\n _startingValue: number;\n _offset: number;\n _animation: ?Animation;\n _tracking: ?AnimatedTracking;\n\n constructor(value: number, config?: ?AnimatedValueConfig) {\n super();\n if (typeof value !== 'number') {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n this._startingValue = this._value = value;\n this._offset = 0;\n this._animation = null;\n if (config && config.useNativeDriver) {\n this.__makeNative();\n }\n }\n\n __detach() {\n if (this.__isNative) {\n NativeAnimatedAPI.getValue(this.__getNativeTag(), value => {\n this._value = value - this._offset;\n });\n }\n this.stopAnimation();\n super.__detach();\n }\n\n __getValue(): number {\n return this._value + this._offset;\n }\n\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvalue#setvalue\n */\n setValue(value: number): void {\n if (this._animation) {\n this._animation.stop();\n this._animation = null;\n }\n this._updateValue(\n value,\n !this.__isNative /* don't perform a flush for natively driven values */,\n );\n if (this.__isNative) {\n _executeAsAnimatedBatch(this.__getNativeTag().toString(), () =>\n NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), value),\n );\n }\n }\n\n /**\n * Sets an offset that is applied on top of whatever value is set, whether via\n * `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvalue#setoffset\n */\n setOffset(offset: number): void {\n this._offset = offset;\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);\n }\n }\n\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue#flattenoffset\n */\n flattenOffset(): void {\n this._value += this._offset;\n this._offset = 0;\n if (this.__isNative) {\n NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n\n /**\n * Sets the offset value to the base value, and resets the base value to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue#extractoffset\n */\n extractOffset(): void {\n this._offset += this._value;\n this._value = 0;\n if (this.__isNative) {\n NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvalue#stopanimation\n */\n stopAnimation(callback?: ?(value: number) => void): void {\n this.stopTracking();\n this._animation && this._animation.stop();\n this._animation = null;\n if (callback) {\n if (this.__isNative) {\n NativeAnimatedAPI.getValue(this.__getNativeTag(), callback);\n } else {\n callback(this.__getValue());\n }\n }\n }\n\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvalue#resetanimation\n */\n resetAnimation(callback?: ?(value: number) => void): void {\n this.stopAnimation(callback);\n this._value = this._startingValue;\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeValue(\n this.__getNativeTag(),\n this._startingValue,\n );\n }\n }\n\n __onAnimatedValueUpdateReceived(value: number): void {\n this._updateValue(value, false /*flush*/);\n }\n\n /**\n * Interpolates the value before updating the property, e.g. mapping 0-1 to\n * 0-10.\n */\n interpolate(\n config: InterpolationConfigType,\n ): AnimatedInterpolation {\n return new AnimatedInterpolation(this, config);\n }\n\n /**\n * Typically only used internally, but could be used by a custom Animation\n * class.\n *\n * See https://reactnative.dev/docs/animatedvalue#animate\n */\n animate(animation: Animation, callback: ?EndCallback): void {\n let handle = null;\n if (animation.__isInteraction) {\n handle = InteractionManager.createInteractionHandle();\n }\n const previousAnimation = this._animation;\n this._animation && this._animation.stop();\n this._animation = animation;\n animation.start(\n this._value,\n value => {\n // Natively driven animations will never call into that callback, therefore we can always\n // pass flush = true to allow the updated value to propagate to native with setNativeProps\n this._updateValue(value, true /* flush */);\n },\n result => {\n this._animation = null;\n if (handle !== null) {\n InteractionManager.clearInteractionHandle(handle);\n }\n callback && callback(result);\n },\n previousAnimation,\n this,\n );\n }\n\n /**\n * Typically only used internally.\n */\n stopTracking(): void {\n this._tracking && this._tracking.__detach();\n this._tracking = null;\n }\n\n /**\n * Typically only used internally.\n */\n track(tracking: AnimatedTracking): void {\n this.stopTracking();\n this._tracking = tracking;\n // Make sure that the tracking animation starts executing\n this._tracking && this._tracking.update();\n }\n\n _updateValue(value: number, flush: boolean): void {\n if (value === undefined) {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n\n this._value = value;\n if (flush) {\n flushValue(this);\n }\n this.__callListeners(this.__getValue());\n }\n\n __getNativeConfig(): Object {\n return {\n type: 'value',\n value: this._value,\n offset: this._offset,\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {Task} from './TaskQueue';\n\nimport EventEmitter from '../vendor/emitter/EventEmitter';\n\nconst BatchedBridge = require('../BatchedBridge/BatchedBridge');\nconst infoLog = require('../Utilities/infoLog');\nconst TaskQueue = require('./TaskQueue');\nconst invariant = require('invariant');\n\nexport type Handle = number;\n\nconst _emitter = new EventEmitter<{\n interactionComplete: [],\n interactionStart: [],\n}>();\n\nconst DEBUG_DELAY: 0 = 0;\nconst DEBUG: false = false;\n\n/**\n * InteractionManager allows long-running work to be scheduled after any\n * interactions/animations have completed. In particular, this allows JavaScript\n * animations to run smoothly.\n *\n * Applications can schedule tasks to run after interactions with the following:\n *\n * ```\n * InteractionManager.runAfterInteractions(() => {\n * // ...long-running synchronous task...\n * });\n * ```\n *\n * Compare this to other scheduling alternatives:\n *\n * - requestAnimationFrame(): for code that animates a view over time.\n * - setImmediate/setTimeout(): run code later, note this may delay animations.\n * - runAfterInteractions(): run code later, without delaying active animations.\n *\n * The touch handling system considers one or more active touches to be an\n * 'interaction' and will delay `runAfterInteractions()` callbacks until all\n * touches have ended or been cancelled.\n *\n * InteractionManager also allows applications to register animations by\n * creating an interaction 'handle' on animation start, and clearing it upon\n * completion:\n *\n * ```\n * var handle = InteractionManager.createInteractionHandle();\n * // run animation... (`runAfterInteractions` tasks are queued)\n * // later, on animation completion:\n * InteractionManager.clearInteractionHandle(handle);\n * // queued tasks run if all handles were cleared\n * ```\n *\n * `runAfterInteractions` takes either a plain callback function, or a\n * `PromiseTask` object with a `gen` method that returns a `Promise`. If a\n * `PromiseTask` is supplied, then it is fully resolved (including asynchronous\n * dependencies that also schedule more tasks via `runAfterInteractions`) before\n * starting on the next task that might have been queued up synchronously\n * earlier.\n *\n * By default, queued tasks are executed together in a loop in one\n * `setImmediate` batch. If `setDeadline` is called with a positive number, then\n * tasks will only be executed until the deadline (in terms of js event loop run\n * time) approaches, at which point execution will yield via setTimeout,\n * allowing events such as touches to start interactions and block queued tasks\n * from executing, making apps more responsive.\n */\nconst InteractionManager = {\n Events: {\n interactionStart: 'interactionStart',\n interactionComplete: 'interactionComplete',\n },\n\n /**\n * Schedule a function to run after all interactions have completed. Returns a cancellable\n * \"promise\".\n */\n runAfterInteractions(task: ?Task): {\n then: (\n onFulfill?: ?(void) => ?(Promise | U),\n onReject?: ?(error: mixed) => ?(Promise | U),\n ) => Promise,\n cancel: () => void,\n ...\n } {\n const tasks: Array = [];\n const promise = new Promise((resolve: () => void) => {\n _scheduleUpdate();\n if (task) {\n tasks.push(task);\n }\n tasks.push({\n run: resolve,\n name: 'resolve ' + ((task && task.name) || '?'),\n });\n _taskQueue.enqueueTasks(tasks);\n });\n return {\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n then: promise.then.bind(promise),\n cancel: function () {\n _taskQueue.cancelTasks(tasks);\n },\n };\n },\n\n /**\n * Notify manager that an interaction has started.\n */\n createInteractionHandle(): Handle {\n DEBUG && infoLog('InteractionManager: create interaction handle');\n _scheduleUpdate();\n const handle = ++_inc;\n _addInteractionSet.add(handle);\n return handle;\n },\n\n /**\n * Notify manager that an interaction has completed.\n */\n clearInteractionHandle(handle: Handle) {\n DEBUG && infoLog('InteractionManager: clear interaction handle');\n invariant(!!handle, 'InteractionManager: Must provide a handle to clear.');\n _scheduleUpdate();\n _addInteractionSet.delete(handle);\n _deleteInteractionSet.add(handle);\n },\n\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n addListener: (_emitter.addListener.bind(_emitter): $FlowFixMe),\n\n /**\n * A positive number will use setTimeout to schedule any tasks after the\n * eventLoopRunningTime hits the deadline value, otherwise all tasks will be\n * executed in one setImmediate batch (default).\n */\n setDeadline(deadline: number) {\n _deadline = deadline;\n },\n};\n\nconst _interactionSet = new Set();\nconst _addInteractionSet = new Set();\nconst _deleteInteractionSet = new Set();\nconst _taskQueue = new TaskQueue({onMoreTasks: _scheduleUpdate});\nlet _nextUpdateHandle: $FlowFixMe | TimeoutID = 0;\nlet _inc = 0;\nlet _deadline = -1;\n\n/**\n * Schedule an asynchronous update to the interaction state.\n */\nfunction _scheduleUpdate() {\n if (!_nextUpdateHandle) {\n if (_deadline > 0) {\n _nextUpdateHandle = setTimeout(_processUpdate, 0 + DEBUG_DELAY);\n } else {\n _nextUpdateHandle = setImmediate(_processUpdate);\n }\n }\n}\n\n/**\n * Notify listeners, process queue, etc\n */\nfunction _processUpdate() {\n _nextUpdateHandle = 0;\n\n const interactionCount = _interactionSet.size;\n _addInteractionSet.forEach(handle => _interactionSet.add(handle));\n _deleteInteractionSet.forEach(handle => _interactionSet.delete(handle));\n const nextInteractionCount = _interactionSet.size;\n\n if (interactionCount !== 0 && nextInteractionCount === 0) {\n // transition from 1+ --> 0 interactions\n _emitter.emit(InteractionManager.Events.interactionComplete);\n } else if (interactionCount === 0 && nextInteractionCount !== 0) {\n // transition from 0 --> 1+ interactions\n _emitter.emit(InteractionManager.Events.interactionStart);\n }\n\n // process the queue regardless of a transition\n if (nextInteractionCount === 0) {\n while (_taskQueue.hasTasksToProcess()) {\n _taskQueue.processNext();\n if (\n _deadline > 0 &&\n BatchedBridge.getEventLoopRunningTime() >= _deadline\n ) {\n // Hit deadline before processing all tasks, so process more later.\n _scheduleUpdate();\n break;\n }\n }\n }\n _addInteractionSet.clear();\n _deleteInteractionSet.clear();\n}\n\nmodule.exports = InteractionManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nconst infoLog = require('../Utilities/infoLog');\nconst invariant = require('invariant');\n\ntype SimpleTask = {\n name: string,\n run: () => void,\n};\ntype PromiseTask = {\n name: string,\n gen: () => Promise,\n};\nexport type Task = SimpleTask | PromiseTask | (() => void);\n\nconst DEBUG: false = false;\n\n/**\n * TaskQueue - A system for queueing and executing a mix of simple callbacks and\n * trees of dependent tasks based on Promises. No tasks are executed unless\n * `processNext` is called.\n *\n * `enqueue` takes a Task object with either a simple `run` callback, or a\n * `gen` function that returns a `Promise` and puts it in the queue. If a gen\n * function is supplied, then the promise it returns will block execution of\n * tasks already in the queue until it resolves. This can be used to make sure\n * the first task is fully resolved (including asynchronous dependencies that\n * also schedule more tasks via `enqueue`) before starting on the next task.\n * The `onMoreTasks` constructor argument is used to inform the owner that an\n * async task has resolved and that the queue should be processed again.\n *\n * Note: Tasks are only actually executed with explicit calls to `processNext`.\n */\nclass TaskQueue {\n /**\n * TaskQueue instances are self contained and independent, so multiple tasks\n * of varying semantics and priority can operate together.\n *\n * `onMoreTasks` is invoked when `PromiseTask`s resolve if there are more\n * tasks to process.\n */\n constructor({onMoreTasks}: {onMoreTasks: () => void, ...}) {\n this._onMoreTasks = onMoreTasks;\n this._queueStack = [{tasks: [], popable: false}];\n }\n\n /**\n * Add a task to the queue. It is recommended to name your tasks for easier\n * async debugging. Tasks will not be executed until `processNext` is called\n * explicitly.\n */\n enqueue(task: Task): void {\n this._getCurrentQueue().push(task);\n }\n\n enqueueTasks(tasks: Array): void {\n tasks.forEach(task => this.enqueue(task));\n }\n\n cancelTasks(tasksToCancel: Array): void {\n // search through all tasks and remove them.\n this._queueStack = this._queueStack\n .map(queue => ({\n ...queue,\n tasks: queue.tasks.filter(task => tasksToCancel.indexOf(task) === -1),\n }))\n .filter((queue, idx) => queue.tasks.length > 0 || idx === 0);\n }\n\n /**\n * Check to see if `processNext` should be called.\n *\n * @returns {boolean} Returns true if there are tasks that are ready to be\n * processed with `processNext`, or returns false if there are no more tasks\n * to be processed right now, although there may be tasks in the queue that\n * are blocked by earlier `PromiseTask`s that haven't resolved yet.\n * `onMoreTasks` will be called after each `PromiseTask` resolves if there are\n * tasks ready to run at that point.\n */\n hasTasksToProcess(): boolean {\n return this._getCurrentQueue().length > 0;\n }\n\n /**\n * Executes the next task in the queue.\n */\n processNext(): void {\n const queue = this._getCurrentQueue();\n if (queue.length) {\n const task = queue.shift();\n try {\n if (typeof task === 'object' && task.gen) {\n DEBUG && infoLog('TaskQueue: genPromise for task ' + task.name);\n this._genPromise(task);\n } else if (typeof task === 'object' && task.run) {\n DEBUG && infoLog('TaskQueue: run task ' + task.name);\n task.run();\n } else {\n invariant(\n typeof task === 'function',\n 'Expected Function, SimpleTask, or PromiseTask, but got:\\n' +\n JSON.stringify(task, null, 2),\n );\n DEBUG && infoLog('TaskQueue: run anonymous task');\n task();\n }\n } catch (e) {\n e.message =\n 'TaskQueue: Error with task ' + (task.name || '') + ': ' + e.message;\n throw e;\n }\n }\n }\n\n _queueStack: Array<{\n tasks: Array,\n popable: boolean,\n ...\n }>;\n _onMoreTasks: () => void;\n\n _getCurrentQueue(): Array {\n const stackIdx = this._queueStack.length - 1;\n const queue = this._queueStack[stackIdx];\n if (\n queue.popable &&\n queue.tasks.length === 0 &&\n this._queueStack.length > 1\n ) {\n this._queueStack.pop();\n DEBUG &&\n infoLog('TaskQueue: popped queue: ', {\n stackIdx,\n queueStackSize: this._queueStack.length,\n });\n return this._getCurrentQueue();\n } else {\n return queue.tasks;\n }\n }\n\n _genPromise(task: PromiseTask) {\n // Each async task pushes it's own queue onto the queue stack. This\n // effectively defers execution of previously queued tasks until the promise\n // resolves, at which point we allow the new queue to be popped, which\n // happens once it is fully processed.\n this._queueStack.push({tasks: [], popable: false});\n const stackIdx = this._queueStack.length - 1;\n const stackItem = this._queueStack[stackIdx];\n DEBUG && infoLog('TaskQueue: push new queue: ', {stackIdx});\n DEBUG && infoLog('TaskQueue: exec gen task ' + task.name);\n task\n .gen()\n .then(() => {\n DEBUG &&\n infoLog('TaskQueue: onThen for gen task ' + task.name, {\n stackIdx,\n queueStackSize: this._queueStack.length,\n });\n stackItem.popable = true;\n this.hasTasksToProcess() && this._onMoreTasks();\n })\n .catch(ex => {\n setTimeout(() => {\n ex.message = `TaskQueue: Error resolving Promise in task ${task.name}: ${ex.message}`;\n throw ex;\n }, 0);\n });\n }\n}\n\nmodule.exports = TaskQueue;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n/* eslint no-bitwise: 0 */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type AnimatedNode from './AnimatedNode';\n\nimport normalizeColor from '../../StyleSheet/normalizeColor';\nimport processColor from '../../StyleSheet/processColor';\nimport Easing from '../Easing';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport invariant from 'invariant';\n\ntype ExtrapolateType = 'extend' | 'identity' | 'clamp';\n\nexport type InterpolationConfigType = $ReadOnly<{\n inputRange: $ReadOnlyArray,\n outputRange: $ReadOnlyArray,\n easing?: (input: number) => number,\n extrapolate?: ExtrapolateType,\n extrapolateLeft?: ExtrapolateType,\n extrapolateRight?: ExtrapolateType,\n}>;\n\n/**\n * Very handy helper to map input ranges to output ranges with an easing\n * function and custom behavior outside of the ranges.\n */\nfunction createNumericInterpolation(\n config: InterpolationConfigType,\n): (input: number) => number {\n const outputRange: $ReadOnlyArray = (config.outputRange: any);\n const inputRange = config.inputRange;\n\n const easing = config.easing || Easing.linear;\n\n let extrapolateLeft: ExtrapolateType = 'extend';\n if (config.extrapolateLeft !== undefined) {\n extrapolateLeft = config.extrapolateLeft;\n } else if (config.extrapolate !== undefined) {\n extrapolateLeft = config.extrapolate;\n }\n\n let extrapolateRight: ExtrapolateType = 'extend';\n if (config.extrapolateRight !== undefined) {\n extrapolateRight = config.extrapolateRight;\n } else if (config.extrapolate !== undefined) {\n extrapolateRight = config.extrapolate;\n }\n\n return input => {\n invariant(\n typeof input === 'number',\n 'Cannot interpolation an input which is not a number',\n );\n\n const range = findRange(input, inputRange);\n return (interpolate(\n input,\n inputRange[range],\n inputRange[range + 1],\n outputRange[range],\n outputRange[range + 1],\n easing,\n extrapolateLeft,\n extrapolateRight,\n ): any);\n };\n}\n\nfunction interpolate(\n input: number,\n inputMin: number,\n inputMax: number,\n outputMin: number,\n outputMax: number,\n easing: (input: number) => number,\n extrapolateLeft: ExtrapolateType,\n extrapolateRight: ExtrapolateType,\n) {\n let result = input;\n\n // Extrapolate\n if (result < inputMin) {\n if (extrapolateLeft === 'identity') {\n return result;\n } else if (extrapolateLeft === 'clamp') {\n result = inputMin;\n } else if (extrapolateLeft === 'extend') {\n // noop\n }\n }\n\n if (result > inputMax) {\n if (extrapolateRight === 'identity') {\n return result;\n } else if (extrapolateRight === 'clamp') {\n result = inputMax;\n } else if (extrapolateRight === 'extend') {\n // noop\n }\n }\n\n if (outputMin === outputMax) {\n return outputMin;\n }\n\n if (inputMin === inputMax) {\n if (input <= inputMin) {\n return outputMin;\n }\n return outputMax;\n }\n\n // Input Range\n if (inputMin === -Infinity) {\n result = -result;\n } else if (inputMax === Infinity) {\n result = result - inputMin;\n } else {\n result = (result - inputMin) / (inputMax - inputMin);\n }\n\n // Easing\n result = easing(result);\n\n // Output Range\n if (outputMin === -Infinity) {\n result = -result;\n } else if (outputMax === Infinity) {\n result = result + outputMin;\n } else {\n result = result * (outputMax - outputMin) + outputMin;\n }\n\n return result;\n}\n\nconst numericComponentRegex = /[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?/g;\n\n// Maps string inputs an RGBA color or an array of numeric components\nfunction mapStringToNumericComponents(\n input: string,\n):\n | {isColor: true, components: [number, number, number, number]}\n | {isColor: false, components: $ReadOnlyArray} {\n let normalizedColor = normalizeColor(input);\n invariant(\n normalizedColor == null || typeof normalizedColor !== 'object',\n 'PlatformColors are not supported',\n );\n\n if (typeof normalizedColor === 'number') {\n normalizedColor = normalizedColor || 0;\n const r = (normalizedColor & 0xff000000) >>> 24;\n const g = (normalizedColor & 0x00ff0000) >>> 16;\n const b = (normalizedColor & 0x0000ff00) >>> 8;\n const a = (normalizedColor & 0x000000ff) / 255;\n return {isColor: true, components: [r, g, b, a]};\n } else {\n const components: Array = [];\n let lastMatchEnd = 0;\n let match: RegExp$matchResult;\n while ((match = (numericComponentRegex.exec(input): any)) != null) {\n if (match.index > lastMatchEnd) {\n components.push(input.substring(lastMatchEnd, match.index));\n }\n components.push(parseFloat(match[0]));\n lastMatchEnd = match.index + match[0].length;\n }\n invariant(\n components.length > 0,\n 'outputRange must contain color or value with numeric component',\n );\n if (lastMatchEnd < input.length) {\n components.push(input.substring(lastMatchEnd, input.length));\n }\n return {isColor: false, components};\n }\n}\n\n/**\n * Supports string shapes by extracting numbers so new values can be computed,\n * and recombines those values into new strings of the same shape. Supports\n * things like:\n *\n * rgba(123, 42, 99, 0.36) // colors\n * -45deg // values with units\n */\nfunction createStringInterpolation(\n config: InterpolationConfigType,\n): (input: number) => string {\n invariant(config.outputRange.length >= 2, 'Bad output range');\n const outputRange = config.outputRange.map(mapStringToNumericComponents);\n\n const isColor = outputRange[0].isColor;\n if (__DEV__) {\n invariant(\n outputRange.every(output => output.isColor === isColor),\n 'All elements of output range should either be a color or a string with numeric components',\n );\n const firstOutput = outputRange[0].components;\n invariant(\n outputRange.every(\n output => output.components.length === firstOutput.length,\n ),\n 'All elements of output range should have the same number of components',\n );\n invariant(\n outputRange.every(output =>\n output.components.every(\n (component, i) =>\n // $FlowIgnoreMe[invalid-compare]\n typeof component === 'number' || component === firstOutput[i],\n ),\n ),\n 'All elements of output range should have the same non-numeric components',\n );\n }\n\n const numericComponents: $ReadOnlyArray<$ReadOnlyArray> =\n outputRange.map(output =>\n isColor\n ? // $FlowIgnoreMe[incompatible-call]\n output.components\n : // $FlowIgnoreMe[incompatible-call]\n output.components.filter(c => typeof c === 'number'),\n );\n const interpolations = numericComponents[0].map((_, i) =>\n createNumericInterpolation({\n ...config,\n outputRange: numericComponents.map(components => components[i]),\n }),\n );\n if (!isColor) {\n return input => {\n const values = interpolations.map(interpolation => interpolation(input));\n let i = 0;\n return outputRange[0].components\n .map(c => (typeof c === 'number' ? values[i++] : c))\n .join('');\n };\n } else {\n return input => {\n const result = interpolations.map((interpolation, i) => {\n const value = interpolation(input);\n // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to\n // round the opacity (4th column).\n return i < 3 ? Math.round(value) : Math.round(value * 1000) / 1000;\n });\n return `rgba(${result[0]}, ${result[1]}, ${result[2]}, ${result[3]})`;\n };\n }\n}\n\nfunction findRange(input: number, inputRange: $ReadOnlyArray) {\n let i;\n for (i = 1; i < inputRange.length - 1; ++i) {\n if (inputRange[i] >= input) {\n break;\n }\n }\n return i - 1;\n}\n\nfunction checkValidRanges(\n inputRange: $ReadOnlyArray,\n outputRange: $ReadOnlyArray,\n) {\n checkInfiniteRange('outputRange', outputRange);\n checkInfiniteRange('inputRange', inputRange);\n checkValidInputRange(inputRange);\n\n invariant(\n inputRange.length === outputRange.length,\n 'inputRange (' +\n inputRange.length +\n ') and outputRange (' +\n outputRange.length +\n ') must have the same length',\n );\n}\n\nfunction checkValidInputRange(arr: $ReadOnlyArray) {\n invariant(arr.length >= 2, 'inputRange must have at least 2 elements');\n const message =\n 'inputRange must be monotonically non-decreasing ' + String(arr);\n for (let i = 1; i < arr.length; ++i) {\n invariant(arr[i] >= arr[i - 1], message);\n }\n}\n\nfunction checkInfiniteRange(\n name: string,\n arr: $ReadOnlyArray,\n) {\n invariant(arr.length >= 2, name + ' must have at least 2 elements');\n invariant(\n arr.length !== 2 || arr[0] !== -Infinity || arr[1] !== Infinity,\n /* $FlowFixMe[incompatible-type] (>=0.13.0) - In the addition expression\n * below this comment, one or both of the operands may be something that\n * doesn't cleanly convert to a string, like undefined, null, and object,\n * etc. If you really mean this implicit string conversion, you can do\n * something like String(myThing) */\n // $FlowFixMe[unsafe-addition]\n name + 'cannot be ]-infinity;+infinity[ ' + arr,\n );\n}\n\nexport default class AnimatedInterpolation<\n OutputT: number | string,\n> extends AnimatedWithChildren {\n _parent: AnimatedNode;\n _config: InterpolationConfigType;\n _interpolation: ?(input: number) => OutputT;\n\n constructor(parent: AnimatedNode, config: InterpolationConfigType) {\n super();\n this._parent = parent;\n this._config = config;\n\n if (__DEV__) {\n checkValidRanges(config.inputRange, config.outputRange);\n\n // Create interpolation eagerly in dev, so we can signal errors faster\n // even when using the native driver\n this._getInterpolation();\n }\n }\n\n _getInterpolation(): number => OutputT {\n if (!this._interpolation) {\n const config = this._config;\n if (config.outputRange && typeof config.outputRange[0] === 'string') {\n this._interpolation = (createStringInterpolation((config: any)): any);\n } else {\n this._interpolation = (createNumericInterpolation((config: any)): any);\n }\n }\n return this._interpolation;\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this._parent.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n\n __getValue(): OutputT {\n const parentValue: number = this._parent.__getValue();\n invariant(\n typeof parentValue === 'number',\n 'Cannot interpolate an input which is not a number.',\n );\n return this._getInterpolation()(parentValue);\n }\n\n interpolate(\n config: InterpolationConfigType,\n ): AnimatedInterpolation {\n return new AnimatedInterpolation(this, config);\n }\n\n __attach(): void {\n this._parent.__addChild(this);\n }\n\n __detach(): void {\n this._parent.__removeChild(this);\n super.__detach();\n }\n\n __getNativeConfig(): any {\n if (__DEV__) {\n NativeAnimatedHelper.validateInterpolation(this._config);\n }\n\n // Only the `outputRange` can contain strings so we don't need to transform `inputRange` here\n let outputRange = this._config.outputRange;\n let outputType = null;\n if (typeof outputRange[0] === 'string') {\n // $FlowIgnoreMe[incompatible-cast]\n outputRange = ((outputRange: $ReadOnlyArray).map(value => {\n const processedColor = processColor(value);\n if (typeof processedColor === 'number') {\n outputType = 'color';\n return processedColor;\n } else {\n return NativeAnimatedHelper.transformDataType(value);\n }\n }): any);\n }\n\n return {\n inputRange: this._config.inputRange,\n outputRange,\n outputType,\n extrapolateLeft:\n this._config.extrapolateLeft || this._config.extrapolate || 'extend',\n extrapolateRight:\n this._config.extrapolateRight || this._config.extrapolate || 'extend',\n type: 'interpolation',\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nlet ease;\n\n/**\n * The `Easing` module implements common easing functions. This module is used\n * by [Animate.timing()](docs/animate.html#timing) to convey physically\n * believable motion in animations.\n *\n * You can find a visualization of some common easing functions at\n * http://easings.net/\n *\n * ### Predefined animations\n *\n * The `Easing` module provides several predefined animations through the\n * following methods:\n *\n * - [`back`](docs/easing.html#back) provides a simple animation where the\n * object goes slightly back before moving forward\n * - [`bounce`](docs/easing.html#bounce) provides a bouncing animation\n * - [`ease`](docs/easing.html#ease) provides a simple inertial animation\n * - [`elastic`](docs/easing.html#elastic) provides a simple spring interaction\n *\n * ### Standard functions\n *\n * Three standard easing functions are provided:\n *\n * - [`linear`](docs/easing.html#linear)\n * - [`quad`](docs/easing.html#quad)\n * - [`cubic`](docs/easing.html#cubic)\n *\n * The [`poly`](docs/easing.html#poly) function can be used to implement\n * quartic, quintic, and other higher power functions.\n *\n * ### Additional functions\n *\n * Additional mathematical functions are provided by the following methods:\n *\n * - [`bezier`](docs/easing.html#bezier) provides a cubic bezier curve\n * - [`circle`](docs/easing.html#circle) provides a circular function\n * - [`sin`](docs/easing.html#sin) provides a sinusoidal function\n * - [`exp`](docs/easing.html#exp) provides an exponential function\n *\n * The following helpers are used to modify other easing functions.\n *\n * - [`in`](docs/easing.html#in) runs an easing function forwards\n * - [`inOut`](docs/easing.html#inout) makes any easing function symmetrical\n * - [`out`](docs/easing.html#out) runs an easing function backwards\n */\nconst Easing = {\n /**\n * A stepping function, returns 1 for any positive value of `n`.\n */\n step0(n: number): number {\n return n > 0 ? 1 : 0;\n },\n\n /**\n * A stepping function, returns 1 if `n` is greater than or equal to 1.\n */\n step1(n: number): number {\n return n >= 1 ? 1 : 0;\n },\n\n /**\n * A linear function, `f(t) = t`. Position correlates to elapsed time one to\n * one.\n *\n * http://cubic-bezier.com/#0,0,1,1\n */\n linear(t: number): number {\n return t;\n },\n\n /**\n * A simple inertial interaction, similar to an object slowly accelerating to\n * speed.\n *\n * http://cubic-bezier.com/#.42,0,1,1\n */\n ease(t: number): number {\n if (!ease) {\n ease = Easing.bezier(0.42, 0, 1, 1);\n }\n return ease(t);\n },\n\n /**\n * A quadratic function, `f(t) = t * t`. Position equals the square of elapsed\n * time.\n *\n * http://easings.net/#easeInQuad\n */\n quad(t: number): number {\n return t * t;\n },\n\n /**\n * A cubic function, `f(t) = t * t * t`. Position equals the cube of elapsed\n * time.\n *\n * http://easings.net/#easeInCubic\n */\n cubic(t: number): number {\n return t * t * t;\n },\n\n /**\n * A power function. Position is equal to the Nth power of elapsed time.\n *\n * n = 4: http://easings.net/#easeInQuart\n * n = 5: http://easings.net/#easeInQuint\n */\n poly(n: number): (t: number) => number {\n return (t: number) => Math.pow(t, n);\n },\n\n /**\n * A sinusoidal function.\n *\n * http://easings.net/#easeInSine\n */\n sin(t: number): number {\n return 1 - Math.cos((t * Math.PI) / 2);\n },\n\n /**\n * A circular function.\n *\n * http://easings.net/#easeInCirc\n */\n circle(t: number): number {\n return 1 - Math.sqrt(1 - t * t);\n },\n\n /**\n * An exponential function.\n *\n * http://easings.net/#easeInExpo\n */\n exp(t: number): number {\n return Math.pow(2, 10 * (t - 1));\n },\n\n /**\n * A simple elastic interaction, similar to a spring oscillating back and\n * forth.\n *\n * Default bounciness is 1, which overshoots a little bit once. 0 bounciness\n * doesn't overshoot at all, and bounciness of N > 1 will overshoot about N\n * times.\n *\n * http://easings.net/#easeInElastic\n */\n elastic(bounciness: number = 1): (t: number) => number {\n const p = bounciness * Math.PI;\n return t => 1 - Math.pow(Math.cos((t * Math.PI) / 2), 3) * Math.cos(t * p);\n },\n\n /**\n * Use with `Animated.parallel()` to create a simple effect where the object\n * animates back slightly as the animation starts.\n *\n * https://easings.net/#easeInBack\n */\n back(s: number = 1.70158): (t: number) => number {\n return t => t * t * ((s + 1) * t - s);\n },\n\n /**\n * Provides a simple bouncing effect.\n *\n * http://easings.net/#easeInBounce\n */\n bounce(t: number): number {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n\n if (t < 2 / 2.75) {\n const t2 = t - 1.5 / 2.75;\n return 7.5625 * t2 * t2 + 0.75;\n }\n\n if (t < 2.5 / 2.75) {\n const t2 = t - 2.25 / 2.75;\n return 7.5625 * t2 * t2 + 0.9375;\n }\n\n const t2 = t - 2.625 / 2.75;\n return 7.5625 * t2 * t2 + 0.984375;\n },\n\n /**\n * Provides a cubic bezier curve, equivalent to CSS Transitions'\n * `transition-timing-function`.\n *\n * A useful tool to visualize cubic bezier curves can be found at\n * http://cubic-bezier.com/\n */\n bezier(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n ): (t: number) => number {\n const _bezier = require('./bezier').default;\n return _bezier(x1, y1, x2, y2);\n },\n\n /**\n * Runs an easing function forwards.\n */\n in(easing: (t: number) => number): (t: number) => number {\n return easing;\n },\n\n /**\n * Runs an easing function backwards.\n */\n out(easing: (t: number) => number): (t: number) => number {\n return t => 1 - easing(1 - t);\n },\n\n /**\n * Makes any easing function symmetrical. The easing function will run\n * forwards for half of the duration, then backwards for the rest of the\n * duration.\n */\n inOut(easing: (t: number) => number): (t: number) => number {\n return t => {\n if (t < 0.5) {\n return easing(t * 2) / 2;\n }\n return 1 - easing((1 - t) * 2) / 2;\n };\n },\n};\n\nexport default Easing;\n","/**\n * Portions Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n/**\n * BezierEasing - use bezier curve for transition easing function\n * https://github.com/gre/bezier-easing\n * @copyright 2014-2015 Gaëtan Renaudeau. MIT License.\n */\n\n'use strict';\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nconst NEWTON_ITERATIONS = 4;\nconst NEWTON_MIN_SLOPE = 0.001;\nconst SUBDIVISION_PRECISION = 0.0000001;\nconst SUBDIVISION_MAX_ITERATIONS = 10;\n\nconst kSplineTableSize = 11;\nconst kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nconst float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1: number, aA2: number) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\nfunction B(aA1: number, aA2: number) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\nfunction C(aA1: number) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT: number, aA1: number, aA2: number) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT: number, aA1: number, aA2: number) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(\n aX: number,\n _aA: number,\n _aB: number,\n mX1: number,\n mX2: number,\n) {\n let currentX,\n currentT,\n i = 0,\n aA = _aA,\n aB = _aB;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (\n Math.abs(currentX) > SUBDIVISION_PRECISION &&\n ++i < SUBDIVISION_MAX_ITERATIONS\n );\n return currentT;\n}\n\nfunction newtonRaphsonIterate(\n aX: number,\n _aGuessT: number,\n mX1: number,\n mX2: number,\n) {\n let aGuessT = _aGuessT;\n for (let i = 0; i < NEWTON_ITERATIONS; ++i) {\n const currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nexport default function bezier(\n mX1: number,\n mY1: number,\n mX2: number,\n mY2: number,\n): (x: number) => number {\n if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n // Precompute samples table\n const sampleValues = float32ArraySupported\n ? new Float32Array(kSplineTableSize)\n : new Array(kSplineTableSize);\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n\n function getTForX(aX: number) {\n let intervalStart = 0.0;\n let currentSample = 1;\n const lastSample = kSplineTableSize - 1;\n\n for (\n ;\n currentSample !== lastSample && sampleValues[currentSample] <= aX;\n ++currentSample\n ) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n const dist =\n (aX - sampleValues[currentSample]) /\n (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n const guessForT = intervalStart + dist * kSampleStepSize;\n\n const initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(\n aX,\n intervalStart,\n intervalStart + kSampleStepSize,\n mX1,\n mX2,\n );\n }\n }\n\n return function BezierEasing(x: number): number {\n if (mX1 === mY1 && mX2 === mY2) {\n return x; // linear\n }\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if (x === 0) {\n return 0;\n }\n if (x === 1) {\n return 1;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport invariant from 'invariant';\n\nexport type AnimatedValueXYConfig = $ReadOnly<{\n useNativeDriver: boolean,\n}>;\ntype ValueXYListenerCallback = (value: {x: number, y: number, ...}) => mixed;\n\nlet _uniqueId = 1;\n\n/**\n * 2D Value for driving 2D animations, such as pan gestures. Almost identical\n * API to normal `Animated.Value`, but multiplexed.\n *\n * See https://reactnative.dev/docs/animatedvaluexy\n */\nexport default class AnimatedValueXY extends AnimatedWithChildren {\n x: AnimatedValue;\n y: AnimatedValue;\n _listeners: {\n [key: string]: {\n x: string,\n y: string,\n ...\n },\n ...\n };\n\n constructor(\n valueIn?: ?{\n +x: number | AnimatedValue,\n +y: number | AnimatedValue,\n ...\n },\n config?: ?AnimatedValueXYConfig,\n ) {\n super();\n const value: any = valueIn || {x: 0, y: 0}; // @flowfixme: shouldn't need `: any`\n if (typeof value.x === 'number' && typeof value.y === 'number') {\n this.x = new AnimatedValue(value.x);\n this.y = new AnimatedValue(value.y);\n } else {\n invariant(\n value.x instanceof AnimatedValue && value.y instanceof AnimatedValue,\n 'AnimatedValueXY must be initialized with an object of numbers or ' +\n 'AnimatedValues.',\n );\n this.x = value.x;\n this.y = value.y;\n }\n this._listeners = {};\n if (config && config.useNativeDriver) {\n this.__makeNative();\n }\n }\n\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#setvalue\n */\n setValue(value: {x: number, y: number, ...}) {\n this.x.setValue(value.x);\n this.y.setValue(value.y);\n }\n\n /**\n * Sets an offset that is applied on top of whatever value is set, whether\n * via `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#setoffset\n */\n setOffset(offset: {x: number, y: number, ...}) {\n this.x.setOffset(offset.x);\n this.y.setOffset(offset.y);\n }\n\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#flattenoffset\n */\n flattenOffset(): void {\n this.x.flattenOffset();\n this.y.flattenOffset();\n }\n\n /**\n * Sets the offset value to the base value, and resets the base value to\n * zero. The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#extractoffset\n */\n extractOffset(): void {\n this.x.extractOffset();\n this.y.extractOffset();\n }\n\n __getValue(): {\n x: number,\n y: number,\n ...\n } {\n return {\n x: this.x.__getValue(),\n y: this.y.__getValue(),\n };\n }\n\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#resetanimation\n */\n resetAnimation(\n callback?: (value: {x: number, y: number, ...}) => void,\n ): void {\n this.x.resetAnimation();\n this.y.resetAnimation();\n callback && callback(this.__getValue());\n }\n\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#stopanimation\n */\n stopAnimation(callback?: (value: {x: number, y: number, ...}) => void): void {\n this.x.stopAnimation();\n this.y.stopAnimation();\n callback && callback(this.__getValue());\n }\n\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to synchronously read\n * the value because it might be driven natively.\n *\n * Returns a string that serves as an identifier for the listener.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#addlistener\n */\n addListener(callback: ValueXYListenerCallback): string {\n const id = String(_uniqueId++);\n const jointCallback = ({value: number}: any) => {\n callback(this.__getValue());\n };\n this._listeners[id] = {\n x: this.x.addListener(jointCallback),\n y: this.y.addListener(jointCallback),\n };\n return id;\n }\n\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#removelistener\n */\n removeListener(id: string): void {\n this.x.removeListener(this._listeners[id].x);\n this.y.removeListener(this._listeners[id].y);\n delete this._listeners[id];\n }\n\n /**\n * Remove all registered listeners.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#removealllisteners\n */\n removeAllListeners(): void {\n this.x.removeAllListeners();\n this.y.removeAllListeners();\n this._listeners = {};\n }\n\n /**\n * Converts `{x, y}` into `{left, top}` for use in style.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#getlayout\n */\n getLayout(): {[key: string]: AnimatedValue, ...} {\n return {\n left: this.x,\n top: this.y,\n };\n }\n\n /**\n * Converts `{x, y}` into a useable translation transform.\n *\n * See https://reactnative.dev/docs/animatedvaluexy#gettranslatetransform\n */\n getTranslateTransform(): Array<{[key: string]: AnimatedValue, ...}> {\n return [{translateX: this.x}, {translateY: this.y}];\n }\n\n __attach(): void {\n this.x.__addChild(this);\n this.y.__addChild(this);\n super.__attach();\n }\n\n __detach(): void {\n this.x.__removeChild(this);\n this.y.__removeChild(this);\n super.__detach();\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this.x.__makeNative(platformConfig);\n this.y.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type AnimatedInterpolation from '../nodes/AnimatedInterpolation';\nimport type AnimatedValue from '../nodes/AnimatedValue';\nimport type AnimatedValueXY from '../nodes/AnimatedValueXY';\nimport type {AnimationConfig, EndCallback} from './Animation';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedColor from '../nodes/AnimatedColor';\nimport * as SpringConfig from '../SpringConfig';\nimport Animation from './Animation';\nimport invariant from 'invariant';\n\nexport type SpringAnimationConfig = {\n ...AnimationConfig,\n toValue:\n | number\n | AnimatedValue\n | {\n x: number,\n y: number,\n ...\n }\n | AnimatedValueXY\n | {\n r: number,\n g: number,\n b: number,\n a: number,\n ...\n }\n | AnimatedColor\n | AnimatedInterpolation,\n overshootClamping?: boolean,\n restDisplacementThreshold?: number,\n restSpeedThreshold?: number,\n velocity?:\n | number\n | {\n x: number,\n y: number,\n ...\n },\n bounciness?: number,\n speed?: number,\n tension?: number,\n friction?: number,\n stiffness?: number,\n damping?: number,\n mass?: number,\n delay?: number,\n};\n\nexport type SpringAnimationConfigSingle = {\n ...AnimationConfig,\n toValue: number,\n overshootClamping?: boolean,\n restDisplacementThreshold?: number,\n restSpeedThreshold?: number,\n velocity?: number,\n bounciness?: number,\n speed?: number,\n tension?: number,\n friction?: number,\n stiffness?: number,\n damping?: number,\n mass?: number,\n delay?: number,\n};\n\nexport default class SpringAnimation extends Animation {\n _overshootClamping: boolean;\n _restDisplacementThreshold: number;\n _restSpeedThreshold: number;\n _lastVelocity: number;\n _startPosition: number;\n _lastPosition: number;\n _fromValue: number;\n _toValue: number;\n _stiffness: number;\n _damping: number;\n _mass: number;\n _initialVelocity: number;\n _delay: number;\n _timeout: any;\n _startTime: number;\n _lastTime: number;\n _frameTime: number;\n _onUpdate: (value: number) => void;\n _animationFrame: any;\n _useNativeDriver: boolean;\n _platformConfig: ?PlatformConfig;\n\n constructor(config: SpringAnimationConfigSingle) {\n super();\n\n this._overshootClamping = config.overshootClamping ?? false;\n this._restDisplacementThreshold = config.restDisplacementThreshold ?? 0.001;\n this._restSpeedThreshold = config.restSpeedThreshold ?? 0.001;\n this._initialVelocity = config.velocity ?? 0;\n this._lastVelocity = config.velocity ?? 0;\n this._toValue = config.toValue;\n this._delay = config.delay ?? 0;\n this._useNativeDriver = NativeAnimatedHelper.shouldUseNativeDriver(config);\n this._platformConfig = config.platformConfig;\n this.__isInteraction = config.isInteraction ?? !this._useNativeDriver;\n this.__iterations = config.iterations ?? 1;\n\n if (\n config.stiffness !== undefined ||\n config.damping !== undefined ||\n config.mass !== undefined\n ) {\n invariant(\n config.bounciness === undefined &&\n config.speed === undefined &&\n config.tension === undefined &&\n config.friction === undefined,\n 'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one',\n );\n this._stiffness = config.stiffness ?? 100;\n this._damping = config.damping ?? 10;\n this._mass = config.mass ?? 1;\n } else if (config.bounciness !== undefined || config.speed !== undefined) {\n // Convert the origami bounciness/speed values to stiffness/damping\n // We assume mass is 1.\n invariant(\n config.tension === undefined &&\n config.friction === undefined &&\n config.stiffness === undefined &&\n config.damping === undefined &&\n config.mass === undefined,\n 'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one',\n );\n const springConfig = SpringConfig.fromBouncinessAndSpeed(\n config.bounciness ?? 8,\n config.speed ?? 12,\n );\n this._stiffness = springConfig.stiffness;\n this._damping = springConfig.damping;\n this._mass = 1;\n } else {\n // Convert the origami tension/friction values to stiffness/damping\n // We assume mass is 1.\n const springConfig = SpringConfig.fromOrigamiTensionAndFriction(\n config.tension ?? 40,\n config.friction ?? 7,\n );\n this._stiffness = springConfig.stiffness;\n this._damping = springConfig.damping;\n this._mass = 1;\n }\n\n invariant(this._stiffness > 0, 'Stiffness value must be greater than 0');\n invariant(this._damping > 0, 'Damping value must be greater than 0');\n invariant(this._mass > 0, 'Mass value must be greater than 0');\n }\n\n __getNativeAnimationConfig(): {|\n damping: number,\n initialVelocity: number,\n iterations: number,\n mass: number,\n platformConfig: ?PlatformConfig,\n overshootClamping: boolean,\n restDisplacementThreshold: number,\n restSpeedThreshold: number,\n stiffness: number,\n toValue: any,\n type: $TEMPORARY$string<'spring'>,\n |} {\n return {\n type: 'spring',\n overshootClamping: this._overshootClamping,\n restDisplacementThreshold: this._restDisplacementThreshold,\n restSpeedThreshold: this._restSpeedThreshold,\n stiffness: this._stiffness,\n damping: this._damping,\n mass: this._mass,\n initialVelocity: this._initialVelocity ?? this._lastVelocity,\n toValue: this._toValue,\n iterations: this.__iterations,\n platformConfig: this._platformConfig,\n };\n }\n\n start(\n fromValue: number,\n onUpdate: (value: number) => void,\n onEnd: ?EndCallback,\n previousAnimation: ?Animation,\n animatedValue: AnimatedValue,\n ): void {\n this.__active = true;\n this._startPosition = fromValue;\n this._lastPosition = this._startPosition;\n\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n this._lastTime = Date.now();\n this._frameTime = 0.0;\n\n if (previousAnimation instanceof SpringAnimation) {\n const internalState = previousAnimation.getInternalState();\n this._lastPosition = internalState.lastPosition;\n this._lastVelocity = internalState.lastVelocity;\n // Set the initial velocity to the last velocity\n this._initialVelocity = this._lastVelocity;\n this._lastTime = internalState.lastTime;\n }\n\n const start = () => {\n if (!this._useNativeDriver && animatedValue.__isNative === true) {\n throw new Error(\n 'Attempting to run JS driven animation on animated node ' +\n 'that has been moved to \"native\" earlier by starting an ' +\n 'animation with `useNativeDriver: true`',\n );\n }\n\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this.onUpdate();\n }\n };\n\n // If this._delay is more than 0, we start after the timeout.\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n }\n\n getInternalState(): Object {\n return {\n lastPosition: this._lastPosition,\n lastVelocity: this._lastVelocity,\n lastTime: this._lastTime,\n };\n }\n\n /**\n * This spring model is based off of a damped harmonic oscillator\n * (https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator).\n *\n * We use the closed form of the second order differential equation:\n *\n * x'' + (2ζ⍵_0)x' + ⍵^2x = 0\n *\n * where\n * ⍵_0 = √(k / m) (undamped angular frequency of the oscillator),\n * ζ = c / 2√mk (damping ratio),\n * c = damping constant\n * k = stiffness\n * m = mass\n *\n * The derivation of the closed form is described in detail here:\n * http://planetmath.org/sites/default/files/texpdf/39745.pdf\n *\n * This algorithm happens to match the algorithm used by CASpringAnimation,\n * a QuartzCore (iOS) API that creates spring animations.\n */\n onUpdate(): void {\n // If for some reason we lost a lot of frames (e.g. process large payload or\n // stopped in the debugger), we only advance by 4 frames worth of\n // computation and will continue on the next frame. It's better to have it\n // running at faster speed than jumping to the end.\n const MAX_STEPS = 64;\n let now = Date.now();\n if (now > this._lastTime + MAX_STEPS) {\n now = this._lastTime + MAX_STEPS;\n }\n\n const deltaTime = (now - this._lastTime) / 1000;\n this._frameTime += deltaTime;\n\n const c: number = this._damping;\n const m: number = this._mass;\n const k: number = this._stiffness;\n const v0: number = -this._initialVelocity;\n\n const zeta = c / (2 * Math.sqrt(k * m)); // damping ratio\n const omega0 = Math.sqrt(k / m); // undamped angular frequency of the oscillator (rad/ms)\n const omega1 = omega0 * Math.sqrt(1.0 - zeta * zeta); // exponential decay\n const x0 = this._toValue - this._startPosition; // calculate the oscillation from x0 = 1 to x = 0\n\n let position = 0.0;\n let velocity = 0.0;\n const t = this._frameTime;\n if (zeta < 1) {\n // Under damped\n const envelope = Math.exp(-zeta * omega0 * t);\n position =\n this._toValue -\n envelope *\n (((v0 + zeta * omega0 * x0) / omega1) * Math.sin(omega1 * t) +\n x0 * Math.cos(omega1 * t));\n // This looks crazy -- it's actually just the derivative of the\n // oscillation function\n velocity =\n zeta *\n omega0 *\n envelope *\n ((Math.sin(omega1 * t) * (v0 + zeta * omega0 * x0)) / omega1 +\n x0 * Math.cos(omega1 * t)) -\n envelope *\n (Math.cos(omega1 * t) * (v0 + zeta * omega0 * x0) -\n omega1 * x0 * Math.sin(omega1 * t));\n } else {\n // Critically damped\n const envelope = Math.exp(-omega0 * t);\n position = this._toValue - envelope * (x0 + (v0 + omega0 * x0) * t);\n velocity =\n envelope * (v0 * (t * omega0 - 1) + t * x0 * (omega0 * omega0));\n }\n\n this._lastTime = now;\n this._lastPosition = position;\n this._lastVelocity = velocity;\n\n this._onUpdate(position);\n if (!this.__active) {\n // a listener might have stopped us in _onUpdate\n return;\n }\n\n // Conditions for stopping the spring animation\n let isOvershooting = false;\n if (this._overshootClamping && this._stiffness !== 0) {\n if (this._startPosition < this._toValue) {\n isOvershooting = position > this._toValue;\n } else {\n isOvershooting = position < this._toValue;\n }\n }\n const isVelocity = Math.abs(velocity) <= this._restSpeedThreshold;\n let isDisplacement = true;\n if (this._stiffness !== 0) {\n isDisplacement =\n Math.abs(this._toValue - position) <= this._restDisplacementThreshold;\n }\n\n if (isOvershooting || (isVelocity && isDisplacement)) {\n if (this._stiffness !== 0) {\n // Ensure that we end up with a round value\n this._lastPosition = this._toValue;\n this._lastVelocity = 0;\n this._onUpdate(this._toValue);\n }\n\n this.__debouncedOnEnd({finished: true});\n return;\n }\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n\n stop(): void {\n super.stop();\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n this.__debouncedOnEnd({finished: false});\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {ProcessedColorValue} from '../../StyleSheet/processColor';\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\nimport type {NativeColorValue} from '../../StyleSheet/StyleSheetTypes';\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\n\nimport normalizeColor from '../../StyleSheet/normalizeColor';\nimport {processColorObject} from '../../StyleSheet/PlatformColorValueTypes';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedValue, {flushValue} from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport type AnimatedColorConfig = $ReadOnly<{\n useNativeDriver: boolean,\n}>;\n\ntype ColorListenerCallback = (value: ColorValue) => mixed;\n\nexport type RgbaValue = {\n +r: number,\n +g: number,\n +b: number,\n +a: number,\n ...\n};\n\ntype RgbaAnimatedValue = {\n +r: AnimatedValue,\n +g: AnimatedValue,\n +b: AnimatedValue,\n +a: AnimatedValue,\n ...\n};\n\nexport type InputValue = ?(RgbaValue | RgbaAnimatedValue | ColorValue);\n\nconst NativeAnimatedAPI = NativeAnimatedHelper.API;\n\nconst defaultColor: RgbaValue = {r: 0, g: 0, b: 0, a: 1.0};\n\n/* eslint no-bitwise: 0 */\nfunction processColor(\n color?: ?(ColorValue | RgbaValue),\n): ?(RgbaValue | NativeColorValue) {\n if (color === undefined || color === null) {\n return null;\n }\n\n if (isRgbaValue(color)) {\n // $FlowIgnore[incompatible-cast] - Type is verified above\n return (color: RgbaValue);\n }\n\n let normalizedColor: ?ProcessedColorValue = normalizeColor(\n // $FlowIgnore[incompatible-cast] - Type is verified above\n (color: ColorValue),\n );\n if (normalizedColor === undefined || normalizedColor === null) {\n return null;\n }\n\n if (typeof normalizedColor === 'object') {\n const processedColorObj: ?NativeColorValue =\n processColorObject(normalizedColor);\n if (processedColorObj != null) {\n return processedColorObj;\n }\n } else if (typeof normalizedColor === 'number') {\n const r: number = (normalizedColor & 0xff000000) >>> 24;\n const g: number = (normalizedColor & 0x00ff0000) >>> 16;\n const b: number = (normalizedColor & 0x0000ff00) >>> 8;\n const a: number = (normalizedColor & 0x000000ff) / 255;\n\n return {r, g, b, a};\n }\n\n return null;\n}\n\nfunction isRgbaValue(value: any): boolean {\n return (\n value &&\n typeof value.r === 'number' &&\n typeof value.g === 'number' &&\n typeof value.b === 'number' &&\n typeof value.a === 'number'\n );\n}\n\nfunction isRgbaAnimatedValue(value: any): boolean {\n return (\n value &&\n value.r instanceof AnimatedValue &&\n value.g instanceof AnimatedValue &&\n value.b instanceof AnimatedValue &&\n value.a instanceof AnimatedValue\n );\n}\n\nexport default class AnimatedColor extends AnimatedWithChildren {\n r: AnimatedValue;\n g: AnimatedValue;\n b: AnimatedValue;\n a: AnimatedValue;\n nativeColor: ?NativeColorValue;\n\n _suspendCallbacks: number = 0;\n\n constructor(valueIn?: InputValue, config?: ?AnimatedColorConfig) {\n super();\n\n let value: RgbaValue | RgbaAnimatedValue | ColorValue =\n valueIn ?? defaultColor;\n if (isRgbaAnimatedValue(value)) {\n // $FlowIgnore[incompatible-cast] - Type is verified above\n const rgbaAnimatedValue: RgbaAnimatedValue = (value: RgbaAnimatedValue);\n this.r = rgbaAnimatedValue.r;\n this.g = rgbaAnimatedValue.g;\n this.b = rgbaAnimatedValue.b;\n this.a = rgbaAnimatedValue.a;\n } else {\n const processedColor: RgbaValue | NativeColorValue =\n // $FlowIgnore[incompatible-cast] - Type is verified above\n processColor((value: ColorValue | RgbaValue)) ?? defaultColor;\n let initColor: RgbaValue = defaultColor;\n if (isRgbaValue(processedColor)) {\n // $FlowIgnore[incompatible-cast] - Type is verified above\n initColor = (processedColor: RgbaValue);\n } else {\n // $FlowIgnore[incompatible-cast] - Type is verified above\n this.nativeColor = (processedColor: NativeColorValue);\n }\n\n this.r = new AnimatedValue(initColor.r);\n this.g = new AnimatedValue(initColor.g);\n this.b = new AnimatedValue(initColor.b);\n this.a = new AnimatedValue(initColor.a);\n }\n\n if (config?.useNativeDriver) {\n this.__makeNative();\n }\n }\n\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n */\n setValue(value: RgbaValue | ColorValue): void {\n let shouldUpdateNodeConfig = false;\n if (this.__isNative) {\n const nativeTag = this.__getNativeTag();\n NativeAnimatedAPI.setWaitingForIdentifier(nativeTag.toString());\n }\n\n const processedColor: RgbaValue | NativeColorValue =\n processColor(value) ?? defaultColor;\n this._withSuspendedCallbacks(() => {\n if (isRgbaValue(processedColor)) {\n // $FlowIgnore[incompatible-type] - Type is verified above\n const rgbaValue: RgbaValue = processedColor;\n this.r.setValue(rgbaValue.r);\n this.g.setValue(rgbaValue.g);\n this.b.setValue(rgbaValue.b);\n this.a.setValue(rgbaValue.a);\n if (this.nativeColor != null) {\n this.nativeColor = null;\n shouldUpdateNodeConfig = true;\n }\n } else {\n // $FlowIgnore[incompatible-type] - Type is verified above\n const nativeColor: NativeColorValue = processedColor;\n if (this.nativeColor !== nativeColor) {\n this.nativeColor = nativeColor;\n shouldUpdateNodeConfig = true;\n }\n }\n });\n\n if (this.__isNative) {\n const nativeTag = this.__getNativeTag();\n if (shouldUpdateNodeConfig) {\n NativeAnimatedAPI.updateAnimatedNodeConfig(\n nativeTag,\n this.__getNativeConfig(),\n );\n }\n NativeAnimatedAPI.unsetWaitingForIdentifier(nativeTag.toString());\n } else {\n flushValue(this);\n }\n\n // $FlowFixMe[incompatible-call]\n this.__callListeners(this.__getValue());\n }\n\n /**\n * Sets an offset that is applied on top of whatever value is set, whether\n * via `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n */\n setOffset(offset: RgbaValue): void {\n this.r.setOffset(offset.r);\n this.g.setOffset(offset.g);\n this.b.setOffset(offset.b);\n this.a.setOffset(offset.a);\n }\n\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n */\n flattenOffset(): void {\n this.r.flattenOffset();\n this.g.flattenOffset();\n this.b.flattenOffset();\n this.a.flattenOffset();\n }\n\n /**\n * Sets the offset value to the base value, and resets the base value to\n * zero. The final output of the value is unchanged.\n */\n extractOffset(): void {\n this.r.extractOffset();\n this.g.extractOffset();\n this.b.extractOffset();\n this.a.extractOffset();\n }\n\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n */\n stopAnimation(callback?: ColorListenerCallback): void {\n this.r.stopAnimation();\n this.g.stopAnimation();\n this.b.stopAnimation();\n this.a.stopAnimation();\n callback && callback(this.__getValue());\n }\n\n /**\n * Stops any animation and resets the value to its original.\n */\n resetAnimation(callback?: ColorListenerCallback): void {\n this.r.resetAnimation();\n this.g.resetAnimation();\n this.b.resetAnimation();\n this.a.resetAnimation();\n callback && callback(this.__getValue());\n }\n\n __getValue(): ColorValue {\n if (this.nativeColor != null) {\n return this.nativeColor;\n } else {\n return `rgba(${this.r.__getValue()}, ${this.g.__getValue()}, ${this.b.__getValue()}, ${this.a.__getValue()})`;\n }\n }\n\n __attach(): void {\n this.r.__addChild(this);\n this.g.__addChild(this);\n this.b.__addChild(this);\n this.a.__addChild(this);\n super.__attach();\n }\n\n __detach(): void {\n this.r.__removeChild(this);\n this.g.__removeChild(this);\n this.b.__removeChild(this);\n this.a.__removeChild(this);\n super.__detach();\n }\n\n _withSuspendedCallbacks(callback: () => void) {\n this._suspendCallbacks++;\n callback();\n this._suspendCallbacks--;\n }\n\n __callListeners(value: number): void {\n if (this._suspendCallbacks === 0) {\n super.__callListeners(value);\n }\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this.r.__makeNative(platformConfig);\n this.g.__makeNative(platformConfig);\n this.b.__makeNative(platformConfig);\n this.a.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n\n __getNativeConfig(): {...} {\n return {\n type: 'color',\n r: this.r.__getNativeTag(),\n g: this.g.__getNativeTag(),\n b: this.b.__getNativeTag(),\n a: this.a.__getNativeTag(),\n nativeColor: this.nativeColor,\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\ntype SpringConfigType = {\n stiffness: number,\n damping: number,\n ...\n};\n\nfunction stiffnessFromOrigamiValue(oValue: number) {\n return (oValue - 30) * 3.62 + 194;\n}\n\nfunction dampingFromOrigamiValue(oValue: number) {\n return (oValue - 8) * 3 + 25;\n}\n\nexport function fromOrigamiTensionAndFriction(\n tension: number,\n friction: number,\n): SpringConfigType {\n return {\n stiffness: stiffnessFromOrigamiValue(tension),\n damping: dampingFromOrigamiValue(friction),\n };\n}\n\nexport function fromBouncinessAndSpeed(\n bounciness: number,\n speed: number,\n): SpringConfigType {\n function normalize(value: number, startValue: number, endValue: number) {\n return (value - startValue) / (endValue - startValue);\n }\n\n function projectNormal(n: number, start: number, end: number) {\n return start + n * (end - start);\n }\n\n function linearInterpolation(t: number, start: number, end: number) {\n return t * end + (1 - t) * start;\n }\n\n function quadraticOutInterpolation(t: number, start: number, end: number) {\n return linearInterpolation(2 * t - t * t, start, end);\n }\n\n function b3Friction1(x: number) {\n return 0.0007 * Math.pow(x, 3) - 0.031 * Math.pow(x, 2) + 0.64 * x + 1.28;\n }\n\n function b3Friction2(x: number) {\n return 0.000044 * Math.pow(x, 3) - 0.006 * Math.pow(x, 2) + 0.36 * x + 2;\n }\n\n function b3Friction3(x: number) {\n return (\n 0.00000045 * Math.pow(x, 3) -\n 0.000332 * Math.pow(x, 2) +\n 0.1078 * x +\n 5.84\n );\n }\n\n function b3Nobounce(tension: number) {\n if (tension <= 18) {\n return b3Friction1(tension);\n } else if (tension > 18 && tension <= 44) {\n return b3Friction2(tension);\n } else {\n return b3Friction3(tension);\n }\n }\n\n let b = normalize(bounciness / 1.7, 0, 20);\n b = projectNormal(b, 0, 0.8);\n const s = normalize(speed / 1.7, 0, 20);\n const bouncyTension = projectNormal(s, 0.5, 200);\n const bouncyFriction = quadraticOutInterpolation(\n b,\n b3Nobounce(bouncyTension),\n 0.01,\n );\n\n return {\n stiffness: stiffnessFromOrigamiValue(bouncyTension),\n damping: dampingFromOrigamiValue(bouncyFriction),\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type {RgbaValue} from '../nodes/AnimatedColor';\nimport type AnimatedInterpolation from '../nodes/AnimatedInterpolation';\nimport type AnimatedValue from '../nodes/AnimatedValue';\nimport type AnimatedValueXY from '../nodes/AnimatedValueXY';\nimport type {AnimationConfig, EndCallback} from './Animation';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedColor from '../nodes/AnimatedColor';\nimport Animation from './Animation';\n\nexport type TimingAnimationConfig = $ReadOnly<{\n ...AnimationConfig,\n toValue:\n | number\n | AnimatedValue\n | {\n x: number,\n y: number,\n ...\n }\n | AnimatedValueXY\n | RgbaValue\n | AnimatedColor\n | AnimatedInterpolation,\n easing?: (value: number) => number,\n duration?: number,\n delay?: number,\n}>;\n\nexport type TimingAnimationConfigSingle = $ReadOnly<{\n ...AnimationConfig,\n toValue: number,\n easing?: (value: number) => number,\n duration?: number,\n delay?: number,\n}>;\n\nlet _easeInOut;\nfunction easeInOut() {\n if (!_easeInOut) {\n const Easing = require('../Easing').default;\n _easeInOut = Easing.inOut(Easing.ease);\n }\n return _easeInOut;\n}\n\nexport default class TimingAnimation extends Animation {\n _startTime: number;\n _fromValue: number;\n _toValue: number;\n _duration: number;\n _delay: number;\n _easing: (value: number) => number;\n _onUpdate: (value: number) => void;\n _animationFrame: any;\n _timeout: any;\n _useNativeDriver: boolean;\n _platformConfig: ?PlatformConfig;\n\n constructor(config: TimingAnimationConfigSingle) {\n super();\n this._toValue = config.toValue;\n this._easing = config.easing ?? easeInOut();\n this._duration = config.duration ?? 500;\n this._delay = config.delay ?? 0;\n this.__iterations = config.iterations ?? 1;\n this._useNativeDriver = NativeAnimatedHelper.shouldUseNativeDriver(config);\n this._platformConfig = config.platformConfig;\n this.__isInteraction = config.isInteraction ?? !this._useNativeDriver;\n }\n\n __getNativeAnimationConfig(): any {\n const frameDuration = 1000.0 / 60.0;\n const frames = [];\n const numFrames = Math.round(this._duration / frameDuration);\n for (let frame = 0; frame < numFrames; frame++) {\n frames.push(this._easing(frame / numFrames));\n }\n frames.push(this._easing(1));\n return {\n type: 'frames',\n frames,\n toValue: this._toValue,\n iterations: this.__iterations,\n platformConfig: this._platformConfig,\n };\n }\n\n start(\n fromValue: number,\n onUpdate: (value: number) => void,\n onEnd: ?EndCallback,\n previousAnimation: ?Animation,\n animatedValue: AnimatedValue,\n ): void {\n this.__active = true;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n\n const start = () => {\n if (!this._useNativeDriver && animatedValue.__isNative === true) {\n throw new Error(\n 'Attempting to run JS driven animation on animated node ' +\n 'that has been moved to \"native\" earlier by starting an ' +\n 'animation with `useNativeDriver: true`',\n );\n }\n\n // Animations that sometimes have 0 duration and sometimes do not\n // still need to use the native driver when duration is 0 so as to\n // not cause intermixed JS and native animations.\n if (this._duration === 0 && !this._useNativeDriver) {\n this._onUpdate(this._toValue);\n this.__debouncedOnEnd({finished: true});\n } else {\n this._startTime = Date.now();\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this._animationFrame = requestAnimationFrame(\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.onUpdate.bind(this),\n );\n }\n }\n };\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n }\n\n onUpdate(): void {\n const now = Date.now();\n if (now >= this._startTime + this._duration) {\n if (this._duration === 0) {\n this._onUpdate(this._toValue);\n } else {\n this._onUpdate(\n this._fromValue + this._easing(1) * (this._toValue - this._fromValue),\n );\n }\n this.__debouncedOnEnd({finished: true});\n return;\n }\n\n this._onUpdate(\n this._fromValue +\n this._easing((now - this._startTime) / this._duration) *\n (this._toValue - this._fromValue),\n );\n if (this.__active) {\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n\n stop(): void {\n super.stop();\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n this.__debouncedOnEnd({finished: false});\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport composeStyles from '../../src/private/core/composeStyles';\nimport View from '../Components/View/View';\nimport useMergeRefs from '../Utilities/useMergeRefs';\nimport useAnimatedProps from './useAnimatedProps';\nimport * as React from 'react';\nimport {useMemo} from 'react';\n\n// $FlowFixMe[deprecated-type]\nexport type AnimatedProps = $ObjMap<\n Props &\n $ReadOnly<{\n passthroughAnimatedPropExplicitValues?: React.ElementConfig,\n }>,\n () => any,\n>;\n\nexport type AnimatedComponentType<\n Props: {...},\n +Instance = mixed,\n> = React.AbstractComponent, Instance>;\n\nexport default function createAnimatedComponent(\n Component: React.AbstractComponent,\n): AnimatedComponentType {\n const AnimatedComponent = React.forwardRef, TInstance>(\n (props, forwardedRef) => {\n const [reducedProps, callbackRef] = useAnimatedProps(\n // $FlowFixMe[incompatible-call]\n props,\n );\n const ref = useMergeRefs(callbackRef, forwardedRef);\n\n // Some components require explicit passthrough values for animation\n // to work properly. For example, if an animated component is\n // transformed and Pressable, onPress will not work after transform\n // without these passthrough values.\n // $FlowFixMe[prop-missing]\n const {passthroughAnimatedPropExplicitValues, style} = reducedProps;\n const passthroughStyle = passthroughAnimatedPropExplicitValues?.style;\n const mergedStyle = useMemo(\n () => composeStyles(style, passthroughStyle),\n [passthroughStyle, style],\n );\n\n // NOTE: It is important that `passthroughAnimatedPropExplicitValues` is\n // spread after `reducedProps` but before `style`.\n return (\n \n );\n },\n );\n\n AnimatedComponent.displayName = `Animated(${\n Component.displayName || 'Anonymous'\n })`;\n\n return AnimatedComponent;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport * as React from 'react';\nimport {useCallback} from 'react';\n\n/**\n * Constructs a new ref that forwards new values to each of the given refs. The\n * given refs will always be invoked in the order that they are supplied.\n *\n * WARNING: A known problem of merging refs using this approach is that if any\n * of the given refs change, the returned callback ref will also be changed. If\n * the returned callback ref is supplied as a `ref` to a React element, this may\n * lead to problems with the given refs being invoked more times than desired.\n */\nexport default function useMergeRefs(\n ...refs: $ReadOnlyArray>\n): (Instance | null) => void {\n return useCallback(\n (current: Instance | null) => {\n for (const ref of refs) {\n if (ref != null) {\n if (typeof ref === 'function') {\n ref(current);\n } else {\n ref.current = current;\n }\n }\n }\n },\n [...refs], // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';\nimport {isPublicInstance as isFabricPublicInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils';\nimport useRefEffect from '../Utilities/useRefEffect';\nimport {AnimatedEvent} from './AnimatedEvent';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n} from 'react';\n\ntype ReducedProps = {\n ...TProps,\n collapsable: boolean,\n ...\n};\ntype CallbackRef = T => mixed;\n\nexport default function useAnimatedProps(\n props: TProps,\n): [ReducedProps, CallbackRef] {\n const [, scheduleUpdate] = useReducer(count => count + 1, 0);\n const onUpdateRef = useRef void>(null);\n const timerRef = useRef(null);\n\n // TODO: Only invalidate `node` if animated props or `style` change. In the\n // previous implementation, we permitted `style` to override props with the\n // same name property name as styles, so we can probably continue doing that.\n // The ordering of other props *should* not matter.\n const node = useMemo(\n () => new AnimatedProps(props, () => onUpdateRef.current?.()),\n [props],\n );\n const useNativePropsInFabric =\n ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric();\n useAnimatedPropsLifecycle(node);\n\n // TODO: This \"effect\" does three things:\n //\n // 1) Call `setNativeView`.\n // 2) Update `onUpdateRef`.\n // 3) Update listeners for `AnimatedEvent` props.\n //\n // Ideally, each of these would be separate \"effects\" so that they are not\n // unnecessarily re-run when irrelevant dependencies change. For example, we\n // should be able to hoist all `AnimatedEvent` props and only do #3 if either\n // the `AnimatedEvent` props change or `instance` changes.\n //\n // But there is no way to transparently compose three separate callback refs,\n // so we just combine them all into one for now.\n const refEffect = useCallback(\n (instance: TInstance) => {\n // NOTE: This may be called more often than necessary (e.g. when `props`\n // changes), but `setNativeView` already optimizes for that.\n node.setNativeView(instance);\n\n // NOTE: When using the JS animation driver, this callback is called on\n // every animation frame. When using the native driver, this callback is\n // called when the animation completes.\n onUpdateRef.current = () => {\n if (process.env.NODE_ENV === 'test') {\n // Check 1: this is a test.\n // call `scheduleUpdate` to bypass use of setNativeProps.\n return scheduleUpdate();\n }\n\n const isFabricNode = isFabricInstance(instance);\n if (node.__isNative) {\n // Check 2: this is an animation driven by native.\n // In native driven animations, this callback is only called once the animation completes.\n if (isFabricNode) {\n // Call `scheduleUpdate` to synchronise Fiber and Shadow tree.\n // Must not be called in Paper.\n scheduleUpdate();\n }\n return;\n }\n\n if (\n typeof instance !== 'object' ||\n typeof instance?.setNativeProps !== 'function'\n ) {\n // Check 3: the instance does not support setNativeProps. Call `scheduleUpdate`.\n return scheduleUpdate();\n }\n\n if (!isFabricNode) {\n // Check 4: this is a paper instance, call setNativeProps.\n // $FlowIgnore[not-a-function] - Assume it's still a function.\n // $FlowFixMe[incompatible-use]\n return instance.setNativeProps(node.__getAnimatedValue());\n }\n\n if (!useNativePropsInFabric) {\n // Check 5: setNativeProps are disabled.\n return scheduleUpdate();\n }\n\n // This is a Fabric instance and setNativeProps is supported.\n\n // $FlowIgnore[not-a-function] - Assume it's still a function.\n // $FlowFixMe[incompatible-use]\n instance.setNativeProps(node.__getAnimatedValue());\n\n // Keeping state of Fiber tree and Shadow tree in sync.\n //\n // This is done by calling `scheduleUpdate` which will trigger a commit.\n // However, React commit is not fast enough to drive animations.\n // This is where setNativeProps comes in handy but the state between\n // Fiber tree and Shadow tree needs to be kept in sync.\n // The goal is to call `scheduleUpdate` as little as possible to maintain\n // performance but frequently enough to keep state in sync.\n // Debounce is set to 48ms, which is 3 * the duration of a frame.\n // 3 frames was the highest value where flickering state was not observed.\n if (timerRef.current != null) {\n clearTimeout(timerRef.current);\n }\n timerRef.current = setTimeout(() => {\n timerRef.current = null;\n scheduleUpdate();\n }, 48);\n };\n\n const target = getEventTarget(instance);\n const events = [];\n\n for (const propName in props) {\n // $FlowFixMe[invalid-computed-prop]\n const propValue = props[propName];\n if (propValue instanceof AnimatedEvent && propValue.__isNative) {\n propValue.__attach(target, propName);\n events.push([propName, propValue]);\n }\n }\n\n return () => {\n onUpdateRef.current = null;\n\n for (const [propName, propValue] of events) {\n propValue.__detach(target, propName);\n }\n };\n },\n [props, node, useNativePropsInFabric],\n );\n const callbackRef = useRefEffect(refEffect);\n\n return [reduceAnimatedProps(node), callbackRef];\n}\n\nfunction reduceAnimatedProps(\n node: AnimatedProps,\n): ReducedProps {\n // Force `collapsable` to be false so that the native view is not flattened.\n // Flattened views cannot be accurately referenced by the native driver.\n return {\n ...node.__getValue(),\n collapsable: false,\n };\n}\n\n/**\n * Manages the lifecycle of the supplied `AnimatedProps` by invoking `__attach`\n * and `__detach`. However, this is more complicated because `AnimatedProps`\n * uses reference counting to determine when to recursively detach its children\n * nodes. So in order to optimize this, we avoid detaching until the next attach\n * unless we are unmounting.\n */\nfunction useAnimatedPropsLifecycle(node: AnimatedProps): void {\n const prevNodeRef = useRef(null);\n const isUnmountingRef = useRef(false);\n\n useEffect(() => {\n // It is ok for multiple components to call `flushQueue` because it noops\n // if the queue is empty. When multiple animated components are mounted at\n // the same time. Only first component flushes the queue and the others will noop.\n NativeAnimatedHelper.API.flushQueue();\n });\n\n useLayoutEffect(() => {\n isUnmountingRef.current = false;\n return () => {\n isUnmountingRef.current = true;\n };\n }, []);\n\n useLayoutEffect(() => {\n node.__attach();\n if (prevNodeRef.current != null) {\n const prevNode = prevNodeRef.current;\n // TODO: Stop restoring default values (unless `reset` is called).\n prevNode.__restoreDefaultValues();\n prevNode.__detach();\n prevNodeRef.current = null;\n }\n return () => {\n if (isUnmountingRef.current) {\n // NOTE: Do not restore default values on unmount, see D18197735.\n node.__detach();\n } else {\n prevNodeRef.current = node;\n }\n };\n }, [node]);\n}\n\nfunction getEventTarget(instance: TInstance): TInstance {\n return typeof instance === 'object' &&\n typeof instance?.getScrollableNode === 'function'\n ? // $FlowFixMe[incompatible-use] - Legacy instance assumptions.\n instance.getScrollableNode()\n : instance;\n}\n\n// $FlowFixMe[unclear-type] - Legacy instance assumptions.\nfunction isFabricInstance(instance: any): boolean {\n return (\n isFabricPublicInstance(instance) ||\n // Some components have a setNativeProps function but aren't a host component\n // such as lists like FlatList and SectionList. These should also use\n // forceUpdate in Fabric since setNativeProps doesn't exist on the underlying\n // host component. This crazy hack is essentially special casing those lists and\n // ScrollView itself to use forceUpdate in Fabric.\n // If these components end up using forwardRef then these hacks can go away\n // as instance would actually be the underlying host component and the above check\n // would be sufficient.\n isFabricPublicInstance(instance?.getNativeScrollRef?.()) ||\n isFabricPublicInstance(\n instance?.getScrollResponder?.()?.getNativeScrollRef?.(),\n )\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport {useCallback, useRef} from 'react';\n\ntype CallbackRef = T => mixed;\n\n/**\n * Constructs a callback ref that provides similar semantics as `useEffect`. The\n * supplied `effect` callback will be called with non-null component instances.\n * The `effect` callback can also optionally return a cleanup function.\n *\n * When a component is updated or unmounted, the cleanup function is called. The\n * `effect` callback will then be called again, if applicable.\n *\n * When a new `effect` callback is supplied, the previously returned cleanup\n * function will be called before the new `effect` callback is called with the\n * same instance.\n *\n * WARNING: The `effect` callback should be stable (e.g. using `useCallback`).\n */\nexport default function useRefEffect(\n effect: TInstance => (() => void) | void,\n): CallbackRef {\n const cleanupRef = useRef<(() => void) | void>(undefined);\n return useCallback(\n (instance: null | TInstance) => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (instance != null) {\n cleanupRef.current = effect(instance);\n }\n },\n [effect],\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n/**\n * IMPORTANT!!\n *\n * This module cannot import `ReactFabric` (directly or indirectly)\n * because it can be used by apps only using the legacy renderer.\n * In that case `nativeFabricUIManager` isn't defined and `ReactFabric` throws.\n */\n\nexport function isPublicInstance(maybeInstance: mixed): boolean {\n return (\n maybeInstance != null &&\n // TODO: implement a better check when the instance is defined in the React Native repository.\n (maybeInstance.__nativeTag != null ||\n // TODO: remove this check when syncing the new version of the renderer from React to React Native.\n isLegacyFabricInstance(maybeInstance))\n );\n}\n\nfunction isLegacyFabricInstance(maybeInstance: mixed): boolean {\n /* eslint-disable dot-notation */\n return (\n maybeInstance != null &&\n // $FlowExpectedError[incompatible-use]\n maybeInstance['_internalInstanceHandle'] != null &&\n maybeInstance['_internalInstanceHandle'].stateNode != null &&\n maybeInstance['_internalInstanceHandle'].stateNode.canonical != null\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type {InterpolationConfigType} from './AnimatedInterpolation';\nimport type AnimatedNode from './AnimatedNode';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport default class AnimatedAddition extends AnimatedWithChildren {\n _a: AnimatedNode;\n _b: AnimatedNode;\n\n constructor(a: AnimatedNode | number, b: AnimatedNode | number) {\n super();\n this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this._a.__makeNative(platformConfig);\n this._b.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n\n __getValue(): number {\n return this._a.__getValue() + this._b.__getValue();\n }\n\n interpolate(\n config: InterpolationConfigType,\n ): AnimatedInterpolation {\n return new AnimatedInterpolation(this, config);\n }\n\n __attach(): void {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n\n __detach(): void {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n super.__detach();\n }\n\n __getNativeConfig(): any {\n return {\n type: 'addition',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()],\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type {InterpolationConfigType} from './AnimatedInterpolation';\nimport type AnimatedNode from './AnimatedNode';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport default class AnimatedDiffClamp extends AnimatedWithChildren {\n _a: AnimatedNode;\n _min: number;\n _max: number;\n _value: number;\n _lastValue: number;\n\n constructor(a: AnimatedNode, min: number, max: number) {\n super();\n\n this._a = a;\n this._min = min;\n this._max = max;\n this._value = this._lastValue = this._a.__getValue();\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this._a.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n\n interpolate(\n config: InterpolationConfigType,\n ): AnimatedInterpolation {\n return new AnimatedInterpolation(this, config);\n }\n\n __getValue(): number {\n const value = this._a.__getValue();\n const diff = value - this._lastValue;\n this._lastValue = value;\n this._value = Math.min(Math.max(this._value + diff, this._min), this._max);\n return this._value;\n }\n\n __attach(): void {\n this._a.__addChild(this);\n }\n\n __detach(): void {\n this._a.__removeChild(this);\n super.__detach();\n }\n\n __getNativeConfig(): any {\n return {\n type: 'diffclamp',\n input: this._a.__getNativeTag(),\n min: this._min,\n max: this._max,\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type {InterpolationConfigType} from './AnimatedInterpolation';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport default class AnimatedDivision extends AnimatedWithChildren {\n _a: AnimatedNode;\n _b: AnimatedNode;\n _warnedAboutDivideByZero: boolean = false;\n\n constructor(a: AnimatedNode | number, b: AnimatedNode | number) {\n super();\n if (b === 0 || (b instanceof AnimatedNode && b.__getValue() === 0)) {\n console.error('Detected potential division by zero in AnimatedDivision');\n }\n this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this._a.__makeNative(platformConfig);\n this._b.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n\n __getValue(): number {\n const a = this._a.__getValue();\n const b = this._b.__getValue();\n if (b === 0) {\n // Prevent spamming the console/LogBox\n if (!this._warnedAboutDivideByZero) {\n console.error('Detected division by zero in AnimatedDivision');\n this._warnedAboutDivideByZero = true;\n }\n // Passing infinity/NaN to Fabric will cause a native crash\n return 0;\n }\n this._warnedAboutDivideByZero = false;\n return a / b;\n }\n\n interpolate(\n config: InterpolationConfigType,\n ): AnimatedInterpolation {\n return new AnimatedInterpolation(this, config);\n }\n\n __attach(): void {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n\n __detach(): void {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n super.__detach();\n }\n\n __getNativeConfig(): any {\n return {\n type: 'division',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()],\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type {InterpolationConfigType} from './AnimatedInterpolation';\nimport type AnimatedNode from './AnimatedNode';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport default class AnimatedModulo extends AnimatedWithChildren {\n _a: AnimatedNode;\n _modulus: number;\n\n constructor(a: AnimatedNode, modulus: number) {\n super();\n this._a = a;\n this._modulus = modulus;\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this._a.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n\n __getValue(): number {\n return (\n ((this._a.__getValue() % this._modulus) + this._modulus) % this._modulus\n );\n }\n\n interpolate(\n config: InterpolationConfigType,\n ): AnimatedInterpolation {\n return new AnimatedInterpolation(this, config);\n }\n\n __attach(): void {\n this._a.__addChild(this);\n }\n\n __detach(): void {\n this._a.__removeChild(this);\n super.__detach();\n }\n\n __getNativeConfig(): any {\n return {\n type: 'modulus',\n input: this._a.__getNativeTag(),\n modulus: this._modulus,\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type {InterpolationConfigType} from './AnimatedInterpolation';\nimport type AnimatedNode from './AnimatedNode';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport default class AnimatedMultiplication extends AnimatedWithChildren {\n _a: AnimatedNode;\n _b: AnimatedNode;\n\n constructor(a: AnimatedNode | number, b: AnimatedNode | number) {\n super();\n this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this._a.__makeNative(platformConfig);\n this._b.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n\n __getValue(): number {\n return this._a.__getValue() * this._b.__getValue();\n }\n\n interpolate(\n config: InterpolationConfigType,\n ): AnimatedInterpolation {\n return new AnimatedInterpolation(this, config);\n }\n __attach(): void {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n\n __detach(): void {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n super.__detach();\n }\n\n __getNativeConfig(): any {\n return {\n type: 'multiplication',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()],\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type {InterpolationConfigType} from './AnimatedInterpolation';\nimport type AnimatedNode from './AnimatedNode';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nexport default class AnimatedSubtraction extends AnimatedWithChildren {\n _a: AnimatedNode;\n _b: AnimatedNode;\n\n constructor(a: AnimatedNode | number, b: AnimatedNode | number) {\n super();\n this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this._a.__makeNative(platformConfig);\n this._b.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n\n __getValue(): number {\n return this._a.__getValue() - this._b.__getValue();\n }\n\n interpolate(\n config: InterpolationConfigType,\n ): AnimatedInterpolation {\n return new AnimatedInterpolation(this, config);\n }\n\n __attach(): void {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n\n __detach(): void {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n super.__detach();\n }\n\n __getNativeConfig(): any {\n return {\n type: 'subtraction',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()],\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PlatformConfig} from '../AnimatedPlatformConfig';\nimport type {EndCallback} from '../animations/Animation';\nimport type AnimatedValue from './AnimatedValue';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport AnimatedNode from './AnimatedNode';\n\nexport default class AnimatedTracking extends AnimatedNode {\n _value: AnimatedValue;\n _parent: AnimatedNode;\n _callback: ?EndCallback;\n _animationConfig: Object;\n _animationClass: any;\n _useNativeDriver: boolean;\n\n constructor(\n value: AnimatedValue,\n parent: AnimatedNode,\n animationClass: any,\n animationConfig: Object,\n callback?: ?EndCallback,\n ) {\n super();\n this._value = value;\n this._parent = parent;\n this._animationClass = animationClass;\n this._animationConfig = animationConfig;\n this._useNativeDriver =\n NativeAnimatedHelper.shouldUseNativeDriver(animationConfig);\n this._callback = callback;\n this.__attach();\n }\n\n __makeNative(platformConfig: ?PlatformConfig) {\n this.__isNative = true;\n this._parent.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n this._value.__makeNative(platformConfig);\n }\n\n __getValue(): Object {\n return this._parent.__getValue();\n }\n\n __attach(): void {\n this._parent.__addChild(this);\n if (this._useNativeDriver) {\n // when the tracking starts we need to convert this node to a \"native node\"\n // so that the parent node will be made \"native\" too. This is necessary as\n // if we don't do this `update` method will get called. At that point it\n // may be too late as it would mean the JS driver has already started\n // updating node values\n let {platformConfig} = this._animationConfig;\n this.__makeNative(platformConfig);\n }\n }\n\n __detach(): void {\n this._parent.__removeChild(this);\n super.__detach();\n }\n\n update(): void {\n this._value.animate(\n new this._animationClass({\n ...this._animationConfig,\n toValue: (this._animationConfig.toValue: any).__getValue(),\n }),\n this._callback,\n );\n }\n\n __getNativeConfig(): any {\n const animation = new this._animationClass({\n ...this._animationConfig,\n // remove toValue from the config as it's a ref to Animated.Value\n toValue: undefined,\n });\n const animationConfig = animation.__getNativeAnimationConfig();\n return {\n type: 'tracking',\n animationId: NativeAnimatedHelper.generateNewAnimationId(),\n animationConfig,\n toValue: this._parent.__getNativeTag(),\n value: this._value.__getNativeTag(),\n };\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {Numeric as AnimatedNumeric} from './AnimatedImplementation';\nimport type {EndResult} from './animations/Animation';\nimport type {EndCallback} from './animations/Animation';\nimport type {DecayAnimationConfig} from './animations/DecayAnimation';\nimport type {SpringAnimationConfig} from './animations/SpringAnimation';\nimport type {TimingAnimationConfig} from './animations/TimingAnimation';\n\nimport {AnimatedEvent, attachNativeEvent} from './AnimatedEvent';\nimport AnimatedImplementation from './AnimatedImplementation';\nimport createAnimatedComponent from './createAnimatedComponent';\nimport AnimatedColor from './nodes/AnimatedColor';\nimport AnimatedInterpolation from './nodes/AnimatedInterpolation';\nimport AnimatedNode from './nodes/AnimatedNode';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\n\n/**\n * Animations are a source of flakiness in snapshot testing. This mock replaces\n * animation functions from AnimatedImplementation with empty animations for\n * predictability in tests. When possible the animation will run immediately\n * to the final state.\n */\n\n// Prevent any callback invocation from recursively triggering another\n// callback, which may trigger another animation\nlet inAnimationCallback = false;\nfunction mockAnimationStart(\n start: (callback?: ?EndCallback) => void,\n): (callback?: ?EndCallback) => void {\n return callback => {\n const guardedCallback =\n callback == null\n ? callback\n : (...args: Array) => {\n if (inAnimationCallback) {\n console.warn(\n 'Ignoring recursive animation callback when running mock animations',\n );\n return;\n }\n inAnimationCallback = true;\n try {\n callback(...args);\n } finally {\n inAnimationCallback = false;\n }\n };\n start(guardedCallback);\n };\n}\n\nexport type CompositeAnimation = {\n start: (callback?: ?EndCallback) => void,\n stop: () => void,\n reset: () => void,\n _startNativeLoop: (iterations?: number) => void,\n _isUsingNativeDriver: () => boolean,\n ...\n};\n\nconst emptyAnimation = {\n start: () => {},\n stop: () => {},\n reset: () => {},\n _startNativeLoop: () => {},\n _isUsingNativeDriver: () => {\n return false;\n },\n};\n\nconst mockCompositeAnimation = (\n animations: Array,\n): CompositeAnimation => ({\n ...emptyAnimation,\n start: mockAnimationStart((callback?: ?EndCallback): void => {\n animations.forEach(animation => animation.start());\n callback?.({finished: true});\n }),\n});\n\nconst spring = function (\n value: AnimatedValue | AnimatedValueXY | AnimatedColor,\n config: SpringAnimationConfig,\n): CompositeAnimation {\n const anyValue: any = value;\n return {\n ...emptyAnimation,\n start: mockAnimationStart((callback?: ?EndCallback): void => {\n anyValue.setValue(config.toValue);\n callback?.({finished: true});\n }),\n };\n};\n\nconst timing = function (\n value: AnimatedValue | AnimatedValueXY | AnimatedColor,\n config: TimingAnimationConfig,\n): CompositeAnimation {\n const anyValue: any = value;\n return {\n ...emptyAnimation,\n start: mockAnimationStart((callback?: ?EndCallback): void => {\n anyValue.setValue(config.toValue);\n callback?.({finished: true});\n }),\n };\n};\n\nconst decay = function (\n value: AnimatedValue | AnimatedValueXY | AnimatedColor,\n config: DecayAnimationConfig,\n): CompositeAnimation {\n return emptyAnimation;\n};\n\nconst sequence = function (\n animations: Array,\n): CompositeAnimation {\n return mockCompositeAnimation(animations);\n};\n\ntype ParallelConfig = {stopTogether?: boolean, ...};\nconst parallel = function (\n animations: Array,\n config?: ?ParallelConfig,\n): CompositeAnimation {\n return mockCompositeAnimation(animations);\n};\n\nconst delay = function (time: number): CompositeAnimation {\n return emptyAnimation;\n};\n\nconst stagger = function (\n time: number,\n animations: Array,\n): CompositeAnimation {\n return mockCompositeAnimation(animations);\n};\n\ntype LoopAnimationConfig = {\n iterations: number,\n resetBeforeIteration?: boolean,\n ...\n};\n\nconst loop = function (\n animation: CompositeAnimation,\n // $FlowFixMe[prop-missing]\n {iterations = -1}: LoopAnimationConfig = {},\n): CompositeAnimation {\n return emptyAnimation;\n};\n\nexport type {AnimatedNumeric as Numeric};\n\nexport default {\n Value: AnimatedValue,\n ValueXY: AnimatedValueXY,\n Color: AnimatedColor,\n Interpolation: AnimatedInterpolation,\n Node: AnimatedNode,\n decay,\n timing,\n spring,\n add: AnimatedImplementation.add,\n subtract: AnimatedImplementation.subtract,\n divide: AnimatedImplementation.divide,\n multiply: AnimatedImplementation.multiply,\n modulo: AnimatedImplementation.modulo,\n diffClamp: AnimatedImplementation.diffClamp,\n delay,\n sequence,\n parallel,\n stagger,\n loop,\n event: AnimatedImplementation.event,\n createAnimatedComponent,\n attachNativeEvent,\n forkEvent: AnimatedImplementation.forkEvent,\n unforkEvent: AnimatedImplementation.unforkEvent,\n Event: AnimatedEvent,\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {AnimatedComponentType} from '../createAnimatedComponent';\n\nimport FlatList from '../../Lists/FlatList';\nimport createAnimatedComponent from '../createAnimatedComponent';\nimport * as React from 'react';\n\nexport default (createAnimatedComponent(FlatList): AnimatedComponentType<\n React.ElementConfig,\n React.ElementRef,\n>);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport typeof ScrollViewNativeComponent from '../Components/ScrollView/ScrollViewNativeComponent';\nimport type {ViewStyleProp} from '../StyleSheet/StyleSheet';\nimport type {\n RenderItemProps,\n RenderItemType,\n ViewabilityConfigCallbackPair,\n ViewToken,\n} from '@react-native/virtualized-lists';\n\nimport * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';\nimport {type ScrollResponderType} from '../Components/ScrollView/ScrollView';\nimport {\n VirtualizedList,\n keyExtractor as defaultKeyExtractor,\n} from '@react-native/virtualized-lists';\nimport memoizeOne from 'memoize-one';\n\nconst View = require('../Components/View/View');\nconst StyleSheet = require('../StyleSheet/StyleSheet');\nconst deepDiffer = require('../Utilities/differ/deepDiffer');\nconst Platform = require('../Utilities/Platform');\nconst invariant = require('invariant');\nconst React = require('react');\n\ntype RequiredProps = {|\n /**\n * An array (or array-like list) of items to render. Other data types can be\n * used by targeting VirtualizedList directly.\n */\n data: ?$ReadOnly<$ArrayLike>,\n|};\ntype OptionalProps = {|\n /**\n * Takes an item from `data` and renders it into the list. Example usage:\n *\n * (\n * \n * )}\n * data={[{title: 'Title Text', key: 'item1'}]}\n * renderItem={({item, separators}) => (\n * this._onPress(item)}\n * onShowUnderlay={separators.highlight}\n * onHideUnderlay={separators.unhighlight}>\n * \n * {item.title}\n * \n * \n * )}\n * />\n *\n * Provides additional metadata like `index` if you need it, as well as a more generic\n * `separators.updateProps` function which let's you set whatever props you want to change the\n * rendering of either the leading separator or trailing separator in case the more common\n * `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for\n * your use-case.\n */\n renderItem?: ?RenderItemType,\n\n /**\n * Optional custom style for multi-item rows generated when numColumns > 1.\n */\n columnWrapperStyle?: ViewStyleProp,\n /**\n * A marker property for telling the list to re-render (since it implements `PureComponent`). If\n * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the\n * `data` prop, stick it here and treat it immutably.\n */\n extraData?: any,\n /**\n * `getItemLayout` is an optional optimizations that let us skip measurement of dynamic content if\n * you know the height of items a priori. `getItemLayout` is the most efficient, and is easy to\n * use if you have fixed height items, for example:\n *\n * getItemLayout={(data, index) => (\n * {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index}\n * )}\n *\n * Adding `getItemLayout` can be a great performance boost for lists of several hundred items.\n * Remember to include separator length (height or width) in your offset calculation if you\n * specify `ItemSeparatorComponent`.\n */\n getItemLayout?: (\n data: ?$ReadOnly<$ArrayLike>,\n index: number,\n ) => {\n length: number,\n offset: number,\n index: number,\n ...\n },\n /**\n * If true, renders items next to each other horizontally instead of stacked vertically.\n */\n horizontal?: ?boolean,\n /**\n * How many items to render in the initial batch. This should be enough to fill the screen but not\n * much more. Note these items will never be unmounted as part of the windowed rendering in order\n * to improve perceived performance of scroll-to-top actions.\n */\n initialNumToRender?: ?number,\n /**\n * Instead of starting at the top with the first item, start at `initialScrollIndex`. This\n * disables the \"scroll to top\" optimization that keeps the first `initialNumToRender` items\n * always rendered and immediately renders the items starting at this initial index. Requires\n * `getItemLayout` to be implemented.\n */\n initialScrollIndex?: ?number,\n /**\n * Reverses the direction of scroll. Uses scale transforms of -1.\n */\n inverted?: ?boolean,\n /**\n * Used to extract a unique key for a given item at the specified index. Key is used for caching\n * and as the react key to track item re-ordering. The default extractor checks `item.key`, then\n * falls back to using the index, like React does.\n */\n keyExtractor?: ?(item: ItemT, index: number) => string,\n /**\n * Multiple columns can only be rendered with `horizontal={false}` and will zig-zag like a\n * `flexWrap` layout. Items should all be the same height - masonry layouts are not supported.\n *\n * The default value is 1.\n */\n numColumns?: number,\n /**\n * Note: may have bugs (missing content) in some circumstances - use at your own risk.\n *\n * This may improve scroll performance for large lists.\n *\n * The default value is true for Android.\n */\n removeClippedSubviews?: boolean,\n /**\n * See `ScrollView` for flow type and further documentation.\n */\n fadingEdgeLength?: ?number,\n /**\n * Enable an optimization to memoize the item renderer to prevent unnecessary rerenders.\n */\n strictMode?: boolean,\n|};\n\n/**\n * Default Props Helper Functions\n * Use the following helper functions for default values\n */\n\n// removeClippedSubviewsOrDefault(this.props.removeClippedSubviews)\nfunction removeClippedSubviewsOrDefault(removeClippedSubviews: ?boolean) {\n if (ReactNativeFeatureFlags.shouldUseRemoveClippedSubviewsAsDefaultOnIOS()) {\n return removeClippedSubviews ?? true;\n } else {\n return removeClippedSubviews ?? Platform.OS === 'android';\n }\n}\n\n// numColumnsOrDefault(this.props.numColumns)\nfunction numColumnsOrDefault(numColumns: ?number) {\n return numColumns ?? 1;\n}\n\nfunction isArrayLike(data: mixed): boolean {\n // $FlowExpectedError[incompatible-use]\n return typeof Object(data).length === 'number';\n}\n\ntype FlatListProps = {|\n ...RequiredProps,\n ...OptionalProps,\n|};\n\ntype VirtualizedListProps = React.ElementConfig;\n\nexport type Props = {\n ...$Diff<\n VirtualizedListProps,\n {\n getItem: $PropertyType,\n getItemCount: $PropertyType,\n getItemLayout: $PropertyType,\n renderItem: $PropertyType,\n keyExtractor: $PropertyType,\n ...\n },\n >,\n ...FlatListProps,\n ...\n};\n\n/**\n * A performant interface for rendering simple, flat lists, supporting the most handy features:\n *\n * - Fully cross-platform.\n * - Optional horizontal mode.\n * - Configurable viewability callbacks.\n * - Header support.\n * - Footer support.\n * - Separator support.\n * - Pull to Refresh.\n * - Scroll loading.\n * - ScrollToIndex support.\n *\n * If you need section support, use [``](docs/sectionlist.html).\n *\n * Minimal Example:\n *\n * {item.key}}\n * />\n *\n * More complex, multi-select example demonstrating `PureComponent` usage for perf optimization and avoiding bugs.\n *\n * - By binding the `onPressItem` handler, the props will remain `===` and `PureComponent` will\n * prevent wasteful re-renders unless the actual `id`, `selected`, or `title` props change, even\n * if the components rendered in `MyListItem` did not have such optimizations.\n * - By passing `extraData={this.state}` to `FlatList` we make sure `FlatList` itself will re-render\n * when the `state.selected` changes. Without setting this prop, `FlatList` would not know it\n * needs to re-render any items because it is also a `PureComponent` and the prop comparison will\n * not show any changes.\n * - `keyExtractor` tells the list to use the `id`s for the react keys instead of the default `key` property.\n *\n *\n * class MyListItem extends React.PureComponent {\n * _onPress = () => {\n * this.props.onPressItem(this.props.id);\n * };\n *\n * render() {\n * const textColor = this.props.selected ? \"red\" : \"black\";\n * return (\n * \n * \n * \n * {this.props.title}\n * \n * \n * \n * );\n * }\n * }\n *\n * class MultiSelectList extends React.PureComponent {\n * state = {selected: (new Map(): Map)};\n *\n * _keyExtractor = (item, index) => item.id;\n *\n * _onPressItem = (id: string) => {\n * // updater functions are preferred for transactional updates\n * this.setState((state) => {\n * // copy the map rather than modifying state.\n * const selected = new Map(state.selected);\n * selected.set(id, !selected.get(id)); // toggle\n * return {selected};\n * });\n * };\n *\n * _renderItem = ({item}) => (\n * \n * );\n *\n * render() {\n * return (\n * \n * );\n * }\n * }\n *\n * This is a convenience wrapper around [``](docs/virtualizedlist.html),\n * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed\n * here, along with the following caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n * Also inherits [ScrollView Props](docs/scrollview.html#props), unless it is nested in another FlatList of same orientation.\n */\nclass FlatList extends React.PureComponent, void> {\n /**\n * Scrolls to the end of the content. May be janky without `getItemLayout` prop.\n */\n scrollToEnd(params?: ?{animated?: ?boolean, ...}) {\n if (this._listRef) {\n this._listRef.scrollToEnd(params);\n }\n }\n\n /**\n * Scrolls to the item at the specified index such that it is positioned in the viewable area\n * such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the\n * middle. `viewOffset` is a fixed number of pixels to offset the final target position.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n scrollToIndex(params: {\n animated?: ?boolean,\n index: number,\n viewOffset?: number,\n viewPosition?: number,\n ...\n }) {\n if (this._listRef) {\n this._listRef.scrollToIndex(params);\n }\n }\n\n /**\n * Requires linear scan through data - use `scrollToIndex` instead if possible.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n scrollToItem(params: {\n animated?: ?boolean,\n item: ItemT,\n viewOffset?: number,\n viewPosition?: number,\n ...\n }) {\n if (this._listRef) {\n this._listRef.scrollToItem(params);\n }\n }\n\n /**\n * Scroll to a specific content pixel offset in the list.\n *\n * Check out [scrollToOffset](docs/virtualizedlist.html#scrolltooffset) of VirtualizedList\n */\n scrollToOffset(params: {animated?: ?boolean, offset: number, ...}) {\n if (this._listRef) {\n this._listRef.scrollToOffset(params);\n }\n }\n\n /**\n * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.\n * if `waitForInteractions` is true and the user has not scrolled. This is typically called by\n * taps on items or by navigation actions.\n */\n recordInteraction() {\n if (this._listRef) {\n this._listRef.recordInteraction();\n }\n }\n\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n flashScrollIndicators() {\n if (this._listRef) {\n this._listRef.flashScrollIndicators();\n }\n }\n\n /**\n * Provides a handle to the underlying scroll responder.\n */\n getScrollResponder(): ?ScrollResponderType {\n if (this._listRef) {\n return this._listRef.getScrollResponder();\n }\n }\n\n /**\n * Provides a reference to the underlying host component\n */\n getNativeScrollRef():\n | ?React.ElementRef\n | ?React.ElementRef {\n if (this._listRef) {\n /* $FlowFixMe[incompatible-return] Suppresses errors found when fixing\n * TextInput typing */\n return this._listRef.getScrollRef();\n }\n }\n\n getScrollableNode(): any {\n if (this._listRef) {\n return this._listRef.getScrollableNode();\n }\n }\n\n setNativeProps(props: {[string]: mixed, ...}) {\n if (this._listRef) {\n this._listRef.setNativeProps(props);\n }\n }\n\n constructor(props: Props) {\n super(props);\n this._checkProps(this.props);\n if (this.props.viewabilityConfigCallbackPairs) {\n this._virtualizedListPairs =\n this.props.viewabilityConfigCallbackPairs.map(pair => ({\n viewabilityConfig: pair.viewabilityConfig,\n onViewableItemsChanged: this._createOnViewableItemsChanged(\n pair.onViewableItemsChanged,\n ),\n }));\n } else if (this.props.onViewableItemsChanged) {\n this._virtualizedListPairs.push({\n /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.63 was deployed. To\n * see the error delete this comment and run Flow. */\n viewabilityConfig: this.props.viewabilityConfig,\n onViewableItemsChanged: this._createOnViewableItemsChanged(\n // NOTE: we use a wrapper function to allow the actual callback to change\n // while still keeping the function provided to native to be stable\n (...args) => {\n invariant(\n this.props.onViewableItemsChanged,\n 'Changing the nullability of onViewableItemsChanged is not supported. ' +\n 'Once a function or null is supplied that cannot be changed.',\n );\n return this.props.onViewableItemsChanged(...args);\n },\n ),\n });\n }\n }\n\n // $FlowFixMe[missing-local-annot]\n componentDidUpdate(prevProps: Props) {\n invariant(\n prevProps.numColumns === this.props.numColumns,\n 'Changing numColumns on the fly is not supported. Change the key prop on FlatList when ' +\n 'changing the number of columns to force a fresh render of the component.',\n );\n invariant(\n (prevProps.onViewableItemsChanged == null) ===\n (this.props.onViewableItemsChanged == null),\n 'Changing onViewableItemsChanged nullability on the fly is not supported',\n );\n invariant(\n !deepDiffer(prevProps.viewabilityConfig, this.props.viewabilityConfig),\n 'Changing viewabilityConfig on the fly is not supported',\n );\n invariant(\n prevProps.viewabilityConfigCallbackPairs ===\n this.props.viewabilityConfigCallbackPairs,\n 'Changing viewabilityConfigCallbackPairs on the fly is not supported',\n );\n\n this._checkProps(this.props);\n }\n\n _listRef: ?React.ElementRef;\n _virtualizedListPairs: Array = [];\n\n _captureRef = (ref: ?React.ElementRef) => {\n this._listRef = ref;\n };\n\n // $FlowFixMe[missing-local-annot]\n _checkProps(props: Props) {\n const {\n // $FlowFixMe[prop-missing] this prop doesn't exist, is only used for an invariant\n getItem,\n // $FlowFixMe[prop-missing] this prop doesn't exist, is only used for an invariant\n getItemCount,\n horizontal,\n columnWrapperStyle,\n onViewableItemsChanged,\n viewabilityConfigCallbackPairs,\n } = props;\n const numColumns = numColumnsOrDefault(this.props.numColumns);\n invariant(\n !getItem && !getItemCount,\n 'FlatList does not support custom data formats.',\n );\n if (numColumns > 1) {\n invariant(!horizontal, 'numColumns does not support horizontal.');\n } else {\n invariant(\n !columnWrapperStyle,\n 'columnWrapperStyle not supported for single column lists',\n );\n }\n invariant(\n !(onViewableItemsChanged && viewabilityConfigCallbackPairs),\n 'FlatList does not support setting both onViewableItemsChanged and ' +\n 'viewabilityConfigCallbackPairs.',\n );\n }\n\n _getItem = (\n data: $ArrayLike,\n index: number,\n ): ?(ItemT | $ReadOnlyArray) => {\n const numColumns = numColumnsOrDefault(this.props.numColumns);\n if (numColumns > 1) {\n const ret = [];\n for (let kk = 0; kk < numColumns; kk++) {\n const itemIndex = index * numColumns + kk;\n if (itemIndex < data.length) {\n const item = data[itemIndex];\n ret.push(item);\n }\n }\n return ret;\n } else {\n return data[index];\n }\n };\n\n _getItemCount = (data: ?$ArrayLike): number => {\n // Legacy behavior of FlatList was to forward \"undefined\" length if invalid\n // data like a non-arraylike object is passed. VirtualizedList would then\n // coerce this, and the math would work out to no-op. For compatibility, if\n // invalid data is passed, we tell VirtualizedList there are zero items\n // available to prevent it from trying to read from the invalid data\n // (without propagating invalidly typed data).\n if (data != null && isArrayLike(data)) {\n const numColumns = numColumnsOrDefault(this.props.numColumns);\n return numColumns > 1 ? Math.ceil(data.length / numColumns) : data.length;\n } else {\n return 0;\n }\n };\n\n _keyExtractor = (items: ItemT | Array, index: number): string => {\n const numColumns = numColumnsOrDefault(this.props.numColumns);\n const keyExtractor = this.props.keyExtractor ?? defaultKeyExtractor;\n\n if (numColumns > 1) {\n invariant(\n Array.isArray(items),\n 'FlatList: Encountered internal consistency error, expected each item to consist of an ' +\n 'array with 1-%s columns; instead, received a single item.',\n numColumns,\n );\n return items\n .map((item, kk) =>\n keyExtractor(((item: $FlowFixMe): ItemT), index * numColumns + kk),\n )\n .join(':');\n }\n\n // $FlowFixMe[incompatible-call] Can't call keyExtractor with an array\n return keyExtractor(items, index);\n };\n\n _pushMultiColumnViewable(arr: Array, v: ViewToken): void {\n const numColumns = numColumnsOrDefault(this.props.numColumns);\n const keyExtractor = this.props.keyExtractor ?? defaultKeyExtractor;\n v.item.forEach((item, ii) => {\n invariant(v.index != null, 'Missing index!');\n const index = v.index * numColumns + ii;\n arr.push({...v, item, key: keyExtractor(item, index), index});\n });\n }\n\n _createOnViewableItemsChanged(\n onViewableItemsChanged: ?(info: {\n viewableItems: Array,\n changed: Array,\n ...\n }) => void,\n // $FlowFixMe[missing-local-annot]\n ) {\n return (info: {\n viewableItems: Array,\n changed: Array,\n ...\n }) => {\n const numColumns = numColumnsOrDefault(this.props.numColumns);\n if (onViewableItemsChanged) {\n if (numColumns > 1) {\n const changed: Array = [];\n const viewableItems: Array = [];\n info.viewableItems.forEach(v =>\n this._pushMultiColumnViewable(viewableItems, v),\n );\n info.changed.forEach(v => this._pushMultiColumnViewable(changed, v));\n onViewableItemsChanged({viewableItems, changed});\n } else {\n onViewableItemsChanged(info);\n }\n }\n };\n }\n\n _renderer = (\n ListItemComponent: ?(React.ComponentType | React.Element),\n renderItem: ?RenderItemType,\n columnWrapperStyle: ?ViewStyleProp,\n numColumns: ?number,\n extraData: ?any,\n // $FlowFixMe[missing-local-annot]\n ) => {\n const cols = numColumnsOrDefault(numColumns);\n\n const render = (props: RenderItemProps): React.Node => {\n if (ListItemComponent) {\n // $FlowFixMe[not-a-component] Component isn't valid\n // $FlowFixMe[incompatible-type-arg] Component isn't valid\n // $FlowFixMe[incompatible-return] Component isn't valid\n return ;\n } else if (renderItem) {\n // $FlowFixMe[incompatible-call]\n return renderItem(props);\n } else {\n return null;\n }\n };\n\n const renderProp = (info: RenderItemProps) => {\n if (cols > 1) {\n const {item, index} = info;\n invariant(\n Array.isArray(item),\n 'Expected array of items with numColumns > 1',\n );\n return (\n \n {item.map((it, kk) => {\n const element = render({\n // $FlowFixMe[incompatible-call]\n item: it,\n index: index * cols + kk,\n separators: info.separators,\n });\n return element != null ? (\n {element}\n ) : null;\n })}\n \n );\n } else {\n return render(info);\n }\n };\n\n return ListItemComponent\n ? {ListItemComponent: renderProp}\n : {renderItem: renderProp};\n };\n\n // $FlowFixMe[missing-local-annot]\n _memoizedRenderer = memoizeOne(this._renderer);\n\n render(): React.Node {\n const {\n numColumns,\n columnWrapperStyle,\n removeClippedSubviews: _removeClippedSubviews,\n strictMode = false,\n ...restProps\n } = this.props;\n\n const renderer = strictMode ? this._memoizedRenderer : this._renderer;\n\n return (\n // $FlowFixMe[incompatible-exact] - `restProps` (`Props`) is inexact.\n \n );\n }\n}\n\nconst styles = StyleSheet.create({\n row: {flexDirection: 'row'},\n});\n\nmodule.exports = FlatList;\n","'use strict';\n\nvar safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nmodule.exports = memoizeOne;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nimport typeof FillRateHelper from './Lists/FillRateHelper';\nimport typeof ViewabilityHelper from './Lists/ViewabilityHelper';\nimport typeof VirtualizedList from './Lists/VirtualizedList';\nimport typeof VirtualizedSectionList from './Lists/VirtualizedSectionList';\n\nimport {typeof VirtualizedListContextResetter} from './Lists/VirtualizedListContext';\nimport {keyExtractor} from './Lists/VirtualizeUtils';\n\nexport type {\n ViewToken,\n ViewabilityConfig,\n ViewabilityConfigCallbackPair,\n} from './Lists/ViewabilityHelper';\nexport type {\n CellRendererProps,\n RenderItemProps,\n RenderItemType,\n Separators,\n} from './Lists/VirtualizedListProps';\nexport type {\n Props as VirtualizedSectionListProps,\n ScrollToLocationParamsType,\n SectionBase,\n} from './Lists/VirtualizedSectionList';\nexport type {FillRateInfo} from './Lists/FillRateHelper';\n\nmodule.exports = {\n keyExtractor,\n\n get VirtualizedList(): VirtualizedList {\n return require('./Lists/VirtualizedList');\n },\n get VirtualizedSectionList(): VirtualizedSectionList {\n return require('./Lists/VirtualizedSectionList');\n },\n get VirtualizedListContextResetter(): VirtualizedListContextResetter {\n const VirtualizedListContext = require('./Lists/VirtualizedListContext');\n return VirtualizedListContext.VirtualizedListContextResetter;\n },\n get ViewabilityHelper(): ViewabilityHelper {\n return require('./Lists/ViewabilityHelper');\n },\n get FillRateHelper(): FillRateHelper {\n return require('./Lists/FillRateHelper');\n },\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type ListMetricsAggregator, {\n CellMetricProps,\n} from './ListMetricsAggregator';\n\n/**\n * Used to find the indices of the frames that overlap the given offsets. Useful for finding the\n * items that bound different windows of content, such as the visible area or the buffered overscan\n * area.\n */\nexport function elementsThatOverlapOffsets(\n offsets: Array,\n props: CellMetricProps,\n listMetrics: ListMetricsAggregator,\n zoomScale: number = 1,\n): Array {\n const itemCount = props.getItemCount(props.data);\n const result = [];\n for (let offsetIndex = 0; offsetIndex < offsets.length; offsetIndex++) {\n const currentOffset = offsets[offsetIndex];\n let left = 0;\n let right = itemCount - 1;\n\n while (left <= right) {\n const mid = left + Math.floor((right - left) / 2);\n const frame = listMetrics.getCellMetricsApprox(mid, props);\n const scaledOffsetStart = frame.offset * zoomScale;\n const scaledOffsetEnd = (frame.offset + frame.length) * zoomScale;\n\n // We want the first frame that contains the offset, with inclusive bounds. Thus, for the\n // first frame the scaledOffsetStart is inclusive, while for other frames it is exclusive.\n if (\n (mid === 0 && currentOffset < scaledOffsetStart) ||\n (mid !== 0 && currentOffset <= scaledOffsetStart)\n ) {\n right = mid - 1;\n } else if (currentOffset > scaledOffsetEnd) {\n left = mid + 1;\n } else {\n result[offsetIndex] = mid;\n break;\n }\n }\n }\n\n return result;\n}\n\n/**\n * Computes the number of elements in the `next` range that are new compared to the `prev` range.\n * Handy for calculating how many new items will be rendered when the render window changes so we\n * can restrict the number of new items render at once so that content can appear on the screen\n * faster.\n */\nexport function newRangeCount(\n prev: {\n first: number,\n last: number,\n ...\n },\n next: {\n first: number,\n last: number,\n ...\n },\n): number {\n return (\n next.last -\n next.first +\n 1 -\n Math.max(\n 0,\n 1 + Math.min(next.last, prev.last) - Math.max(next.first, prev.first),\n )\n );\n}\n\n/**\n * Custom logic for determining which items should be rendered given the current frame and scroll\n * metrics, as well as the previous render state. The algorithm may evolve over time, but generally\n * prioritizes the visible area first, then expands that with overscan regions ahead and behind,\n * biased in the direction of scroll.\n */\nexport function computeWindowedRenderLimits(\n props: CellMetricProps,\n maxToRenderPerBatch: number,\n windowSize: number,\n prev: {\n first: number,\n last: number,\n },\n listMetrics: ListMetricsAggregator,\n scrollMetrics: {\n dt: number,\n offset: number,\n velocity: number,\n visibleLength: number,\n zoomScale: number,\n ...\n },\n): {\n first: number,\n last: number,\n} {\n const itemCount = props.getItemCount(props.data);\n if (itemCount === 0) {\n return {first: 0, last: -1};\n }\n const {offset, velocity, visibleLength, zoomScale = 1} = scrollMetrics;\n\n // Start with visible area, then compute maximum overscan region by expanding from there, biased\n // in the direction of scroll. Total overscan area is capped, which should cap memory consumption\n // too.\n const visibleBegin = Math.max(0, offset);\n const visibleEnd = visibleBegin + visibleLength;\n const overscanLength = (windowSize - 1) * visibleLength;\n\n // Considering velocity seems to introduce more churn than it's worth.\n const leadFactor = 0.5; // Math.max(0, Math.min(1, velocity / 25 + 0.5));\n\n const fillPreference =\n velocity > 1 ? 'after' : velocity < -1 ? 'before' : 'none';\n\n const overscanBegin = Math.max(\n 0,\n visibleBegin - (1 - leadFactor) * overscanLength,\n );\n const overscanEnd = Math.max(0, visibleEnd + leadFactor * overscanLength);\n\n const lastItemOffset =\n listMetrics.getCellMetricsApprox(itemCount - 1, props).offset * zoomScale;\n if (lastItemOffset < overscanBegin) {\n // Entire list is before our overscan window\n return {\n first: Math.max(0, itemCount - 1 - maxToRenderPerBatch),\n last: itemCount - 1,\n };\n }\n\n // Find the indices that correspond to the items at the render boundaries we're targeting.\n let [overscanFirst, first, last, overscanLast] = elementsThatOverlapOffsets(\n [overscanBegin, visibleBegin, visibleEnd, overscanEnd],\n props,\n listMetrics,\n zoomScale,\n );\n overscanFirst = overscanFirst == null ? 0 : overscanFirst;\n first = first == null ? Math.max(0, overscanFirst) : first;\n overscanLast = overscanLast == null ? itemCount - 1 : overscanLast;\n last =\n last == null\n ? Math.min(overscanLast, first + maxToRenderPerBatch - 1)\n : last;\n const visible = {first, last};\n\n // We want to limit the number of new cells we're rendering per batch so that we can fill the\n // content on the screen quickly. If we rendered the entire overscan window at once, the user\n // could be staring at white space for a long time waiting for a bunch of offscreen content to\n // render.\n let newCellCount = newRangeCount(prev, visible);\n\n while (true) {\n if (first <= overscanFirst && last >= overscanLast) {\n // If we fill the entire overscan range, we're done.\n break;\n }\n const maxNewCells = newCellCount >= maxToRenderPerBatch;\n const firstWillAddMore = first <= prev.first || first > prev.last;\n const firstShouldIncrement =\n first > overscanFirst && (!maxNewCells || !firstWillAddMore);\n const lastWillAddMore = last >= prev.last || last < prev.first;\n const lastShouldIncrement =\n last < overscanLast && (!maxNewCells || !lastWillAddMore);\n if (maxNewCells && !firstShouldIncrement && !lastShouldIncrement) {\n // We only want to stop if we've hit maxNewCells AND we cannot increment first or last\n // without rendering new items. This let's us preserve as many already rendered items as\n // possible, reducing render churn and keeping the rendered overscan range as large as\n // possible.\n break;\n }\n if (\n firstShouldIncrement &&\n !(fillPreference === 'after' && lastShouldIncrement && lastWillAddMore)\n ) {\n if (firstWillAddMore) {\n newCellCount++;\n }\n first--;\n }\n if (\n lastShouldIncrement &&\n !(fillPreference === 'before' && firstShouldIncrement && firstWillAddMore)\n ) {\n if (lastWillAddMore) {\n newCellCount++;\n }\n last++;\n }\n }\n if (\n !(\n last >= first &&\n first >= 0 &&\n last < itemCount &&\n first >= overscanFirst &&\n last <= overscanLast &&\n first <= visible.first &&\n last >= visible.last\n )\n ) {\n throw new Error(\n 'Bad window calculation ' +\n JSON.stringify({\n first,\n last,\n itemCount,\n overscanFirst,\n overscanLast,\n visible,\n }),\n );\n }\n return {first, last};\n}\n\nexport function keyExtractor(item: any, index: number): string {\n if (typeof item === 'object' && item?.key != null) {\n return item.key;\n }\n if (typeof item === 'object' && item?.id != null) {\n return item.id;\n }\n return String(index);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {CellMetricProps, ListOrientation} from './ListMetricsAggregator';\nimport type {ViewToken} from './ViewabilityHelper';\nimport type {\n Item,\n Props,\n RenderItemProps,\n RenderItemType,\n Separators,\n} from './VirtualizedListProps';\nimport type {ScrollResponderType} from 'react-native/Libraries/Components/ScrollView/ScrollView';\nimport type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n LayoutEvent,\n ScrollEvent,\n} from 'react-native/Libraries/Types/CoreEventTypes';\n\nimport Batchinator from '../Interaction/Batchinator';\nimport clamp from '../Utilities/clamp';\nimport infoLog from '../Utilities/infoLog';\nimport {CellRenderMask} from './CellRenderMask';\nimport ChildListCollection from './ChildListCollection';\nimport FillRateHelper from './FillRateHelper';\nimport ListMetricsAggregator from './ListMetricsAggregator';\nimport StateSafePureComponent from './StateSafePureComponent';\nimport ViewabilityHelper from './ViewabilityHelper';\nimport CellRenderer from './VirtualizedListCellRenderer';\nimport {\n VirtualizedListCellContextProvider,\n VirtualizedListContext,\n VirtualizedListContextProvider,\n} from './VirtualizedListContext.js';\nimport {\n horizontalOrDefault,\n initialNumToRenderOrDefault,\n maxToRenderPerBatchOrDefault,\n onEndReachedThresholdOrDefault,\n onStartReachedThresholdOrDefault,\n windowSizeOrDefault,\n} from './VirtualizedListProps';\nimport {\n computeWindowedRenderLimits,\n keyExtractor as defaultKeyExtractor,\n} from './VirtualizeUtils';\nimport invariant from 'invariant';\nimport nullthrows from 'nullthrows';\nimport * as React from 'react';\nimport {\n I18nManager,\n Platform,\n RefreshControl,\n ScrollView,\n StyleSheet,\n View,\n findNodeHandle,\n} from 'react-native';\n\nexport type {RenderItemProps, RenderItemType, Separators};\n\nconst ON_EDGE_REACHED_EPSILON = 0.001;\n\nlet _usedIndexForKey = false;\nlet _keylessItemComponentName: string = '';\n\ntype ViewabilityHelperCallbackTuple = {\n viewabilityHelper: ViewabilityHelper,\n onViewableItemsChanged: (info: {\n viewableItems: Array,\n changed: Array,\n ...\n }) => void,\n ...\n};\n\ntype State = {\n renderMask: CellRenderMask,\n cellsAroundViewport: {first: number, last: number},\n // Used to track items added at the start of the list for maintainVisibleContentPosition.\n firstVisibleItemKey: ?string,\n // When > 0 the scroll position available in JS is considered stale and should not be used.\n pendingScrollUpdateCount: number,\n};\n\nfunction getScrollingThreshold(threshold: number, visibleLength: number) {\n return (threshold * visibleLength) / 2;\n}\n\n/**\n * Base implementation for the more convenient [``](https://reactnative.dev/docs/flatlist)\n * and [``](https://reactnative.dev/docs/sectionlist) components, which are also better\n * documented. In general, this should only really be used if you need more flexibility than\n * `FlatList` provides, e.g. for use with immutable data instead of plain arrays.\n *\n * Virtualization massively improves memory consumption and performance of large lists by\n * maintaining a finite render window of active items and replacing all items outside of the render\n * window with appropriately sized blank space. The window adapts to scrolling behavior, and items\n * are rendered incrementally with low-pri (after any running interactions) if they are far from the\n * visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.\n *\n * Some caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` or `id` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n * - As an effort to remove defaultProps, use helper functions when referencing certain props\n *\n */\nclass VirtualizedList extends StateSafePureComponent {\n static contextType: typeof VirtualizedListContext = VirtualizedListContext;\n\n // scrollToEnd may be janky without getItemLayout prop\n scrollToEnd(params?: ?{animated?: ?boolean, ...}) {\n const animated = params ? params.animated : true;\n const veryLast = this.props.getItemCount(this.props.data) - 1;\n if (veryLast < 0) {\n return;\n }\n const frame = this._listMetrics.getCellMetricsApprox(veryLast, this.props);\n const offset = Math.max(\n 0,\n frame.offset +\n frame.length +\n this._footerLength -\n this._scrollMetrics.visibleLength,\n );\n\n // TODO: consider using `ref.scrollToEnd` directly\n this.scrollToOffset({animated, offset});\n }\n\n // scrollToIndex may be janky without getItemLayout prop\n scrollToIndex(params: {\n animated?: ?boolean,\n index: number,\n viewOffset?: number,\n viewPosition?: number,\n ...\n }): $FlowFixMe {\n const {data, getItemCount, getItemLayout, onScrollToIndexFailed} =\n this.props;\n const {animated, index, viewOffset, viewPosition} = params;\n invariant(\n index >= 0,\n `scrollToIndex out of range: requested index ${index} but minimum is 0`,\n );\n invariant(\n getItemCount(data) >= 1,\n `scrollToIndex out of range: item length ${getItemCount(\n data,\n )} but minimum is 1`,\n );\n invariant(\n index < getItemCount(data),\n `scrollToIndex out of range: requested index ${index} is out of 0 to ${\n getItemCount(data) - 1\n }`,\n );\n if (\n !getItemLayout &&\n index > this._listMetrics.getHighestMeasuredCellIndex()\n ) {\n invariant(\n !!onScrollToIndexFailed,\n 'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' +\n 'otherwise there is no way to know the location of offscreen indices or handle failures.',\n );\n onScrollToIndexFailed({\n averageItemLength: this._listMetrics.getAverageCellLength(),\n highestMeasuredFrameIndex:\n this._listMetrics.getHighestMeasuredCellIndex(),\n index,\n });\n return;\n }\n const frame = this._listMetrics.getCellMetricsApprox(\n Math.floor(index),\n this.props,\n );\n const offset =\n Math.max(\n 0,\n this._listMetrics.getCellOffsetApprox(index, this.props) -\n (viewPosition || 0) *\n (this._scrollMetrics.visibleLength - frame.length),\n ) - (viewOffset || 0);\n\n this.scrollToOffset({offset, animated});\n }\n\n // scrollToItem may be janky without getItemLayout prop. Required linear scan through items -\n // use scrollToIndex instead if possible.\n scrollToItem(params: {\n animated?: ?boolean,\n item: Item,\n viewOffset?: number,\n viewPosition?: number,\n ...\n }) {\n const {item} = params;\n const {data, getItem, getItemCount} = this.props;\n const itemCount = getItemCount(data);\n for (let index = 0; index < itemCount; index++) {\n if (getItem(data, index) === item) {\n this.scrollToIndex({...params, index});\n break;\n }\n }\n }\n\n /**\n * Scroll to a specific content pixel offset in the list.\n *\n * Param `offset` expects the offset to scroll to.\n * In case of `horizontal` is true, the offset is the x-value,\n * in any other case the offset is the y-value.\n *\n * Param `animated` (`true` by default) defines whether the list\n * should do an animation while scrolling.\n */\n scrollToOffset(params: {animated?: ?boolean, offset: number, ...}) {\n const {animated, offset} = params;\n const scrollRef = this._scrollRef;\n\n if (scrollRef == null) {\n return;\n }\n\n if (scrollRef.scrollTo == null) {\n console.warn(\n 'No scrollTo method provided. This may be because you have two nested ' +\n 'VirtualizedLists with the same orientation, or because you are ' +\n 'using a custom component that does not implement scrollTo.',\n );\n return;\n }\n\n const {horizontal, rtl} = this._orientation();\n if (horizontal && rtl && !this._listMetrics.hasContentLength()) {\n console.warn(\n 'scrollToOffset may not be called in RTL before content is laid out',\n );\n return;\n }\n\n scrollRef.scrollTo({\n animated,\n ...this._scrollToParamsFromOffset(offset),\n });\n }\n\n _scrollToParamsFromOffset(offset: number): {x?: number, y?: number} {\n const {horizontal, rtl} = this._orientation();\n if (horizontal && rtl) {\n // Add the visible length of the scrollview so that the offset is right-aligned\n const cartOffset = this._listMetrics.cartesianOffset(\n offset + this._scrollMetrics.visibleLength,\n );\n return horizontal ? {x: cartOffset} : {y: cartOffset};\n } else {\n return horizontal ? {x: offset} : {y: offset};\n }\n }\n\n recordInteraction() {\n this._nestedChildLists.forEach(childList => {\n childList.recordInteraction();\n });\n this._viewabilityTuples.forEach(t => {\n t.viewabilityHelper.recordInteraction();\n });\n this._updateViewableItems(this.props, this.state.cellsAroundViewport);\n }\n\n flashScrollIndicators() {\n if (this._scrollRef == null) {\n return;\n }\n\n this._scrollRef.flashScrollIndicators();\n }\n\n /**\n * Provides a handle to the underlying scroll responder.\n * Note that `this._scrollRef` might not be a `ScrollView`, so we\n * need to check that it responds to `getScrollResponder` before calling it.\n */\n getScrollResponder(): ?ScrollResponderType {\n if (this._scrollRef && this._scrollRef.getScrollResponder) {\n return this._scrollRef.getScrollResponder();\n }\n }\n\n getScrollableNode(): ?number {\n if (this._scrollRef && this._scrollRef.getScrollableNode) {\n return this._scrollRef.getScrollableNode();\n } else {\n return findNodeHandle(this._scrollRef);\n }\n }\n\n getScrollRef():\n | ?React.ElementRef\n | ?React.ElementRef {\n if (this._scrollRef && this._scrollRef.getScrollRef) {\n return this._scrollRef.getScrollRef();\n } else {\n return this._scrollRef;\n }\n }\n\n setNativeProps(props: Object) {\n if (this._scrollRef) {\n this._scrollRef.setNativeProps(props);\n }\n }\n\n _getCellKey(): string {\n return this.context?.cellKey || 'rootList';\n }\n\n // $FlowFixMe[missing-local-annot]\n _getScrollMetrics = () => {\n return this._scrollMetrics;\n };\n\n hasMore(): boolean {\n return this._hasMore;\n }\n\n // $FlowFixMe[missing-local-annot]\n _getOutermostParentListRef = () => {\n if (this._isNestedWithSameOrientation()) {\n return this.context.getOutermostParentListRef();\n } else {\n return this;\n }\n };\n\n _registerAsNestedChild = (childList: {\n cellKey: string,\n ref: React.ElementRef,\n }): void => {\n this._nestedChildLists.add(childList.ref, childList.cellKey);\n if (this._hasInteracted) {\n childList.ref.recordInteraction();\n }\n };\n\n _unregisterAsNestedChild = (childList: {\n ref: React.ElementRef,\n }): void => {\n this._nestedChildLists.remove(childList.ref);\n };\n\n state: State;\n\n constructor(props: Props) {\n super(props);\n this._checkProps(props);\n\n this._fillRateHelper = new FillRateHelper(this._listMetrics);\n this._updateCellsToRenderBatcher = new Batchinator(\n this._updateCellsToRender,\n this.props.updateCellsBatchingPeriod ?? 50,\n );\n\n if (this.props.viewabilityConfigCallbackPairs) {\n this._viewabilityTuples = this.props.viewabilityConfigCallbackPairs.map(\n pair => ({\n viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig),\n onViewableItemsChanged: pair.onViewableItemsChanged,\n }),\n );\n } else {\n const {onViewableItemsChanged, viewabilityConfig} = this.props;\n if (onViewableItemsChanged) {\n this._viewabilityTuples.push({\n viewabilityHelper: new ViewabilityHelper(viewabilityConfig),\n onViewableItemsChanged: onViewableItemsChanged,\n });\n }\n }\n\n const initialRenderRegion = VirtualizedList._initialRenderRegion(props);\n\n const minIndexForVisible =\n this.props.maintainVisibleContentPosition?.minIndexForVisible ?? 0;\n\n this.state = {\n cellsAroundViewport: initialRenderRegion,\n renderMask: VirtualizedList._createRenderMask(props, initialRenderRegion),\n firstVisibleItemKey:\n this.props.getItemCount(this.props.data) > minIndexForVisible\n ? VirtualizedList._getItemKey(this.props, minIndexForVisible)\n : null,\n // When we have a non-zero initialScrollIndex, we will receive a\n // scroll event later so this will prevent the window from updating\n // until we get a valid offset.\n pendingScrollUpdateCount:\n this.props.initialScrollIndex != null &&\n this.props.initialScrollIndex > 0\n ? 1\n : 0,\n };\n }\n\n _checkProps(props: Props) {\n const {onScroll, windowSize, getItemCount, data, initialScrollIndex} =\n props;\n\n invariant(\n // $FlowFixMe[prop-missing]\n !onScroll || !onScroll.__isNative,\n 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' +\n 'to support native onScroll events with useNativeDriver',\n );\n invariant(\n windowSizeOrDefault(windowSize) > 0,\n 'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.',\n );\n\n invariant(\n getItemCount,\n 'VirtualizedList: The \"getItemCount\" prop must be provided',\n );\n\n const itemCount = getItemCount(data);\n\n if (\n initialScrollIndex != null &&\n !this._hasTriggeredInitialScrollToIndex &&\n (initialScrollIndex < 0 ||\n (itemCount > 0 && initialScrollIndex >= itemCount)) &&\n !this._hasWarned.initialScrollIndex\n ) {\n console.warn(\n `initialScrollIndex \"${initialScrollIndex}\" is not valid (list has ${itemCount} items)`,\n );\n this._hasWarned.initialScrollIndex = true;\n }\n\n if (__DEV__ && !this._hasWarned.flexWrap) {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n const flatStyles = StyleSheet.flatten(this.props.contentContainerStyle);\n if (flatStyles != null && flatStyles.flexWrap === 'wrap') {\n console.warn(\n '`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' +\n 'Consider using `numColumns` with `FlatList` instead.',\n );\n this._hasWarned.flexWrap = true;\n }\n }\n }\n\n static _findItemIndexWithKey(\n props: Props,\n key: string,\n hint: ?number,\n ): ?number {\n const itemCount = props.getItemCount(props.data);\n if (hint != null && hint >= 0 && hint < itemCount) {\n const curKey = VirtualizedList._getItemKey(props, hint);\n if (curKey === key) {\n return hint;\n }\n }\n for (let ii = 0; ii < itemCount; ii++) {\n const curKey = VirtualizedList._getItemKey(props, ii);\n if (curKey === key) {\n return ii;\n }\n }\n return null;\n }\n\n static _getItemKey(\n props: {\n data: Props['data'],\n getItem: Props['getItem'],\n keyExtractor: Props['keyExtractor'],\n ...\n },\n index: number,\n ): string {\n const item = props.getItem(props.data, index);\n return VirtualizedList._keyExtractor(item, index, props);\n }\n\n static _createRenderMask(\n props: Props,\n cellsAroundViewport: {first: number, last: number},\n additionalRegions?: ?$ReadOnlyArray<{first: number, last: number}>,\n ): CellRenderMask {\n const itemCount = props.getItemCount(props.data);\n\n invariant(\n cellsAroundViewport.first >= 0 &&\n cellsAroundViewport.last >= cellsAroundViewport.first - 1 &&\n cellsAroundViewport.last < itemCount,\n `Invalid cells around viewport \"[${cellsAroundViewport.first}, ${cellsAroundViewport.last}]\" was passed to VirtualizedList._createRenderMask`,\n );\n\n const renderMask = new CellRenderMask(itemCount);\n\n if (itemCount > 0) {\n const allRegions = [cellsAroundViewport, ...(additionalRegions ?? [])];\n for (const region of allRegions) {\n renderMask.addCells(region);\n }\n\n // The initially rendered cells are retained as part of the\n // \"scroll-to-top\" optimization\n if (props.initialScrollIndex == null || props.initialScrollIndex <= 0) {\n const initialRegion = VirtualizedList._initialRenderRegion(props);\n renderMask.addCells(initialRegion);\n }\n\n // The layout coordinates of sticker headers may be off-screen while the\n // actual header is on-screen. Keep the most recent before the viewport\n // rendered, even if its layout coordinates are not in viewport.\n const stickyIndicesSet = new Set(props.stickyHeaderIndices);\n VirtualizedList._ensureClosestStickyHeader(\n props,\n stickyIndicesSet,\n renderMask,\n cellsAroundViewport.first,\n );\n }\n\n return renderMask;\n }\n\n static _initialRenderRegion(props: Props): {first: number, last: number} {\n const itemCount = props.getItemCount(props.data);\n\n const firstCellIndex = Math.max(\n 0,\n Math.min(itemCount - 1, Math.floor(props.initialScrollIndex ?? 0)),\n );\n\n const lastCellIndex =\n Math.min(\n itemCount,\n firstCellIndex + initialNumToRenderOrDefault(props.initialNumToRender),\n ) - 1;\n\n return {\n first: firstCellIndex,\n last: lastCellIndex,\n };\n }\n\n static _ensureClosestStickyHeader(\n props: Props,\n stickyIndicesSet: Set,\n renderMask: CellRenderMask,\n cellIdx: number,\n ) {\n const stickyOffset = props.ListHeaderComponent ? 1 : 0;\n\n for (let itemIdx = cellIdx - 1; itemIdx >= 0; itemIdx--) {\n if (stickyIndicesSet.has(itemIdx + stickyOffset)) {\n renderMask.addCells({first: itemIdx, last: itemIdx});\n break;\n }\n }\n }\n\n _adjustCellsAroundViewport(\n props: Props,\n cellsAroundViewport: {first: number, last: number},\n pendingScrollUpdateCount: number,\n ): {first: number, last: number} {\n const {data, getItemCount} = props;\n const onEndReachedThreshold = onEndReachedThresholdOrDefault(\n props.onEndReachedThreshold,\n );\n const {offset, visibleLength} = this._scrollMetrics;\n const contentLength = this._listMetrics.getContentLength();\n const distanceFromEnd = contentLength - visibleLength - offset;\n\n // Wait until the scroll view metrics have been set up. And until then,\n // we will trust the initialNumToRender suggestion\n if (visibleLength <= 0 || contentLength <= 0) {\n return cellsAroundViewport.last >= getItemCount(data)\n ? VirtualizedList._constrainToItemCount(cellsAroundViewport, props)\n : cellsAroundViewport;\n }\n\n let newCellsAroundViewport: {first: number, last: number};\n if (props.disableVirtualization) {\n const renderAhead =\n distanceFromEnd < onEndReachedThreshold * visibleLength\n ? maxToRenderPerBatchOrDefault(props.maxToRenderPerBatch)\n : 0;\n\n newCellsAroundViewport = {\n first: 0,\n last: Math.min(\n cellsAroundViewport.last + renderAhead,\n getItemCount(data) - 1,\n ),\n };\n } else {\n // If we have a pending scroll update, we should not adjust the render window as it\n // might override the correct window.\n if (pendingScrollUpdateCount > 0) {\n return cellsAroundViewport.last >= getItemCount(data)\n ? VirtualizedList._constrainToItemCount(cellsAroundViewport, props)\n : cellsAroundViewport;\n }\n\n newCellsAroundViewport = computeWindowedRenderLimits(\n props,\n maxToRenderPerBatchOrDefault(props.maxToRenderPerBatch),\n windowSizeOrDefault(props.windowSize),\n cellsAroundViewport,\n this._listMetrics,\n this._scrollMetrics,\n );\n invariant(\n newCellsAroundViewport.last < getItemCount(data),\n 'computeWindowedRenderLimits() should return range in-bounds',\n );\n }\n\n if (this._nestedChildLists.size() > 0) {\n // If some cell in the new state has a child list in it, we should only render\n // up through that item, so that we give that list a chance to render.\n // Otherwise there's churn from multiple child lists mounting and un-mounting\n // their items.\n\n // Will this prevent rendering if the nested list doesn't realize the end?\n const childIdx = this._findFirstChildWithMore(\n newCellsAroundViewport.first,\n newCellsAroundViewport.last,\n );\n\n newCellsAroundViewport.last = childIdx ?? newCellsAroundViewport.last;\n }\n\n return newCellsAroundViewport;\n }\n\n _findFirstChildWithMore(first: number, last: number): number | null {\n for (let ii = first; ii <= last; ii++) {\n const cellKeyForIndex = this._indicesToKeys.get(ii);\n if (\n cellKeyForIndex != null &&\n this._nestedChildLists.anyInCell(cellKeyForIndex, childList =>\n childList.hasMore(),\n )\n ) {\n return ii;\n }\n }\n\n return null;\n }\n\n componentDidMount() {\n if (this._isNestedWithSameOrientation()) {\n this.context.registerAsNestedChild({\n ref: this,\n cellKey: this.context.cellKey,\n });\n }\n }\n\n componentWillUnmount() {\n if (this._isNestedWithSameOrientation()) {\n this.context.unregisterAsNestedChild({ref: this});\n }\n this._updateCellsToRenderBatcher.dispose({abort: true});\n this._viewabilityTuples.forEach(tuple => {\n tuple.viewabilityHelper.dispose();\n });\n this._fillRateHelper.deactivateAndFlush();\n }\n\n static getDerivedStateFromProps(newProps: Props, prevState: State): State {\n // first and last could be stale (e.g. if a new, shorter items props is passed in), so we make\n // sure we're rendering a reasonable range here.\n const itemCount = newProps.getItemCount(newProps.data);\n if (itemCount === prevState.renderMask.numCells()) {\n return prevState;\n }\n\n let maintainVisibleContentPositionAdjustment: ?number = null;\n const prevFirstVisibleItemKey = prevState.firstVisibleItemKey;\n const minIndexForVisible =\n newProps.maintainVisibleContentPosition?.minIndexForVisible ?? 0;\n const newFirstVisibleItemKey =\n newProps.getItemCount(newProps.data) > minIndexForVisible\n ? VirtualizedList._getItemKey(newProps, minIndexForVisible)\n : null;\n if (\n newProps.maintainVisibleContentPosition != null &&\n prevFirstVisibleItemKey != null &&\n newFirstVisibleItemKey != null\n ) {\n if (newFirstVisibleItemKey !== prevFirstVisibleItemKey) {\n // Fast path if items were added at the start of the list.\n const hint =\n itemCount - prevState.renderMask.numCells() + minIndexForVisible;\n const firstVisibleItemIndex = VirtualizedList._findItemIndexWithKey(\n newProps,\n prevFirstVisibleItemKey,\n hint,\n );\n maintainVisibleContentPositionAdjustment =\n firstVisibleItemIndex != null\n ? firstVisibleItemIndex - minIndexForVisible\n : null;\n } else {\n maintainVisibleContentPositionAdjustment = null;\n }\n }\n\n const constrainedCells = VirtualizedList._constrainToItemCount(\n maintainVisibleContentPositionAdjustment != null\n ? {\n first:\n prevState.cellsAroundViewport.first +\n maintainVisibleContentPositionAdjustment,\n last:\n prevState.cellsAroundViewport.last +\n maintainVisibleContentPositionAdjustment,\n }\n : prevState.cellsAroundViewport,\n newProps,\n );\n\n return {\n cellsAroundViewport: constrainedCells,\n renderMask: VirtualizedList._createRenderMask(newProps, constrainedCells),\n firstVisibleItemKey: newFirstVisibleItemKey,\n pendingScrollUpdateCount:\n maintainVisibleContentPositionAdjustment != null\n ? prevState.pendingScrollUpdateCount + 1\n : prevState.pendingScrollUpdateCount,\n };\n }\n\n _pushCells(\n cells: Array,\n stickyHeaderIndices: Array,\n stickyIndicesFromProps: Set,\n first: number,\n last: number,\n inversionStyle: ViewStyleProp,\n ) {\n const {\n CellRendererComponent,\n ItemSeparatorComponent,\n ListHeaderComponent,\n ListItemComponent,\n data,\n debug,\n getItem,\n getItemCount,\n getItemLayout,\n horizontal,\n renderItem,\n } = this.props;\n const stickyOffset = ListHeaderComponent ? 1 : 0;\n const end = getItemCount(data) - 1;\n let prevCellKey;\n last = Math.min(end, last);\n\n for (let ii = first; ii <= last; ii++) {\n const item = getItem(data, ii);\n const key = VirtualizedList._keyExtractor(item, ii, this.props);\n\n this._indicesToKeys.set(ii, key);\n if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n stickyHeaderIndices.push(cells.length);\n }\n\n const shouldListenForLayout =\n getItemLayout == null || debug || this._fillRateHelper.enabled();\n\n cells.push(\n {\n this._cellRefs[key] = ref;\n }}\n renderItem={renderItem}\n {...(shouldListenForLayout && {\n onCellLayout: this._onCellLayout,\n })}\n />,\n );\n prevCellKey = key;\n }\n }\n\n static _constrainToItemCount(\n cells: {first: number, last: number},\n props: Props,\n ): {first: number, last: number} {\n const itemCount = props.getItemCount(props.data);\n const lastPossibleCellIndex = itemCount - 1;\n\n // Constraining `last` may significantly shrink the window. Adjust `first`\n // to expand the window if the new `last` results in a new window smaller\n // than the number of cells rendered per batch.\n const maxToRenderPerBatch = maxToRenderPerBatchOrDefault(\n props.maxToRenderPerBatch,\n );\n const maxFirst = Math.max(0, lastPossibleCellIndex - maxToRenderPerBatch);\n\n return {\n first: clamp(0, cells.first, maxFirst),\n last: Math.min(lastPossibleCellIndex, cells.last),\n };\n }\n\n _onUpdateSeparators = (keys: Array, newProps: Object) => {\n keys.forEach(key => {\n const ref = key != null && this._cellRefs[key];\n ref && ref.updateSeparatorProps(newProps);\n });\n };\n\n _isNestedWithSameOrientation(): boolean {\n const nestedContext = this.context;\n return !!(\n nestedContext &&\n !!nestedContext.horizontal === horizontalOrDefault(this.props.horizontal)\n );\n }\n\n _getSpacerKey = (isVertical: boolean): string =>\n isVertical ? 'height' : 'width';\n\n static _keyExtractor(\n item: Item,\n index: number,\n props: {\n keyExtractor?: ?(item: Item, index: number) => string,\n ...\n },\n ): string {\n if (props.keyExtractor != null) {\n return props.keyExtractor(item, index);\n }\n\n const key = defaultKeyExtractor(item, index);\n if (key === String(index)) {\n _usedIndexForKey = true;\n if (item.type && item.type.displayName) {\n _keylessItemComponentName = item.type.displayName;\n }\n }\n return key;\n }\n\n render(): React.Node {\n this._checkProps(this.props);\n const {ListEmptyComponent, ListFooterComponent, ListHeaderComponent} =\n this.props;\n const {data, horizontal} = this.props;\n const inversionStyle = this.props.inverted\n ? horizontalOrDefault(this.props.horizontal)\n ? styles.horizontallyInverted\n : styles.verticallyInverted\n : null;\n const cells: Array = [];\n const stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);\n const stickyHeaderIndices = [];\n\n // 1. Add cell for ListHeaderComponent\n if (ListHeaderComponent) {\n if (stickyIndicesFromProps.has(0)) {\n stickyHeaderIndices.push(0);\n }\n const element = React.isValidElement(ListHeaderComponent) ? (\n ListHeaderComponent\n ) : (\n // $FlowFixMe[not-a-component]\n // $FlowFixMe[incompatible-type-arg]\n \n );\n cells.push(\n \n \n {\n // $FlowFixMe[incompatible-type] - Typing ReactNativeComponent revealed errors\n element\n }\n \n ,\n );\n }\n\n // 2a. Add a cell for ListEmptyComponent if applicable\n const itemCount = this.props.getItemCount(data);\n if (itemCount === 0 && ListEmptyComponent) {\n const element: React.Element = ((React.isValidElement(\n ListEmptyComponent,\n ) ? (\n ListEmptyComponent\n ) : (\n // $FlowFixMe[not-a-component]\n // $FlowFixMe[incompatible-type-arg]\n \n )): any);\n cells.push(\n \n {React.cloneElement(element, {\n onLayout: (event: LayoutEvent) => {\n this._onLayoutEmpty(event);\n // $FlowFixMe[prop-missing] React.Element internal inspection\n if (element.props.onLayout) {\n element.props.onLayout(event);\n }\n },\n // $FlowFixMe[prop-missing] React.Element internal inspection\n style: StyleSheet.compose(inversionStyle, element.props.style),\n })}\n ,\n );\n }\n\n // 2b. Add cells and spacers for each item\n if (itemCount > 0) {\n _usedIndexForKey = false;\n _keylessItemComponentName = '';\n const spacerKey = this._getSpacerKey(!horizontal);\n\n const renderRegions = this.state.renderMask.enumerateRegions();\n const lastRegion = renderRegions[renderRegions.length - 1];\n const lastSpacer = lastRegion?.isSpacer ? lastRegion : null;\n\n for (const section of renderRegions) {\n if (section.isSpacer) {\n // Legacy behavior is to avoid spacers when virtualization is\n // disabled (including head spacers on initial render).\n if (this.props.disableVirtualization) {\n continue;\n }\n\n // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to\n // prevent the user for hyperscrolling into un-measured area because otherwise content will\n // likely jump around as it renders in above the viewport.\n const isLastSpacer = section === lastSpacer;\n const constrainToMeasured = isLastSpacer && !this.props.getItemLayout;\n const last = constrainToMeasured\n ? clamp(\n section.first - 1,\n section.last,\n this._listMetrics.getHighestMeasuredCellIndex(),\n )\n : section.last;\n\n const firstMetrics = this._listMetrics.getCellMetricsApprox(\n section.first,\n this.props,\n );\n const lastMetrics = this._listMetrics.getCellMetricsApprox(\n last,\n this.props,\n );\n const spacerSize =\n lastMetrics.offset + lastMetrics.length - firstMetrics.offset;\n cells.push(\n ,\n );\n } else {\n this._pushCells(\n cells,\n stickyHeaderIndices,\n stickyIndicesFromProps,\n section.first,\n section.last,\n inversionStyle,\n );\n }\n }\n\n if (!this._hasWarned.keys && _usedIndexForKey) {\n console.warn(\n 'VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' +\n 'item or provide a custom keyExtractor.',\n _keylessItemComponentName,\n );\n this._hasWarned.keys = true;\n }\n }\n\n // 3. Add cell for ListFooterComponent\n if (ListFooterComponent) {\n const element = React.isValidElement(ListFooterComponent) ? (\n ListFooterComponent\n ) : (\n // $FlowFixMe[not-a-component]\n // $FlowFixMe[incompatible-type-arg]\n \n );\n cells.push(\n \n \n {\n // $FlowFixMe[incompatible-type] - Typing ReactNativeComponent revealed errors\n element\n }\n \n ,\n );\n }\n\n // 4. Render the ScrollView\n const scrollProps = {\n ...this.props,\n onContentSizeChange: this._onContentSizeChange,\n onLayout: this._onLayout,\n onScroll: this._onScroll,\n onScrollBeginDrag: this._onScrollBeginDrag,\n onScrollEndDrag: this._onScrollEndDrag,\n onMomentumScrollBegin: this._onMomentumScrollBegin,\n onMomentumScrollEnd: this._onMomentumScrollEnd,\n // iOS/macOS requires a non-zero scrollEventThrottle to fire more than a\n // single notification while scrolling. This will otherwise no-op.\n scrollEventThrottle: this.props.scrollEventThrottle ?? 0.0001,\n invertStickyHeaders:\n this.props.invertStickyHeaders !== undefined\n ? this.props.invertStickyHeaders\n : this.props.inverted,\n stickyHeaderIndices,\n style: inversionStyle\n ? [inversionStyle, this.props.style]\n : this.props.style,\n isInvertedVirtualizedList: this.props.inverted,\n maintainVisibleContentPosition:\n this.props.maintainVisibleContentPosition != null\n ? {\n ...this.props.maintainVisibleContentPosition,\n // Adjust index to account for ListHeaderComponent.\n minIndexForVisible:\n this.props.maintainVisibleContentPosition.minIndexForVisible +\n (this.props.ListHeaderComponent ? 1 : 0),\n }\n : undefined,\n };\n\n this._hasMore = this.state.cellsAroundViewport.last < itemCount - 1;\n\n const innerRet = (\n \n {React.cloneElement(\n (\n this.props.renderScrollComponent ||\n this._defaultRenderScrollComponent\n )(scrollProps),\n {\n ref: this._captureScrollRef,\n },\n cells,\n )}\n \n );\n let ret: React.Node = innerRet;\n if (__DEV__) {\n ret = (\n \n {scrollContext => {\n if (\n scrollContext != null &&\n !scrollContext.horizontal ===\n !horizontalOrDefault(this.props.horizontal) &&\n !this._hasWarned.nesting &&\n this.context == null &&\n this.props.scrollEnabled !== false\n ) {\n console.error(\n 'VirtualizedLists should never be nested inside plain ScrollViews with the same ' +\n 'orientation because it can break windowing and other functionality - use another ' +\n 'VirtualizedList-backed container instead.',\n );\n this._hasWarned.nesting = true;\n }\n return innerRet;\n }}\n \n );\n }\n if (this.props.debug) {\n return (\n \n {ret}\n {this._renderDebugOverlay()}\n \n );\n } else {\n return ret;\n }\n }\n\n componentDidUpdate(prevProps: Props) {\n const {data, extraData} = this.props;\n if (data !== prevProps.data || extraData !== prevProps.extraData) {\n // clear the viewableIndices cache to also trigger\n // the onViewableItemsChanged callback with the new data\n this._viewabilityTuples.forEach(tuple => {\n tuple.viewabilityHelper.resetViewableIndices();\n });\n }\n // The `this._hiPriInProgress` is guaranteeing a hiPri cell update will only happen\n // once per fiber update. The `_scheduleCellsToRenderUpdate` will set it to true\n // if a hiPri update needs to perform. If `componentDidUpdate` is triggered with\n // `this._hiPriInProgress=true`, means it's triggered by the hiPri update. The\n // `_scheduleCellsToRenderUpdate` will check this condition and not perform\n // another hiPri update.\n const hiPriInProgress = this._hiPriInProgress;\n this._scheduleCellsToRenderUpdate();\n // Make sure setting `this._hiPriInProgress` back to false after `componentDidUpdate`\n // is triggered with `this._hiPriInProgress = true`\n if (hiPriInProgress) {\n this._hiPriInProgress = false;\n }\n }\n\n _cellRefs: {[string]: null | CellRenderer} = {};\n _fillRateHelper: FillRateHelper;\n _listMetrics: ListMetricsAggregator = new ListMetricsAggregator();\n _footerLength = 0;\n // Used for preventing scrollToIndex from being called multiple times for initialScrollIndex\n _hasTriggeredInitialScrollToIndex = false;\n _hasInteracted = false;\n _hasMore = false;\n _hasWarned: {[string]: boolean} = {};\n _headerLength = 0;\n _hiPriInProgress: boolean = false; // flag to prevent infinite hiPri cell limit update\n _indicesToKeys: Map = new Map();\n _lastFocusedCellKey: ?string = null;\n _nestedChildLists: ChildListCollection =\n new ChildListCollection();\n _offsetFromParentVirtualizedList: number = 0;\n _pendingViewabilityUpdate: boolean = false;\n _prevParentOffset: number = 0;\n _scrollMetrics: {\n dOffset: number,\n dt: number,\n offset: number,\n timestamp: number,\n velocity: number,\n visibleLength: number,\n zoomScale: number,\n } = {\n dOffset: 0,\n dt: 10,\n offset: 0,\n timestamp: 0,\n velocity: 0,\n visibleLength: 0,\n zoomScale: 1,\n };\n _scrollRef: ?React.ElementRef = null;\n _sentStartForContentLength = 0;\n _sentEndForContentLength = 0;\n _updateCellsToRenderBatcher: Batchinator;\n _viewabilityTuples: Array = [];\n\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n _captureScrollRef = ref => {\n this._scrollRef = ref;\n };\n\n _computeBlankness() {\n this._fillRateHelper.computeBlankness(\n this.props,\n this.state.cellsAroundViewport,\n this._scrollMetrics,\n );\n }\n\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n _defaultRenderScrollComponent = props => {\n const onRefresh = props.onRefresh;\n if (this._isNestedWithSameOrientation()) {\n // Prevent VirtualizedList._onContentSizeChange from being triggered by a bubbling onContentSizeChange event.\n // This could lead to internal inconsistencies within VirtualizedList.\n const {onContentSizeChange, ...otherProps} = props;\n return ;\n } else if (onRefresh) {\n invariant(\n typeof props.refreshing === 'boolean',\n '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' +\n JSON.stringify(props.refreshing ?? 'undefined') +\n '`',\n );\n return (\n // $FlowFixMe[prop-missing] Invalid prop usage\n // $FlowFixMe[incompatible-use]\n \n ) : (\n props.refreshControl\n )\n }\n />\n );\n } else {\n // $FlowFixMe[prop-missing] Invalid prop usage\n // $FlowFixMe[incompatible-use]\n return ;\n }\n };\n\n _onCellLayout = (\n e: LayoutEvent,\n cellKey: string,\n cellIndex: number,\n ): void => {\n const layoutHasChanged = this._listMetrics.notifyCellLayout({\n cellIndex,\n cellKey,\n layout: e.nativeEvent.layout,\n orientation: this._orientation(),\n });\n\n if (layoutHasChanged) {\n this._scheduleCellsToRenderUpdate();\n }\n\n this._triggerRemeasureForChildListsInCell(cellKey);\n this._computeBlankness();\n this._updateViewableItems(this.props, this.state.cellsAroundViewport);\n };\n\n _onCellFocusCapture = (cellKey: string) => {\n this._lastFocusedCellKey = cellKey;\n this._updateCellsToRender();\n };\n\n _onCellUnmount = (cellKey: string) => {\n delete this._cellRefs[cellKey];\n this._listMetrics.notifyCellUnmounted(cellKey);\n };\n\n _triggerRemeasureForChildListsInCell(cellKey: string): void {\n this._nestedChildLists.forEachInCell(cellKey, childList => {\n childList.measureLayoutRelativeToContainingList();\n });\n }\n\n measureLayoutRelativeToContainingList(): void {\n // TODO (T35574538): findNodeHandle sometimes crashes with \"Unable to find\n // node on an unmounted component\" during scrolling\n try {\n if (!this._scrollRef) {\n return;\n }\n // We are assuming that getOutermostParentListRef().getScrollRef()\n // is a non-null reference to a ScrollView\n this._scrollRef.measureLayout(\n this.context.getOutermostParentListRef().getScrollRef(),\n (x, y, width, height) => {\n this._offsetFromParentVirtualizedList = this._selectOffset({x, y});\n this._listMetrics.notifyListContentLayout({\n layout: {width, height},\n orientation: this._orientation(),\n });\n const scrollMetrics = this._convertParentScrollMetrics(\n this.context.getScrollMetrics(),\n );\n\n const metricsChanged =\n this._scrollMetrics.visibleLength !== scrollMetrics.visibleLength ||\n this._scrollMetrics.offset !== scrollMetrics.offset;\n\n if (metricsChanged) {\n this._scrollMetrics.visibleLength = scrollMetrics.visibleLength;\n this._scrollMetrics.offset = scrollMetrics.offset;\n\n // If metrics of the scrollView changed, then we triggered remeasure for child list\n // to ensure VirtualizedList has the right information.\n this._nestedChildLists.forEach(childList => {\n childList.measureLayoutRelativeToContainingList();\n });\n }\n },\n error => {\n console.warn(\n \"VirtualizedList: Encountered an error while measuring a list's\" +\n ' offset from its containing VirtualizedList.',\n );\n },\n );\n } catch (error) {\n console.warn(\n 'measureLayoutRelativeToContainingList threw an error',\n error.stack,\n );\n }\n }\n\n _onLayout = (e: LayoutEvent) => {\n if (this._isNestedWithSameOrientation()) {\n // Need to adjust our scroll metrics to be relative to our containing\n // VirtualizedList before we can make claims about list item viewability\n this.measureLayoutRelativeToContainingList();\n } else {\n this._scrollMetrics.visibleLength = this._selectLength(\n e.nativeEvent.layout,\n );\n }\n this.props.onLayout && this.props.onLayout(e);\n this._scheduleCellsToRenderUpdate();\n this._maybeCallOnEdgeReached();\n };\n\n _onLayoutEmpty = (e: LayoutEvent) => {\n this.props.onLayout && this.props.onLayout(e);\n };\n\n _getFooterCellKey(): string {\n return this._getCellKey() + '-footer';\n }\n\n _onLayoutFooter = (e: LayoutEvent) => {\n this._triggerRemeasureForChildListsInCell(this._getFooterCellKey());\n this._footerLength = this._selectLength(e.nativeEvent.layout);\n };\n\n _onLayoutHeader = (e: LayoutEvent) => {\n this._headerLength = this._selectLength(e.nativeEvent.layout);\n };\n\n // $FlowFixMe[missing-local-annot]\n _renderDebugOverlay() {\n const normalize =\n this._scrollMetrics.visibleLength /\n (this._listMetrics.getContentLength() || 1);\n const framesInLayout = [];\n const itemCount = this.props.getItemCount(this.props.data);\n for (let ii = 0; ii < itemCount; ii++) {\n const frame = this._listMetrics.getCellMetricsApprox(ii, this.props);\n if (frame.isMounted) {\n framesInLayout.push(frame);\n }\n }\n const windowTop = this._listMetrics.getCellMetricsApprox(\n this.state.cellsAroundViewport.first,\n this.props,\n ).offset;\n const frameLast = this._listMetrics.getCellMetricsApprox(\n this.state.cellsAroundViewport.last,\n this.props,\n );\n const windowLen = frameLast.offset + frameLast.length - windowTop;\n const visTop = this._scrollMetrics.offset;\n const visLen = this._scrollMetrics.visibleLength;\n\n return (\n \n {framesInLayout.map((f, ii) => (\n \n ))}\n \n \n \n );\n }\n\n _selectLength(\n metrics: $ReadOnly<{\n height: number,\n width: number,\n ...\n }>,\n ): number {\n return !horizontalOrDefault(this.props.horizontal)\n ? metrics.height\n : metrics.width;\n }\n\n _selectOffset({x, y}: $ReadOnly<{x: number, y: number, ...}>): number {\n return this._orientation().horizontal ? x : y;\n }\n\n _orientation(): ListOrientation {\n return {\n horizontal: horizontalOrDefault(this.props.horizontal),\n rtl: I18nManager.isRTL,\n };\n }\n\n _maybeCallOnEdgeReached() {\n const {\n data,\n getItemCount,\n onStartReached,\n onStartReachedThreshold,\n onEndReached,\n onEndReachedThreshold,\n } = this.props;\n // If we have any pending scroll updates it means that the scroll metrics\n // are out of date and we should not call any of the edge reached callbacks.\n if (this.state.pendingScrollUpdateCount > 0) {\n return;\n }\n\n const {visibleLength, offset} = this._scrollMetrics;\n let distanceFromStart = offset;\n let distanceFromEnd =\n this._listMetrics.getContentLength() - visibleLength - offset;\n\n // Especially when oERT is zero it's necessary to 'floor' very small distance values to be 0\n // since debouncing causes us to not fire this event for every single \"pixel\" we scroll and can thus\n // be at the edge of the list with a distance approximating 0 but not quite there.\n if (distanceFromStart < ON_EDGE_REACHED_EPSILON) {\n distanceFromStart = 0;\n }\n if (distanceFromEnd < ON_EDGE_REACHED_EPSILON) {\n distanceFromEnd = 0;\n }\n\n // TODO: T121172172 Look into why we're \"defaulting\" to a threshold of 2px\n // when oERT is not present (different from 2 viewports used elsewhere)\n const DEFAULT_THRESHOLD_PX = 2;\n\n const startThreshold =\n onStartReachedThreshold != null\n ? onStartReachedThreshold * visibleLength\n : DEFAULT_THRESHOLD_PX;\n const endThreshold =\n onEndReachedThreshold != null\n ? onEndReachedThreshold * visibleLength\n : DEFAULT_THRESHOLD_PX;\n const isWithinStartThreshold = distanceFromStart <= startThreshold;\n const isWithinEndThreshold = distanceFromEnd <= endThreshold;\n\n // First check if the user just scrolled within the end threshold\n // and call onEndReached only once for a given content length,\n // and only if onStartReached is not being executed\n if (\n onEndReached &&\n this.state.cellsAroundViewport.last === getItemCount(data) - 1 &&\n isWithinEndThreshold &&\n this._listMetrics.getContentLength() !== this._sentEndForContentLength\n ) {\n this._sentEndForContentLength = this._listMetrics.getContentLength();\n onEndReached({distanceFromEnd});\n }\n\n // Next check if the user just scrolled within the start threshold\n // and call onStartReached only once for a given content length,\n // and only if onEndReached is not being executed\n if (\n onStartReached != null &&\n this.state.cellsAroundViewport.first === 0 &&\n isWithinStartThreshold &&\n this._listMetrics.getContentLength() !== this._sentStartForContentLength\n ) {\n this._sentStartForContentLength = this._listMetrics.getContentLength();\n onStartReached({distanceFromStart});\n }\n\n // If the user scrolls away from the start or end and back again,\n // cause onStartReached or onEndReached to be triggered again\n if (!isWithinStartThreshold) {\n this._sentStartForContentLength = 0;\n }\n if (!isWithinEndThreshold) {\n this._sentEndForContentLength = 0;\n }\n }\n\n _onContentSizeChange = (width: number, height: number) => {\n this._listMetrics.notifyListContentLayout({\n layout: {width, height},\n orientation: this._orientation(),\n });\n\n this._maybeScrollToInitialScrollIndex(width, height);\n\n if (this.props.onContentSizeChange) {\n this.props.onContentSizeChange(width, height);\n }\n this._scheduleCellsToRenderUpdate();\n this._maybeCallOnEdgeReached();\n };\n\n /**\n * Scroll to a specified `initialScrollIndex` prop after the ScrollView\n * content has been laid out, if it is still valid. Only a single scroll is\n * triggered throughout the lifetime of the list.\n */\n _maybeScrollToInitialScrollIndex(\n contentWidth: number,\n contentHeight: number,\n ) {\n if (\n contentWidth > 0 &&\n contentHeight > 0 &&\n this.props.initialScrollIndex != null &&\n this.props.initialScrollIndex > 0 &&\n !this._hasTriggeredInitialScrollToIndex\n ) {\n if (this.props.contentOffset == null) {\n if (\n this.props.initialScrollIndex <\n this.props.getItemCount(this.props.data)\n ) {\n this.scrollToIndex({\n animated: false,\n index: nullthrows(this.props.initialScrollIndex),\n });\n } else {\n this.scrollToEnd({animated: false});\n }\n }\n this._hasTriggeredInitialScrollToIndex = true;\n }\n }\n\n /* Translates metrics from a scroll event in a parent VirtualizedList into\n * coordinates relative to the child list.\n */\n _convertParentScrollMetrics = (metrics: {\n visibleLength: number,\n offset: number,\n ...\n }): $FlowFixMe => {\n // Offset of the top of the nested list relative to the top of its parent's viewport\n const offset = metrics.offset - this._offsetFromParentVirtualizedList;\n // Child's visible length is the same as its parent's\n const visibleLength = metrics.visibleLength;\n const dOffset = offset - this._scrollMetrics.offset;\n const contentLength = this._listMetrics.getContentLength();\n\n return {\n visibleLength,\n contentLength,\n offset,\n dOffset,\n };\n };\n\n _onScroll = (e: Object) => {\n this._nestedChildLists.forEach(childList => {\n childList._onScroll(e);\n });\n if (this.props.onScroll) {\n this.props.onScroll(e);\n }\n const timestamp = e.timeStamp;\n let visibleLength = this._selectLength(e.nativeEvent.layoutMeasurement);\n let contentLength = this._selectLength(e.nativeEvent.contentSize);\n let offset = this._offsetFromScrollEvent(e);\n let dOffset = offset - this._scrollMetrics.offset;\n\n if (this._isNestedWithSameOrientation()) {\n if (this._listMetrics.getContentLength() === 0) {\n // Ignore scroll events until onLayout has been called and we\n // know our offset from our offset from our parent\n return;\n }\n ({visibleLength, contentLength, offset, dOffset} =\n this._convertParentScrollMetrics({\n visibleLength,\n offset,\n }));\n }\n\n const dt = this._scrollMetrics.timestamp\n ? Math.max(1, timestamp - this._scrollMetrics.timestamp)\n : 1;\n const velocity = dOffset / dt;\n\n if (\n dt > 500 &&\n this._scrollMetrics.dt > 500 &&\n contentLength > 5 * visibleLength &&\n !this._hasWarned.perf\n ) {\n infoLog(\n 'VirtualizedList: You have a large list that is slow to update - make sure your ' +\n 'renderItem function renders components that follow React performance best practices ' +\n 'like PureComponent, shouldComponentUpdate, etc.',\n {dt, prevDt: this._scrollMetrics.dt, contentLength},\n );\n this._hasWarned.perf = true;\n }\n\n // For invalid negative values (w/ RTL), set this to 1.\n const zoomScale = e.nativeEvent.zoomScale < 0 ? 1 : e.nativeEvent.zoomScale;\n this._scrollMetrics = {\n dt,\n dOffset,\n offset,\n timestamp,\n velocity,\n visibleLength,\n zoomScale,\n };\n if (this.state.pendingScrollUpdateCount > 0) {\n this.setState(state => ({\n pendingScrollUpdateCount: state.pendingScrollUpdateCount - 1,\n }));\n }\n this._updateViewableItems(this.props, this.state.cellsAroundViewport);\n if (!this.props) {\n return;\n }\n this._maybeCallOnEdgeReached();\n if (velocity !== 0) {\n this._fillRateHelper.activate();\n }\n this._computeBlankness();\n this._scheduleCellsToRenderUpdate();\n };\n\n _offsetFromScrollEvent(e: ScrollEvent): number {\n const {contentOffset, contentSize, layoutMeasurement} = e.nativeEvent;\n const {horizontal, rtl} = this._orientation();\n if (horizontal && rtl) {\n return (\n this._selectLength(contentSize) -\n (this._selectOffset(contentOffset) +\n this._selectLength(layoutMeasurement))\n );\n } else {\n return this._selectOffset(contentOffset);\n }\n }\n\n _scheduleCellsToRenderUpdate() {\n // Only trigger high-priority updates if we've actually rendered cells,\n // and with that size estimate, accurately compute how many cells we should render.\n // Otherwise, it would just render as many cells as it can (of zero dimension),\n // each time through attempting to render more (limited by maxToRenderPerBatch),\n // starving the renderer from actually laying out the objects and computing _averageCellLength.\n // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate\n // We shouldn't do another hipri cellToRenderUpdate\n if (\n (this._listMetrics.getAverageCellLength() > 0 ||\n this.props.getItemLayout != null) &&\n this._shouldRenderWithPriority() &&\n !this._hiPriInProgress\n ) {\n this._hiPriInProgress = true;\n // Don't worry about interactions when scrolling quickly; focus on filling content as fast\n // as possible.\n this._updateCellsToRenderBatcher.dispose({abort: true});\n this._updateCellsToRender();\n return;\n } else {\n this._updateCellsToRenderBatcher.schedule();\n }\n }\n\n _shouldRenderWithPriority(): boolean {\n const {first, last} = this.state.cellsAroundViewport;\n const {offset, visibleLength, velocity} = this._scrollMetrics;\n const itemCount = this.props.getItemCount(this.props.data);\n let hiPri = false;\n const onStartReachedThreshold = onStartReachedThresholdOrDefault(\n this.props.onStartReachedThreshold,\n );\n const onEndReachedThreshold = onEndReachedThresholdOrDefault(\n this.props.onEndReachedThreshold,\n );\n // Mark as high priority if we're close to the start of the first item\n // But only if there are items before the first rendered item\n if (first > 0) {\n const distTop =\n offset -\n this._listMetrics.getCellMetricsApprox(first, this.props).offset;\n hiPri =\n distTop < 0 ||\n (velocity < -2 &&\n distTop <\n getScrollingThreshold(onStartReachedThreshold, visibleLength));\n }\n // Mark as high priority if we're close to the end of the last item\n // But only if there are items after the last rendered item\n if (!hiPri && last >= 0 && last < itemCount - 1) {\n const distBottom =\n this._listMetrics.getCellMetricsApprox(last, this.props).offset -\n (offset + visibleLength);\n hiPri =\n distBottom < 0 ||\n (velocity > 2 &&\n distBottom <\n getScrollingThreshold(onEndReachedThreshold, visibleLength));\n }\n\n return hiPri;\n }\n\n _onScrollBeginDrag = (e: ScrollEvent): void => {\n this._nestedChildLists.forEach(childList => {\n childList._onScrollBeginDrag(e);\n });\n this._viewabilityTuples.forEach(tuple => {\n tuple.viewabilityHelper.recordInteraction();\n });\n this._hasInteracted = true;\n this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);\n };\n\n _onScrollEndDrag = (e: ScrollEvent): void => {\n this._nestedChildLists.forEach(childList => {\n childList._onScrollEndDrag(e);\n });\n const {velocity} = e.nativeEvent;\n if (velocity) {\n this._scrollMetrics.velocity = this._selectOffset(velocity);\n }\n this._computeBlankness();\n this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);\n };\n\n _onMomentumScrollBegin = (e: ScrollEvent): void => {\n this._nestedChildLists.forEach(childList => {\n childList._onMomentumScrollBegin(e);\n });\n this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);\n };\n\n _onMomentumScrollEnd = (e: ScrollEvent): void => {\n this._nestedChildLists.forEach(childList => {\n childList._onMomentumScrollEnd(e);\n });\n this._scrollMetrics.velocity = 0;\n this._computeBlankness();\n this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);\n };\n\n _updateCellsToRender = () => {\n this._updateViewableItems(this.props, this.state.cellsAroundViewport);\n\n this.setState((state, props) => {\n const cellsAroundViewport = this._adjustCellsAroundViewport(\n props,\n state.cellsAroundViewport,\n state.pendingScrollUpdateCount,\n );\n const renderMask = VirtualizedList._createRenderMask(\n props,\n cellsAroundViewport,\n this._getNonViewportRenderRegions(props),\n );\n\n if (\n cellsAroundViewport.first === state.cellsAroundViewport.first &&\n cellsAroundViewport.last === state.cellsAroundViewport.last &&\n renderMask.equals(state.renderMask)\n ) {\n return null;\n }\n\n return {cellsAroundViewport, renderMask};\n });\n };\n\n _createViewToken = (\n index: number,\n isViewable: boolean,\n props: CellMetricProps,\n // $FlowFixMe[missing-local-annot]\n ) => {\n const {data, getItem} = props;\n const item = getItem(data, index);\n return {\n index,\n item,\n key: VirtualizedList._keyExtractor(item, index, props),\n isViewable,\n };\n };\n\n __getListMetrics(): ListMetricsAggregator {\n return this._listMetrics;\n }\n\n _getNonViewportRenderRegions = (\n props: CellMetricProps,\n ): $ReadOnlyArray<{\n first: number,\n last: number,\n }> => {\n // Keep a viewport's worth of content around the last focused cell to allow\n // random navigation around it without any blanking. E.g. tabbing from one\n // focused item out of viewport to another.\n if (\n !(this._lastFocusedCellKey && this._cellRefs[this._lastFocusedCellKey])\n ) {\n return [];\n }\n\n const lastFocusedCellRenderer = this._cellRefs[this._lastFocusedCellKey];\n const focusedCellIndex = lastFocusedCellRenderer.props.index;\n const itemCount = props.getItemCount(props.data);\n\n // The last cell we rendered may be at a new index. Bail if we don't know\n // where it is.\n if (\n focusedCellIndex >= itemCount ||\n VirtualizedList._getItemKey(props, focusedCellIndex) !==\n this._lastFocusedCellKey\n ) {\n return [];\n }\n\n let first = focusedCellIndex;\n let heightOfCellsBeforeFocused = 0;\n for (\n let i = first - 1;\n i >= 0 && heightOfCellsBeforeFocused < this._scrollMetrics.visibleLength;\n i--\n ) {\n first--;\n heightOfCellsBeforeFocused += this._listMetrics.getCellMetricsApprox(\n i,\n props,\n ).length;\n }\n\n let last = focusedCellIndex;\n let heightOfCellsAfterFocused = 0;\n for (\n let i = last + 1;\n i < itemCount &&\n heightOfCellsAfterFocused < this._scrollMetrics.visibleLength;\n i++\n ) {\n last++;\n heightOfCellsAfterFocused += this._listMetrics.getCellMetricsApprox(\n i,\n props,\n ).length;\n }\n\n return [{first, last}];\n };\n\n _updateViewableItems(\n props: CellMetricProps,\n cellsAroundViewport: {first: number, last: number},\n ) {\n // If we have any pending scroll updates it means that the scroll metrics\n // are out of date and we should not call any of the visibility callbacks.\n if (this.state.pendingScrollUpdateCount > 0) {\n return;\n }\n this._viewabilityTuples.forEach(tuple => {\n tuple.viewabilityHelper.onUpdate(\n props,\n this._scrollMetrics.offset,\n this._scrollMetrics.visibleLength,\n this._listMetrics,\n this._createViewToken,\n tuple.onViewableItemsChanged,\n cellsAroundViewport,\n );\n });\n }\n}\n\nconst styles = StyleSheet.create({\n verticallyInverted:\n Platform.OS === 'android'\n ? {transform: [{scale: -1}]}\n : {transform: [{scaleY: -1}]},\n horizontallyInverted: {\n transform: [{scaleX: -1}],\n },\n debug: {\n flex: 1,\n },\n debugOverlayBase: {\n position: 'absolute',\n top: 0,\n right: 0,\n },\n debugOverlay: {\n bottom: 0,\n width: 20,\n borderColor: 'blue',\n borderWidth: 1,\n },\n debugOverlayFrame: {\n left: 0,\n backgroundColor: 'orange',\n },\n debugOverlayFrameLast: {\n left: 0,\n borderColor: 'green',\n borderWidth: 2,\n },\n debugOverlayFrameVis: {\n left: 0,\n borderColor: 'red',\n borderWidth: 2,\n },\n});\n\nmodule.exports = VirtualizedList;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nconst {InteractionManager} = require('react-native');\n\n/**\n * A simple class for batching up invocations of a low-pri callback. A timeout is set to run the\n * callback once after a delay, no matter how many times it's scheduled. Once the delay is reached,\n * InteractionManager.runAfterInteractions is used to invoke the callback after any hi-pri\n * interactions are done running.\n *\n * Make sure to cleanup with dispose(). Example:\n *\n * class Widget extends React.Component {\n * _batchedSave: new Batchinator(() => this._saveState, 1000);\n * _saveSate() {\n * // save this.state to disk\n * }\n * componentDidUpdate() {\n * this._batchedSave.schedule();\n * }\n * componentWillUnmount() {\n * this._batchedSave.dispose();\n * }\n * ...\n * }\n */\nclass Batchinator {\n _callback: () => void;\n _delay: number;\n _taskHandle: ?{cancel: () => void, ...};\n constructor(callback: () => void, delayMS: number) {\n this._delay = delayMS;\n this._callback = callback;\n }\n /*\n * Cleanup any pending tasks.\n *\n * By default, if there is a pending task the callback is run immediately. Set the option abort to\n * true to not call the callback if it was pending.\n */\n dispose(options: {abort: boolean, ...} = {abort: false}) {\n if (this._taskHandle) {\n this._taskHandle.cancel();\n if (!options.abort) {\n this._callback();\n }\n this._taskHandle = null;\n }\n }\n schedule() {\n if (this._taskHandle) {\n return;\n }\n const timeoutHandle = setTimeout(() => {\n this._taskHandle = InteractionManager.runAfterInteractions(() => {\n // Note that we clear the handle before invoking the callback so that if the callback calls\n // schedule again, it will actually schedule another task.\n this._taskHandle = null;\n this._callback();\n });\n }, this._delay);\n this._taskHandle = {cancel: () => clearTimeout(timeoutHandle)};\n }\n}\n\nmodule.exports = Batchinator;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\nfunction clamp(min: number, value: number, max: number): number {\n if (value < min) {\n return min;\n }\n if (value > max) {\n return max;\n }\n return value;\n}\n\nmodule.exports = clamp;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\n/**\n * Intentional info-level logging for clear separation from ad-hoc console debug logging.\n */\nfunction infoLog(...args: Array): void {\n return console.log(...args);\n}\n\nmodule.exports = infoLog;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport invariant from 'invariant';\n\nexport default class ChildListCollection {\n _cellKeyToChildren: Map> = new Map();\n _childrenToCellKey: Map = new Map();\n\n add(list: TList, cellKey: string): void {\n invariant(\n !this._childrenToCellKey.has(list),\n 'Trying to add already present child list',\n );\n\n const cellLists = this._cellKeyToChildren.get(cellKey) ?? new Set();\n cellLists.add(list);\n this._cellKeyToChildren.set(cellKey, cellLists);\n\n this._childrenToCellKey.set(list, cellKey);\n }\n\n remove(list: TList): void {\n const cellKey = this._childrenToCellKey.get(list);\n invariant(cellKey != null, 'Trying to remove non-present child list');\n this._childrenToCellKey.delete(list);\n\n const cellLists = this._cellKeyToChildren.get(cellKey);\n invariant(cellLists, '_cellKeyToChildren should contain cellKey');\n cellLists.delete(list);\n\n if (cellLists.size === 0) {\n this._cellKeyToChildren.delete(cellKey);\n }\n }\n\n forEach(fn: TList => void): void {\n for (const listSet of this._cellKeyToChildren.values()) {\n for (const list of listSet) {\n fn(list);\n }\n }\n }\n\n forEachInCell(cellKey: string, fn: TList => void): void {\n const listSet = this._cellKeyToChildren.get(cellKey) ?? [];\n for (const list of listSet) {\n fn(list);\n }\n }\n\n anyInCell(cellKey: string, fn: TList => boolean): boolean {\n const listSet = this._cellKeyToChildren.get(cellKey) ?? [];\n for (const list of listSet) {\n if (fn(list)) {\n return true;\n }\n }\n return false;\n }\n\n size(): number {\n return this._childrenToCellKey.size;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {CellMetricProps} from './ListMetricsAggregator';\n\nimport ListMetricsAggregator from './ListMetricsAggregator';\n\nexport type FillRateInfo = Info;\n\nclass Info {\n any_blank_count: number = 0;\n any_blank_ms: number = 0;\n any_blank_speed_sum: number = 0;\n mostly_blank_count: number = 0;\n mostly_blank_ms: number = 0;\n pixels_blank: number = 0;\n pixels_sampled: number = 0;\n pixels_scrolled: number = 0;\n total_time_spent: number = 0;\n sample_count: number = 0;\n}\n\nconst DEBUG = false;\n\nlet _listeners: Array<(Info) => void> = [];\nlet _minSampleCount = 10;\nlet _sampleRate = DEBUG ? 1 : null;\n\n/**\n * A helper class for detecting when the maximem fill rate of `VirtualizedList` is exceeded.\n * By default the sampling rate is set to zero and this will do nothing. If you want to collect\n * samples (e.g. to log them), make sure to call `FillRateHelper.setSampleRate(0.0-1.0)`.\n *\n * Listeners and sample rate are global for all `VirtualizedList`s - typical usage will combine with\n * `SceneTracker.getActiveScene` to determine the context of the events.\n */\nclass FillRateHelper {\n _anyBlankStartTime: ?number = null;\n _enabled = false;\n _listMetrics: ListMetricsAggregator;\n _info: Info = new Info();\n _mostlyBlankStartTime: ?number = null;\n _samplesStartTime: ?number = null;\n\n static addListener(callback: FillRateInfo => void): {\n remove: () => void,\n ...\n } {\n if (_sampleRate === null) {\n console.warn('Call `FillRateHelper.setSampleRate` before `addListener`.');\n }\n _listeners.push(callback);\n return {\n remove: () => {\n _listeners = _listeners.filter(listener => callback !== listener);\n },\n };\n }\n\n static setSampleRate(sampleRate: number) {\n _sampleRate = sampleRate;\n }\n\n static setMinSampleCount(minSampleCount: number) {\n _minSampleCount = minSampleCount;\n }\n\n constructor(listMetrics: ListMetricsAggregator) {\n this._listMetrics = listMetrics;\n this._enabled = (_sampleRate || 0) > Math.random();\n this._resetData();\n }\n\n activate() {\n if (this._enabled && this._samplesStartTime == null) {\n DEBUG && console.debug('FillRateHelper: activate');\n this._samplesStartTime = global.performance.now();\n }\n }\n\n deactivateAndFlush() {\n if (!this._enabled) {\n return;\n }\n const start = this._samplesStartTime; // const for flow\n if (start == null) {\n DEBUG &&\n console.debug('FillRateHelper: bail on deactivate with no start time');\n return;\n }\n if (this._info.sample_count < _minSampleCount) {\n // Don't bother with under-sampled events.\n this._resetData();\n return;\n }\n const total_time_spent = global.performance.now() - start;\n const info: any = {\n ...this._info,\n total_time_spent,\n };\n if (DEBUG) {\n const derived = {\n avg_blankness: this._info.pixels_blank / this._info.pixels_sampled,\n avg_speed: this._info.pixels_scrolled / (total_time_spent / 1000),\n avg_speed_when_any_blank:\n this._info.any_blank_speed_sum / this._info.any_blank_count,\n any_blank_per_min:\n this._info.any_blank_count / (total_time_spent / 1000 / 60),\n any_blank_time_frac: this._info.any_blank_ms / total_time_spent,\n mostly_blank_per_min:\n this._info.mostly_blank_count / (total_time_spent / 1000 / 60),\n mostly_blank_time_frac: this._info.mostly_blank_ms / total_time_spent,\n };\n for (const key in derived) {\n // $FlowFixMe[prop-missing]\n // $FlowFixMe[invalid-computed-prop]\n derived[key] = Math.round(1000 * derived[key]) / 1000;\n }\n console.debug('FillRateHelper deactivateAndFlush: ', {derived, info});\n }\n _listeners.forEach(listener => listener(info));\n this._resetData();\n }\n\n computeBlankness(\n props: {\n ...CellMetricProps,\n initialNumToRender?: ?number,\n ...\n },\n cellsAroundViewport: {\n first: number,\n last: number,\n ...\n },\n scrollMetrics: {\n dOffset: number,\n offset: number,\n velocity: number,\n visibleLength: number,\n ...\n },\n ): number {\n if (\n !this._enabled ||\n props.getItemCount(props.data) === 0 ||\n cellsAroundViewport.last < cellsAroundViewport.first ||\n this._samplesStartTime == null\n ) {\n return 0;\n }\n const {dOffset, offset, velocity, visibleLength} = scrollMetrics;\n\n // Denominator metrics that we track for all events - most of the time there is no blankness and\n // we want to capture that.\n this._info.sample_count++;\n this._info.pixels_sampled += Math.round(visibleLength);\n this._info.pixels_scrolled += Math.round(Math.abs(dOffset));\n const scrollSpeed = Math.round(Math.abs(velocity) * 1000); // px / sec\n\n // Whether blank now or not, record the elapsed time blank if we were blank last time.\n const now = global.performance.now();\n if (this._anyBlankStartTime != null) {\n this._info.any_blank_ms += now - this._anyBlankStartTime;\n }\n this._anyBlankStartTime = null;\n if (this._mostlyBlankStartTime != null) {\n this._info.mostly_blank_ms += now - this._mostlyBlankStartTime;\n }\n this._mostlyBlankStartTime = null;\n\n let blankTop = 0;\n let first = cellsAroundViewport.first;\n let firstFrame = this._listMetrics.getCellMetrics(first, props);\n while (\n first <= cellsAroundViewport.last &&\n (!firstFrame || !firstFrame.isMounted)\n ) {\n firstFrame = this._listMetrics.getCellMetrics(first, props);\n first++;\n }\n // Only count blankTop if we aren't rendering the first item, otherwise we will count the header\n // as blank.\n if (firstFrame && first > 0) {\n blankTop = Math.min(\n visibleLength,\n Math.max(0, firstFrame.offset - offset),\n );\n }\n let blankBottom = 0;\n let last = cellsAroundViewport.last;\n let lastFrame = this._listMetrics.getCellMetrics(last, props);\n while (\n last >= cellsAroundViewport.first &&\n (!lastFrame || !lastFrame.isMounted)\n ) {\n lastFrame = this._listMetrics.getCellMetrics(last, props);\n last--;\n }\n // Only count blankBottom if we aren't rendering the last item, otherwise we will count the\n // footer as blank.\n if (lastFrame && last < props.getItemCount(props.data) - 1) {\n const bottomEdge = lastFrame.offset + lastFrame.length;\n blankBottom = Math.min(\n visibleLength,\n Math.max(0, offset + visibleLength - bottomEdge),\n );\n }\n const pixels_blank = Math.round(blankTop + blankBottom);\n const blankness = pixels_blank / visibleLength;\n if (blankness > 0) {\n this._anyBlankStartTime = now;\n this._info.any_blank_speed_sum += scrollSpeed;\n this._info.any_blank_count++;\n this._info.pixels_blank += pixels_blank;\n if (blankness > 0.5) {\n this._mostlyBlankStartTime = now;\n this._info.mostly_blank_count++;\n }\n } else if (scrollSpeed < 0.01 || Math.abs(dOffset) < 1) {\n this.deactivateAndFlush();\n }\n return blankness;\n }\n\n enabled(): boolean {\n return this._enabled;\n }\n\n _resetData() {\n this._anyBlankStartTime = null;\n this._info = new Info();\n this._mostlyBlankStartTime = null;\n this._samplesStartTime = null;\n }\n}\n\nmodule.exports = FillRateHelper;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {Props as VirtualizedListProps} from './VirtualizedListProps';\nimport type {Layout} from 'react-native/Libraries/Types/CoreEventTypes';\n\nimport {keyExtractor as defaultKeyExtractor} from './VirtualizeUtils';\nimport invariant from 'invariant';\n\nexport type CellMetrics = {\n /**\n * Index of the item in the list\n */\n index: number,\n /**\n * Length of the cell along the scrolling axis\n */\n length: number,\n /**\n * Distance between this cell and the start of the list along the scrolling\n * axis\n */\n offset: number,\n /**\n * Whether the cell is last known to be mounted\n */\n isMounted: boolean,\n};\n\n// TODO: `inverted` can be incorporated here if it is moved to an order\n// based implementation instead of transform.\nexport type ListOrientation = {\n horizontal: boolean,\n rtl: boolean,\n};\n\n/**\n * Subset of VirtualizedList props needed to calculate cell metrics\n */\nexport type CellMetricProps = {\n data: VirtualizedListProps['data'],\n getItemCount: VirtualizedListProps['getItemCount'],\n getItem: VirtualizedListProps['getItem'],\n getItemLayout?: VirtualizedListProps['getItemLayout'],\n keyExtractor?: VirtualizedListProps['keyExtractor'],\n ...\n};\n\n/**\n * Provides an interface to query information about the metrics of a list and its cells.\n */\nexport default class ListMetricsAggregator {\n _averageCellLength = 0;\n _cellMetrics: Map = new Map();\n _contentLength: ?number;\n _highestMeasuredCellIndex = 0;\n _measuredCellsLength = 0;\n _measuredCellsCount = 0;\n _orientation: ListOrientation = {\n horizontal: false,\n rtl: false,\n };\n\n /**\n * Notify the ListMetricsAggregator that a cell has been laid out.\n *\n * @returns whether the cell layout has changed since last notification\n */\n notifyCellLayout({\n cellIndex,\n cellKey,\n orientation,\n layout,\n }: {\n cellIndex: number,\n cellKey: string,\n orientation: ListOrientation,\n layout: Layout,\n }): boolean {\n this._invalidateIfOrientationChanged(orientation);\n\n const next: CellMetrics = {\n index: cellIndex,\n length: this._selectLength(layout),\n isMounted: true,\n offset: this.flowRelativeOffset(layout),\n };\n const curr = this._cellMetrics.get(cellKey);\n\n if (!curr || next.offset !== curr.offset || next.length !== curr.length) {\n if (curr) {\n const dLength = next.length - curr.length;\n this._measuredCellsLength += dLength;\n } else {\n this._measuredCellsLength += next.length;\n this._measuredCellsCount += 1;\n }\n\n this._averageCellLength =\n this._measuredCellsLength / this._measuredCellsCount;\n this._cellMetrics.set(cellKey, next);\n this._highestMeasuredCellIndex = Math.max(\n this._highestMeasuredCellIndex,\n cellIndex,\n );\n return true;\n } else {\n curr.isMounted = true;\n return false;\n }\n }\n\n /**\n * Notify ListMetricsAggregator that a cell has been unmounted.\n */\n notifyCellUnmounted(cellKey: string): void {\n const curr = this._cellMetrics.get(cellKey);\n if (curr) {\n curr.isMounted = false;\n }\n }\n\n /**\n * Notify ListMetricsAggregator that the lists content container has been laid out.\n */\n notifyListContentLayout({\n orientation,\n layout,\n }: {\n orientation: ListOrientation,\n layout: $ReadOnly<{width: number, height: number}>,\n }): void {\n this._invalidateIfOrientationChanged(orientation);\n this._contentLength = this._selectLength(layout);\n }\n\n /**\n * Return the average length of the cells which have been measured\n */\n getAverageCellLength(): number {\n return this._averageCellLength;\n }\n\n /**\n * Return the highest measured cell index (or 0 if nothing has been measured\n * yet)\n */\n getHighestMeasuredCellIndex(): number {\n return this._highestMeasuredCellIndex;\n }\n\n /**\n * Returns the exact metrics of a cell if it has already been laid out,\n * otherwise an estimate based on the average length of previously measured\n * cells\n */\n getCellMetricsApprox(index: number, props: CellMetricProps): CellMetrics {\n const frame = this.getCellMetrics(index, props);\n if (frame && frame.index === index) {\n // check for invalid frames due to row re-ordering\n return frame;\n } else {\n const {data, getItemCount} = props;\n invariant(\n index >= 0 && index < getItemCount(data),\n 'Tried to get frame for out of range index ' + index,\n );\n return {\n length: this._averageCellLength,\n offset: this._averageCellLength * index,\n index,\n isMounted: false,\n };\n }\n }\n\n /**\n * Returns the exact metrics of a cell if it has already been laid out\n */\n getCellMetrics(index: number, props: CellMetricProps): ?CellMetrics {\n const {data, getItem, getItemCount, getItemLayout} = props;\n invariant(\n index >= 0 && index < getItemCount(data),\n 'Tried to get metrics for out of range cell index ' + index,\n );\n const keyExtractor = props.keyExtractor ?? defaultKeyExtractor;\n const frame = this._cellMetrics.get(\n keyExtractor(getItem(data, index), index),\n );\n if (frame && frame.index === index) {\n return frame;\n }\n\n if (getItemLayout) {\n const {length, offset} = getItemLayout(data, index);\n // TODO: `isMounted` is used for both \"is exact layout\" and \"has been\n // unmounted\". Should be refactored.\n return {index, length, offset, isMounted: true};\n }\n\n return null;\n }\n\n /**\n * Gets an approximate offset to an item at a given index. Supports\n * fractional indices.\n */\n getCellOffsetApprox(index: number, props: CellMetricProps): number {\n if (Number.isInteger(index)) {\n return this.getCellMetricsApprox(index, props).offset;\n } else {\n const frameMetrics = this.getCellMetricsApprox(Math.floor(index), props);\n const remainder = index - Math.floor(index);\n return frameMetrics.offset + remainder * frameMetrics.length;\n }\n }\n\n /**\n * Returns the length of all ScrollView content along the scrolling axis.\n */\n getContentLength(): number {\n return this._contentLength ?? 0;\n }\n\n /**\n * Whether a content length has been observed\n */\n hasContentLength(): boolean {\n return this._contentLength != null;\n }\n\n /**\n * Finds the flow-relative offset (e.g. starting from the left in LTR, but\n * right in RTL) from a layout box.\n */\n flowRelativeOffset(layout: Layout, referenceContentLength?: ?number): number {\n const {horizontal, rtl} = this._orientation;\n\n if (horizontal && rtl) {\n const contentLength = referenceContentLength ?? this._contentLength;\n invariant(\n contentLength != null,\n 'ListMetricsAggregator must be notified of list content layout before resolving offsets',\n );\n return (\n contentLength -\n (this._selectOffset(layout) + this._selectLength(layout))\n );\n } else {\n return this._selectOffset(layout);\n }\n }\n\n /**\n * Converts a flow-relative offset to a cartesian offset\n */\n cartesianOffset(flowRelativeOffset: number): number {\n const {horizontal, rtl} = this._orientation;\n\n if (horizontal && rtl) {\n invariant(\n this._contentLength != null,\n 'ListMetricsAggregator must be notified of list content layout before resolving offsets',\n );\n return this._contentLength - flowRelativeOffset;\n } else {\n return flowRelativeOffset;\n }\n }\n\n _invalidateIfOrientationChanged(orientation: ListOrientation): void {\n if (orientation.rtl !== this._orientation.rtl) {\n this._cellMetrics.clear();\n }\n\n if (orientation.horizontal !== this._orientation.horizontal) {\n this._averageCellLength = 0;\n this._highestMeasuredCellIndex = 0;\n this._measuredCellsLength = 0;\n this._measuredCellsCount = 0;\n }\n\n this._orientation = orientation;\n }\n\n _selectLength({\n width,\n height,\n }: $ReadOnly<{width: number, height: number, ...}>): number {\n return this._orientation.horizontal ? width : height;\n }\n\n _selectOffset({x, y}: $ReadOnly<{x: number, y: number, ...}>): number {\n return this._orientation.horizontal ? x : y;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport invariant from 'invariant';\nimport * as React from 'react';\n\n/**\n * `setState` is called asynchronously, and should not rely on the value of\n * `this.props` or `this.state`:\n * https://react.dev/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous\n *\n * SafePureComponent adds runtime enforcement, to catch cases where these\n * variables are read in a state updater function, instead of the ones passed\n * in.\n */\nexport default class StateSafePureComponent<\n Props,\n State: interface {},\n> extends React.PureComponent {\n _inAsyncStateUpdate = false;\n\n constructor(props: Props) {\n super(props);\n this._installSetStateHooks();\n }\n\n setState(\n partialState: ?(Partial | ((State, Props) => ?Partial)),\n callback?: () => mixed,\n ): void {\n if (typeof partialState === 'function') {\n super.setState((state, props) => {\n this._inAsyncStateUpdate = true;\n let ret;\n try {\n ret = partialState(state, props);\n } catch (err) {\n throw err;\n } finally {\n this._inAsyncStateUpdate = false;\n }\n return ret;\n }, callback);\n } else {\n super.setState(partialState, callback);\n }\n }\n\n _installSetStateHooks() {\n const that = this;\n let {props, state} = this;\n\n Object.defineProperty(this, 'props', {\n get() {\n invariant(\n !that._inAsyncStateUpdate,\n '\"this.props\" should not be accessed during state updates',\n );\n return props;\n },\n set(newProps: Props) {\n props = newProps;\n },\n });\n Object.defineProperty(this, 'state', {\n get() {\n invariant(\n !that._inAsyncStateUpdate,\n '\"this.state\" should not be acceessed during state updates',\n );\n return state;\n },\n set(newState: State) {\n state = newState;\n },\n });\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {CellMetricProps} from './ListMetricsAggregator';\n\nimport ListMetricsAggregator from './ListMetricsAggregator';\n\nconst invariant = require('invariant');\n\nexport type ViewToken = {\n item: any,\n key: string,\n index: ?number,\n isViewable: boolean,\n section?: any,\n ...\n};\n\nexport type ViewabilityConfigCallbackPair = {\n viewabilityConfig: ViewabilityConfig,\n onViewableItemsChanged: (info: {\n viewableItems: Array,\n changed: Array,\n ...\n }) => void,\n ...\n};\n\nexport type ViewabilityConfig = {|\n /**\n * Minimum amount of time (in milliseconds) that an item must be physically viewable before the\n * viewability callback will be fired. A high number means that scrolling through content without\n * stopping will not mark the content as viewable.\n */\n minimumViewTime?: number,\n\n /**\n * Percent of viewport that must be covered for a partially occluded item to count as\n * \"viewable\", 0-100. Fully visible items are always considered viewable. A value of 0 means\n * that a single pixel in the viewport makes the item viewable, and a value of 100 means that\n * an item must be either entirely visible or cover the entire viewport to count as viewable.\n */\n viewAreaCoveragePercentThreshold?: number,\n\n /**\n * Similar to `viewAreaPercentThreshold`, but considers the percent of the item that is visible,\n * rather than the fraction of the viewable area it covers.\n */\n itemVisiblePercentThreshold?: number,\n\n /**\n * Nothing is considered viewable until the user scrolls or `recordInteraction` is called after\n * render.\n */\n waitForInteraction?: boolean,\n|};\n\n/**\n * A Utility class for calculating viewable items based on current metrics like scroll position and\n * layout.\n *\n * An item is said to be in a \"viewable\" state when any of the following\n * is true for longer than `minimumViewTime` milliseconds (after an interaction if `waitForInteraction`\n * is true):\n *\n * - Occupying >= `viewAreaCoveragePercentThreshold` of the view area XOR fraction of the item\n * visible in the view area >= `itemVisiblePercentThreshold`.\n * - Entirely visible on screen\n */\nclass ViewabilityHelper {\n _config: ViewabilityConfig;\n _hasInteracted: boolean = false;\n _timers: Set = new Set();\n _viewableIndices: Array = [];\n _viewableItems: Map = new Map();\n\n constructor(\n config: ViewabilityConfig = {viewAreaCoveragePercentThreshold: 0},\n ) {\n this._config = config;\n }\n\n /**\n * Cleanup, e.g. on unmount. Clears any pending timers.\n */\n dispose() {\n /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.63 was deployed. To see\n * the error delete this comment and run Flow. */\n this._timers.forEach(clearTimeout);\n }\n\n /**\n * Determines which items are viewable based on the current metrics and config.\n */\n computeViewableItems(\n props: CellMetricProps,\n scrollOffset: number,\n viewportHeight: number,\n listMetrics: ListMetricsAggregator,\n // Optional optimization to reduce the scan size\n renderRange?: {\n first: number,\n last: number,\n ...\n },\n ): Array {\n const itemCount = props.getItemCount(props.data);\n const {itemVisiblePercentThreshold, viewAreaCoveragePercentThreshold} =\n this._config;\n const viewAreaMode = viewAreaCoveragePercentThreshold != null;\n const viewablePercentThreshold = viewAreaMode\n ? viewAreaCoveragePercentThreshold\n : itemVisiblePercentThreshold;\n invariant(\n viewablePercentThreshold != null &&\n (itemVisiblePercentThreshold != null) !==\n (viewAreaCoveragePercentThreshold != null),\n 'Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold',\n );\n const viewableIndices = [];\n if (itemCount === 0) {\n return viewableIndices;\n }\n let firstVisible = -1;\n const {first, last} = renderRange || {first: 0, last: itemCount - 1};\n if (last >= itemCount) {\n console.warn(\n 'Invalid render range computing viewability ' +\n JSON.stringify({renderRange, itemCount}),\n );\n return [];\n }\n for (let idx = first; idx <= last; idx++) {\n const metrics = listMetrics.getCellMetrics(idx, props);\n if (!metrics) {\n continue;\n }\n const top = Math.floor(metrics.offset - scrollOffset);\n const bottom = Math.floor(top + metrics.length);\n\n if (top < viewportHeight && bottom > 0) {\n firstVisible = idx;\n if (\n _isViewable(\n viewAreaMode,\n viewablePercentThreshold,\n top,\n bottom,\n viewportHeight,\n metrics.length,\n )\n ) {\n viewableIndices.push(idx);\n }\n } else if (firstVisible >= 0) {\n break;\n }\n }\n return viewableIndices;\n }\n\n /**\n * Figures out which items are viewable and how that has changed from before and calls\n * `onViewableItemsChanged` as appropriate.\n */\n onUpdate(\n props: CellMetricProps,\n scrollOffset: number,\n viewportHeight: number,\n listMetrics: ListMetricsAggregator,\n createViewToken: (\n index: number,\n isViewable: boolean,\n props: CellMetricProps,\n ) => ViewToken,\n onViewableItemsChanged: ({\n viewableItems: Array,\n changed: Array,\n ...\n }) => void,\n // Optional optimization to reduce the scan size\n renderRange?: {\n first: number,\n last: number,\n ...\n },\n ): void {\n const itemCount = props.getItemCount(props.data);\n if (\n (this._config.waitForInteraction && !this._hasInteracted) ||\n itemCount === 0 ||\n !listMetrics.getCellMetrics(0, props)\n ) {\n return;\n }\n let viewableIndices: Array = [];\n if (itemCount) {\n viewableIndices = this.computeViewableItems(\n props,\n scrollOffset,\n viewportHeight,\n listMetrics,\n renderRange,\n );\n }\n if (\n this._viewableIndices.length === viewableIndices.length &&\n this._viewableIndices.every((v, ii) => v === viewableIndices[ii])\n ) {\n // We might get a lot of scroll events where visibility doesn't change and we don't want to do\n // extra work in those cases.\n return;\n }\n this._viewableIndices = viewableIndices;\n if (this._config.minimumViewTime) {\n const handle: TimeoutID = setTimeout(() => {\n /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.63 was deployed. To\n * see the error delete this comment and run Flow. */\n this._timers.delete(handle);\n this._onUpdateSync(\n props,\n viewableIndices,\n onViewableItemsChanged,\n createViewToken,\n );\n }, this._config.minimumViewTime);\n /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.63 was deployed. To see\n * the error delete this comment and run Flow. */\n this._timers.add(handle);\n } else {\n this._onUpdateSync(\n props,\n viewableIndices,\n onViewableItemsChanged,\n createViewToken,\n );\n }\n }\n\n /**\n * clean-up cached _viewableIndices to evaluate changed items on next update\n */\n resetViewableIndices() {\n this._viewableIndices = [];\n }\n\n /**\n * Records that an interaction has happened even if there has been no scroll.\n */\n recordInteraction() {\n this._hasInteracted = true;\n }\n\n _onUpdateSync(\n props: CellMetricProps,\n viewableIndicesToCheck: Array,\n onViewableItemsChanged: ({\n changed: Array,\n viewableItems: Array,\n ...\n }) => void,\n createViewToken: (\n index: number,\n isViewable: boolean,\n props: CellMetricProps,\n ) => ViewToken,\n ) {\n // Filter out indices that have gone out of view since this call was scheduled.\n viewableIndicesToCheck = viewableIndicesToCheck.filter(ii =>\n this._viewableIndices.includes(ii),\n );\n const prevItems = this._viewableItems;\n const nextItems = new Map(\n viewableIndicesToCheck.map(ii => {\n const viewable = createViewToken(ii, true, props);\n return [viewable.key, viewable];\n }),\n );\n\n const changed = [];\n for (const [key, viewable] of nextItems) {\n if (!prevItems.has(key)) {\n changed.push(viewable);\n }\n }\n for (const [key, viewable] of prevItems) {\n if (!nextItems.has(key)) {\n changed.push({...viewable, isViewable: false});\n }\n }\n if (changed.length > 0) {\n this._viewableItems = nextItems;\n onViewableItemsChanged({\n viewableItems: Array.from(nextItems.values()),\n changed,\n viewabilityConfig: this._config,\n });\n }\n }\n}\n\nfunction _isViewable(\n viewAreaMode: boolean,\n viewablePercentThreshold: number,\n top: number,\n bottom: number,\n viewportHeight: number,\n itemLength: number,\n): boolean {\n if (_isEntirelyVisible(top, bottom, viewportHeight)) {\n return true;\n } else {\n const pixels = _getPixelsVisible(top, bottom, viewportHeight);\n const percent =\n 100 * (viewAreaMode ? pixels / viewportHeight : pixels / itemLength);\n return percent >= viewablePercentThreshold;\n }\n}\n\nfunction _getPixelsVisible(\n top: number,\n bottom: number,\n viewportHeight: number,\n): number {\n const visibleHeight = Math.min(bottom, viewportHeight) - Math.max(top, 0);\n return Math.max(0, visibleHeight);\n}\n\nfunction _isEntirelyVisible(\n top: number,\n bottom: number,\n viewportHeight: number,\n): boolean {\n return top >= 0 && bottom <= viewportHeight && bottom > top;\n}\n\nmodule.exports = ViewabilityHelper;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {CellRendererProps, RenderItemType} from './VirtualizedListProps';\nimport type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n FocusEvent,\n LayoutEvent,\n} from 'react-native/Libraries/Types/CoreEventTypes';\n\nimport {VirtualizedListCellContextProvider} from './VirtualizedListContext.js';\nimport invariant from 'invariant';\nimport * as React from 'react';\nimport {StyleSheet, View} from 'react-native';\n\nexport type Props = {\n CellRendererComponent?: ?React.ComponentType>,\n ItemSeparatorComponent: ?React.ComponentType<\n any | {highlighted: boolean, leadingItem: ?ItemT},\n >,\n ListItemComponent?: ?(React.ComponentType | React.Element),\n cellKey: string,\n horizontal: ?boolean,\n index: number,\n inversionStyle: ViewStyleProp,\n item: ItemT,\n onCellLayout?: (event: LayoutEvent, cellKey: string, index: number) => void,\n onCellFocusCapture?: (cellKey: string) => void,\n onUnmount: (cellKey: string) => void,\n onUpdateSeparators: (\n cellKeys: Array,\n props: Partial>,\n ) => void,\n prevCellKey: ?string,\n renderItem?: ?RenderItemType,\n ...\n};\n\ntype SeparatorProps = $ReadOnly<{|\n highlighted: boolean,\n leadingItem: ?ItemT,\n|}>;\n\ntype State = {\n separatorProps: SeparatorProps,\n ...\n};\n\nexport default class CellRenderer extends React.Component<\n Props,\n State,\n> {\n state: State = {\n separatorProps: {\n highlighted: false,\n leadingItem: this.props.item,\n },\n };\n\n static getDerivedStateFromProps(\n props: Props,\n prevState: State,\n ): ?State {\n return {\n separatorProps: {\n ...prevState.separatorProps,\n leadingItem: props.item,\n },\n };\n }\n\n // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not\n // reused by SectionList and we can keep VirtualizedList simpler.\n // $FlowFixMe[missing-local-annot]\n _separators = {\n highlight: () => {\n const {cellKey, prevCellKey} = this.props;\n this.props.onUpdateSeparators([cellKey, prevCellKey], {\n highlighted: true,\n });\n },\n unhighlight: () => {\n const {cellKey, prevCellKey} = this.props;\n this.props.onUpdateSeparators([cellKey, prevCellKey], {\n highlighted: false,\n });\n },\n updateProps: (\n select: 'leading' | 'trailing',\n newProps: SeparatorProps,\n ) => {\n const {cellKey, prevCellKey} = this.props;\n this.props.onUpdateSeparators(\n [select === 'leading' ? prevCellKey : cellKey],\n newProps,\n );\n },\n };\n\n updateSeparatorProps(newProps: SeparatorProps) {\n this.setState(state => ({\n separatorProps: {...state.separatorProps, ...newProps},\n }));\n }\n\n componentWillUnmount() {\n this.props.onUnmount(this.props.cellKey);\n }\n\n _onLayout = (nativeEvent: LayoutEvent): void => {\n this.props.onCellLayout?.(\n nativeEvent,\n this.props.cellKey,\n this.props.index,\n );\n };\n\n _onCellFocusCapture = (e: FocusEvent): void => {\n this.props.onCellFocusCapture?.(this.props.cellKey);\n };\n\n _renderElement(\n renderItem: ?RenderItemType,\n ListItemComponent: any,\n item: ItemT,\n index: number,\n ): React.Node {\n if (renderItem && ListItemComponent) {\n console.warn(\n 'VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' +\n ' precedence over renderItem.',\n );\n }\n\n if (ListItemComponent) {\n return (\n \n );\n }\n\n if (renderItem) {\n return renderItem({\n item,\n index,\n separators: this._separators,\n });\n }\n\n invariant(\n false,\n 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.',\n );\n }\n\n render(): React.Node {\n const {\n CellRendererComponent,\n ItemSeparatorComponent,\n ListItemComponent,\n cellKey,\n horizontal,\n item,\n index,\n inversionStyle,\n onCellLayout,\n renderItem,\n } = this.props;\n const element = this._renderElement(\n renderItem,\n ListItemComponent,\n item,\n index,\n );\n\n // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and\n // called explicitly by `ScrollViewStickyHeader`.\n const itemSeparator: React.Node = React.isValidElement(\n ItemSeparatorComponent,\n )\n ? // $FlowFixMe[incompatible-type]\n ItemSeparatorComponent\n : // $FlowFixMe[incompatible-type]\n ItemSeparatorComponent && (\n \n );\n const cellStyle = inversionStyle\n ? horizontal\n ? [styles.rowReverse, inversionStyle]\n : [styles.columnReverse, inversionStyle]\n : horizontal\n ? [styles.row, inversionStyle]\n : inversionStyle;\n const result = !CellRendererComponent ? (\n \n {element}\n {itemSeparator}\n \n ) : (\n \n {element}\n {itemSeparator}\n \n );\n\n return (\n \n {result}\n \n );\n }\n}\n\nconst styles = StyleSheet.create({\n row: {\n flexDirection: 'row',\n },\n rowReverse: {\n flexDirection: 'row-reverse',\n },\n columnReverse: {\n flexDirection: 'column-reverse',\n },\n});\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport typeof VirtualizedList from './VirtualizedList';\n\nimport * as React from 'react';\nimport {useContext, useMemo} from 'react';\n\ntype Context = $ReadOnly<{\n cellKey: ?string,\n getScrollMetrics: () => {\n contentLength: number,\n dOffset: number,\n dt: number,\n offset: number,\n timestamp: number,\n velocity: number,\n visibleLength: number,\n zoomScale: number,\n },\n horizontal: ?boolean,\n getOutermostParentListRef: () => React.ElementRef,\n registerAsNestedChild: ({\n cellKey: string,\n ref: React.ElementRef,\n }) => void,\n unregisterAsNestedChild: ({ref: React.ElementRef}) => void,\n}>;\n\nexport const VirtualizedListContext: React.Context =\n React.createContext(null);\nif (__DEV__) {\n VirtualizedListContext.displayName = 'VirtualizedListContext';\n}\n\n/**\n * Resets the context. Intended for use by portal-like components (e.g. Modal).\n */\nexport function VirtualizedListContextResetter({\n children,\n}: {\n children: React.Node,\n}): React.Node {\n return (\n \n {children}\n \n );\n}\n\n/**\n * Sets the context with memoization. Intended to be used by `VirtualizedList`.\n */\nexport function VirtualizedListContextProvider({\n children,\n value,\n}: {\n children: React.Node,\n value: Context,\n}): React.Node {\n // Avoid setting a newly created context object if the values are identical.\n const context = useMemo(\n () => ({\n cellKey: null,\n getScrollMetrics: value.getScrollMetrics,\n horizontal: value.horizontal,\n getOutermostParentListRef: value.getOutermostParentListRef,\n registerAsNestedChild: value.registerAsNestedChild,\n unregisterAsNestedChild: value.unregisterAsNestedChild,\n }),\n [\n value.getScrollMetrics,\n value.horizontal,\n value.getOutermostParentListRef,\n value.registerAsNestedChild,\n value.unregisterAsNestedChild,\n ],\n );\n return (\n \n {children}\n \n );\n}\n\n/**\n * Sets the `cellKey`. Intended to be used by `VirtualizedList` for each cell.\n */\nexport function VirtualizedListCellContextProvider({\n cellKey,\n children,\n}: {\n cellKey: string,\n children: React.Node,\n}): React.Node {\n // Avoid setting a newly created context object if the values are identical.\n const currContext = useContext(VirtualizedListContext);\n const context = useMemo(\n () => (currContext == null ? null : {...currContext, cellKey}),\n [currContext, cellKey],\n );\n return (\n \n {children}\n \n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {\n ViewabilityConfig,\n ViewabilityConfigCallbackPair,\n ViewToken,\n} from './ViewabilityHelper';\nimport type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n FocusEvent,\n LayoutEvent,\n} from 'react-native/Libraries/Types/CoreEventTypes';\n\nimport * as React from 'react';\nimport {typeof ScrollView} from 'react-native';\n\nexport type Item = any;\n\nexport type Separators = {\n highlight: () => void,\n unhighlight: () => void,\n updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,\n ...\n};\n\nexport type RenderItemProps = {\n item: ItemT,\n index: number,\n separators: Separators,\n ...\n};\n\nexport type CellRendererProps = $ReadOnly<{\n cellKey: string,\n children: React.Node,\n index: number,\n item: ItemT,\n onFocusCapture?: (event: FocusEvent) => void,\n onLayout?: (event: LayoutEvent) => void,\n style: ViewStyleProp,\n}>;\n\nexport type RenderItemType = (\n info: RenderItemProps,\n) => React.Node;\n\ntype RequiredProps = {|\n /**\n * The default accessor functions assume this is an Array<{key: string} | {id: string}> but you can override\n * getItem, getItemCount, and keyExtractor to handle any type of index-based data.\n */\n data?: any,\n /**\n * A generic accessor for extracting an item from any sort of data blob.\n */\n getItem: (data: any, index: number) => ?Item,\n /**\n * Determines how many items are in the data blob.\n */\n getItemCount: (data: any) => number,\n|};\ntype OptionalProps = {|\n renderItem?: ?RenderItemType,\n /**\n * `debug` will turn on extra logging and visual overlays to aid with debugging both usage and\n * implementation, but with a significant perf hit.\n */\n debug?: ?boolean,\n /**\n * DEPRECATED: Virtualization provides significant performance and memory optimizations, but fully\n * unmounts react instances that are outside of the render window. You should only need to disable\n * this for debugging purposes. Defaults to false.\n */\n disableVirtualization?: ?boolean,\n /**\n * A marker property for telling the list to re-render (since it implements `PureComponent`). If\n * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the\n * `data` prop, stick it here and treat it immutably.\n */\n extraData?: any,\n // e.g. height, y\n getItemLayout?: (\n data: any,\n index: number,\n ) => {\n length: number,\n offset: number,\n index: number,\n ...\n },\n horizontal?: ?boolean,\n /**\n * How many items to render in the initial batch. This should be enough to fill the screen but not\n * much more. Note these items will never be unmounted as part of the windowed rendering in order\n * to improve perceived performance of scroll-to-top actions.\n */\n initialNumToRender?: ?number,\n /**\n * Instead of starting at the top with the first item, start at `initialScrollIndex`. This\n * disables the \"scroll to top\" optimization that keeps the first `initialNumToRender` items\n * always rendered and immediately renders the items starting at this initial index. Requires\n * `getItemLayout` to be implemented.\n */\n initialScrollIndex?: ?number,\n /**\n * Reverses the direction of scroll. Uses scale transforms of -1.\n */\n inverted?: ?boolean,\n keyExtractor?: ?(item: Item, index: number) => string,\n /**\n * CellRendererComponent allows customizing how cells rendered by\n * `renderItem`/`ListItemComponent` are wrapped when placed into the\n * underlying ScrollView. This component must accept event handlers which\n * notify VirtualizedList of changes within the cell.\n */\n CellRendererComponent?: ?React.ComponentType>,\n /**\n * Rendered in between each item, but not at the top or bottom. By default, `highlighted` and\n * `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight`\n * which will update the `highlighted` prop, but you can also add custom props with\n * `separators.updateProps`.\n */\n ItemSeparatorComponent?: ?React.ComponentType,\n /**\n * Takes an item from `data` and renders it into the list. Example usage:\n *\n * (\n * \n * )}\n * data={[{title: 'Title Text', key: 'item1'}]}\n * ListItemComponent={({item, separators}) => (\n * this._onPress(item)}\n * onShowUnderlay={separators.highlight}\n * onHideUnderlay={separators.unhighlight}>\n * \n * {item.title}\n * \n * \n * )}\n * />\n *\n * Provides additional metadata like `index` if you need it, as well as a more generic\n * `separators.updateProps` function which let's you set whatever props you want to change the\n * rendering of either the leading separator or trailing separator in case the more common\n * `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for\n * your use-case.\n */\n ListItemComponent?: ?(React.ComponentType | React.Element),\n /**\n * Rendered when the list is empty. Can be a React Component Class, a render function, or\n * a rendered element.\n */\n ListEmptyComponent?: ?(React.ComponentType | React.Element),\n /**\n * Rendered at the bottom of all the items. Can be a React Component Class, a render function, or\n * a rendered element.\n */\n ListFooterComponent?: ?(React.ComponentType | React.Element),\n /**\n * Styling for internal View for ListFooterComponent\n */\n ListFooterComponentStyle?: ViewStyleProp,\n /**\n * Rendered at the top of all the items. Can be a React Component Class, a render function, or\n * a rendered element.\n */\n ListHeaderComponent?: ?(React.ComponentType | React.Element),\n /**\n * Styling for internal View for ListHeaderComponent\n */\n ListHeaderComponentStyle?: ViewStyleProp,\n /**\n * The maximum number of items to render in each incremental render batch. The more rendered at\n * once, the better the fill rate, but responsiveness may suffer because rendering content may\n * interfere with responding to button taps or other interactions.\n */\n maxToRenderPerBatch?: ?number,\n /**\n * Called once when the scroll position gets within within `onEndReachedThreshold`\n * from the logical end of the list.\n */\n onEndReached?: ?(info: {distanceFromEnd: number, ...}) => void,\n /**\n * How far from the end (in units of visible length of the list) the trailing edge of the\n * list must be from the end of the content to trigger the `onEndReached` callback.\n * Thus, a value of 0.5 will trigger `onEndReached` when the end of the content is\n * within half the visible length of the list.\n */\n onEndReachedThreshold?: ?number,\n /**\n * If provided, a standard RefreshControl will be added for \"Pull to Refresh\" functionality. Make\n * sure to also set the `refreshing` prop correctly.\n */\n onRefresh?: ?() => void,\n /**\n * Used to handle failures when scrolling to an index that has not been measured yet. Recommended\n * action is to either compute your own offset and `scrollTo` it, or scroll as far as possible and\n * then try again after more items have been rendered.\n */\n onScrollToIndexFailed?: ?(info: {\n index: number,\n highestMeasuredFrameIndex: number,\n averageItemLength: number,\n ...\n }) => void,\n /**\n * Called once when the scroll position gets within within `onStartReachedThreshold`\n * from the logical start of the list.\n */\n onStartReached?: ?(info: {distanceFromStart: number, ...}) => void,\n /**\n * How far from the start (in units of visible length of the list) the leading edge of the\n * list must be from the start of the content to trigger the `onStartReached` callback.\n * Thus, a value of 0.5 will trigger `onStartReached` when the start of the content is\n * within half the visible length of the list.\n */\n onStartReachedThreshold?: ?number,\n /**\n * Called when the viewability of rows changes, as defined by the\n * `viewabilityConfig` prop.\n */\n onViewableItemsChanged?: ?(info: {\n viewableItems: Array,\n changed: Array,\n ...\n }) => void,\n persistentScrollbar?: ?boolean,\n /**\n * Set this when offset is needed for the loading indicator to show correctly.\n */\n progressViewOffset?: number,\n /**\n * A custom refresh control element. When set, it overrides the default\n * component built internally. The onRefresh and refreshing\n * props are also ignored. Only works for vertical VirtualizedList.\n */\n refreshControl?: ?React.Element,\n /**\n * Set this true while waiting for new data from a refresh.\n */\n refreshing?: ?boolean,\n /**\n * Note: may have bugs (missing content) in some circumstances - use at your own risk.\n *\n * This may improve scroll performance for large lists.\n */\n removeClippedSubviews?: boolean,\n /**\n * Render a custom scroll component, e.g. with a differently styled `RefreshControl`.\n */\n renderScrollComponent?: (props: Object) => React.Element,\n /**\n * Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off\n * screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.\n */\n updateCellsBatchingPeriod?: ?number,\n /**\n * See `ViewabilityHelper` for flow type and further documentation.\n */\n viewabilityConfig?: ViewabilityConfig,\n /**\n * List of ViewabilityConfig/onViewableItemsChanged pairs. A specific onViewableItemsChanged\n * will be called when its corresponding ViewabilityConfig's conditions are met.\n */\n viewabilityConfigCallbackPairs?: Array,\n /**\n * Determines the maximum number of items rendered outside of the visible area, in units of\n * visible lengths. So if your list fills the screen, then `windowSize={21}` (the default) will\n * render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing\n * this number will reduce memory consumption and may improve performance, but will increase the\n * chance that fast scrolling may reveal momentary blank areas of unrendered content.\n */\n windowSize?: ?number,\n /**\n * The legacy implementation is no longer supported.\n */\n legacyImplementation?: empty,\n|};\n\nexport type Props = {|\n ...React.ElementConfig,\n ...RequiredProps,\n ...OptionalProps,\n|};\n\n/**\n * Default Props Helper Functions\n * Use the following helper functions for default values\n */\n\n// horizontalOrDefault(this.props.horizontal)\nexport function horizontalOrDefault(horizontal: ?boolean): boolean {\n return horizontal ?? false;\n}\n\n// initialNumToRenderOrDefault(this.props.initialNumToRender)\nexport function initialNumToRenderOrDefault(\n initialNumToRender: ?number,\n): number {\n return initialNumToRender ?? 10;\n}\n\n// maxToRenderPerBatchOrDefault(this.props.maxToRenderPerBatch)\nexport function maxToRenderPerBatchOrDefault(\n maxToRenderPerBatch: ?number,\n): number {\n return maxToRenderPerBatch ?? 10;\n}\n\n// onStartReachedThresholdOrDefault(this.props.onStartReachedThreshold)\nexport function onStartReachedThresholdOrDefault(\n onStartReachedThreshold: ?number,\n): number {\n return onStartReachedThreshold ?? 2;\n}\n\n// onEndReachedThresholdOrDefault(this.props.onEndReachedThreshold)\nexport function onEndReachedThresholdOrDefault(\n onEndReachedThreshold: ?number,\n): number {\n return onEndReachedThreshold ?? 2;\n}\n\n// windowSizeOrDefault(this.props.windowSize)\nexport function windowSizeOrDefault(windowSize: ?number): number {\n return windowSize ?? 21;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport invariant from 'invariant';\n\nexport type CellRegion = {\n first: number,\n last: number,\n isSpacer: boolean,\n};\n\nexport class CellRenderMask {\n _numCells: number;\n _regions: Array;\n\n constructor(numCells: number) {\n invariant(\n numCells >= 0,\n 'CellRenderMask must contain a non-negative number os cells',\n );\n\n this._numCells = numCells;\n\n if (numCells === 0) {\n this._regions = [];\n } else {\n this._regions = [\n {\n first: 0,\n last: numCells - 1,\n isSpacer: true,\n },\n ];\n }\n }\n\n enumerateRegions(): $ReadOnlyArray {\n return this._regions;\n }\n\n addCells(cells: {first: number, last: number}): void {\n invariant(\n cells.first >= 0 &&\n cells.first < this._numCells &&\n cells.last >= -1 &&\n cells.last < this._numCells &&\n cells.last >= cells.first - 1,\n 'CellRenderMask.addCells called with invalid cell range',\n );\n\n // VirtualizedList uses inclusive ranges, where zero-count states are\n // possible. E.g. [0, -1] for no cells, starting at 0.\n if (cells.last < cells.first) {\n return;\n }\n\n const [firstIntersect, firstIntersectIdx] = this._findRegion(cells.first);\n const [lastIntersect, lastIntersectIdx] = this._findRegion(cells.last);\n\n // Fast-path if the cells to add are already all present in the mask. We\n // will otherwise need to do some mutation.\n if (firstIntersectIdx === lastIntersectIdx && !firstIntersect.isSpacer) {\n return;\n }\n\n // We need to replace the existing covered regions with 1-3 new regions\n // depending whether we need to split spacers out of overlapping regions.\n const newLeadRegion: Array = [];\n const newTailRegion: Array = [];\n const newMainRegion: CellRegion = {\n ...cells,\n isSpacer: false,\n };\n\n if (firstIntersect.first < newMainRegion.first) {\n if (firstIntersect.isSpacer) {\n newLeadRegion.push({\n first: firstIntersect.first,\n last: newMainRegion.first - 1,\n isSpacer: true,\n });\n } else {\n newMainRegion.first = firstIntersect.first;\n }\n }\n\n if (lastIntersect.last > newMainRegion.last) {\n if (lastIntersect.isSpacer) {\n newTailRegion.push({\n first: newMainRegion.last + 1,\n last: lastIntersect.last,\n isSpacer: true,\n });\n } else {\n newMainRegion.last = lastIntersect.last;\n }\n }\n\n const replacementRegions: Array = [\n ...newLeadRegion,\n newMainRegion,\n ...newTailRegion,\n ];\n const numRegionsToDelete = lastIntersectIdx - firstIntersectIdx + 1;\n this._regions.splice(\n firstIntersectIdx,\n numRegionsToDelete,\n ...replacementRegions,\n );\n }\n\n numCells(): number {\n return this._numCells;\n }\n\n equals(other: CellRenderMask): boolean {\n return (\n this._numCells === other._numCells &&\n this._regions.length === other._regions.length &&\n this._regions.every(\n (region, i) =>\n region.first === other._regions[i].first &&\n region.last === other._regions[i].last &&\n region.isSpacer === other._regions[i].isSpacer,\n )\n );\n }\n\n _findRegion(cellIdx: number): [CellRegion, number] {\n let firstIdx = 0;\n let lastIdx = this._regions.length - 1;\n\n while (firstIdx <= lastIdx) {\n const middleIdx = Math.floor((firstIdx + lastIdx) / 2);\n const middleRegion = this._regions[middleIdx];\n\n if (cellIdx >= middleRegion.first && cellIdx <= middleRegion.last) {\n return [middleRegion, middleIdx];\n } else if (cellIdx < middleRegion.first) {\n lastIdx = middleIdx - 1;\n } else if (cellIdx > middleRegion.last) {\n firstIdx = middleIdx + 1;\n }\n }\n\n invariant(false, `A region was not found containing cellIdx ${cellIdx}`);\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {ViewToken} from './ViewabilityHelper';\n\nimport VirtualizedList from './VirtualizedList';\nimport {keyExtractor as defaultKeyExtractor} from './VirtualizeUtils';\nimport invariant from 'invariant';\nimport * as React from 'react';\ntype Item = any;\n\nexport type SectionBase = {\n /**\n * The data for rendering items in this section.\n */\n data: $ReadOnlyArray,\n /**\n * Optional key to keep track of section re-ordering. If you don't plan on re-ordering sections,\n * the array index will be used by default.\n */\n key?: string,\n // Optional props will override list-wide props just for this section.\n renderItem?: ?(info: {\n item: SectionItemT,\n index: number,\n section: SectionBase,\n separators: {\n highlight: () => void,\n unhighlight: () => void,\n updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,\n ...\n },\n ...\n }) => null | React.Element,\n ItemSeparatorComponent?: ?React.ComponentType,\n keyExtractor?: (item: SectionItemT, index?: ?number) => string,\n ...\n};\n\ntype RequiredProps> = {|\n sections: $ReadOnlyArray,\n|};\n\ntype OptionalProps> = {|\n /**\n * Default renderer for every item in every section.\n */\n renderItem?: (info: {\n item: Item,\n index: number,\n section: SectionT,\n separators: {\n highlight: () => void,\n unhighlight: () => void,\n updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,\n ...\n },\n ...\n }) => null | React.Element,\n /**\n * Rendered at the top of each section. These stick to the top of the `ScrollView` by default on\n * iOS. See `stickySectionHeadersEnabled`.\n */\n renderSectionHeader?: ?(info: {\n section: SectionT,\n ...\n }) => null | React.Element,\n /**\n * Rendered at the bottom of each section.\n */\n renderSectionFooter?: ?(info: {\n section: SectionT,\n ...\n }) => null | React.Element,\n /**\n * Rendered at the top and bottom of each section (note this is different from\n * `ItemSeparatorComponent` which is only rendered between items). These are intended to separate\n * sections from the headers above and below and typically have the same highlight response as\n * `ItemSeparatorComponent`. Also receives `highlighted`, `[leading/trailing][Item/Separator]`,\n * and any custom props from `separators.updateProps`.\n */\n SectionSeparatorComponent?: ?React.ComponentType,\n /**\n * Makes section headers stick to the top of the screen until the next one pushes it off. Only\n * enabled by default on iOS because that is the platform standard there.\n */\n stickySectionHeadersEnabled?: boolean,\n onEndReached?: ?({distanceFromEnd: number, ...}) => void,\n|};\n\ntype VirtualizedListProps = React.ElementConfig;\n\nexport type Props = {|\n ...RequiredProps,\n ...OptionalProps,\n ...$Diff<\n VirtualizedListProps,\n {\n renderItem: $PropertyType,\n data: $PropertyType,\n ...\n },\n >,\n|};\nexport type ScrollToLocationParamsType = {|\n animated?: ?boolean,\n itemIndex: number,\n sectionIndex: number,\n viewOffset?: number,\n viewPosition?: number,\n|};\n\ntype State = {childProps: VirtualizedListProps, ...};\n\n/**\n * Right now this just flattens everything into one list and uses VirtualizedList under the\n * hood. The only operation that might not scale well is concatting the data arrays of all the\n * sections when new props are received, which should be plenty fast for up to ~10,000 items.\n */\nclass VirtualizedSectionList<\n SectionT: SectionBase,\n> extends React.PureComponent, State> {\n scrollToLocation(params: ScrollToLocationParamsType) {\n let index = params.itemIndex;\n for (let i = 0; i < params.sectionIndex; i++) {\n index += this.props.getItemCount(this.props.sections[i].data) + 2;\n }\n let viewOffset = params.viewOffset || 0;\n if (this._listRef == null) {\n return;\n }\n const listRef = this._listRef;\n if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) {\n const frame = listRef\n .__getListMetrics()\n .getCellMetricsApprox(index - params.itemIndex, listRef.props);\n viewOffset += frame.length;\n }\n const toIndexParams = {\n ...params,\n viewOffset,\n index,\n };\n // $FlowFixMe[incompatible-use]\n this._listRef.scrollToIndex(toIndexParams);\n }\n\n getListRef(): ?React.ElementRef {\n return this._listRef;\n }\n\n render(): React.Node {\n const {\n ItemSeparatorComponent, // don't pass through, rendered with renderItem\n SectionSeparatorComponent,\n renderItem: _renderItem,\n renderSectionFooter,\n renderSectionHeader,\n sections: _sections,\n stickySectionHeadersEnabled,\n ...passThroughProps\n } = this.props;\n\n const listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0;\n\n const stickyHeaderIndices = this.props.stickySectionHeadersEnabled\n ? ([]: Array)\n : undefined;\n\n let itemCount = 0;\n for (const section of this.props.sections) {\n // Track the section header indices\n if (stickyHeaderIndices != null) {\n stickyHeaderIndices.push(itemCount + listHeaderOffset);\n }\n\n // Add two for the section header and footer.\n itemCount += 2;\n itemCount += this.props.getItemCount(section.data);\n }\n const renderItem = this._renderItem(itemCount);\n\n return (\n \n this._getItem(this.props, sections, index)\n }\n getItemCount={() => itemCount}\n onViewableItemsChanged={\n this.props.onViewableItemsChanged\n ? this._onViewableItemsChanged\n : undefined\n }\n ref={this._captureRef}\n />\n );\n }\n\n _getItem(\n props: Props,\n sections: ?$ReadOnlyArray,\n index: number,\n ): ?Item {\n if (!sections) {\n return null;\n }\n let itemIdx = index - 1;\n for (let i = 0; i < sections.length; i++) {\n const section = sections[i];\n const sectionData = section.data;\n const itemCount = props.getItemCount(sectionData);\n if (itemIdx === -1 || itemIdx === itemCount) {\n // We intend for there to be overflow by one on both ends of the list.\n // This will be for headers and footers. When returning a header or footer\n // item the section itself is the item.\n return section;\n } else if (itemIdx < itemCount) {\n // If we are in the bounds of the list's data then return the item.\n return props.getItem(sectionData, itemIdx);\n } else {\n itemIdx -= itemCount + 2; // Add two for the header and footer\n }\n }\n return null;\n }\n\n // $FlowFixMe[missing-local-annot]\n _keyExtractor = (item: Item, index: number) => {\n const info = this._subExtractor(index);\n return (info && info.key) || String(index);\n };\n\n _subExtractor(index: number): ?{\n section: SectionT,\n // Key of the section or combined key for section + item\n key: string,\n // Relative index within the section\n index: ?number,\n // True if this is the section header\n header?: ?boolean,\n leadingItem?: ?Item,\n leadingSection?: ?SectionT,\n trailingItem?: ?Item,\n trailingSection?: ?SectionT,\n ...\n } {\n let itemIndex = index;\n const {getItem, getItemCount, keyExtractor, sections} = this.props;\n for (let i = 0; i < sections.length; i++) {\n const section = sections[i];\n const sectionData = section.data;\n const key = section.key || String(i);\n itemIndex -= 1; // The section adds an item for the header\n if (itemIndex >= getItemCount(sectionData) + 1) {\n itemIndex -= getItemCount(sectionData) + 1; // The section adds an item for the footer.\n } else if (itemIndex === -1) {\n return {\n section,\n key: key + ':header',\n index: null,\n header: true,\n trailingSection: sections[i + 1],\n };\n } else if (itemIndex === getItemCount(sectionData)) {\n return {\n section,\n key: key + ':footer',\n index: null,\n header: false,\n trailingSection: sections[i + 1],\n };\n } else {\n const extractor =\n section.keyExtractor || keyExtractor || defaultKeyExtractor;\n return {\n section,\n key:\n key + ':' + extractor(getItem(sectionData, itemIndex), itemIndex),\n index: itemIndex,\n leadingItem: getItem(sectionData, itemIndex - 1),\n leadingSection: sections[i - 1],\n trailingItem: getItem(sectionData, itemIndex + 1),\n trailingSection: sections[i + 1],\n };\n }\n }\n }\n\n _convertViewable = (viewable: ViewToken): ?ViewToken => {\n invariant(viewable.index != null, 'Received a broken ViewToken');\n const info = this._subExtractor(viewable.index);\n if (!info) {\n return null;\n }\n const keyExtractorWithNullableIndex = info.section.keyExtractor;\n const keyExtractorWithNonNullableIndex =\n this.props.keyExtractor || defaultKeyExtractor;\n const key =\n keyExtractorWithNullableIndex != null\n ? keyExtractorWithNullableIndex(viewable.item, info.index)\n : keyExtractorWithNonNullableIndex(viewable.item, info.index ?? 0);\n\n return {\n ...viewable,\n index: info.index,\n key,\n section: info.section,\n };\n };\n\n _onViewableItemsChanged = ({\n viewableItems,\n changed,\n }: {\n viewableItems: Array,\n changed: Array,\n ...\n }) => {\n const onViewableItemsChanged = this.props.onViewableItemsChanged;\n if (onViewableItemsChanged != null) {\n onViewableItemsChanged({\n viewableItems: viewableItems\n .map(this._convertViewable, this)\n .filter(Boolean),\n changed: changed.map(this._convertViewable, this).filter(Boolean),\n });\n }\n };\n\n _renderItem =\n (listItemCount: number): $FlowFixMe =>\n // eslint-disable-next-line react/no-unstable-nested-components\n ({item, index}: {item: Item, index: number, ...}) => {\n const info = this._subExtractor(index);\n if (!info) {\n return null;\n }\n const infoIndex = info.index;\n if (infoIndex == null) {\n const {section} = info;\n if (info.header === true) {\n const {renderSectionHeader} = this.props;\n return renderSectionHeader ? renderSectionHeader({section}) : null;\n } else {\n const {renderSectionFooter} = this.props;\n return renderSectionFooter ? renderSectionFooter({section}) : null;\n }\n } else {\n const renderItem = info.section.renderItem || this.props.renderItem;\n const SeparatorComponent = this._getSeparatorComponent(\n index,\n info,\n listItemCount,\n );\n invariant(renderItem, 'no renderItem!');\n return (\n \n );\n }\n };\n\n _updatePropsFor = (cellKey: string, value: any) => {\n const updateProps = this._updatePropsMap[cellKey];\n if (updateProps != null) {\n updateProps(value);\n }\n };\n\n _updateHighlightFor = (cellKey: string, value: boolean) => {\n const updateHighlight = this._updateHighlightMap[cellKey];\n if (updateHighlight != null) {\n updateHighlight(value);\n }\n };\n\n _setUpdateHighlightFor = (\n cellKey: string,\n updateHighlightFn: ?(boolean) => void,\n ) => {\n if (updateHighlightFn != null) {\n this._updateHighlightMap[cellKey] = updateHighlightFn;\n } else {\n // $FlowFixMe[prop-missing]\n delete this._updateHighlightFor[cellKey];\n }\n };\n\n _setUpdatePropsFor = (cellKey: string, updatePropsFn: ?(boolean) => void) => {\n if (updatePropsFn != null) {\n this._updatePropsMap[cellKey] = updatePropsFn;\n } else {\n delete this._updatePropsMap[cellKey];\n }\n };\n\n _getSeparatorComponent(\n index: number,\n info?: ?Object,\n listItemCount: number,\n ): ?React.ComponentType {\n info = info || this._subExtractor(index);\n if (!info) {\n return null;\n }\n const ItemSeparatorComponent =\n info.section.ItemSeparatorComponent || this.props.ItemSeparatorComponent;\n const {SectionSeparatorComponent} = this.props;\n const isLastItemInList = index === listItemCount - 1;\n const isLastItemInSection =\n info.index === this.props.getItemCount(info.section.data) - 1;\n if (SectionSeparatorComponent && isLastItemInSection) {\n return SectionSeparatorComponent;\n }\n if (ItemSeparatorComponent && !isLastItemInSection && !isLastItemInList) {\n return ItemSeparatorComponent;\n }\n return null;\n }\n\n _updateHighlightMap: {[string]: (boolean) => void} = {};\n _updatePropsMap: {[string]: void | (boolean => void)} = {};\n _listRef: ?React.ElementRef;\n _captureRef = (ref: null | React$ElementRef>) => {\n this._listRef = ref;\n };\n}\n\ntype ItemWithSeparatorCommonProps = $ReadOnly<{|\n leadingItem: ?Item,\n leadingSection: ?Object,\n section: Object,\n trailingItem: ?Item,\n trailingSection: ?Object,\n|}>;\n\ntype ItemWithSeparatorProps = $ReadOnly<{|\n ...ItemWithSeparatorCommonProps,\n LeadingSeparatorComponent: ?React.ComponentType,\n SeparatorComponent: ?React.ComponentType,\n cellKey: string,\n index: number,\n item: Item,\n setSelfHighlightCallback: (\n cellKey: string,\n updateFn: ?(boolean) => void,\n ) => void,\n setSelfUpdatePropsCallback: (\n cellKey: string,\n updateFn: ?(boolean) => void,\n ) => void,\n prevCellKey?: ?string,\n updateHighlightFor: (prevCellKey: string, value: boolean) => void,\n updatePropsFor: (prevCellKey: string, value: Object) => void,\n renderItem: Function,\n inverted: boolean,\n|}>;\n\nfunction ItemWithSeparator(props: ItemWithSeparatorProps): React.Node {\n const {\n LeadingSeparatorComponent,\n // this is the trailing separator and is associated with this item\n SeparatorComponent,\n cellKey,\n prevCellKey,\n setSelfHighlightCallback,\n updateHighlightFor,\n setSelfUpdatePropsCallback,\n updatePropsFor,\n item,\n index,\n section,\n inverted,\n } = props;\n\n const [leadingSeparatorHiglighted, setLeadingSeparatorHighlighted] =\n React.useState(false);\n\n const [separatorHighlighted, setSeparatorHighlighted] = React.useState(false);\n\n const [leadingSeparatorProps, setLeadingSeparatorProps] = React.useState({\n leadingItem: props.leadingItem,\n leadingSection: props.leadingSection,\n section: props.section,\n trailingItem: props.item,\n trailingSection: props.trailingSection,\n });\n const [separatorProps, setSeparatorProps] = React.useState({\n leadingItem: props.item,\n leadingSection: props.leadingSection,\n section: props.section,\n trailingItem: props.trailingItem,\n trailingSection: props.trailingSection,\n });\n\n React.useEffect(() => {\n setSelfHighlightCallback(cellKey, setSeparatorHighlighted);\n // $FlowFixMe[incompatible-call]\n setSelfUpdatePropsCallback(cellKey, setSeparatorProps);\n\n return () => {\n setSelfUpdatePropsCallback(cellKey, null);\n setSelfHighlightCallback(cellKey, null);\n };\n }, [\n cellKey,\n setSelfHighlightCallback,\n setSeparatorProps,\n setSelfUpdatePropsCallback,\n ]);\n\n const separators = {\n highlight: () => {\n setLeadingSeparatorHighlighted(true);\n setSeparatorHighlighted(true);\n if (prevCellKey != null) {\n updateHighlightFor(prevCellKey, true);\n }\n },\n unhighlight: () => {\n setLeadingSeparatorHighlighted(false);\n setSeparatorHighlighted(false);\n if (prevCellKey != null) {\n updateHighlightFor(prevCellKey, false);\n }\n },\n updateProps: (\n select: 'leading' | 'trailing',\n newProps: Partial,\n ) => {\n if (select === 'leading') {\n if (LeadingSeparatorComponent != null) {\n setLeadingSeparatorProps({...leadingSeparatorProps, ...newProps});\n } else if (prevCellKey != null) {\n // update the previous item's separator\n updatePropsFor(prevCellKey, {...leadingSeparatorProps, ...newProps});\n }\n } else if (select === 'trailing' && SeparatorComponent != null) {\n setSeparatorProps({...separatorProps, ...newProps});\n }\n },\n };\n const element = props.renderItem({\n item,\n index,\n section,\n separators,\n });\n const leadingSeparator = LeadingSeparatorComponent != null && (\n \n );\n const separator = SeparatorComponent != null && (\n \n );\n const RenderSeparator = leadingSeparator || separator;\n const firstSeparator = inverted === false ? leadingSeparator : separator;\n const secondSeparator = inverted === false ? separator : leadingSeparator;\n\n return (\n <>\n {RenderSeparator ? firstSeparator : null}\n {element}\n {RenderSeparator ? secondSeparator : null}\n \n );\n}\n\n/* $FlowFixMe[class-object-subtyping] added when improving typing for this\n * parameters */\n// $FlowFixMe[method-unbinding]\nmodule.exports = (VirtualizedSectionList: React.AbstractComponent<\n React.ElementConfig,\n $ReadOnly<{\n getListRef: () => ?React.ElementRef,\n scrollToLocation: (params: ScrollToLocationParamsType) => void,\n ...\n }>,\n>);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {AnimatedComponentType} from '../createAnimatedComponent';\n\nimport Image from '../../Image/Image';\nimport createAnimatedComponent from '../createAnimatedComponent';\nimport * as React from 'react';\n\nexport default (createAnimatedComponent(\n (Image: $FlowFixMe),\n): AnimatedComponentType<\n React.ElementConfig,\n React.ElementRef,\n>);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ImageStyleProp} from '../StyleSheet/StyleSheet';\nimport type {RootTag} from '../Types/RootTagTypes';\nimport type {AbstractImageAndroid, ImageAndroid} from './ImageTypes.flow';\n\nimport flattenStyle from '../StyleSheet/flattenStyle';\nimport StyleSheet from '../StyleSheet/StyleSheet';\nimport TextAncestor from '../Text/TextAncestor';\nimport ImageAnalyticsTagContext from './ImageAnalyticsTagContext';\nimport {\n unstable_getImageComponentDecorator,\n useWrapRefWithImageAttachedCallbacks,\n} from './ImageInjection';\nimport {getImageSourcesFromImageProps} from './ImageSourceUtils';\nimport {convertObjectFitToResizeMode} from './ImageUtils';\nimport ImageViewNativeComponent from './ImageViewNativeComponent';\nimport NativeImageLoaderAndroid, {\n type ImageSize,\n} from './NativeImageLoaderAndroid';\nimport resolveAssetSource from './resolveAssetSource';\nimport TextInlineImageNativeComponent from './TextInlineImageNativeComponent';\nimport * as React from 'react';\n\nlet _requestId = 1;\nfunction generateRequestId() {\n return _requestId++;\n}\n\n/**\n * Retrieve the width and height (in pixels) of an image prior to displaying it\n *\n * See https://reactnative.dev/docs/image#getsize\n */\nfunction getSize(\n url: string,\n success?: (width: number, height: number) => void,\n failure?: (error: mixed) => void,\n): void | Promise {\n const promise = NativeImageLoaderAndroid.getSize(url);\n if (typeof success !== 'function') {\n return promise;\n }\n promise\n .then(sizes => success(sizes.width, sizes.height))\n .catch(\n failure ||\n function () {\n console.warn('Failed to get size for image: ' + url);\n },\n );\n}\n\n/**\n * Retrieve the width and height (in pixels) of an image prior to displaying it\n * with the ability to provide the headers for the request\n *\n * See https://reactnative.dev/docs/image#getsizewithheaders\n */\nfunction getSizeWithHeaders(\n url: string,\n headers: {[string]: string, ...},\n success?: (width: number, height: number) => void,\n failure?: (error: mixed) => void,\n): void | Promise {\n const promise = NativeImageLoaderAndroid.getSizeWithHeaders(url, headers);\n if (typeof success !== 'function') {\n return promise;\n }\n promise\n .then(sizes => success(sizes.width, sizes.height))\n .catch(\n failure ||\n function () {\n console.warn('Failed to get size for image: ' + url);\n },\n );\n}\n\nfunction prefetchWithMetadata(\n url: string,\n queryRootName: string,\n rootTag?: ?RootTag,\n callback: ?(requestId: number) => void,\n): Promise {\n // TODO: T79192300 Log queryRootName and rootTag\n return prefetch(url, callback);\n}\n\nfunction prefetch(\n url: string,\n callback: ?(requestId: number) => void,\n): Promise {\n const requestId = generateRequestId();\n callback && callback(requestId);\n return NativeImageLoaderAndroid.prefetchImage(url, requestId);\n}\n\nfunction abortPrefetch(requestId: number): void {\n NativeImageLoaderAndroid.abortRequest(requestId);\n}\n\n/**\n * Perform cache interrogation.\n *\n * See https://reactnative.dev/docs/image#querycache\n */\nasync function queryCache(\n urls: Array,\n): Promise<{[string]: 'memory' | 'disk' | 'disk/memory', ...}> {\n return NativeImageLoaderAndroid.queryCache(urls);\n}\n\n/**\n * A React component for displaying different types of images,\n * including network images, static resources, temporary local images, and\n * images from local disk, such as the camera roll.\n *\n * See https://reactnative.dev/docs/image\n */\nlet BaseImage: AbstractImageAndroid = React.forwardRef(\n (props, forwardedRef) => {\n let source = getImageSourcesFromImageProps(props) || {\n uri: undefined,\n width: undefined,\n height: undefined,\n };\n const defaultSource = resolveAssetSource(props.defaultSource);\n const loadingIndicatorSource = resolveAssetSource(\n props.loadingIndicatorSource,\n );\n\n if (props.children) {\n throw new Error(\n 'The component cannot contain children. If you want to render content on top of the image, consider using the component or absolute positioning.',\n );\n }\n\n if (props.defaultSource != null && props.loadingIndicatorSource != null) {\n throw new Error(\n 'The component cannot have defaultSource and loadingIndicatorSource at the same time. Please use either defaultSource or loadingIndicatorSource.',\n );\n }\n\n let style;\n let sources;\n if (Array.isArray(source)) {\n style = flattenStyle([styles.base, props.style]);\n sources = source;\n } else {\n const {uri} = source;\n const width = source.width ?? props.width;\n const height = source.height ?? props.height;\n style = flattenStyle([\n {width, height},\n styles.base,\n props.style,\n ]);\n sources = [source];\n if (uri === '') {\n console.warn('source.uri should not be an empty string');\n }\n }\n\n const {height, width, ...restProps} = props;\n\n const {onLoadStart, onLoad, onLoadEnd, onError} = props;\n const nativeProps = {\n ...restProps,\n style,\n shouldNotifyLoadEvents: !!(onLoadStart || onLoad || onLoadEnd || onError),\n // Both iOS and C++ sides expect to have \"source\" prop, whereas on Android it's \"src\"\n // (for historical reasons). So in the latter case we populate both \"src\" and \"source\",\n // in order to have a better alignment between platforms in the future.\n src: sources,\n source: sources,\n /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found\n * when making Flow check .android.js files. */\n headers: (source?.[0]?.headers || source?.headers: ?{[string]: string}),\n defaultSrc: defaultSource ? defaultSource.uri : null,\n loadingIndicatorSrc: loadingIndicatorSource\n ? loadingIndicatorSource.uri\n : null,\n accessibilityLabel:\n props['aria-label'] ?? props.accessibilityLabel ?? props.alt,\n accessibilityLabelledBy:\n props?.['aria-labelledby'] ?? props?.accessibilityLabelledBy,\n accessible: props.alt !== undefined ? true : props.accessible,\n accessibilityState: {\n busy: props['aria-busy'] ?? props.accessibilityState?.busy,\n checked: props['aria-checked'] ?? props.accessibilityState?.checked,\n disabled: props['aria-disabled'] ?? props.accessibilityState?.disabled,\n expanded: props['aria-expanded'] ?? props.accessibilityState?.expanded,\n selected: props['aria-selected'] ?? props.accessibilityState?.selected,\n },\n };\n\n const objectFit = style?.objectFit\n ? convertObjectFitToResizeMode(style.objectFit)\n : null;\n const resizeMode =\n objectFit || props.resizeMode || style?.resizeMode || 'cover';\n\n const actualRef = useWrapRefWithImageAttachedCallbacks(forwardedRef);\n\n return (\n \n {analyticTag => {\n const nativePropsWithAnalytics =\n analyticTag !== null\n ? {\n ...nativeProps,\n internal_analyticTag: analyticTag,\n }\n : nativeProps;\n return (\n \n {hasTextAncestor => {\n if (hasTextAncestor) {\n return (\n \n );\n }\n\n return (\n \n );\n }}\n \n );\n }}\n \n );\n },\n);\n\nconst imageComponentDecorator = unstable_getImageComponentDecorator();\nif (imageComponentDecorator != null) {\n BaseImage = imageComponentDecorator(BaseImage);\n}\n\n// $FlowExpectedError[incompatible-type] Eventually we need to move these functions from statics of the component to exports in the module.\nconst Image: ImageAndroid = BaseImage;\n\nImage.displayName = 'Image';\n\n/**\n * Retrieve the width and height (in pixels) of an image prior to displaying it\n *\n * See https://reactnative.dev/docs/image#getsize\n */\n// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.\nImage.getSize = getSize;\n\n/**\n * Retrieve the width and height (in pixels) of an image prior to displaying it\n * with the ability to provide the headers for the request\n *\n * See https://reactnative.dev/docs/image#getsizewithheaders\n */\n// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.\nImage.getSizeWithHeaders = getSizeWithHeaders;\n\n/**\n * Prefetches a remote image for later use by downloading it to the disk\n * cache\n *\n * See https://reactnative.dev/docs/image#prefetch\n */\n// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.\nImage.prefetch = prefetch;\n\n/**\n * Prefetches a remote image for later use by downloading it to the disk\n * cache, and adds metadata for queryRootName and rootTag.\n *\n * See https://reactnative.dev/docs/image#prefetch\n */\n// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.\nImage.prefetchWithMetadata = prefetchWithMetadata;\n\n/**\n * Abort prefetch request.\n *\n * See https://reactnative.dev/docs/image#abortprefetch\n */\n// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.\nImage.abortPrefetch = abortPrefetch;\n\n/**\n * Perform cache interrogation.\n *\n * See https://reactnative.dev/docs/image#querycache\n */\n// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.\nImage.queryCache = queryCache;\n\n/**\n * Resolves an asset reference into an object.\n *\n * See https://reactnative.dev/docs/image#resolveassetsource\n */\n// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.\nImage.resolveAssetSource = resolveAssetSource;\n\nconst styles = StyleSheet.create({\n base: {\n overflow: 'hidden',\n },\n});\n\nmodule.exports = Image;\n","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport * as React from 'react';\n\ntype ContextType = ?string;\n\nconst Context: React.Context =\n React.createContext(null);\n\nif (__DEV__) {\n Context.displayName = 'ImageAnalyticsTagContext';\n}\n\nexport default Context;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ViewProps} from '../Components/View/ViewPropTypes';\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../Renderer/shims/ReactNativeTypes';\nimport type {\n ColorValue,\n DangerouslyImpreciseStyle,\n ImageStyleProp,\n} from '../StyleSheet/StyleSheet';\nimport type {ResolvedAssetSource} from './AssetSourceResolver';\nimport type {ImageProps} from './ImageProps';\nimport type {ElementRef} from 'react';\n\nimport * as NativeComponentRegistry from '../NativeComponent/NativeComponentRegistry';\nimport {ConditionallyIgnoredEventHandlers} from '../NativeComponent/ViewConfigIgnore';\nimport codegenNativeCommands from '../Utilities/codegenNativeCommands';\nimport Platform from '../Utilities/Platform';\n\ntype Props = $ReadOnly<{\n ...ImageProps,\n ...ViewProps,\n\n style?: ImageStyleProp | DangerouslyImpreciseStyle,\n\n // iOS native props\n tintColor?: ColorValue,\n\n // Android native props\n shouldNotifyLoadEvents?: boolean,\n src?:\n | ?ResolvedAssetSource\n | ?$ReadOnlyArray>,\n headers?: ?{[string]: string},\n defaultSrc?: ?string,\n loadingIndicatorSrc?: ?string,\n}>;\n\ninterface NativeCommands {\n +setIsVisible_EXPERIMENTAL: (\n viewRef: ElementRef>,\n isVisible: boolean,\n ) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['setIsVisible_EXPERIMENTAL'],\n});\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig =\n Platform.OS === 'android'\n ? {\n uiViewClassName: 'RCTImageView',\n bubblingEventTypes: {},\n directEventTypes: {\n topLoadStart: {\n registrationName: 'onLoadStart',\n },\n topProgress: {\n registrationName: 'onProgress',\n },\n topError: {\n registrationName: 'onError',\n },\n topLoad: {\n registrationName: 'onLoad',\n },\n topLoadEnd: {\n registrationName: 'onLoadEnd',\n },\n },\n validAttributes: {\n blurRadius: true,\n internal_analyticTag: true,\n resizeMethod: true,\n resizeMode: true,\n resizeMultiplier: true,\n tintColor: {\n process: require('../StyleSheet/processColor').default,\n },\n borderBottomLeftRadius: true,\n borderTopLeftRadius: true,\n src: true,\n // NOTE: New Architecture expects this to be called `source`,\n // regardless of the platform, therefore propagate it as well.\n // For the backwards compatibility reasons, we keep both `src`\n // and `source`, which will be identical at this stage.\n source: true,\n borderRadius: true,\n headers: true,\n shouldNotifyLoadEvents: true,\n defaultSrc: true,\n overlayColor: {\n process: require('../StyleSheet/processColor').default,\n },\n borderColor: {\n process: require('../StyleSheet/processColor').default,\n },\n accessible: true,\n progressiveRenderingEnabled: true,\n fadeDuration: true,\n borderBottomRightRadius: true,\n borderTopRightRadius: true,\n loadingIndicatorSrc: true,\n },\n }\n : {\n uiViewClassName: 'RCTImageView',\n bubblingEventTypes: {},\n directEventTypes: {\n topLoadStart: {\n registrationName: 'onLoadStart',\n },\n topProgress: {\n registrationName: 'onProgress',\n },\n topError: {\n registrationName: 'onError',\n },\n topPartialLoad: {\n registrationName: 'onPartialLoad',\n },\n topLoad: {\n registrationName: 'onLoad',\n },\n topLoadEnd: {\n registrationName: 'onLoadEnd',\n },\n },\n validAttributes: {\n blurRadius: true,\n capInsets: {\n diff: require('../Utilities/differ/insetsDiffer'),\n },\n defaultSource: {\n process: require('./resolveAssetSource'),\n },\n internal_analyticTag: true,\n resizeMode: true,\n source: true,\n tintColor: {\n process: require('../StyleSheet/processColor').default,\n },\n ...ConditionallyIgnoredEventHandlers({\n onLoadStart: true,\n onLoad: true,\n onLoadEnd: true,\n onProgress: true,\n onError: true,\n onPartialLoad: true,\n }),\n },\n };\n\nconst ImageViewNativeComponent: HostComponent =\n NativeComponentRegistry.get(\n 'RCTImageView',\n () => __INTERNAL_VIEW_CONFIG,\n );\n\nexport default ImageViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeImageLoaderAndroid';\nimport NativeImageLoaderAndroid from '../../src/private/specs/modules/NativeImageLoaderAndroid';\nexport default NativeImageLoaderAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type ImageSize = {\n width: number,\n height: number,\n ...\n};\n\nexport interface Spec extends TurboModule {\n +abortRequest: (requestId: number) => void;\n +getConstants: () => {||};\n +getSize: (uri: string) => Promise;\n +getSizeWithHeaders: (uri: string, headers: Object) => Promise;\n +prefetchImage: (uri: string, requestId: number) => Promise;\n +queryCache: (uris: Array) => Promise;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('ImageLoader'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nimport type {ViewProps} from '../Components/View/ViewPropTypes';\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../StyleSheet/StyleSheet';\nimport type {ImageResizeMode} from './ImageResizeMode';\n\nimport * as NativeComponentRegistry from '../NativeComponent/NativeComponentRegistry';\n\ntype NativeProps = $ReadOnly<{\n ...ViewProps,\n resizeMode?: ?ImageResizeMode,\n src?: ?$ReadOnlyArray>,\n tintColor?: ?ColorValue,\n headers?: ?{[string]: string},\n}>;\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {\n uiViewClassName: 'RCTTextInlineImage',\n bubblingEventTypes: {},\n directEventTypes: {},\n validAttributes: {\n resizeMode: true,\n src: true,\n tintColor: {\n process: require('../StyleSheet/processColor').default,\n },\n headers: true,\n },\n};\n\nconst TextInlineImage: HostComponent =\n NativeComponentRegistry.get(\n 'RCTTextInlineImage',\n () => __INTERNAL_VIEW_CONFIG,\n );\n\nexport default TextInlineImage;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport type {ResolvedAssetSource} from './AssetSourceResolver';\nimport type {ImageProps} from './ImageProps';\n\nimport resolveAssetSource from './resolveAssetSource';\n\n/**\n * A function which returns the appropriate value for image source\n * by resolving the `source`, `src` and `srcSet` props.\n */\nexport function getImageSourcesFromImageProps(\n imageProps: ImageProps,\n): ?ResolvedAssetSource | $ReadOnlyArray<{uri: string, ...}> {\n let source = resolveAssetSource(imageProps.source);\n\n let sources;\n\n const {crossOrigin, referrerPolicy, src, srcSet, width, height} = imageProps;\n\n const headers: {[string]: string} = {};\n if (crossOrigin === 'use-credentials') {\n headers['Access-Control-Allow-Credentials'] = 'true';\n }\n if (referrerPolicy != null) {\n headers['Referrer-Policy'] = referrerPolicy;\n }\n if (srcSet != null) {\n const sourceList = [];\n const srcSetList = srcSet.split(', ');\n // `src` prop should be used with default scale if `srcSet` does not have 1x scale.\n let shouldUseSrcForDefaultScale = true;\n srcSetList.forEach(imageSrc => {\n const [uri, xScale = '1x'] = imageSrc.split(' ');\n if (!xScale.endsWith('x')) {\n console.warn(\n 'The provided format for scale is not supported yet. Please use scales like 1x, 2x, etc.',\n );\n } else {\n const scale = parseInt(xScale.split('x')[0], 10);\n if (!isNaN(scale)) {\n // 1x scale is provided in `srcSet` prop so ignore the `src` prop if provided.\n shouldUseSrcForDefaultScale =\n scale === 1 ? false : shouldUseSrcForDefaultScale;\n sourceList.push({headers: headers, scale, uri, width, height});\n }\n }\n });\n\n if (shouldUseSrcForDefaultScale && src != null) {\n sourceList.push({\n headers: headers,\n scale: 1,\n uri: src,\n width,\n height,\n });\n }\n if (sourceList.length === 0) {\n console.warn('The provided value for srcSet is not valid.');\n }\n\n sources = sourceList;\n } else if (src != null) {\n sources = [{uri: src, headers: headers, width, height}];\n } else {\n sources = source;\n }\n return sources;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\ntype ResizeMode = 'cover' | 'contain' | 'stretch' | 'repeat' | 'center';\n\nexport function convertObjectFitToResizeMode(objectFit: string): ResizeMode {\n const objectFitMap = {\n contain: 'contain',\n cover: 'cover',\n fill: 'stretch',\n 'scale-down': 'contain',\n };\n // $FlowFixMe[invalid-computed-prop]\n return objectFitMap[objectFit];\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {\n AbstractImageAndroid,\n AbstractImageIOS,\n Image as ImageComponent,\n} from './ImageTypes.flow';\n\nimport useMergeRefs from '../Utilities/useMergeRefs';\nimport * as React from 'react';\nimport {useRef} from 'react';\n\ntype ImageComponentDecorator = (AbstractImageAndroid => AbstractImageAndroid) &\n (AbstractImageIOS => AbstractImageIOS);\n\nlet injectedImageComponentDecorator: ?ImageComponentDecorator;\n\nexport function unstable_setImageComponentDecorator(\n imageComponentDecorator: ?ImageComponentDecorator,\n): void {\n injectedImageComponentDecorator = imageComponentDecorator;\n}\n\nexport function unstable_getImageComponentDecorator(): ?ImageComponentDecorator {\n return injectedImageComponentDecorator;\n}\n\ntype ImageInstance = React.ElementRef;\n\ntype ImageAttachedCallback = (\n imageInstance: ImageInstance,\n) => void | (() => void);\n\nconst imageAttachedCallbacks = new Set();\n\nexport function unstable_registerImageAttachedCallback(\n callback: ImageAttachedCallback,\n): void {\n imageAttachedCallbacks.add(callback);\n}\n\nexport function unstable_unregisterImageAttachedCallback(\n callback: ImageAttachedCallback,\n): void {\n imageAttachedCallbacks.delete(callback);\n}\n\nexport function useWrapRefWithImageAttachedCallbacks(\n forwardedRef: React.RefSetter,\n): React.RefSetter {\n const pendingCleanupCallbacks = useRef void>>([]);\n\n const imageAttachedCallbacksRef =\n useRef void>(null);\n\n if (imageAttachedCallbacksRef.current == null) {\n imageAttachedCallbacksRef.current = (node: ImageInstance | null): void => {\n if (node == null) {\n if (pendingCleanupCallbacks.current.length > 0) {\n pendingCleanupCallbacks.current.forEach(cb => cb());\n pendingCleanupCallbacks.current = [];\n }\n } else {\n imageAttachedCallbacks.forEach(imageAttachedCallback => {\n const maybeCleanupCallback = imageAttachedCallback(node);\n if (maybeCleanupCallback != null) {\n pendingCleanupCallbacks.current.push(maybeCleanupCallback);\n }\n });\n }\n };\n }\n\n // `useMergeRefs` returns a stable ref if its arguments don't change.\n return useMergeRefs(\n forwardedRef,\n imageAttachedCallbacksRef.current,\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {____ViewStyle_Internal} from '../../StyleSheet/StyleSheetTypes';\nimport type {AnimatedComponentType} from '../createAnimatedComponent';\n\nimport RefreshControl from '../../Components/RefreshControl/RefreshControl';\nimport ScrollView from '../../Components/ScrollView/ScrollView';\nimport flattenStyle from '../../StyleSheet/flattenStyle';\nimport splitLayoutProps from '../../StyleSheet/splitLayoutProps';\nimport StyleSheet from '../../StyleSheet/StyleSheet';\nimport Platform from '../../Utilities/Platform';\nimport useMergeRefs from '../../Utilities/useMergeRefs';\nimport createAnimatedComponent from '../createAnimatedComponent';\nimport useAnimatedProps from '../useAnimatedProps';\nimport * as React from 'react';\nimport {useMemo} from 'react';\n\ntype Props = React.ElementConfig;\ntype Instance = React.ElementRef;\n\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nconst AnimatedScrollView: AnimatedComponentType =\n React.forwardRef(\n function AnimatedScrollViewWithOrWithoutInvertedRefreshControl(\n props,\n forwardedRef,\n ) {\n // (Android only) When a ScrollView has a RefreshControl and\n // any `style` property set with an Animated.Value, the CSS\n // gets incorrectly applied twice. This is because ScrollView\n // swaps the parent/child relationship of itself and the\n // RefreshControl component (see ScrollView.js for more details).\n if (\n Platform.OS === 'android' &&\n props.refreshControl != null &&\n props.style != null\n ) {\n return (\n \n );\n } else {\n return (\n \n );\n }\n },\n );\n\nconst AnimatedScrollViewWithInvertedRefreshControl = React.forwardRef(\n // $FlowFixMe[incompatible-call]\n function AnimatedScrollViewWithInvertedRefreshControl(\n props: {\n ...React.ElementConfig,\n // $FlowFixMe[unclear-type] Same Flow type as `refreshControl` in ScrollView\n refreshControl: React.Element,\n },\n forwardedRef:\n | {current: Instance | null, ...}\n | ((Instance | null) => mixed),\n ) {\n // Split `props` into the animate-able props for the parent (RefreshControl)\n // and child (ScrollView).\n const {intermediatePropsForRefreshControl, intermediatePropsForScrollView} =\n useMemo(() => {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n // $FlowFixMe[incompatible-call]\n const {outer, inner} = splitLayoutProps(flattenStyle(props.style));\n return {\n intermediatePropsForRefreshControl: {style: outer},\n intermediatePropsForScrollView: {...props, style: inner},\n };\n }, [props]);\n\n // Handle animated props on `refreshControl`.\n const [refreshControlAnimatedProps, refreshControlRef] = useAnimatedProps<\n {style: ?____ViewStyle_Internal},\n $FlowFixMe,\n >(intermediatePropsForRefreshControl);\n // NOTE: Assumes that refreshControl.ref` and `refreshControl.style` can be\n // safely clobbered.\n const refreshControl: React.Element =\n React.cloneElement(props.refreshControl, {\n ...refreshControlAnimatedProps,\n ref: refreshControlRef,\n });\n\n // Handle animated props on `NativeDirectionalScrollView`.\n const [scrollViewAnimatedProps, scrollViewRef] = useAnimatedProps<\n Props,\n Instance,\n >(intermediatePropsForScrollView);\n const ref = useMergeRefs(scrollViewRef, forwardedRef);\n\n return (\n // $FlowFixMe[incompatible-use] Investigate useAnimatedProps return value\n \n );\n },\n);\n\nconst AnimatedScrollViewWithoutInvertedRefreshControl =\n createAnimatedComponent(ScrollView);\n\nexport default AnimatedScrollView;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\nimport type {ViewProps} from '../View/ViewPropTypes';\n\nimport AndroidSwipeRefreshLayoutNativeComponent, {\n Commands as AndroidSwipeRefreshLayoutCommands,\n} from './AndroidSwipeRefreshLayoutNativeComponent';\nimport PullToRefreshViewNativeComponent, {\n Commands as PullToRefreshCommands,\n} from './PullToRefreshViewNativeComponent';\n\nconst Platform = require('../../Utilities/Platform');\nconst React = require('react');\n\ntype IOSProps = $ReadOnly<{|\n /**\n * The color of the refresh indicator.\n */\n tintColor?: ?ColorValue,\n /**\n * Title color.\n */\n titleColor?: ?ColorValue,\n /**\n * The title displayed under the refresh indicator.\n */\n title?: ?string,\n|}>;\n\ntype AndroidProps = $ReadOnly<{|\n /**\n * Whether the pull to refresh functionality is enabled.\n */\n enabled?: ?boolean,\n /**\n * The colors (at least one) that will be used to draw the refresh indicator.\n */\n colors?: ?$ReadOnlyArray,\n /**\n * The background color of the refresh indicator.\n */\n progressBackgroundColor?: ?ColorValue,\n /**\n * Size of the refresh indicator.\n */\n size?: ?('default' | 'large'),\n|}>;\n\nexport type RefreshControlProps = $ReadOnly<{|\n ...ViewProps,\n ...IOSProps,\n ...AndroidProps,\n\n /**\n * Called when the view starts refreshing.\n */\n onRefresh?: ?() => void | Promise,\n\n /**\n * Whether the view should be indicating an active refresh.\n */\n refreshing: boolean,\n\n /**\n * Progress view top offset\n */\n progressViewOffset?: ?number,\n|}>;\n\n/**\n * This component is used inside a ScrollView or ListView to add pull to refresh\n * functionality. When the ScrollView is at `scrollY: 0`, swiping down\n * triggers an `onRefresh` event.\n *\n * ### Usage example\n *\n * ``` js\n * class RefreshableList extends Component {\n * constructor(props) {\n * super(props);\n * this.state = {\n * refreshing: false,\n * };\n * }\n *\n * _onRefresh() {\n * this.setState({refreshing: true});\n * fetchData().then(() => {\n * this.setState({refreshing: false});\n * });\n * }\n *\n * render() {\n * return (\n * \n * }\n * ...\n * >\n * ...\n * \n * );\n * }\n * ...\n * }\n * ```\n *\n * __Note:__ `refreshing` is a controlled prop, this is why it needs to be set to true\n * in the `onRefresh` function otherwise the refresh indicator will stop immediately.\n */\nclass RefreshControl extends React.Component {\n _nativeRef: ?React.ElementRef<\n | typeof PullToRefreshViewNativeComponent\n | typeof AndroidSwipeRefreshLayoutNativeComponent,\n >;\n _lastNativeRefreshing = false;\n\n componentDidMount() {\n this._lastNativeRefreshing = this.props.refreshing;\n }\n\n componentDidUpdate(prevProps: RefreshControlProps) {\n // RefreshControl is a controlled component so if the native refreshing\n // value doesn't match the current js refreshing prop update it to\n // the js value.\n if (this.props.refreshing !== prevProps.refreshing) {\n this._lastNativeRefreshing = this.props.refreshing;\n } else if (\n this.props.refreshing !== this._lastNativeRefreshing &&\n this._nativeRef\n ) {\n if (Platform.OS === 'android') {\n AndroidSwipeRefreshLayoutCommands.setNativeRefreshing(\n this._nativeRef,\n this.props.refreshing,\n );\n } else {\n PullToRefreshCommands.setNativeRefreshing(\n this._nativeRef,\n this.props.refreshing,\n );\n }\n this._lastNativeRefreshing = this.props.refreshing;\n }\n }\n\n render(): React.Node {\n if (Platform.OS === 'ios') {\n const {enabled, colors, progressBackgroundColor, size, ...props} =\n this.props;\n return (\n \n );\n } else {\n const {tintColor, titleColor, title, ...props} = this.props;\n return (\n \n );\n }\n }\n\n _onRefresh = () => {\n this._lastNativeRefreshing = true;\n\n // $FlowFixMe[unused-promise]\n this.props.onRefresh && this.props.onRefresh();\n\n // The native component will start refreshing so force an update to\n // make sure it stays in sync with the js component.\n this.forceUpdate();\n };\n\n _setNativeRef = (\n ref: ?React.ElementRef<\n | typeof PullToRefreshViewNativeComponent\n | typeof AndroidSwipeRefreshLayoutNativeComponent,\n >,\n ) => {\n this._nativeRef = ref;\n };\n}\n\nmodule.exports = RefreshControl;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/AndroidSwipeRefreshLayoutNativeComponent';\nimport AndroidSwipeRefreshLayoutNativeComponent from '../../../src/private/specs/components/AndroidSwipeRefreshLayoutNativeComponent';\nexport default AndroidSwipeRefreshLayoutNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';\nimport type {\n DirectEventHandler,\n Float,\n WithDefault,\n} from '../../../../Libraries/Types/CodegenTypes';\n\nimport codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\nimport * as React from 'react';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n /**\n * Whether the pull to refresh functionality is enabled.\n */\n enabled?: WithDefault,\n /**\n * The colors (at least one) that will be used to draw the refresh indicator.\n */\n colors?: ?$ReadOnlyArray,\n /**\n * The background color of the refresh indicator.\n */\n progressBackgroundColor?: ?ColorValue,\n /**\n * Size of the refresh indicator.\n */\n size?: WithDefault<'default' | 'large', 'default'>,\n /**\n * Progress view top offset\n */\n progressViewOffset?: WithDefault,\n\n /**\n * Called when the view starts refreshing.\n */\n onRefresh?: ?DirectEventHandler,\n\n /**\n * Whether the view should be indicating an active refresh.\n */\n refreshing: boolean,\n|}>;\n\ntype NativeType = HostComponent;\n\ninterface NativeCommands {\n +setNativeRefreshing: (\n viewRef: React.ElementRef,\n value: boolean,\n ) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['setNativeRefreshing'],\n});\n\nexport default (codegenNativeComponent(\n 'AndroidSwipeRefreshLayout',\n): NativeType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/PullToRefreshViewNativeComponent';\nimport PullToRefreshViewNativeComponent from '../../../src/private/specs/components/PullToRefreshViewNativeComponent';\nexport default PullToRefreshViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';\nimport type {\n DirectEventHandler,\n Float,\n WithDefault,\n} from '../../../../Libraries/Types/CodegenTypes';\n\nimport codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\nimport * as React from 'react';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n /**\n * The color of the refresh indicator.\n */\n tintColor?: ?ColorValue,\n /**\n * Title color.\n */\n titleColor?: ?ColorValue,\n /**\n * The title displayed under the refresh indicator.\n */\n title?: WithDefault,\n /**\n * Progress view top offset\n */\n progressViewOffset?: WithDefault,\n\n /**\n * Called when the view starts refreshing.\n */\n onRefresh?: ?DirectEventHandler,\n\n /**\n * Whether the view should be indicating an active refresh.\n */\n refreshing: boolean,\n|}>;\n\ntype ComponentType = HostComponent;\n\ninterface NativeCommands {\n +setNativeRefreshing: (\n viewRef: React.ElementRef,\n refreshing: boolean,\n ) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['setNativeRefreshing'],\n});\n\nexport default (codegenNativeComponent('PullToRefreshView', {\n paperComponentName: 'RCTRefreshControl',\n excludedPlatforms: ['android'],\n}): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';\nimport type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';\nimport type {PointProp} from '../../StyleSheet/PointPropType';\nimport type {ViewStyleProp} from '../../StyleSheet/StyleSheet';\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\nimport type {\n LayoutEvent,\n PressEvent,\n ScrollEvent,\n} from '../../Types/CoreEventTypes';\nimport type {EventSubscription} from '../../vendor/emitter/EventEmitter';\nimport type {KeyboardEvent, KeyboardMetrics} from '../Keyboard/Keyboard';\nimport type {ViewProps} from '../View/ViewPropTypes';\nimport type {Props as ScrollViewStickyHeaderProps} from './ScrollViewStickyHeader';\n\nimport AnimatedImplementation from '../../Animated/AnimatedImplementation';\nimport FrameRateLogger from '../../Interaction/FrameRateLogger';\nimport {findNodeHandle} from '../../ReactNative/RendererProxy';\nimport UIManager from '../../ReactNative/UIManager';\nimport flattenStyle from '../../StyleSheet/flattenStyle';\nimport splitLayoutProps from '../../StyleSheet/splitLayoutProps';\nimport StyleSheet from '../../StyleSheet/StyleSheet';\nimport Dimensions from '../../Utilities/Dimensions';\nimport dismissKeyboard from '../../Utilities/dismissKeyboard';\nimport Platform from '../../Utilities/Platform';\nimport EventEmitter from '../../vendor/emitter/EventEmitter';\nimport Keyboard from '../Keyboard/Keyboard';\nimport TextInputState from '../TextInput/TextInputState';\nimport View from '../View/View';\nimport AndroidHorizontalScrollContentViewNativeComponent from './AndroidHorizontalScrollContentViewNativeComponent';\nimport AndroidHorizontalScrollViewNativeComponent from './AndroidHorizontalScrollViewNativeComponent';\nimport processDecelerationRate from './processDecelerationRate';\nimport ScrollContentViewNativeComponent from './ScrollContentViewNativeComponent';\nimport Commands from './ScrollViewCommands';\nimport ScrollViewContext, {HORIZONTAL, VERTICAL} from './ScrollViewContext';\nimport ScrollViewNativeComponent from './ScrollViewNativeComponent';\nimport ScrollViewStickyHeader from './ScrollViewStickyHeader';\nimport invariant from 'invariant';\nimport memoize from 'memoize-one';\nimport nullthrows from 'nullthrows';\nimport * as React from 'react';\n\nif (Platform.OS === 'ios') {\n require('../../Renderer/shims/ReactNative'); // Force side effects to prevent T55744311\n}\n\nconst {NativeHorizontalScrollViewTuple, NativeVerticalScrollViewTuple} =\n Platform.OS === 'android'\n ? {\n NativeHorizontalScrollViewTuple: [\n AndroidHorizontalScrollViewNativeComponent,\n AndroidHorizontalScrollContentViewNativeComponent,\n ],\n NativeVerticalScrollViewTuple: [ScrollViewNativeComponent, View],\n }\n : {\n NativeHorizontalScrollViewTuple: [\n ScrollViewNativeComponent,\n ScrollContentViewNativeComponent,\n ],\n NativeVerticalScrollViewTuple: [\n ScrollViewNativeComponent,\n ScrollContentViewNativeComponent,\n ],\n };\n\n/*\n * iOS scroll event timing nuances:\n * ===============================\n *\n *\n * Scrolling without bouncing, if you touch down:\n * -------------------------------\n *\n * 1. `onMomentumScrollBegin` (when animation begins after letting up)\n * ... physical touch starts ...\n * 2. `onTouchStartCapture` (when you press down to stop the scroll)\n * 3. `onTouchStart` (same, but bubble phase)\n * 4. `onResponderRelease` (when lifting up - you could pause forever before * lifting)\n * 5. `onMomentumScrollEnd`\n *\n *\n * Scrolling with bouncing, if you touch down:\n * -------------------------------\n *\n * 1. `onMomentumScrollBegin` (when animation begins after letting up)\n * ... bounce begins ...\n * ... some time elapses ...\n * ... physical touch during bounce ...\n * 2. `onMomentumScrollEnd` (Makes no sense why this occurs first during bounce)\n * 3. `onTouchStartCapture` (immediately after `onMomentumScrollEnd`)\n * 4. `onTouchStart` (same, but bubble phase)\n * 5. `onTouchEnd` (You could hold the touch start for a long time)\n * 6. `onMomentumScrollBegin` (When releasing the view starts bouncing back)\n *\n * So when we receive an `onTouchStart`, how can we tell if we are touching\n * *during* an animation (which then causes the animation to stop)? The only way\n * to tell is if the `touchStart` occurred immediately after the\n * `onMomentumScrollEnd`.\n *\n * This is abstracted out for you, so you can just call this.scrollResponderIsAnimating() if\n * necessary\n *\n * `ScrollView` also includes logic for blurring a currently focused input\n * if one is focused while scrolling. This is a natural place\n * to put this logic since it can support not dismissing the keyboard while\n * scrolling, unless a recognized \"tap\"-like gesture has occurred.\n *\n * The public lifecycle API includes events for keyboard interaction, responder\n * interaction, and scrolling (among others). The keyboard callbacks\n * `onKeyboardWill/Did/*` are *global* events, but are invoked on scroll\n * responder's props so that you can guarantee that the scroll responder's\n * internal state has been updated accordingly (and deterministically) by\n * the time the props callbacks are invoke. Otherwise, you would always wonder\n * if the scroll responder is currently in a state where it recognizes new\n * keyboard positions etc. If coordinating scrolling with keyboard movement,\n * *always* use these hooks instead of listening to your own global keyboard\n * events.\n *\n * Public keyboard lifecycle API: (props callbacks)\n *\n * Standard Keyboard Appearance Sequence:\n *\n * this.props.onKeyboardWillShow\n * this.props.onKeyboardDidShow\n *\n * `onScrollResponderKeyboardDismissed` will be invoked if an appropriate\n * tap inside the scroll responder's scrollable region was responsible\n * for the dismissal of the keyboard. There are other reasons why the\n * keyboard could be dismissed.\n *\n * this.props.onScrollResponderKeyboardDismissed\n *\n * Standard Keyboard Hide Sequence:\n *\n * this.props.onKeyboardWillHide\n * this.props.onKeyboardDidHide\n */\n\n// Public methods for ScrollView\nexport type ScrollViewImperativeMethods = $ReadOnly<{|\n getScrollResponder: $PropertyType,\n getScrollableNode: $PropertyType,\n getInnerViewNode: $PropertyType,\n getInnerViewRef: $PropertyType,\n getNativeScrollRef: $PropertyType,\n scrollTo: $PropertyType,\n scrollToEnd: $PropertyType,\n flashScrollIndicators: $PropertyType,\n scrollResponderZoomTo: $PropertyType,\n scrollResponderScrollNativeHandleToKeyboard: $PropertyType<\n ScrollView,\n 'scrollResponderScrollNativeHandleToKeyboard',\n >,\n|}>;\n\nexport type DecelerationRateType = 'fast' | 'normal' | number;\nexport type ScrollResponderType = ScrollViewImperativeMethods;\n\ntype NativeScrollViewInstance = React.ElementRef>;\ntype PublicScrollViewInstance = $ReadOnly<{|\n ...$Exact,\n ...ScrollViewImperativeMethods,\n|}>;\n\ntype InnerViewInstance = React.ElementRef;\n\ntype IOSProps = $ReadOnly<{|\n /**\n * Controls whether iOS should automatically adjust the content inset\n * for scroll views that are placed behind a navigation bar or\n * tab bar/ toolbar. The default value is true.\n * @platform ios\n */\n automaticallyAdjustContentInsets?: ?boolean,\n /**\n * Controls whether the ScrollView should automatically adjust its `contentInset`\n * and `scrollViewInsets` when the Keyboard changes its size. The default value is false.\n * @platform ios\n */\n automaticallyAdjustKeyboardInsets?: ?boolean,\n /**\n * Controls whether iOS should automatically adjust the scroll indicator\n * insets. The default value is true. Available on iOS 13 and later.\n * @platform ios\n */\n automaticallyAdjustsScrollIndicatorInsets?: ?boolean,\n /**\n * The amount by which the scroll view content is inset from the edges\n * of the scroll view. Defaults to `{top: 0, left: 0, bottom: 0, right: 0}`.\n * @platform ios\n */\n contentInset?: ?EdgeInsetsProp,\n /**\n * When true, the scroll view bounces when it reaches the end of the\n * content if the content is larger then the scroll view along the axis of\n * the scroll direction. When false, it disables all bouncing even if\n * the `alwaysBounce*` props are true. The default value is true.\n * @platform ios\n */\n bounces?: ?boolean,\n /**\n * By default, ScrollView has an active pan responder that hijacks panresponders\n * deeper in the render tree in order to prevent accidental touches while scrolling.\n * However, in certain occasions (such as when using snapToInterval) in a vertical scrollview\n * You may want to disable this behavior in order to prevent the ScrollView from blocking touches\n */\n disableScrollViewPanResponder?: ?boolean,\n /**\n * When true, gestures can drive zoom past min/max and the zoom will animate\n * to the min/max value at gesture end, otherwise the zoom will not exceed\n * the limits.\n * @platform ios\n */\n bouncesZoom?: ?boolean,\n /**\n * When true, the scroll view bounces horizontally when it reaches the end\n * even if the content is smaller than the scroll view itself. The default\n * value is true when `horizontal={true}` and false otherwise.\n * @platform ios\n */\n alwaysBounceHorizontal?: ?boolean,\n /**\n * When true, the scroll view bounces vertically when it reaches the end\n * even if the content is smaller than the scroll view itself. The default\n * value is false when `horizontal={true}` and true otherwise.\n * @platform ios\n */\n alwaysBounceVertical?: ?boolean,\n /**\n * When true, the scroll view automatically centers the content when the\n * content is smaller than the scroll view bounds; when the content is\n * larger than the scroll view, this property has no effect. The default\n * value is false.\n * @platform ios\n */\n centerContent?: ?boolean,\n /**\n * The style of the scroll indicators.\n *\n * - `'default'` (the default), same as `black`.\n * - `'black'`, scroll indicator is black. This style is good against a light background.\n * - `'white'`, scroll indicator is white. This style is good against a dark background.\n *\n * @platform ios\n */\n indicatorStyle?: ?('default' | 'black' | 'white'),\n /**\n * When true, the ScrollView will try to lock to only vertical or horizontal\n * scrolling while dragging. The default value is false.\n * @platform ios\n */\n directionalLockEnabled?: ?boolean,\n /**\n * When false, once tracking starts, won't try to drag if the touch moves.\n * The default value is true.\n * @platform ios\n */\n canCancelContentTouches?: ?boolean,\n /**\n * The maximum allowed zoom scale. The default value is 1.0.\n * @platform ios\n */\n maximumZoomScale?: ?number,\n /**\n * The minimum allowed zoom scale. The default value is 1.0.\n * @platform ios\n */\n minimumZoomScale?: ?number,\n /**\n * When true, ScrollView allows use of pinch gestures to zoom in and out.\n * The default value is true.\n * @platform ios\n */\n pinchGestureEnabled?: ?boolean,\n /**\n * The amount by which the scroll view indicators are inset from the edges\n * of the scroll view. This should normally be set to the same value as\n * the `contentInset`. Defaults to `{0, 0, 0, 0}`.\n * @platform ios\n */\n scrollIndicatorInsets?: ?EdgeInsetsProp,\n /**\n * When true, the scroll view can be programmatically scrolled beyond its\n * content size. The default value is false.\n * @platform ios\n */\n scrollToOverflowEnabled?: ?boolean,\n /**\n * When true, the scroll view scrolls to top when the status bar is tapped.\n * The default value is true.\n * @platform ios\n */\n scrollsToTop?: ?boolean,\n /**\n * Fires when the scroll view scrolls to top after the status bar has been tapped\n * @platform ios\n */\n onScrollToTop?: (event: ScrollEvent) => void,\n /**\n * When true, shows a horizontal scroll indicator.\n * The default value is true.\n */\n showsHorizontalScrollIndicator?: ?boolean,\n /**\n * The current scale of the scroll view content. The default value is 1.0.\n * @platform ios\n */\n zoomScale?: ?number,\n /**\n * This property specifies how the safe area insets are used to modify the\n * content area of the scroll view. The default value of this property is\n * \"never\". Available on iOS 11 and later.\n * @platform ios\n */\n contentInsetAdjustmentBehavior?: ?(\n | 'automatic'\n | 'scrollableAxes'\n | 'never'\n | 'always'\n ),\n|}>;\n\ntype AndroidProps = $ReadOnly<{|\n /**\n * Enables nested scrolling for Android API level 21+.\n * Nested scrolling is supported by default on iOS\n * @platform android\n */\n nestedScrollEnabled?: ?boolean,\n /**\n * Sometimes a scrollview takes up more space than its content fills. When this is\n * the case, this prop will fill the rest of the scrollview with a color to avoid setting\n * a background and creating unnecessary overdraw. This is an advanced optimization\n * that is not needed in the general case.\n * @platform android\n */\n endFillColor?: ?ColorValue,\n /**\n * Tag used to log scroll performance on this scroll view. Will force\n * momentum events to be turned on (see sendMomentumEvents). This doesn't do\n * anything out of the box and you need to implement a custom native\n * FpsListener for it to be useful.\n * @platform android\n */\n scrollPerfTag?: ?string,\n /**\n * Used to override default value of overScroll mode.\n *\n * Possible values:\n *\n * - `'auto'` - Default value, allow a user to over-scroll\n * this view only if the content is large enough to meaningfully scroll.\n * - `'always'` - Always allow a user to over-scroll this view.\n * - `'never'` - Never allow a user to over-scroll this view.\n *\n * @platform android\n */\n overScrollMode?: ?('auto' | 'always' | 'never'),\n /**\n * Causes the scrollbars not to turn transparent when they are not in use.\n * The default value is false.\n *\n * @platform android\n */\n persistentScrollbar?: ?boolean,\n /**\n * Fades out the edges of the scroll content.\n *\n * If the value is greater than 0, the fading edges will be set accordingly\n * to the current scroll direction and position,\n * indicating if there is more content to show.\n *\n * The default value is 0.\n *\n * @platform android\n */\n fadingEdgeLength?: ?number,\n|}>;\n\ntype StickyHeaderComponentType = React.AbstractComponent<\n ScrollViewStickyHeaderProps,\n $ReadOnly void}>,\n>;\n\nexport type Props = $ReadOnly<{|\n ...ViewProps,\n ...IOSProps,\n ...AndroidProps,\n\n /**\n * These styles will be applied to the scroll view content container which\n * wraps all of the child views. Example:\n *\n * ```\n * return (\n * \n * \n * );\n * ...\n * const styles = StyleSheet.create({\n * contentContainer: {\n * paddingVertical: 20\n * }\n * });\n * ```\n */\n contentContainerStyle?: ?ViewStyleProp,\n /**\n * Used to manually set the starting scroll offset.\n * The default value is `{x: 0, y: 0}`.\n */\n contentOffset?: ?PointProp,\n /**\n * When true, the scroll view stops on the next index (in relation to scroll\n * position at release) regardless of how fast the gesture is. This can be\n * used for pagination when the page is less than the width of the\n * horizontal ScrollView or the height of the vertical ScrollView. The default value is false.\n */\n disableIntervalMomentum?: ?boolean,\n /**\n * A floating-point number that determines how quickly the scroll view\n * decelerates after the user lifts their finger. You may also use string\n * shortcuts `\"normal\"` and `\"fast\"` which match the underlying iOS settings\n * for `UIScrollViewDecelerationRateNormal` and\n * `UIScrollViewDecelerationRateFast` respectively.\n *\n * - `'normal'`: 0.998 on iOS, 0.985 on Android (the default)\n * - `'fast'`: 0.99 on iOS, 0.9 on Android\n */\n decelerationRate?: ?DecelerationRateType,\n\n /**\n * *Experimental, iOS Only*. The API is experimental and will change in future releases.\n *\n * Controls how much distance is travelled after user stops scrolling.\n * Value greater than 1 will increase the distance travelled.\n * Value less than 1 will decrease the distance travelled.\n *\n * @deprecated\n *\n * The default value is 1.\n */\n experimental_endDraggingSensitivityMultiplier?: ?number,\n\n /**\n * When true, the scroll view's children are arranged horizontally in a row\n * instead of vertically in a column. The default value is false.\n */\n horizontal?: ?boolean,\n /**\n * If sticky headers should stick at the bottom instead of the top of the\n * ScrollView. This is usually used with inverted ScrollViews.\n */\n invertStickyHeaders?: ?boolean,\n /**\n * Determines whether the keyboard gets dismissed in response to a drag.\n *\n * *Cross platform*\n *\n * - `'none'` (the default), drags do not dismiss the keyboard.\n * - `'on-drag'`, the keyboard is dismissed when a drag begins.\n *\n * *iOS Only*\n *\n * - `'interactive'`, the keyboard is dismissed interactively with the drag and moves in\n * synchrony with the touch; dragging upwards cancels the dismissal.\n * On android this is not supported and it will have the same behavior as 'none'.\n */\n keyboardDismissMode?: ?// default\n // cross-platform\n ('none' | 'on-drag' | 'interactive'), // ios only\n /**\n * Determines when the keyboard should stay visible after a tap.\n *\n * - `'never'` (the default), tapping outside of the focused text input when the keyboard\n * is up dismisses the keyboard. When this happens, children won't receive the tap.\n * - `'always'`, the keyboard will not dismiss automatically, and the scroll view will not\n * catch taps, but children of the scroll view can catch taps.\n * - `'handled'`, the keyboard will not dismiss automatically when the tap was handled by\n * a children, (or captured by an ancestor).\n * - `false`, deprecated, use 'never' instead\n * - `true`, deprecated, use 'always' instead\n */\n keyboardShouldPersistTaps?: ?('always' | 'never' | 'handled' | true | false),\n /**\n * When set, the scroll view will adjust the scroll position so that the first child that is\n * partially or fully visible and at or beyond `minIndexForVisible` will not change position.\n * This is useful for lists that are loading content in both directions, e.g. a chat thread,\n * where new messages coming in might otherwise cause the scroll position to jump. A value of 0\n * is common, but other values such as 1 can be used to skip loading spinners or other content\n * that should not maintain position.\n *\n * The optional `autoscrollToTopThreshold` can be used to make the content automatically scroll\n * to the top after making the adjustment if the user was within the threshold of the top before\n * the adjustment was made. This is also useful for chat-like applications where you want to see\n * new messages scroll into place, but not if the user has scrolled up a ways and it would be\n * disruptive to scroll a bunch.\n *\n * Caveat 1: Reordering elements in the scrollview with this enabled will probably cause\n * jumpiness and jank. It can be fixed, but there are currently no plans to do so. For now,\n * don't re-order the content of any ScrollViews or Lists that use this feature.\n *\n * Caveat 2: This simply uses `contentOffset` and `frame.origin` in native code to compute\n * visibility. Occlusion, transforms, and other complexity won't be taken into account as to\n * whether content is \"visible\" or not.\n *\n */\n maintainVisibleContentPosition?: ?$ReadOnly<{|\n minIndexForVisible: number,\n autoscrollToTopThreshold?: ?number,\n |}>,\n /**\n * Called when the momentum scroll starts (scroll which occurs as the ScrollView glides to a stop).\n */\n onMomentumScrollBegin?: ?(event: ScrollEvent) => void,\n /**\n * Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop).\n */\n onMomentumScrollEnd?: ?(event: ScrollEvent) => void,\n\n /**\n * Fires at most once per frame during scrolling.\n */\n onScroll?: ?(event: ScrollEvent) => void,\n /**\n * Called when the user begins to drag the scroll view.\n */\n onScrollBeginDrag?: ?(event: ScrollEvent) => void,\n /**\n * Called when the user stops dragging the scroll view and it either stops\n * or begins to glide.\n */\n onScrollEndDrag?: ?(event: ScrollEvent) => void,\n /**\n * Called when scrollable content view of the ScrollView changes.\n *\n * Handler function is passed the content width and content height as parameters:\n * `(contentWidth, contentHeight)`\n *\n * It's implemented using onLayout handler attached to the content container\n * which this ScrollView renders.\n */\n onContentSizeChange?: (contentWidth: number, contentHeight: number) => void,\n onKeyboardDidShow?: (event: KeyboardEvent) => void,\n onKeyboardDidHide?: (event: KeyboardEvent) => void,\n onKeyboardWillShow?: (event: KeyboardEvent) => void,\n onKeyboardWillHide?: (event: KeyboardEvent) => void,\n /**\n * When true, the scroll view stops on multiples of the scroll view's size\n * when scrolling. This can be used for horizontal pagination. The default\n * value is false.\n */\n pagingEnabled?: ?boolean,\n /**\n * When false, the view cannot be scrolled via touch interaction.\n * The default value is true.\n *\n * Note that the view can always be scrolled by calling `scrollTo`.\n */\n scrollEnabled?: ?boolean,\n /**\n * Limits how often scroll events will be fired while scrolling, specified as\n * a time interval in ms. This may be useful when expensive work is performed\n * in response to scrolling. Values <= `16` will disable throttling,\n * regardless of the refresh rate of the device.\n */\n scrollEventThrottle?: ?number,\n /**\n * When true, shows a vertical scroll indicator.\n * The default value is true.\n */\n showsVerticalScrollIndicator?: ?boolean,\n /**\n * When true, Sticky header is hidden when scrolling down, and dock at the top\n * when scrolling up\n */\n stickyHeaderHiddenOnScroll?: ?boolean,\n /**\n * An array of child indices determining which children get docked to the\n * top of the screen when scrolling. For example, passing\n * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the\n * top of the scroll view. This property is not supported in conjunction\n * with `horizontal={true}`.\n */\n stickyHeaderIndices?: ?$ReadOnlyArray,\n /**\n * A React Component that will be used to render sticky headers.\n * To be used together with `stickyHeaderIndices` or with `SectionList`, defaults to `ScrollViewStickyHeader`.\n * You may need to set this if your sticky header uses custom transforms (eg. translation),\n * for example when you want your list to have an animated hidable header.\n */\n StickyHeaderComponent?: StickyHeaderComponentType,\n /**\n * When `snapToInterval` is set, `snapToAlignment` will define the relationship\n * of the snapping to the scroll view.\n *\n * - `'start'` (the default) will align the snap at the left (horizontal) or top (vertical)\n * - `'center'` will align the snap in the center\n * - `'end'` will align the snap at the right (horizontal) or bottom (vertical)\n */\n snapToAlignment?: ?('start' | 'center' | 'end'),\n /**\n * When set, causes the scroll view to stop at multiples of the value of\n * `snapToInterval`. This can be used for paginating through children\n * that have lengths smaller than the scroll view. Typically used in\n * combination with `snapToAlignment` and `decelerationRate=\"fast\"`.\n *\n * Overrides less configurable `pagingEnabled` prop.\n */\n snapToInterval?: ?number,\n /**\n * When set, causes the scroll view to stop at the defined offsets.\n * This can be used for paginating through variously sized children\n * that have lengths smaller than the scroll view. Typically used in\n * combination with `decelerationRate=\"fast\"`.\n *\n * Overrides less configurable `pagingEnabled` and `snapToInterval` props.\n */\n snapToOffsets?: ?$ReadOnlyArray,\n /**\n * Use in conjunction with `snapToOffsets`. By default, the beginning\n * of the list counts as a snap offset. Set `snapToStart` to false to disable\n * this behavior and allow the list to scroll freely between its start and\n * the first `snapToOffsets` offset.\n * The default value is true.\n */\n snapToStart?: ?boolean,\n /**\n * Use in conjunction with `snapToOffsets`. By default, the end\n * of the list counts as a snap offset. Set `snapToEnd` to false to disable\n * this behavior and allow the list to scroll freely between its end and\n * the last `snapToOffsets` offset.\n * The default value is true.\n */\n snapToEnd?: ?boolean,\n /**\n * Experimental: When true, offscreen child views (whose `overflow` value is\n * `hidden`) are removed from their native backing superview when offscreen.\n * This can improve scrolling performance on long lists. The default value is\n * true.\n */\n removeClippedSubviews?: ?boolean,\n /**\n * A RefreshControl component, used to provide pull-to-refresh\n * functionality for the ScrollView. Only works for vertical ScrollViews\n * (`horizontal` prop must be `false`).\n *\n * See [RefreshControl](docs/refreshcontrol.html).\n */\n /* $FlowFixMe[unclear-type] - how to handle generic type without existential\n * operator? */\n refreshControl?: ?React.Element,\n children?: React.Node,\n /**\n * A ref to the inner View element of the ScrollView. This should be used\n * instead of calling `getInnerViewRef`.\n */\n innerViewRef?: ForwardedRef,\n /**\n * A ref to the Native ScrollView component. This ref can be used to call\n * all of ScrollView's public methods, in addition to native methods like\n * measure, measureLayout, etc.\n */\n scrollViewRef?: ForwardedRef,\n|}>;\n\ntype State = {|\n layoutHeight: ?number,\n onScrollEmitter: ?EventEmitter<{\n scroll: [{x: number, y: number}],\n }>,\n|};\n\nconst IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;\n\nexport type ScrollViewComponentStatics = $ReadOnly<{|\n Context: typeof ScrollViewContext,\n|}>;\n\n/**\n * Component that wraps platform ScrollView while providing\n * integration with touch locking \"responder\" system.\n *\n * Keep in mind that ScrollViews must have a bounded height in order to work,\n * since they contain unbounded-height children into a bounded container (via\n * a scroll interaction). In order to bound the height of a ScrollView, either\n * set the height of the view directly (discouraged) or make sure all parent\n * views have bounded height. Forgetting to transfer `{flex: 1}` down the\n * view stack can lead to errors here, which the element inspector makes\n * easy to debug.\n *\n * Doesn't yet support other contained responders from blocking this scroll\n * view from becoming the responder.\n *\n *\n * `` vs [``](https://reactnative.dev/docs/flatlist) - which one to use?\n *\n * `ScrollView` simply renders all its react child components at once. That\n * makes it very easy to understand and use.\n *\n * On the other hand, this has a performance downside. Imagine you have a very\n * long list of items you want to display, maybe several screens worth of\n * content. Creating JS components and native views for everything all at once,\n * much of which may not even be shown, will contribute to slow rendering and\n * increased memory usage.\n *\n * This is where `FlatList` comes into play. `FlatList` renders items lazily,\n * just when they are about to appear, and removes items that scroll way off\n * screen to save memory and processing time.\n *\n * `FlatList` is also handy if you want to render separators between your items,\n * multiple columns, infinite scroll loading, or any number of other features it\n * supports out of the box.\n */\nclass ScrollView extends React.Component {\n static Context: typeof ScrollViewContext = ScrollViewContext;\n\n constructor(props: Props) {\n super(props);\n\n this._scrollAnimatedValue = new AnimatedImplementation.Value(\n this.props.contentOffset?.y ?? 0,\n );\n this._scrollAnimatedValue.setOffset(this.props.contentInset?.top ?? 0);\n }\n\n _scrollAnimatedValue: AnimatedImplementation.Value;\n _scrollAnimatedValueAttachment: ?{detach: () => void, ...} = null;\n _stickyHeaderRefs: Map> =\n new Map();\n _headerLayoutYs: Map = new Map();\n\n _keyboardMetrics: ?KeyboardMetrics = null;\n _additionalScrollOffset: number = 0;\n _isTouching: boolean = false;\n _lastMomentumScrollBeginTime: number = 0;\n _lastMomentumScrollEndTime: number = 0;\n\n // Reset to false every time becomes responder. This is used to:\n // - Determine if the scroll view has been scrolled and therefore should\n // refuse to give up its responder lock.\n // - Determine if releasing should dismiss the keyboard when we are in\n // tap-to-dismiss mode (this.props.keyboardShouldPersistTaps !== 'always').\n _observedScrollSinceBecomingResponder: boolean = false;\n _becameResponderWhileAnimating: boolean = false;\n _preventNegativeScrollOffset: ?boolean = null;\n\n _animated: ?boolean = null;\n\n _subscriptionKeyboardWillShow: ?EventSubscription = null;\n _subscriptionKeyboardWillHide: ?EventSubscription = null;\n _subscriptionKeyboardDidShow: ?EventSubscription = null;\n _subscriptionKeyboardDidHide: ?EventSubscription = null;\n\n state: State = {\n layoutHeight: null,\n onScrollEmitter: null,\n };\n\n componentDidMount() {\n if (typeof this.props.keyboardShouldPersistTaps === 'boolean') {\n console.warn(\n `'keyboardShouldPersistTaps={${\n this.props.keyboardShouldPersistTaps === true ? 'true' : 'false'\n }}' is deprecated. ` +\n `Use 'keyboardShouldPersistTaps=\"${\n this.props.keyboardShouldPersistTaps ? 'always' : 'never'\n }\"' instead`,\n );\n }\n\n this._keyboardMetrics = Keyboard.metrics();\n this._additionalScrollOffset = 0;\n\n this._subscriptionKeyboardWillShow = Keyboard.addListener(\n 'keyboardWillShow',\n this.scrollResponderKeyboardWillShow,\n );\n this._subscriptionKeyboardWillHide = Keyboard.addListener(\n 'keyboardWillHide',\n this.scrollResponderKeyboardWillHide,\n );\n this._subscriptionKeyboardDidShow = Keyboard.addListener(\n 'keyboardDidShow',\n this.scrollResponderKeyboardDidShow,\n );\n this._subscriptionKeyboardDidHide = Keyboard.addListener(\n 'keyboardDidHide',\n this.scrollResponderKeyboardDidHide,\n );\n\n this._updateAnimatedNodeAttachment();\n }\n\n componentDidUpdate(prevProps: Props) {\n const prevContentInsetTop = prevProps.contentInset\n ? prevProps.contentInset.top\n : 0;\n const newContentInsetTop = this.props.contentInset\n ? this.props.contentInset.top\n : 0;\n if (prevContentInsetTop !== newContentInsetTop) {\n this._scrollAnimatedValue.setOffset(newContentInsetTop || 0);\n }\n\n this._updateAnimatedNodeAttachment();\n }\n\n componentWillUnmount() {\n if (this._subscriptionKeyboardWillShow != null) {\n this._subscriptionKeyboardWillShow.remove();\n }\n if (this._subscriptionKeyboardWillHide != null) {\n this._subscriptionKeyboardWillHide.remove();\n }\n if (this._subscriptionKeyboardDidShow != null) {\n this._subscriptionKeyboardDidShow.remove();\n }\n if (this._subscriptionKeyboardDidHide != null) {\n this._subscriptionKeyboardDidHide.remove();\n }\n\n if (this._scrollAnimatedValueAttachment) {\n this._scrollAnimatedValueAttachment.detach();\n }\n\n this.state.onScrollEmitter?.removeAllListeners();\n }\n\n /**\n * Returns a reference to the underlying scroll responder, which supports\n * operations like `scrollTo`. All ScrollView-like components should\n * implement this method so that they can be composed while providing access\n * to the underlying scroll responder's methods.\n */\n getScrollResponder: () => ScrollResponderType = () => {\n // $FlowFixMe[unclear-type]\n return ((this: any): ScrollResponderType);\n };\n\n getScrollableNode: () => ?number = () => {\n return findNodeHandle(this._scrollView.nativeInstance);\n };\n\n getInnerViewNode: () => ?number = () => {\n return findNodeHandle(this._innerView.nativeInstance);\n };\n\n getInnerViewRef: () => InnerViewInstance | null = () => {\n return this._innerView.nativeInstance;\n };\n\n getNativeScrollRef: () => NativeScrollViewInstance | null = () => {\n return this._scrollView.nativeInstance;\n };\n\n /**\n * Scrolls to a given x, y offset, either immediately or with a smooth animation.\n *\n * Example:\n *\n * `scrollTo({x: 0, y: 0, animated: true})`\n *\n * Note: The weird function signature is due to the fact that, for historical reasons,\n * the function also accepts separate arguments as an alternative to the options object.\n * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.\n */\n scrollTo: (\n options?:\n | {\n x?: number,\n y?: number,\n animated?: boolean,\n ...\n }\n | number,\n deprecatedX?: number,\n deprecatedAnimated?: boolean,\n ) => void = (\n options?:\n | {\n x?: number,\n y?: number,\n animated?: boolean,\n ...\n }\n | number,\n deprecatedX?: number,\n deprecatedAnimated?: boolean,\n ) => {\n let x, y, animated;\n if (typeof options === 'number') {\n console.warn(\n '`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, ' +\n 'animated: true})` instead.',\n );\n y = options;\n x = deprecatedX;\n animated = deprecatedAnimated;\n } else if (options) {\n y = options.y;\n x = options.x;\n animated = options.animated;\n }\n if (this._scrollView.nativeInstance == null) {\n return;\n }\n Commands.scrollTo(\n this._scrollView.nativeInstance,\n x || 0,\n y || 0,\n animated !== false,\n );\n };\n\n /**\n * If this is a vertical ScrollView scrolls to the bottom.\n * If this is a horizontal ScrollView scrolls to the right.\n *\n * Use `scrollToEnd({animated: true})` for smooth animated scrolling,\n * `scrollToEnd({animated: false})` for immediate scrolling.\n * If no options are passed, `animated` defaults to true.\n */\n scrollToEnd: (options?: ?{animated?: boolean, ...}) => void = (\n options?: ?{animated?: boolean, ...},\n ) => {\n // Default to true\n const animated = (options && options.animated) !== false;\n if (this._scrollView.nativeInstance == null) {\n return;\n }\n Commands.scrollToEnd(this._scrollView.nativeInstance, animated);\n };\n\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n flashScrollIndicators: () => void = () => {\n if (this._scrollView.nativeInstance == null) {\n return;\n }\n Commands.flashScrollIndicators(this._scrollView.nativeInstance);\n };\n\n _subscribeToOnScroll: (\n callback: ({x: number, y: number}) => void,\n ) => EventSubscription = callback => {\n // An undefined value means the listener has not been added, yet.\n // A null value means the listener has been removed.\n let subscription: ?EventSubscription;\n\n this.setState(\n ({onScrollEmitter}) => {\n if (onScrollEmitter) {\n return null;\n } else {\n return {onScrollEmitter: new EventEmitter()};\n }\n },\n () => {\n // If `subscription` is null, that means it was removed before we got\n // here so do nothing.\n if (subscription !== null) {\n subscription = nullthrows(this.state.onScrollEmitter).addListener(\n 'scroll',\n callback,\n );\n }\n },\n );\n\n return {\n remove() {\n // If `subscription` was created before this invocation, remove it.\n subscription?.remove();\n // Record this invocation by setting `subscription` to null, in case it\n // ends up being created after this invocation.\n subscription = null;\n },\n };\n };\n\n /**\n * This method should be used as the callback to onFocus in a TextInputs'\n * parent view. Note that any module using this mixin needs to return\n * the parent view's ref in getScrollViewRef() in order to use this method.\n * @param {number} nodeHandle The TextInput node handle\n * @param {number} additionalOffset The scroll view's bottom \"contentInset\".\n * Default is 0.\n * @param {bool} preventNegativeScrolling Whether to allow pulling the content\n * down to make it meet the keyboard's top. Default is false.\n */\n scrollResponderScrollNativeHandleToKeyboard: (\n nodeHandle: number | React.ElementRef>,\n additionalOffset?: number,\n preventNegativeScrollOffset?: boolean,\n ) => void = (\n nodeHandle: number | React.ElementRef>,\n additionalOffset?: number,\n preventNegativeScrollOffset?: boolean,\n ) => {\n this._additionalScrollOffset = additionalOffset || 0;\n this._preventNegativeScrollOffset = !!preventNegativeScrollOffset;\n\n if (this._innerView.nativeInstance == null) {\n return;\n }\n\n if (typeof nodeHandle === 'number') {\n UIManager.measureLayout(\n nodeHandle,\n nullthrows(findNodeHandle(this)),\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._textInputFocusError,\n this._inputMeasureAndScrollToKeyboard,\n );\n } else {\n nodeHandle.measureLayout(\n this._innerView.nativeInstance,\n this._inputMeasureAndScrollToKeyboard,\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._textInputFocusError,\n );\n }\n };\n\n /**\n * A helper function to zoom to a specific rect in the scrollview. The argument has the shape\n * {x: number; y: number; width: number; height: number; animated: boolean = true}\n *\n * @platform ios\n */\n scrollResponderZoomTo: (\n rect: {|\n x: number,\n y: number,\n width: number,\n height: number,\n animated?: boolean,\n |},\n animated?: boolean, // deprecated, put this inside the rect argument instead\n ) => void = (\n rect: {|\n x: number,\n y: number,\n width: number,\n height: number,\n animated?: boolean,\n |},\n animated?: boolean, // deprecated, put this inside the rect argument instead\n ) => {\n invariant(Platform.OS === 'ios', 'zoomToRect is not implemented');\n if ('animated' in rect) {\n this._animated = rect.animated;\n delete rect.animated;\n } else if (typeof animated !== 'undefined') {\n console.warn(\n '`scrollResponderZoomTo` `animated` argument is deprecated. Use `options.animated` instead',\n );\n }\n\n if (this._scrollView.nativeInstance == null) {\n return;\n }\n Commands.zoomToRect(\n this._scrollView.nativeInstance,\n rect,\n animated !== false,\n );\n };\n\n _textInputFocusError() {\n console.warn('Error measuring text field.');\n }\n\n /**\n * The calculations performed here assume the scroll view takes up the entire\n * screen - even if has some content inset. We then measure the offsets of the\n * keyboard, and compensate both for the scroll view's \"contentInset\".\n *\n * @param {number} left Position of input w.r.t. table view.\n * @param {number} top Position of input w.r.t. table view.\n * @param {number} width Width of the text input.\n * @param {number} height Height of the text input.\n */\n _inputMeasureAndScrollToKeyboard: (\n left: number,\n top: number,\n width: number,\n height: number,\n ) => void = (left: number, top: number, width: number, height: number) => {\n let keyboardScreenY = Dimensions.get('window').height;\n\n const scrollTextInputIntoVisibleRect = () => {\n if (this._keyboardMetrics != null) {\n keyboardScreenY = this._keyboardMetrics.screenY;\n }\n let scrollOffsetY =\n top - keyboardScreenY + height + this._additionalScrollOffset;\n\n // By default, this can scroll with negative offset, pulling the content\n // down so that the target component's bottom meets the keyboard's top.\n // If requested otherwise, cap the offset at 0 minimum to avoid content\n // shifting down.\n if (this._preventNegativeScrollOffset === true) {\n scrollOffsetY = Math.max(0, scrollOffsetY);\n }\n this.scrollTo({x: 0, y: scrollOffsetY, animated: true});\n\n this._additionalScrollOffset = 0;\n this._preventNegativeScrollOffset = false;\n };\n\n if (this._keyboardMetrics == null) {\n // `_keyboardMetrics` is set inside `scrollResponderKeyboardWillShow` which\n // is not guaranteed to be called before `_inputMeasureAndScrollToKeyboard` but native has already scheduled it.\n // In case it was not called before `_inputMeasureAndScrollToKeyboard`, we postpone scrolling to\n // text input.\n setTimeout(() => {\n scrollTextInputIntoVisibleRect();\n }, 0);\n } else {\n scrollTextInputIntoVisibleRect();\n }\n };\n\n _getKeyForIndex(index: $FlowFixMe, childArray: $FlowFixMe): $FlowFixMe {\n const child = childArray[index];\n return child && child.key;\n }\n\n _updateAnimatedNodeAttachment() {\n if (this._scrollAnimatedValueAttachment) {\n this._scrollAnimatedValueAttachment.detach();\n }\n if (\n this.props.stickyHeaderIndices &&\n this.props.stickyHeaderIndices.length > 0\n ) {\n this._scrollAnimatedValueAttachment =\n AnimatedImplementation.attachNativeEvent(\n this._scrollView.nativeInstance,\n 'onScroll',\n [{nativeEvent: {contentOffset: {y: this._scrollAnimatedValue}}}],\n );\n }\n }\n\n _setStickyHeaderRef(\n key: string,\n ref: ?React.ElementRef,\n ) {\n if (ref) {\n this._stickyHeaderRefs.set(key, ref);\n } else {\n this._stickyHeaderRefs.delete(key);\n }\n }\n\n _onStickyHeaderLayout(index: $FlowFixMe, event: $FlowFixMe, key: $FlowFixMe) {\n const {stickyHeaderIndices} = this.props;\n if (!stickyHeaderIndices) {\n return;\n }\n const childArray = React.Children.toArray<$FlowFixMe>(this.props.children);\n if (key !== this._getKeyForIndex(index, childArray)) {\n // ignore stale layout update\n return;\n }\n\n const layoutY = event.nativeEvent.layout.y;\n this._headerLayoutYs.set(key, layoutY);\n\n const indexOfIndex = stickyHeaderIndices.indexOf(index);\n const previousHeaderIndex = stickyHeaderIndices[indexOfIndex - 1];\n if (previousHeaderIndex != null) {\n const previousHeader = this._stickyHeaderRefs.get(\n this._getKeyForIndex(previousHeaderIndex, childArray),\n );\n previousHeader &&\n previousHeader.setNextHeaderY &&\n previousHeader.setNextHeaderY(layoutY);\n }\n }\n\n _handleScroll = (e: ScrollEvent) => {\n this._observedScrollSinceBecomingResponder = true;\n this.props.onScroll && this.props.onScroll(e);\n\n this.state.onScrollEmitter?.emit('scroll', {\n x: e.nativeEvent.contentOffset.x,\n y: e.nativeEvent.contentOffset.y,\n });\n };\n\n _handleLayout = (e: LayoutEvent) => {\n if (this.props.invertStickyHeaders === true) {\n this.setState({layoutHeight: e.nativeEvent.layout.height});\n }\n if (this.props.onLayout) {\n this.props.onLayout(e);\n }\n };\n\n _handleContentOnLayout = (e: LayoutEvent) => {\n const {width, height} = e.nativeEvent.layout;\n this.props.onContentSizeChange &&\n this.props.onContentSizeChange(width, height);\n };\n\n _innerView: RefForwarder =\n createRefForwarder(\n (instance: InnerViewInstance): InnerViewInstance => instance,\n );\n\n _scrollView: RefForwarder<\n NativeScrollViewInstance,\n PublicScrollViewInstance,\n > = createRefForwarder(\n (nativeInstance: NativeScrollViewInstance): PublicScrollViewInstance => {\n // This is a hack. Ideally we would forwardRef to the underlying\n // host component. However, since ScrollView has it's own methods that can be\n // called as well, if we used the standard forwardRef then these\n // methods wouldn't be accessible and thus be a breaking change.\n //\n // Therefore we edit ref to include ScrollView's public methods so that\n // they are callable from the ref.\n\n // $FlowFixMe[prop-missing] - Known issue with appending custom methods.\n const publicInstance: PublicScrollViewInstance = Object.assign(\n nativeInstance,\n {\n getScrollResponder: this.getScrollResponder,\n getScrollableNode: this.getScrollableNode,\n getInnerViewNode: this.getInnerViewNode,\n getInnerViewRef: this.getInnerViewRef,\n getNativeScrollRef: this.getNativeScrollRef,\n scrollTo: this.scrollTo,\n scrollToEnd: this.scrollToEnd,\n flashScrollIndicators: this.flashScrollIndicators,\n scrollResponderZoomTo: this.scrollResponderZoomTo,\n // TODO: Replace unstable_subscribeToOnScroll once scrollView.addEventListener('scroll', (e: ScrollEvent) => {}, {passive: false});\n unstable_subscribeToOnScroll: this._subscribeToOnScroll,\n scrollResponderScrollNativeHandleToKeyboard:\n this.scrollResponderScrollNativeHandleToKeyboard,\n },\n );\n\n return publicInstance;\n },\n );\n\n /**\n * Warning, this may be called several times for a single keyboard opening.\n * It's best to store the information in this method and then take any action\n * at a later point (either in `keyboardDidShow` or other).\n *\n * Here's the order that events occur in:\n * - focus\n * - willShow {startCoordinates, endCoordinates} several times\n * - didShow several times\n * - blur\n * - willHide {startCoordinates, endCoordinates} several times\n * - didHide several times\n *\n * The `ScrollResponder` module callbacks for each of these events.\n * Even though any user could have easily listened to keyboard events\n * themselves, using these `props` callbacks ensures that ordering of events\n * is consistent - and not dependent on the order that the keyboard events are\n * subscribed to. This matters when telling the scroll view to scroll to where\n * the keyboard is headed - the scroll responder better have been notified of\n * the keyboard destination before being instructed to scroll to where the\n * keyboard will be. Stick to the `ScrollResponder` callbacks, and everything\n * will work.\n *\n * WARNING: These callbacks will fire even if a keyboard is displayed in a\n * different navigation pane. Filter out the events to determine if they are\n * relevant to you. (For example, only if you receive these callbacks after\n * you had explicitly focused a node etc).\n */\n\n scrollResponderKeyboardWillShow: (e: KeyboardEvent) => void = (\n e: KeyboardEvent,\n ) => {\n this._keyboardMetrics = e.endCoordinates;\n this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);\n };\n\n scrollResponderKeyboardWillHide: (e: KeyboardEvent) => void = (\n e: KeyboardEvent,\n ) => {\n this._keyboardMetrics = null;\n this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e);\n };\n\n scrollResponderKeyboardDidShow: (e: KeyboardEvent) => void = (\n e: KeyboardEvent,\n ) => {\n this._keyboardMetrics = e.endCoordinates;\n this.props.onKeyboardDidShow && this.props.onKeyboardDidShow(e);\n };\n\n scrollResponderKeyboardDidHide: (e: KeyboardEvent) => void = (\n e: KeyboardEvent,\n ) => {\n this._keyboardMetrics = null;\n this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(e);\n };\n\n /**\n * Invoke this from an `onMomentumScrollBegin` event.\n */\n _handleMomentumScrollBegin: (e: ScrollEvent) => void = (e: ScrollEvent) => {\n this._lastMomentumScrollBeginTime = global.performance.now();\n this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);\n };\n\n /**\n * Invoke this from an `onMomentumScrollEnd` event.\n */\n _handleMomentumScrollEnd: (e: ScrollEvent) => void = (e: ScrollEvent) => {\n FrameRateLogger.endScroll();\n this._lastMomentumScrollEndTime = global.performance.now();\n this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);\n };\n\n /**\n * Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll\n * animation, and there's not an easy way to distinguish a drag vs. stopping\n * momentum.\n *\n * Invoke this from an `onScrollBeginDrag` event.\n */\n _handleScrollBeginDrag: (e: ScrollEvent) => void = (e: ScrollEvent) => {\n FrameRateLogger.beginScroll(); // TODO: track all scrolls after implementing onScrollEndAnimation\n\n if (\n Platform.OS === 'android' &&\n this.props.keyboardDismissMode === 'on-drag'\n ) {\n dismissKeyboard();\n }\n\n this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);\n };\n\n /**\n * Invoke this from an `onScrollEndDrag` event.\n */\n _handleScrollEndDrag: (e: ScrollEvent) => void = (e: ScrollEvent) => {\n const {velocity} = e.nativeEvent;\n // - If we are animating, then this is a \"drag\" that is stopping the scrollview and momentum end\n // will fire.\n // - If velocity is non-zero, then the interaction will stop when momentum scroll ends or\n // another drag starts and ends.\n // - If we don't get velocity, better to stop the interaction twice than not stop it.\n if (\n !this._isAnimating() &&\n (!velocity || (velocity.x === 0 && velocity.y === 0))\n ) {\n FrameRateLogger.endScroll();\n }\n this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);\n };\n\n /**\n * A helper function for this class that lets us quickly determine if the\n * view is currently animating. This is particularly useful to know when\n * a touch has just started or ended.\n */\n _isAnimating: () => boolean = () => {\n const now = global.performance.now();\n const timeSinceLastMomentumScrollEnd =\n now - this._lastMomentumScrollEndTime;\n const isAnimating =\n timeSinceLastMomentumScrollEnd < IS_ANIMATING_TOUCH_START_THRESHOLD_MS ||\n this._lastMomentumScrollEndTime < this._lastMomentumScrollBeginTime;\n return isAnimating;\n };\n\n /**\n * Invoke this from an `onResponderGrant` event.\n */\n _handleResponderGrant: (e: PressEvent) => void = (e: PressEvent) => {\n this._observedScrollSinceBecomingResponder = false;\n this.props.onResponderGrant && this.props.onResponderGrant(e);\n this._becameResponderWhileAnimating = this._isAnimating();\n };\n\n /**\n * Invoke this from an `onResponderReject` event.\n *\n * Some other element is not yielding its role as responder. Normally, we'd\n * just disable the `UIScrollView`, but a touch has already began on it, the\n * `UIScrollView` will not accept being disabled after that. The easiest\n * solution for now is to accept the limitation of disallowing this\n * altogether. To improve this, find a way to disable the `UIScrollView` after\n * a touch has already started.\n */\n _handleResponderReject: () => void = () => {};\n\n /**\n * Invoke this from an `onResponderRelease` event.\n */\n _handleResponderRelease: (e: PressEvent) => void = (e: PressEvent) => {\n this._isTouching = e.nativeEvent.touches.length !== 0;\n this.props.onResponderRelease && this.props.onResponderRelease(e);\n\n if (typeof e.target === 'number') {\n if (__DEV__) {\n console.error(\n 'Did not expect event target to be a number. Should have been a native component',\n );\n }\n\n return;\n }\n\n // By default scroll views will unfocus a textField\n // if another touch occurs outside of it\n const currentlyFocusedTextInput = TextInputState.currentlyFocusedInput();\n if (\n currentlyFocusedTextInput != null &&\n this.props.keyboardShouldPersistTaps !== true &&\n this.props.keyboardShouldPersistTaps !== 'always' &&\n this._keyboardIsDismissible() &&\n e.target !== currentlyFocusedTextInput &&\n !this._observedScrollSinceBecomingResponder &&\n !this._becameResponderWhileAnimating\n ) {\n TextInputState.blurTextInput(currentlyFocusedTextInput);\n }\n };\n\n /**\n * We will allow the scroll view to give up its lock iff it acquired the lock\n * during an animation. This is a very useful default that happens to satisfy\n * many common user experiences.\n *\n * - Stop a scroll on the left edge, then turn that into an outer view's\n * backswipe.\n * - Stop a scroll mid-bounce at the top, continue pulling to have the outer\n * view dismiss.\n * - However, without catching the scroll view mid-bounce (while it is\n * motionless), if you drag far enough for the scroll view to become\n * responder (and therefore drag the scroll view a bit), any backswipe\n * navigation of a swipe gesture higher in the view hierarchy, should be\n * rejected.\n */\n _handleResponderTerminationRequest: () => boolean = () => {\n return !this._observedScrollSinceBecomingResponder;\n };\n\n /**\n * Invoke this from an `onScroll` event.\n */\n _handleScrollShouldSetResponder: () => boolean = () => {\n // Allow any event touch pass through if the default pan responder is disabled\n if (this.props.disableScrollViewPanResponder === true) {\n return false;\n }\n return this._isTouching;\n };\n\n /**\n * Merely touch starting is not sufficient for a scroll view to become the\n * responder. Being the \"responder\" means that the very next touch move/end\n * event will result in an action/movement.\n *\n * Invoke this from an `onStartShouldSetResponder` event.\n *\n * `onStartShouldSetResponder` is used when the next move/end will trigger\n * some UI movement/action, but when you want to yield priority to views\n * nested inside of the view.\n *\n * There may be some cases where scroll views actually should return `true`\n * from `onStartShouldSetResponder`: Any time we are detecting a standard tap\n * that gives priority to nested views.\n *\n * - If a single tap on the scroll view triggers an action such as\n * recentering a map style view yet wants to give priority to interaction\n * views inside (such as dropped pins or labels), then we would return true\n * from this method when there is a single touch.\n *\n * - Similar to the previous case, if a two finger \"tap\" should trigger a\n * zoom, we would check the `touches` count, and if `>= 2`, we would return\n * true.\n *\n */\n _handleStartShouldSetResponder: (e: PressEvent) => boolean = (\n e: PressEvent,\n ) => {\n // Allow any event touch pass through if the default pan responder is disabled\n if (this.props.disableScrollViewPanResponder === true) {\n return false;\n }\n\n const currentlyFocusedInput = TextInputState.currentlyFocusedInput();\n if (\n this.props.keyboardShouldPersistTaps === 'handled' &&\n this._keyboardIsDismissible() &&\n e.target !== currentlyFocusedInput\n ) {\n return true;\n }\n return false;\n };\n\n /**\n * There are times when the scroll view wants to become the responder\n * (meaning respond to the next immediate `touchStart/touchEnd`), in a way\n * that *doesn't* give priority to nested views (hence the capture phase):\n *\n * - Currently animating.\n * - Tapping anywhere that is not a text input, while the keyboard is\n * up (which should dismiss the keyboard).\n *\n * Invoke this from an `onStartShouldSetResponderCapture` event.\n */\n _handleStartShouldSetResponderCapture: (e: PressEvent) => boolean = (\n e: PressEvent,\n ) => {\n // The scroll view should receive taps instead of its descendants if:\n // * it is already animating/decelerating\n if (this._isAnimating()) {\n return true;\n }\n\n // Allow any event touch pass through if the default pan responder is disabled\n if (this.props.disableScrollViewPanResponder === true) {\n return false;\n }\n\n // * the keyboard is up, keyboardShouldPersistTaps is 'never' (the default),\n // and a new touch starts with a non-textinput target (in which case the\n // first tap should be sent to the scroll view and dismiss the keyboard,\n // then the second tap goes to the actual interior view)\n const {keyboardShouldPersistTaps} = this.props;\n const keyboardNeverPersistTaps =\n !keyboardShouldPersistTaps || keyboardShouldPersistTaps === 'never';\n\n if (typeof e.target === 'number') {\n if (__DEV__) {\n console.error(\n 'Did not expect event target to be a number. Should have been a native component',\n );\n }\n\n return false;\n }\n\n // Let presses through if the soft keyboard is detached from the viewport\n if (this._softKeyboardIsDetached()) {\n return false;\n }\n\n if (\n keyboardNeverPersistTaps &&\n this._keyboardIsDismissible() &&\n e.target != null &&\n // $FlowFixMe[incompatible-call]\n !TextInputState.isTextInput(e.target)\n ) {\n return true;\n }\n\n return false;\n };\n\n /**\n * Do we consider there to be a dismissible soft-keyboard open?\n */\n _keyboardIsDismissible: () => boolean = () => {\n const currentlyFocusedInput = TextInputState.currentlyFocusedInput();\n\n // We cannot dismiss the keyboard without an input to blur, even if a soft\n // keyboard is open (e.g. when keyboard is open due to a native component\n // not participating in TextInputState). It's also possible that the\n // currently focused input isn't a TextInput (such as by calling ref.focus\n // on a non-TextInput).\n const hasFocusedTextInput =\n currentlyFocusedInput != null &&\n TextInputState.isTextInput(currentlyFocusedInput);\n\n // Even if an input is focused, we may not have a keyboard to dismiss. E.g\n // when using a physical keyboard. Ensure we have an event for an opened\n // keyboard.\n const softKeyboardMayBeOpen =\n this._keyboardMetrics != null || this._keyboardEventsAreUnreliable();\n\n return hasFocusedTextInput && softKeyboardMayBeOpen;\n };\n\n /**\n * Whether an open soft keyboard is present which does not overlap the\n * viewport. E.g. for a VR soft-keyboard which is detached from the app\n * viewport.\n */\n _softKeyboardIsDetached: () => boolean = () => {\n return this._keyboardMetrics != null && this._keyboardMetrics.height === 0;\n };\n\n _keyboardEventsAreUnreliable: () => boolean = () => {\n // Android versions prior to API 30 rely on observing layout changes when\n // `android:windowSoftInputMode` is set to `adjustResize` or `adjustPan`.\n return Platform.OS === 'android' && Platform.Version < 30;\n };\n\n /**\n * Invoke this from an `onTouchEnd` event.\n *\n * @param {PressEvent} e Event.\n */\n _handleTouchEnd: (e: PressEvent) => void = (e: PressEvent) => {\n const nativeEvent = e.nativeEvent;\n this._isTouching = nativeEvent.touches.length !== 0;\n\n const {keyboardShouldPersistTaps} = this.props;\n const keyboardNeverPersistsTaps =\n !keyboardShouldPersistTaps || keyboardShouldPersistTaps === 'never';\n\n // Dismiss the keyboard now if we didn't become responder in capture phase\n // to eat presses, but still want to dismiss on interaction.\n // Don't do anything if the target of the touch event is the current input.\n const currentlyFocusedTextInput = TextInputState.currentlyFocusedInput();\n if (\n currentlyFocusedTextInput != null &&\n e.target !== currentlyFocusedTextInput &&\n this._softKeyboardIsDetached() &&\n this._keyboardIsDismissible() &&\n keyboardNeverPersistsTaps\n ) {\n TextInputState.blurTextInput(currentlyFocusedTextInput);\n }\n\n this.props.onTouchEnd && this.props.onTouchEnd(e);\n };\n\n /**\n * Invoke this from an `onTouchCancel` event.\n *\n * @param {PressEvent} e Event.\n */\n _handleTouchCancel: (e: PressEvent) => void = (e: PressEvent) => {\n this._isTouching = false;\n this.props.onTouchCancel && this.props.onTouchCancel(e);\n };\n\n /**\n * Invoke this from an `onTouchStart` event.\n *\n * Since we know that the `SimpleEventPlugin` occurs later in the plugin\n * order, after `ResponderEventPlugin`, we can detect that we were *not*\n * permitted to be the responder (presumably because a contained view became\n * responder). The `onResponderReject` won't fire in that case - it only\n * fires when a *current* responder rejects our request.\n *\n * @param {PressEvent} e Touch Start event.\n */\n _handleTouchStart: (e: PressEvent) => void = (e: PressEvent) => {\n this._isTouching = true;\n this.props.onTouchStart && this.props.onTouchStart(e);\n };\n\n /**\n * Invoke this from an `onTouchMove` event.\n *\n * Since we know that the `SimpleEventPlugin` occurs later in the plugin\n * order, after `ResponderEventPlugin`, we can detect that we were *not*\n * permitted to be the responder (presumably because a contained view became\n * responder). The `onResponderReject` won't fire in that case - it only\n * fires when a *current* responder rejects our request.\n *\n * @param {PressEvent} e Touch Start event.\n */\n _handleTouchMove: (e: PressEvent) => void = (e: PressEvent) => {\n this.props.onTouchMove && this.props.onTouchMove(e);\n };\n\n render(): React.Node | React.Element {\n const [NativeDirectionalScrollView, NativeDirectionalScrollContentView] =\n this.props.horizontal === true\n ? NativeHorizontalScrollViewTuple\n : NativeVerticalScrollViewTuple;\n\n const contentContainerStyle = [\n this.props.horizontal === true && styles.contentContainerHorizontal,\n this.props.contentContainerStyle,\n ];\n if (__DEV__ && this.props.style !== undefined) {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n const style = flattenStyle(this.props.style);\n const childLayoutProps = ['alignItems', 'justifyContent'].filter(\n // $FlowFixMe[incompatible-use]\n prop => style && style[prop] !== undefined,\n );\n invariant(\n childLayoutProps.length === 0,\n 'ScrollView child layout (' +\n JSON.stringify(childLayoutProps) +\n ') must be applied through the contentContainerStyle prop.',\n );\n }\n\n const contentSizeChangeProps =\n this.props.onContentSizeChange == null\n ? null\n : {\n onLayout: this._handleContentOnLayout,\n };\n\n const {stickyHeaderIndices} = this.props;\n let children = this.props.children;\n /**\n * This function can cause unnecessary remount when nested in conditionals as it causes remap of children keys.\n * https://react.dev/reference/react/Children#children-toarray-caveats\n */\n children = React.Children.toArray<$FlowFixMe>(children);\n\n if (stickyHeaderIndices != null && stickyHeaderIndices.length > 0) {\n children = children.map((child, index) => {\n const indexOfIndex = child ? stickyHeaderIndices.indexOf(index) : -1;\n if (indexOfIndex > -1) {\n const key = child.key;\n const nextIndex = stickyHeaderIndices[indexOfIndex + 1];\n const StickyHeaderComponent =\n this.props.StickyHeaderComponent || ScrollViewStickyHeader;\n return (\n this._setStickyHeaderRef(key, ref)}\n nextHeaderLayoutY={this._headerLayoutYs.get(\n this._getKeyForIndex(nextIndex, children),\n )}\n onLayout={event => this._onStickyHeaderLayout(index, event, key)}\n scrollAnimatedValue={this._scrollAnimatedValue}\n inverted={this.props.invertStickyHeaders}\n hiddenOnScroll={this.props.stickyHeaderHiddenOnScroll}\n scrollViewHeight={this.state.layoutHeight}>\n {child}\n \n );\n } else {\n return child;\n }\n });\n }\n children = (\n \n {children}\n \n );\n\n const hasStickyHeaders =\n Array.isArray(stickyHeaderIndices) && stickyHeaderIndices.length > 0;\n\n // Some ScrollView native component behaviors rely on using the metrics\n // of mounted views for anchoring. Make sure not to flatten children if\n // this is the case.\n const preserveChildren =\n this.props.maintainVisibleContentPosition != null ||\n (Platform.OS === 'android' && this.props.snapToAlignment != null);\n\n const contentContainer = (\n \n {children}\n \n );\n\n const alwaysBounceHorizontal =\n this.props.alwaysBounceHorizontal !== undefined\n ? this.props.alwaysBounceHorizontal\n : this.props.horizontal;\n\n const alwaysBounceVertical =\n this.props.alwaysBounceVertical !== undefined\n ? this.props.alwaysBounceVertical\n : !this.props.horizontal;\n\n const baseStyle =\n this.props.horizontal === true\n ? styles.baseHorizontal\n : styles.baseVertical;\n\n const {experimental_endDraggingSensitivityMultiplier, ...otherProps} =\n this.props;\n const props = {\n ...otherProps,\n alwaysBounceHorizontal,\n alwaysBounceVertical,\n style: StyleSheet.compose(baseStyle, this.props.style),\n // Override the onContentSizeChange from props, since this event can\n // bubble up from TextInputs\n onContentSizeChange: null,\n onLayout: this._handleLayout,\n onMomentumScrollBegin: this._handleMomentumScrollBegin,\n onMomentumScrollEnd: this._handleMomentumScrollEnd,\n onResponderGrant: this._handleResponderGrant,\n onResponderReject: this._handleResponderReject,\n onResponderRelease: this._handleResponderRelease,\n onResponderTerminationRequest: this._handleResponderTerminationRequest,\n onScrollBeginDrag: this._handleScrollBeginDrag,\n onScrollEndDrag: this._handleScrollEndDrag,\n onScrollShouldSetResponder: this._handleScrollShouldSetResponder,\n onStartShouldSetResponder: this._handleStartShouldSetResponder,\n onStartShouldSetResponderCapture:\n this._handleStartShouldSetResponderCapture,\n onTouchEnd: this._handleTouchEnd,\n onTouchMove: this._handleTouchMove,\n onTouchStart: this._handleTouchStart,\n onTouchCancel: this._handleTouchCancel,\n onScroll: this._handleScroll,\n endDraggingSensitivityMultiplier:\n experimental_endDraggingSensitivityMultiplier,\n enableSyncOnScroll: this.state.onScrollEmitter ? true : undefined,\n scrollEventThrottle: hasStickyHeaders\n ? 1\n : this.props.scrollEventThrottle,\n sendMomentumEvents:\n this.props.onMomentumScrollBegin || this.props.onMomentumScrollEnd\n ? true\n : false,\n // default to true\n snapToStart: this.props.snapToStart !== false,\n // default to true\n snapToEnd: this.props.snapToEnd !== false,\n // pagingEnabled is overridden by snapToInterval / snapToOffsets\n pagingEnabled: Platform.select({\n // on iOS, pagingEnabled must be set to false to have snapToInterval / snapToOffsets work\n ios:\n this.props.pagingEnabled === true &&\n this.props.snapToInterval == null &&\n this.props.snapToOffsets == null,\n // on Android, pagingEnabled must be set to true to have snapToInterval / snapToOffsets work\n android:\n this.props.pagingEnabled === true ||\n this.props.snapToInterval != null ||\n this.props.snapToOffsets != null,\n }),\n };\n\n const {decelerationRate} = this.props;\n if (decelerationRate != null) {\n props.decelerationRate = processDecelerationRate(decelerationRate);\n }\n\n const refreshControl = this.props.refreshControl;\n const scrollViewRef = this._scrollView.getForwardingRef(\n this.props.scrollViewRef,\n );\n\n if (refreshControl) {\n if (Platform.OS === 'ios') {\n // On iOS the RefreshControl is a child of the ScrollView.\n return (\n \n {refreshControl}\n {contentContainer}\n \n );\n } else if (Platform.OS === 'android') {\n // On Android wrap the ScrollView with a AndroidSwipeRefreshLayout.\n // Since the ScrollView is wrapped add the style props to the\n // AndroidSwipeRefreshLayout and use flex: 1 for the ScrollView.\n // Note: we should split props.style on the inner and outer props\n // however, the ScrollView still needs the baseStyle to be scrollable\n // $FlowFixMe[underconstrained-implicit-instantiation]\n // $FlowFixMe[incompatible-call]\n const {outer, inner} = splitLayoutProps(flattenStyle(props.style));\n return React.cloneElement(\n refreshControl,\n {style: StyleSheet.compose(baseStyle, outer)},\n \n {contentContainer}\n ,\n );\n }\n }\n return (\n \n {contentContainer}\n \n );\n }\n}\n\nconst styles = StyleSheet.create({\n baseVertical: {\n flexGrow: 1,\n flexShrink: 1,\n flexDirection: 'column',\n overflow: 'scroll',\n },\n baseHorizontal: {\n flexGrow: 1,\n flexShrink: 1,\n flexDirection: 'row',\n overflow: 'scroll',\n },\n contentContainerHorizontal: {\n flexDirection: 'row',\n },\n});\n\ntype ForwardedRef = {current: null | T, ...} | ((null | T) => mixed);\n\ntype RefForwarder = {\n getForwardingRef: (\n ?ForwardedRef,\n ) => (TNativeInstance | null) => void,\n nativeInstance: TNativeInstance | null,\n publicInstance: TPublicInstance | null,\n};\n\n/**\n * Helper function that should be replaced with `useCallback` and `useMergeRefs`\n * once `ScrollView` is reimplemented as a functional component.\n */\nfunction createRefForwarder(\n mutator: TNativeInstance => TPublicInstance,\n): RefForwarder {\n const state: RefForwarder = {\n getForwardingRef: memoize(forwardedRef => {\n return (nativeInstance: TNativeInstance | null): void => {\n const publicInstance =\n nativeInstance == null ? null : mutator(nativeInstance);\n\n state.nativeInstance = nativeInstance;\n state.publicInstance = publicInstance;\n\n if (forwardedRef != null) {\n if (typeof forwardedRef === 'function') {\n forwardedRef(publicInstance);\n } else {\n forwardedRef.current = publicInstance;\n }\n }\n };\n }),\n nativeInstance: null,\n publicInstance: null,\n };\n\n return state;\n}\n\n/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\nfunction Wrapper(props, ref: (mixed => mixed) | {current: mixed, ...}) {\n return ;\n}\nWrapper.displayName = 'ScrollView';\n// $FlowFixMe[incompatible-call]\nconst ForwardedScrollView = React.forwardRef(Wrapper);\n\n// $FlowFixMe[prop-missing] Add static context to ForwardedScrollView\nForwardedScrollView.Context = ScrollViewContext;\n\nForwardedScrollView.displayName = 'ScrollView';\n\nmodule.exports = ((ForwardedScrollView: $FlowFixMe): React.AbstractComponent<\n React.ElementConfig,\n PublicScrollViewInstance,\n> &\n ScrollViewComponentStatics);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport NativeFrameRateLogger from './NativeFrameRateLogger';\n\nconst invariant = require('invariant');\n\n/**\n * Flow API for native FrameRateLogger module. If the native module is not installed, function calls\n * are just no-ops.\n *\n * Typical behavior is that `setContext` is called when a new screen is loaded (e.g. via a\n * navigation integration), and then `beginScroll` is called by `ScrollResponder` at which point the\n * native module then begins tracking frame drops. When `ScrollResponder` calls `endScroll`, the\n * native module gathers up all it's frame drop data and reports it via an analytics pipeline for\n * analysis.\n *\n * Note that `beginScroll` may be called multiple times by `ScrollResponder` - unclear if that's a\n * bug, but the native module should be robust to that.\n *\n * In the future we may add support for tracking frame drops in other types of interactions beyond\n * scrolling.\n */\nconst FrameRateLogger = {\n /**\n * Enable `debug` to see local logs of what's going on.\n */\n setGlobalOptions: function (options: {debug?: boolean, ...}) {\n if (options.debug !== undefined) {\n invariant(\n NativeFrameRateLogger,\n 'Trying to debug FrameRateLogger without the native module!',\n );\n }\n NativeFrameRateLogger?.setGlobalOptions({\n debug: !!options.debug,\n });\n },\n\n /**\n * Must call `setContext` before any events can be properly tracked, which is done automatically\n * in `AppRegistry`, but navigation is also a common place to hook in.\n */\n setContext: function (context: string) {\n NativeFrameRateLogger?.setContext(context);\n },\n\n /**\n * Called in `ScrollResponder` so any component that uses that module will handle this\n * automatically.\n */\n beginScroll() {\n NativeFrameRateLogger?.beginScroll();\n },\n\n /**\n * Called in `ScrollResponder` so any component that uses that module will handle this\n * automatically.\n */\n endScroll() {\n NativeFrameRateLogger?.endScroll();\n },\n};\n\nmodule.exports = FrameRateLogger;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeFrameRateLogger';\nimport NativeFrameRateLogger from '../../src/private/specs/modules/NativeFrameRateLogger';\nexport default NativeFrameRateLogger;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +setGlobalOptions: (options: {|+debug?: ?boolean|}) => void;\n +setContext: (context: string) => void;\n +beginScroll: () => void;\n +endScroll: () => void;\n}\n\nexport default (TurboModuleRegistry.get('FrameRateLogger'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {____ViewStyle_Internal} from './StyleSheetTypes';\n\nexport default function splitLayoutProps(props: ?____ViewStyle_Internal): {\n outer: ?____ViewStyle_Internal,\n inner: ?____ViewStyle_Internal,\n} {\n let outer: ?____ViewStyle_Internal = null;\n let inner: ?____ViewStyle_Internal = null;\n\n if (props != null) {\n // $FlowIgnore[incompatible-exact] Will contain a subset of keys from `props`.\n outer = {};\n // $FlowIgnore[incompatible-exact] Will contain a subset of keys from `props`.\n inner = {};\n\n for (const prop of Object.keys(props)) {\n switch (prop) {\n case 'margin':\n case 'marginHorizontal':\n case 'marginVertical':\n case 'marginBottom':\n case 'marginTop':\n case 'marginLeft':\n case 'marginRight':\n case 'flex':\n case 'flexGrow':\n case 'flexShrink':\n case 'flexBasis':\n case 'alignSelf':\n case 'height':\n case 'minHeight':\n case 'maxHeight':\n case 'width':\n case 'minWidth':\n case 'maxWidth':\n case 'position':\n case 'left':\n case 'right':\n case 'bottom':\n case 'top':\n case 'transform':\n case 'transformOrigin':\n case 'rowGap':\n case 'columnGap':\n case 'gap':\n // $FlowFixMe[cannot-write]\n // $FlowFixMe[incompatible-use]\n // $FlowFixMe[prop-missing]\n outer[prop] = props[prop];\n break;\n default:\n // $FlowFixMe[cannot-write]\n // $FlowFixMe[incompatible-use]\n // $FlowFixMe[prop-missing]\n inner[prop] = props[prop];\n break;\n }\n }\n }\n\n return {outer, inner};\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n// This function dismisses the currently-open keyboard, if any.\n\n'use strict';\n\nconst TextInputState = require('../Components/TextInput/TextInputState');\n\nfunction dismissKeyboard() {\n TextInputState.blurTextInput(TextInputState.currentlyFocusedInput());\n}\n\nmodule.exports = dismissKeyboard;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {EventSubscription} from '../../vendor/emitter/EventEmitter';\n\nimport NativeEventEmitter from '../../EventEmitter/NativeEventEmitter';\nimport LayoutAnimation from '../../LayoutAnimation/LayoutAnimation';\nimport dismissKeyboard from '../../Utilities/dismissKeyboard';\nimport Platform from '../../Utilities/Platform';\nimport NativeKeyboardObserver from './NativeKeyboardObserver';\n\nexport type KeyboardEventName = $Keys;\n\nexport type KeyboardEventEasing =\n | 'easeIn'\n | 'easeInEaseOut'\n | 'easeOut'\n | 'linear'\n | 'keyboard';\n\nexport type KeyboardMetrics = $ReadOnly<{|\n screenX: number,\n screenY: number,\n width: number,\n height: number,\n|}>;\n\nexport type KeyboardEvent = AndroidKeyboardEvent | IOSKeyboardEvent;\n\ntype BaseKeyboardEvent = {|\n duration: number,\n easing: KeyboardEventEasing,\n endCoordinates: KeyboardMetrics,\n|};\n\nexport type AndroidKeyboardEvent = $ReadOnly<{|\n ...BaseKeyboardEvent,\n duration: 0,\n easing: 'keyboard',\n|}>;\n\nexport type IOSKeyboardEvent = $ReadOnly<{|\n ...BaseKeyboardEvent,\n startCoordinates: KeyboardMetrics,\n isEventFromThisApp: boolean,\n|}>;\n\ntype KeyboardEventDefinitions = {\n keyboardWillShow: [KeyboardEvent],\n keyboardDidShow: [KeyboardEvent],\n keyboardWillHide: [KeyboardEvent],\n keyboardDidHide: [KeyboardEvent],\n keyboardWillChangeFrame: [KeyboardEvent],\n keyboardDidChangeFrame: [KeyboardEvent],\n};\n\n/**\n * `Keyboard` module to control keyboard events.\n *\n * ### Usage\n *\n * The Keyboard module allows you to listen for native events and react to them, as\n * well as make changes to the keyboard, like dismissing it.\n *\n *```\n * import React, { Component } from 'react';\n * import { Keyboard, TextInput } from 'react-native';\n *\n * class Example extends Component {\n * componentWillMount () {\n * this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);\n * this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);\n * }\n *\n * componentWillUnmount () {\n * this.keyboardDidShowListener.remove();\n * this.keyboardDidHideListener.remove();\n * }\n *\n * _keyboardDidShow () {\n * alert('Keyboard Shown');\n * }\n *\n * _keyboardDidHide () {\n * alert('Keyboard Hidden');\n * }\n *\n * render() {\n * return (\n * \n * );\n * }\n * }\n *```\n */\n\nclass Keyboard {\n _currentlyShowing: ?KeyboardEvent;\n\n _emitter: NativeEventEmitter =\n new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeKeyboardObserver,\n );\n\n constructor() {\n this.addListener('keyboardDidShow', ev => {\n this._currentlyShowing = ev;\n });\n this.addListener('keyboardDidHide', _ev => {\n this._currentlyShowing = null;\n });\n }\n\n /**\n * The `addListener` function connects a JavaScript function to an identified native\n * keyboard notification event.\n *\n * This function then returns the reference to the listener.\n *\n * @param {string} eventName The `nativeEvent` is the string that identifies the event you're listening for. This\n *can be any of the following:\n *\n * - `keyboardWillShow`\n * - `keyboardDidShow`\n * - `keyboardWillHide`\n * - `keyboardDidHide`\n * - `keyboardWillChangeFrame`\n * - `keyboardDidChangeFrame`\n *\n * Android versions prior to API 30 rely on observing layout changes when\n * `android:windowSoftInputMode` is set to `adjustResize` or `adjustPan`.\n *\n * `keyboardWillShow` as well as `keyboardWillHide` are not available on Android since there is\n * no native corresponding event.\n *\n * @param {function} callback function to be called when the event fires.\n */\n addListener>(\n eventType: K,\n listener: (...$ElementType) => mixed,\n context?: mixed,\n ): EventSubscription {\n return this._emitter.addListener(eventType, listener);\n }\n\n /**\n * Removes all listeners for a specific event type.\n *\n * @param {string} eventType The native event string listeners are watching which will be removed.\n */\n removeAllListeners>(eventType: ?K): void {\n this._emitter.removeAllListeners(eventType);\n }\n\n /**\n * Dismisses the active keyboard and removes focus.\n */\n dismiss(): void {\n dismissKeyboard();\n }\n\n /**\n * Whether the keyboard is last known to be visible.\n */\n isVisible(): boolean {\n return !!this._currentlyShowing;\n }\n\n /**\n * Return the metrics of the soft-keyboard if visible.\n */\n metrics(): ?KeyboardMetrics {\n return this._currentlyShowing?.endCoordinates;\n }\n\n /**\n * Useful for syncing TextInput (or other keyboard accessory view) size of\n * position changes with keyboard movements.\n */\n scheduleLayoutAnimation(event: KeyboardEvent): void {\n const {duration, easing} = event;\n if (duration != null && duration !== 0) {\n LayoutAnimation.configureNext({\n duration: duration,\n update: {\n duration: duration,\n type: (easing != null && LayoutAnimation.Types[easing]) || 'keyboard',\n },\n });\n }\n }\n}\n\nmodule.exports = (new Keyboard(): Keyboard);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport type {\n LayoutAnimationConfig as LayoutAnimationConfig_,\n LayoutAnimationProperty,\n LayoutAnimationType,\n} from '../Renderer/shims/ReactNativeTypes';\n\nimport * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';\nimport {getFabricUIManager} from '../ReactNative/FabricUIManager';\nimport Platform from '../Utilities/Platform';\n\nconst UIManager = require('../ReactNative/UIManager');\n\n// Reexport type\nexport type LayoutAnimationConfig = LayoutAnimationConfig_;\n\ntype OnAnimationDidEndCallback = () => void;\ntype OnAnimationDidFailCallback = () => void;\n\nlet isLayoutAnimationEnabled: boolean =\n ReactNativeFeatureFlags.isLayoutAnimationEnabled();\n\nfunction setEnabled(value: boolean) {\n isLayoutAnimationEnabled = isLayoutAnimationEnabled;\n}\n\n/**\n * Configures the next commit to be animated.\n *\n * onAnimationDidEnd is guaranteed to be called when the animation completes.\n * onAnimationDidFail is *never* called in the classic, pre-Fabric renderer,\n * and never has been. In the new renderer (Fabric) it is called only if configuration\n * parsing fails.\n */\nfunction configureNext(\n config: LayoutAnimationConfig,\n onAnimationDidEnd?: OnAnimationDidEndCallback,\n onAnimationDidFail?: OnAnimationDidFailCallback,\n) {\n if (Platform.isDisableAnimations) {\n return;\n }\n\n if (!isLayoutAnimationEnabled) {\n return;\n }\n\n // Since LayoutAnimations may possibly be disabled for now on iOS (Fabric),\n // or Android (non-Fabric) we race a setTimeout with animation completion,\n // in case onComplete is never called\n // from native. Once LayoutAnimations+Fabric unconditionally ship everywhere, we can\n // delete this mechanism at least in the Fabric branch.\n let animationCompletionHasRun = false;\n const onAnimationComplete = () => {\n if (animationCompletionHasRun) {\n return;\n }\n animationCompletionHasRun = true;\n clearTimeout(raceWithAnimationId);\n onAnimationDidEnd?.();\n };\n const raceWithAnimationId = setTimeout(\n onAnimationComplete,\n (config.duration ?? 0) + 17 /* one frame + 1ms */,\n );\n\n // In Fabric, LayoutAnimations are unconditionally enabled for Android, and\n // conditionally enabled on iOS (pending fully shipping; this is a temporary state).\n const FabricUIManager = getFabricUIManager();\n if (FabricUIManager?.configureNextLayoutAnimation) {\n global?.nativeFabricUIManager?.configureNextLayoutAnimation(\n config,\n onAnimationComplete,\n onAnimationDidFail ??\n function () {} /* this will only be called if configuration parsing fails */,\n );\n return;\n }\n\n // This will only run if Fabric is *not* installed.\n // If you have Fabric + non-Fabric running in the same VM, non-Fabric LayoutAnimations\n // will not work.\n if (UIManager?.configureNextLayoutAnimation) {\n UIManager.configureNextLayoutAnimation(\n config,\n onAnimationComplete ?? function () {},\n onAnimationDidFail ??\n function () {} /* this should never be called in Non-Fabric */,\n );\n }\n}\n\nfunction create(\n duration: number,\n type: LayoutAnimationType,\n property: LayoutAnimationProperty,\n): LayoutAnimationConfig {\n return {\n duration,\n create: {type, property},\n update: {type},\n delete: {type, property},\n };\n}\n\nconst Presets = {\n easeInEaseOut: (create(\n 300,\n 'easeInEaseOut',\n 'opacity',\n ): LayoutAnimationConfig),\n linear: (create(500, 'linear', 'opacity'): LayoutAnimationConfig),\n spring: {\n duration: 700,\n create: {\n type: 'linear',\n property: 'opacity',\n },\n update: {\n type: 'spring',\n springDamping: 0.4,\n },\n delete: {\n type: 'linear',\n property: 'opacity',\n },\n },\n};\n\n/**\n * Automatically animates views to their new positions when the\n * next layout happens.\n *\n * A common way to use this API is to call it before calling `setState`.\n *\n * Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:\n *\n * UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);\n */\nconst LayoutAnimation = {\n /**\n * Schedules an animation to happen on the next layout.\n *\n * @param config Specifies animation properties:\n *\n * - `duration` in milliseconds\n * - `create`, `AnimationConfig` for animating in new views\n * - `update`, `AnimationConfig` for animating views that have been updated\n *\n * @param onAnimationDidEnd Called when the animation finished.\n * Only supported on iOS.\n * @param onError Called on error. Only supported on iOS.\n */\n configureNext,\n /**\n * Helper for creating a config for `configureNext`.\n */\n create,\n Types: Object.freeze({\n spring: 'spring',\n linear: 'linear',\n easeInEaseOut: 'easeInEaseOut',\n easeIn: 'easeIn',\n easeOut: 'easeOut',\n keyboard: 'keyboard',\n }),\n Properties: Object.freeze({\n opacity: 'opacity',\n scaleX: 'scaleX',\n scaleY: 'scaleY',\n scaleXY: 'scaleXY',\n }),\n checkConfig(...args: Array) {\n console.error('LayoutAnimation.checkConfig(...) has been disabled.');\n },\n Presets,\n easeInEaseOut: (configureNext.bind(null, Presets.easeInEaseOut): (\n onAnimationDidEnd?: OnAnimationDidEndCallback,\n ) => void),\n linear: (configureNext.bind(null, Presets.linear): (\n onAnimationDidEnd?: OnAnimationDidEndCallback,\n ) => void),\n spring: (configureNext.bind(null, Presets.spring): (\n onAnimationDidEnd?: OnAnimationDidEndCallback,\n ) => void),\n setEnabled,\n};\n\nmodule.exports = LayoutAnimation;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeKeyboardObserver';\nimport NativeKeyboardObserver from '../../../src/private/specs/modules/NativeKeyboardObserver';\nexport default NativeKeyboardObserver;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n}\n\nexport default (TurboModuleRegistry.get('KeyboardObserver'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent';\nimport AndroidHorizontalScrollContentViewNativeComponent from '../../../src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent';\nexport default AndroidHorizontalScrollContentViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\n\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n removeClippedSubviews?: ?boolean,\n|}>;\n\ntype NativeType = HostComponent;\n\nexport default (codegenNativeComponent(\n 'AndroidHorizontalScrollContentView',\n): NativeType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type {ScrollViewNativeProps as Props} from './ScrollViewNativeComponentType';\n\nimport * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {\n uiViewClassName: 'AndroidHorizontalScrollView',\n bubblingEventTypes: {},\n directEventTypes: {},\n validAttributes: {\n decelerationRate: true,\n disableIntervalMomentum: true,\n maintainVisibleContentPosition: true,\n endFillColor: {process: require('../../StyleSheet/processColor').default},\n fadingEdgeLength: true,\n nestedScrollEnabled: true,\n overScrollMode: true,\n pagingEnabled: true,\n persistentScrollbar: true,\n horizontal: true,\n enableSyncOnScroll: true,\n scrollEnabled: true,\n scrollEventThrottle: true,\n scrollPerfTag: true,\n sendMomentumEvents: true,\n showsHorizontalScrollIndicator: true,\n snapToAlignment: true,\n snapToEnd: true,\n snapToInterval: true,\n snapToStart: true,\n snapToOffsets: true,\n contentOffset: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderRadius: true,\n borderStyle: true,\n borderRightColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderColor: {process: require('../../StyleSheet/processColor').default},\n borderBottomColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderTopLeftRadius: true,\n borderTopColor: {process: require('../../StyleSheet/processColor').default},\n removeClippedSubviews: true,\n borderTopRightRadius: true,\n borderLeftColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n pointerEvents: true,\n },\n};\n\nconst AndroidHorizontalScrollViewNativeComponent: HostComponent =\n NativeComponentRegistry.get(\n 'AndroidHorizontalScrollView',\n () => __INTERNAL_VIEW_CONFIG,\n );\n\nexport default AndroidHorizontalScrollViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport Platform from '../../Utilities/Platform';\n\nfunction processDecelerationRate(\n decelerationRate: number | 'normal' | 'fast',\n): number {\n if (decelerationRate === 'normal') {\n return Platform.select({\n ios: 0.998,\n android: 0.985,\n });\n } else if (decelerationRate === 'fast') {\n return Platform.select({\n ios: 0.99,\n android: 0.9,\n });\n }\n return decelerationRate;\n}\n\nmodule.exports = processDecelerationRate;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type {ViewProps as Props} from '../View/ViewPropTypes';\n\nimport * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {\n uiViewClassName: 'RCTScrollContentView',\n bubblingEventTypes: {},\n directEventTypes: {},\n validAttributes: {},\n};\n\nconst ScrollContentViewNativeComponent: HostComponent =\n NativeComponentRegistry.get(\n 'RCTScrollContentView',\n () => __INTERNAL_VIEW_CONFIG,\n );\n\nexport default ScrollContentViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';\nimport type {Double} from '../../Types/CodegenTypes';\n\nimport codegenNativeCommands from '../../Utilities/codegenNativeCommands';\nimport * as React from 'react';\n\ntype ScrollViewNativeComponentType = HostComponent;\ninterface NativeCommands {\n +flashScrollIndicators: (\n viewRef: React.ElementRef,\n ) => void;\n +scrollTo: (\n viewRef: React.ElementRef,\n x: Double,\n y: Double,\n animated: boolean,\n ) => void;\n +scrollToEnd: (\n viewRef: React.ElementRef,\n animated: boolean,\n ) => void;\n +zoomToRect: (\n viewRef: React.ElementRef,\n rect: {|\n x: Double,\n y: Double,\n width: Double,\n height: Double,\n animated?: boolean,\n |},\n animated?: boolean,\n ) => void;\n}\n\nexport default (codegenNativeCommands({\n supportedCommands: [\n 'flashScrollIndicators',\n 'scrollTo',\n 'scrollToEnd',\n 'zoomToRect',\n ],\n}): NativeCommands);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport * as React from 'react';\n\ntype Value = {horizontal: boolean} | null;\n\nconst ScrollViewContext: React.Context = React.createContext(null);\nif (__DEV__) {\n ScrollViewContext.displayName = 'ScrollViewContext';\n}\nexport default ScrollViewContext;\n\nexport const HORIZONTAL: Value = Object.freeze({horizontal: true});\nexport const VERTICAL: Value = Object.freeze({horizontal: false});\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type {ScrollViewNativeProps as Props} from './ScrollViewNativeComponentType';\n\nimport * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';\nimport {ConditionallyIgnoredEventHandlers} from '../../NativeComponent/ViewConfigIgnore';\nimport Platform from '../../Utilities/Platform';\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig =\n Platform.OS === 'android'\n ? {\n uiViewClassName: 'RCTScrollView',\n bubblingEventTypes: {},\n directEventTypes: {\n topMomentumScrollBegin: {\n registrationName: 'onMomentumScrollBegin',\n },\n topMomentumScrollEnd: {\n registrationName: 'onMomentumScrollEnd',\n },\n topScroll: {\n registrationName: 'onScroll',\n },\n topScrollBeginDrag: {\n registrationName: 'onScrollBeginDrag',\n },\n topScrollEndDrag: {\n registrationName: 'onScrollEndDrag',\n },\n },\n validAttributes: {\n contentOffset: {\n diff: require('../../Utilities/differ/pointsDiffer'),\n },\n decelerationRate: true,\n enableSyncOnScroll: true, // Fabric only.\n disableIntervalMomentum: true,\n maintainVisibleContentPosition: true,\n pagingEnabled: true,\n scrollEnabled: true,\n showsVerticalScrollIndicator: true,\n snapToAlignment: true,\n snapToEnd: true,\n snapToInterval: true,\n snapToOffsets: true,\n snapToStart: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n sendMomentumEvents: true,\n borderRadius: true,\n nestedScrollEnabled: true,\n scrollEventThrottle: true,\n borderStyle: true,\n borderRightColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n borderBottomColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n persistentScrollbar: true,\n horizontal: true,\n endFillColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n fadingEdgeLength: true,\n overScrollMode: true,\n borderTopLeftRadius: true,\n scrollPerfTag: true,\n borderTopColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n removeClippedSubviews: true,\n borderTopRightRadius: true,\n borderLeftColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n pointerEvents: true,\n isInvertedVirtualizedList: true,\n },\n }\n : {\n uiViewClassName: 'RCTScrollView',\n bubblingEventTypes: {},\n directEventTypes: {\n topMomentumScrollBegin: {\n registrationName: 'onMomentumScrollBegin',\n },\n topMomentumScrollEnd: {\n registrationName: 'onMomentumScrollEnd',\n },\n topScroll: {\n registrationName: 'onScroll',\n },\n topScrollBeginDrag: {\n registrationName: 'onScrollBeginDrag',\n },\n topScrollEndDrag: {\n registrationName: 'onScrollEndDrag',\n },\n topScrollToTop: {\n registrationName: 'onScrollToTop',\n },\n },\n validAttributes: {\n alwaysBounceHorizontal: true,\n alwaysBounceVertical: true,\n automaticallyAdjustContentInsets: true,\n automaticallyAdjustKeyboardInsets: true,\n automaticallyAdjustsScrollIndicatorInsets: true,\n bounces: true,\n bouncesZoom: true,\n canCancelContentTouches: true,\n centerContent: true,\n contentInset: {\n diff: require('../../Utilities/differ/insetsDiffer'),\n },\n contentOffset: {\n diff: require('../../Utilities/differ/pointsDiffer'),\n },\n contentInsetAdjustmentBehavior: true,\n decelerationRate: true,\n endDraggingSensitivityMultiplier: true,\n enableSyncOnScroll: true, // Fabric only.\n directionalLockEnabled: true,\n disableIntervalMomentum: true,\n indicatorStyle: true,\n inverted: true,\n keyboardDismissMode: true,\n maintainVisibleContentPosition: true,\n maximumZoomScale: true,\n minimumZoomScale: true,\n pagingEnabled: true,\n pinchGestureEnabled: true,\n scrollEnabled: true,\n scrollEventThrottle: true,\n scrollIndicatorInsets: {\n diff: require('../../Utilities/differ/insetsDiffer'),\n },\n scrollToOverflowEnabled: true,\n scrollsToTop: true,\n showsHorizontalScrollIndicator: true,\n showsVerticalScrollIndicator: true,\n snapToAlignment: true,\n snapToEnd: true,\n snapToInterval: true,\n snapToOffsets: true,\n snapToStart: true,\n zoomScale: true,\n ...ConditionallyIgnoredEventHandlers({\n onScrollBeginDrag: true,\n onMomentumScrollEnd: true,\n onScrollEndDrag: true,\n onMomentumScrollBegin: true,\n onScrollToTop: true,\n onScroll: true,\n }),\n },\n };\n\nconst ScrollViewNativeComponent: HostComponent =\n NativeComponentRegistry.get(\n 'RCTScrollView',\n () => __INTERNAL_VIEW_CONFIG,\n );\n\nexport default ScrollViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {LayoutEvent} from '../../Types/CoreEventTypes';\n\nimport Animated from '../../Animated/Animated';\nimport {isPublicInstance as isFabricPublicInstance} from '../../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils';\nimport StyleSheet from '../../StyleSheet/StyleSheet';\nimport Platform from '../../Utilities/Platform';\nimport useMergeRefs from '../../Utilities/useMergeRefs';\nimport * as React from 'react';\nimport {useCallback, useEffect, useMemo, useRef, useState} from 'react';\n\nexport type Props = $ReadOnly<{\n children?: React.Element<$FlowFixMe>,\n nextHeaderLayoutY: ?number,\n onLayout: (event: LayoutEvent) => void,\n scrollAnimatedValue: Animated.Value,\n // Will cause sticky headers to stick at the bottom of the ScrollView instead\n // of the top.\n inverted: ?boolean,\n // The height of the parent ScrollView. Currently only set when inverted.\n scrollViewHeight: ?number,\n nativeID?: ?string,\n hiddenOnScroll?: ?boolean,\n}>;\n\ntype Instance = {\n ...React.ElementRef,\n setNextHeaderY: number => void,\n ...\n};\n\nconst ScrollViewStickyHeaderWithForwardedRef: React.AbstractComponent<\n Props,\n Instance,\n> = React.forwardRef(function ScrollViewStickyHeader(props, forwardedRef) {\n const {\n inverted,\n scrollViewHeight,\n hiddenOnScroll,\n scrollAnimatedValue,\n nextHeaderLayoutY: _nextHeaderLayoutY,\n } = props;\n\n const [measured, setMeasured] = useState(false);\n const [layoutY, setLayoutY] = useState(0);\n const [layoutHeight, setLayoutHeight] = useState(0);\n const [translateY, setTranslateY] = useState(null);\n const [nextHeaderLayoutY, setNextHeaderLayoutY] =\n useState(_nextHeaderLayoutY);\n const [isFabric, setIsFabric] = useState(false);\n\n const callbackRef = useCallback((ref: Instance | null): void => {\n if (ref == null) {\n return;\n }\n ref.setNextHeaderY = setNextHeaderLayoutY;\n setIsFabric(isFabricPublicInstance(ref));\n }, []);\n const ref: (React.ElementRef | null) => void =\n // $FlowFixMe[incompatible-type] - Ref is mutated by `callbackRef`.\n useMergeRefs(callbackRef, forwardedRef);\n\n const offset = useMemo(\n () =>\n hiddenOnScroll === true\n ? Animated.diffClamp(\n scrollAnimatedValue\n .interpolate({\n extrapolateLeft: 'clamp',\n inputRange: [layoutY, layoutY + 1],\n outputRange: ([0, 1]: Array),\n })\n .interpolate({\n inputRange: [0, 1],\n outputRange: ([0, -1]: Array),\n }),\n -layoutHeight,\n 0,\n )\n : null,\n [scrollAnimatedValue, layoutHeight, layoutY, hiddenOnScroll],\n );\n\n const [animatedTranslateY, setAnimatedTranslateY] = useState(\n () => {\n const inputRange: Array = [-1, 0];\n const outputRange: Array = [0, 0];\n const initialTranslateY = scrollAnimatedValue.interpolate({\n inputRange,\n outputRange,\n });\n\n if (offset != null) {\n return Animated.add(initialTranslateY, offset);\n }\n return initialTranslateY;\n },\n );\n\n const haveReceivedInitialZeroTranslateY = useRef(true);\n const translateYDebounceTimer = useRef(null);\n\n useEffect(() => {\n if (translateY !== 0 && translateY != null) {\n haveReceivedInitialZeroTranslateY.current = false;\n }\n }, [translateY]);\n\n // This is called whenever the (Interpolated) Animated Value\n // updates, which is several times per frame during scrolling.\n // To ensure that the Fabric ShadowTree has the most recent\n // translate style of this node, we debounce the value and then\n // pass it through to the underlying node during render.\n // This is:\n // 1. Only an issue in Fabric.\n // 2. Worse in Android than iOS. In Android, but not iOS, you\n // can touch and move your finger slightly and still trigger\n // a \"tap\" event. In iOS, moving will cancel the tap in\n // both Fabric and non-Fabric. On Android when you move\n // your finger, the hit-detection moves from the Android\n // platform to JS, so we need the ShadowTree to have knowledge\n // of the current position.\n const animatedValueListener = useCallback(({value}: $FlowFixMe) => {\n const debounceTimeout: number = Platform.OS === 'android' ? 15 : 64;\n // When the AnimatedInterpolation is recreated, it always initializes\n // to a value of zero and emits a value change of 0 to its listeners.\n if (value === 0 && !haveReceivedInitialZeroTranslateY.current) {\n haveReceivedInitialZeroTranslateY.current = true;\n return;\n }\n if (translateYDebounceTimer.current != null) {\n clearTimeout(translateYDebounceTimer.current);\n }\n translateYDebounceTimer.current = setTimeout(\n () => setTranslateY(value),\n debounceTimeout,\n );\n }, []);\n\n useEffect(() => {\n const inputRange: Array = [-1, 0];\n const outputRange: Array = [0, 0];\n\n if (measured) {\n if (inverted === true) {\n // The interpolation looks like:\n // - Negative scroll: no translation\n // - `stickStartPoint` is the point at which the header will start sticking.\n // It is calculated using the ScrollView viewport height so it is a the bottom.\n // - Headers that are in the initial viewport will never stick, `stickStartPoint`\n // will be negative.\n // - From 0 to `stickStartPoint` no translation. This will cause the header\n // to scroll normally until it reaches the top of the scroll view.\n // - From `stickStartPoint` to when the next header y hits the bottom edge of the header: translate\n // equally to scroll. This will cause the header to stay at the top of the scroll view.\n // - Past the collision with the next header y: no more translation. This will cause the\n // header to continue scrolling up and make room for the next sticky header.\n // In the case that there is no next header just translate equally to\n // scroll indefinitely.\n if (scrollViewHeight != null) {\n const stickStartPoint = layoutY + layoutHeight - scrollViewHeight;\n if (stickStartPoint > 0) {\n inputRange.push(stickStartPoint);\n outputRange.push(0);\n inputRange.push(stickStartPoint + 1);\n outputRange.push(1);\n // If the next sticky header has not loaded yet (probably windowing) or is the last\n // we can just keep it sticked forever.\n const collisionPoint =\n (nextHeaderLayoutY || 0) - layoutHeight - scrollViewHeight;\n if (collisionPoint > stickStartPoint) {\n inputRange.push(collisionPoint, collisionPoint + 1);\n outputRange.push(\n collisionPoint - stickStartPoint,\n collisionPoint - stickStartPoint,\n );\n }\n }\n }\n } else {\n // The interpolation looks like:\n // - Negative scroll: no translation\n // - From 0 to the y of the header: no translation. This will cause the header\n // to scroll normally until it reaches the top of the scroll view.\n // - From header y to when the next header y hits the bottom edge of the header: translate\n // equally to scroll. This will cause the header to stay at the top of the scroll view.\n // - Past the collision with the next header y: no more translation. This will cause the\n // header to continue scrolling up and make room for the next sticky header.\n // In the case that there is no next header just translate equally to\n // scroll indefinitely.\n inputRange.push(layoutY);\n outputRange.push(0);\n // If the next sticky header has not loaded yet (probably windowing) or is the last\n // we can just keep it sticked forever.\n const collisionPoint = (nextHeaderLayoutY || 0) - layoutHeight;\n if (collisionPoint >= layoutY) {\n inputRange.push(collisionPoint, collisionPoint + 1);\n outputRange.push(collisionPoint - layoutY, collisionPoint - layoutY);\n } else {\n inputRange.push(layoutY + 1);\n outputRange.push(1);\n }\n }\n }\n\n let newAnimatedTranslateY: Animated.Node = scrollAnimatedValue.interpolate({\n inputRange,\n outputRange,\n });\n\n if (offset != null) {\n newAnimatedTranslateY = Animated.add(newAnimatedTranslateY, offset);\n }\n\n // add the event listener\n let animatedListenerId;\n if (isFabric) {\n animatedListenerId = newAnimatedTranslateY.addListener(\n animatedValueListener,\n );\n }\n\n setAnimatedTranslateY(newAnimatedTranslateY);\n\n // clean up the event listener and timer\n return () => {\n if (animatedListenerId) {\n newAnimatedTranslateY.removeListener(animatedListenerId);\n }\n if (translateYDebounceTimer.current != null) {\n clearTimeout(translateYDebounceTimer.current);\n }\n };\n }, [\n nextHeaderLayoutY,\n measured,\n layoutHeight,\n layoutY,\n scrollViewHeight,\n scrollAnimatedValue,\n inverted,\n offset,\n animatedValueListener,\n isFabric,\n ]);\n\n const _onLayout = (event: LayoutEvent) => {\n setLayoutY(event.nativeEvent.layout.y);\n setLayoutHeight(event.nativeEvent.layout.height);\n setMeasured(true);\n\n props.onLayout(event);\n const child = React.Children.only<$FlowFixMe>(props.children);\n if (child.props.onLayout) {\n child.props.onLayout(event);\n }\n };\n\n const child = React.Children.only<$FlowFixMe>(props.children);\n\n const passthroughAnimatedPropExplicitValues =\n isFabric && translateY != null\n ? {\n style: {transform: [{translateY: translateY}]},\n }\n : null;\n\n return (\n /* $FlowFixMe[prop-missing] passthroughAnimatedPropExplicitValues isn't properly\n included in the Animated.View flow type. */\n \n {React.cloneElement(child, {\n style: styles.fill, // We transfer the child style to the wrapper.\n onLayout: undefined, // we call this manually through our this._onLayout\n })}\n \n );\n});\n\nconst styles = StyleSheet.create({\n header: {\n zIndex: 10,\n position: 'relative',\n },\n fill: {\n flex: 1,\n },\n});\n\nexport default ScrollViewStickyHeaderWithForwardedRef;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {AnimatedComponentType} from '../createAnimatedComponent';\n\nimport SectionList from '../../Lists/SectionList';\nimport createAnimatedComponent from '../createAnimatedComponent';\nimport * as React from 'react';\n\nexport default (createAnimatedComponent(SectionList): AnimatedComponentType<\n React.ElementConfig,\n React.ElementRef,\n>);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {ScrollResponderType} from '../Components/ScrollView/ScrollView';\nimport type {\n ScrollToLocationParamsType,\n SectionBase as _SectionBase,\n VirtualizedSectionListProps,\n} from '@react-native/virtualized-lists';\n\nimport Platform from '../Utilities/Platform';\nimport {VirtualizedSectionList} from '@react-native/virtualized-lists';\nimport * as React from 'react';\n\ntype Item = any;\n\nexport type SectionBase = _SectionBase;\n\ntype RequiredProps> = {|\n /**\n * The actual data to render, akin to the `data` prop in [``](https://reactnative.dev/docs/flatlist).\n *\n * General shape:\n *\n * sections: $ReadOnlyArray<{\n * data: $ReadOnlyArray,\n * renderItem?: ({item: SectionItem, ...}) => ?React.Element<*>,\n * ItemSeparatorComponent?: ?ReactClass<{highlighted: boolean, ...}>,\n * }>\n */\n sections: $ReadOnlyArray,\n|};\n\ntype OptionalProps> = {|\n /**\n * Default renderer for every item in every section. Can be over-ridden on a per-section basis.\n */\n renderItem?: (info: {\n item: Item,\n index: number,\n section: SectionT,\n separators: {\n highlight: () => void,\n unhighlight: () => void,\n updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,\n ...\n },\n ...\n }) => null | React.Element,\n /**\n * A marker property for telling the list to re-render (since it implements `PureComponent`). If\n * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the\n * `data` prop, stick it here and treat it immutably.\n */\n extraData?: any,\n /**\n * How many items to render in the initial batch. This should be enough to fill the screen but not\n * much more. Note these items will never be unmounted as part of the windowed rendering in order\n * to improve perceived performance of scroll-to-top actions.\n */\n initialNumToRender?: ?number,\n /**\n * Reverses the direction of scroll. Uses scale transforms of -1.\n */\n inverted?: ?boolean,\n /**\n * Used to extract a unique key for a given item at the specified index. Key is used for caching\n * and as the react key to track item re-ordering. The default extractor checks item.key, then\n * falls back to using the index, like react does. Note that this sets keys for each item, but\n * each overall section still needs its own key.\n */\n keyExtractor?: ?(item: Item, index: number) => string,\n /**\n * Called once when the scroll position gets within `onEndReachedThreshold` of the rendered\n * content.\n */\n onEndReached?: ?(info: {distanceFromEnd: number, ...}) => void,\n /**\n * Note: may have bugs (missing content) in some circumstances - use at your own risk.\n *\n * This may improve scroll performance for large lists.\n */\n removeClippedSubviews?: boolean,\n|};\n\nexport type Props = {|\n ...$Diff<\n VirtualizedSectionListProps,\n {\n getItem: $PropertyType, 'getItem'>,\n getItemCount: $PropertyType<\n VirtualizedSectionListProps,\n 'getItemCount',\n >,\n renderItem: $PropertyType<\n VirtualizedSectionListProps,\n 'renderItem',\n >,\n keyExtractor: $PropertyType<\n VirtualizedSectionListProps,\n 'keyExtractor',\n >,\n ...\n },\n >,\n ...RequiredProps,\n ...OptionalProps,\n|};\n\n/**\n * A performant interface for rendering sectioned lists, supporting the most handy features:\n *\n * - Fully cross-platform.\n * - Configurable viewability callbacks.\n * - List header support.\n * - List footer support.\n * - Item separator support.\n * - Section header support.\n * - Section separator support.\n * - Heterogeneous data and item rendering support.\n * - Pull to Refresh.\n * - Scroll loading.\n *\n * If you don't need section support and want a simpler interface, use\n * [``](https://reactnative.dev/docs/flatlist).\n *\n * Simple Examples:\n *\n * }\n * renderSectionHeader={({section}) =>
}\n * sections={[ // homogeneous rendering between sections\n * {data: [...], title: ...},\n * {data: [...], title: ...},\n * {data: [...], title: ...},\n * ]}\n * />\n *\n * \n *\n * This is a convenience wrapper around [``](docs/virtualizedlist),\n * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed\n * here, along with the following caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate and momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n */\nexport default class SectionList<\n SectionT: SectionBase,\n> extends React.PureComponent, void> {\n props: Props;\n\n /**\n * Scrolls to the item at the specified `sectionIndex` and `itemIndex` (within the section)\n * positioned in the viewable area such that `viewPosition` 0 places it at the top (and may be\n * covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle. `viewOffset` is a\n * fixed number of pixels to offset the final target position, e.g. to compensate for sticky\n * headers.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n scrollToLocation(params: ScrollToLocationParamsType) {\n if (this._wrapperListRef != null) {\n this._wrapperListRef.scrollToLocation(params);\n }\n }\n\n /**\n * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.\n * if `waitForInteractions` is true and the user has not scrolled. This is typically called by\n * taps on items or by navigation actions.\n */\n recordInteraction() {\n const listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n listRef && listRef.recordInteraction();\n }\n\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n flashScrollIndicators() {\n const listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n listRef && listRef.flashScrollIndicators();\n }\n\n /**\n * Provides a handle to the underlying scroll responder.\n */\n getScrollResponder(): ?ScrollResponderType {\n const listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n if (listRef) {\n return listRef.getScrollResponder();\n }\n }\n\n getScrollableNode(): any {\n const listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n if (listRef) {\n return listRef.getScrollableNode();\n }\n }\n\n setNativeProps(props: Object) {\n const listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n if (listRef) {\n listRef.setNativeProps(props);\n }\n }\n\n render(): React.Node {\n const {\n stickySectionHeadersEnabled: _stickySectionHeadersEnabled,\n ...restProps\n } = this.props;\n const stickySectionHeadersEnabled =\n _stickySectionHeadersEnabled ?? Platform.OS === 'ios';\n return (\n /* $FlowFixMe[incompatible-type] Error revealed after improved builtin\n * React utility types */\n /* $FlowFixMe[incompatible-type] Error revealed after improved builtin\n * React utility types */\n items.length}\n // $FlowFixMe[missing-local-annot]\n getItem={(items, index) => items[index]}\n />\n );\n }\n\n _wrapperListRef: ?React.ElementRef;\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n _captureRef = ref => {\n this._wrapperListRef = ref;\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {AnimatedComponentType} from '../createAnimatedComponent';\n\nimport Text from '../../Text/Text';\nimport createAnimatedComponent from '../createAnimatedComponent';\nimport * as React from 'react';\n\nexport default (createAnimatedComponent(\n (Text: $FlowFixMe),\n): AnimatedComponentType<\n React.ElementConfig,\n React.ElementRef,\n>);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {AnimatedComponentType} from '../createAnimatedComponent';\n\nimport View from '../../Components/View/View';\nimport createAnimatedComponent from '../createAnimatedComponent';\nimport * as React from 'react';\n\nexport default (createAnimatedComponent(View): AnimatedComponentType<\n React.ElementConfig,\n React.ElementRef,\n>);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {AccessibilityRole} from '../../Components/View/ViewAccessibility';\nimport type {\n MeasureInWindowOnSuccessCallback,\n MeasureLayoutOnSuccessCallback,\n MeasureOnSuccessCallback,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type {ColorValue, ViewStyleProp} from '../../StyleSheet/StyleSheet';\nimport type {DirectEventHandler} from '../../Types/CodegenTypes';\n\nimport StyleSheet from '../../StyleSheet/StyleSheet';\nimport dismissKeyboard from '../../Utilities/dismissKeyboard';\nimport StatusBar from '../StatusBar/StatusBar';\nimport View from '../View/View';\nimport AndroidDrawerLayoutNativeComponent, {\n Commands,\n} from './AndroidDrawerLayoutNativeComponent';\nimport nullthrows from 'nullthrows';\nimport * as React from 'react';\n\nconst DRAWER_STATES = ['Idle', 'Dragging', 'Settling'];\n\ntype DrawerStates = 'Idle' | 'Dragging' | 'Settling';\n\ntype DrawerSlideEvent = $ReadOnly<{|\n offset: number,\n|}>;\n\ntype Props = $ReadOnly<{|\n accessibilityRole?: ?AccessibilityRole,\n\n /**\n * Determines whether the keyboard gets dismissed in response to a drag.\n * - 'none' (the default), drags do not dismiss the keyboard.\n * - 'on-drag', the keyboard is dismissed when a drag begins.\n */\n keyboardDismissMode?: ?('none' | 'on-drag'),\n\n /**\n * Specifies the background color of the drawer. The default value is white.\n * If you want to set the opacity of the drawer, use rgba. Example:\n *\n * ```\n * return (\n * \n * \n * );\n * ```\n */\n drawerBackgroundColor?: ?ColorValue,\n\n /**\n * Specifies the side of the screen from which the drawer will slide in.\n */\n drawerPosition: ?('left' | 'right'),\n\n /**\n * Specifies the width of the drawer, more precisely the width of the view that be pulled in\n * from the edge of the window.\n */\n drawerWidth?: ?number,\n\n /**\n * Specifies the lock mode of the drawer. The drawer can be locked in 3 states:\n * - unlocked (default), meaning that the drawer will respond (open/close) to touch gestures.\n * - locked-closed, meaning that the drawer will stay closed and not respond to gestures.\n * - locked-open, meaning that the drawer will stay opened and not respond to gestures.\n * The drawer may still be opened and closed programmatically (`openDrawer`/`closeDrawer`).\n */\n drawerLockMode?: ?('unlocked' | 'locked-closed' | 'locked-open'),\n\n /**\n * Function called whenever there is an interaction with the navigation view.\n */\n onDrawerSlide?: ?DirectEventHandler,\n\n /**\n * Function called when the drawer state has changed. The drawer can be in 3 states:\n * - Idle, meaning there is no interaction with the navigation view happening at the time\n * - Dragging, meaning there is currently an interaction with the navigation view\n * - Settling, meaning that there was an interaction with the navigation view, and the\n * navigation view is now finishing its closing or opening animation\n */\n onDrawerStateChanged?: ?(state: DrawerStates) => mixed,\n\n /**\n * Function called whenever the navigation view has been opened.\n */\n onDrawerOpen?: ?() => mixed,\n\n /**\n * Function called whenever the navigation view has been closed.\n */\n onDrawerClose?: ?() => mixed,\n\n /**\n * The navigation view that will be rendered to the side of the screen and can be pulled in.\n */\n renderNavigationView: () => React.Element,\n\n /**\n * Make the drawer take the entire screen and draw the background of the\n * status bar to allow it to open over the status bar. It will only have an\n * effect on API 21+.\n */\n statusBarBackgroundColor?: ?ColorValue,\n\n children?: React.Node,\n style?: ?ViewStyleProp,\n|}>;\n\ntype State = {|\n drawerOpened: boolean,\n|};\n\n/**\n * React component that wraps the platform `DrawerLayout` (Android only). The\n * Drawer (typically used for navigation) is rendered with `renderNavigationView`\n * and direct children are the main view (where your content goes). The navigation\n * view is initially not visible on the screen, but can be pulled in from the\n * side of the window specified by the `drawerPosition` prop and its width can\n * be set by the `drawerWidth` prop.\n *\n * Example:\n *\n * ```\n * render: function() {\n * var navigationView = (\n * \n * I'm in the Drawer!\n * \n * );\n * return (\n * navigationView}>\n * \n * Hello\n * World!\n * \n * \n * );\n * },\n * ```\n */\nclass DrawerLayoutAndroid extends React.Component {\n static get positions(): mixed {\n console.warn(\n 'Setting DrawerLayoutAndroid drawerPosition using `DrawerLayoutAndroid.positions` is deprecated. Instead pass the string value \"left\" or \"right\"',\n );\n\n return {Left: 'left', Right: 'right'};\n }\n\n // $FlowFixMe[missing-local-annot]\n _nativeRef =\n React.createRef<\n React.ElementRef,\n >();\n\n state: State = {\n drawerOpened: false,\n };\n\n render(): React.Node {\n const {\n drawerBackgroundColor = 'white',\n onDrawerStateChanged,\n renderNavigationView,\n onDrawerOpen,\n onDrawerClose,\n ...props\n } = this.props;\n const drawStatusBar = this.props.statusBarBackgroundColor != null;\n const drawerViewWrapper = (\n \n {renderNavigationView()}\n {drawStatusBar && }\n \n );\n const childrenWrapper = (\n \n {drawStatusBar && (\n \n )}\n {drawStatusBar && (\n \n )}\n {this.props.children}\n \n );\n return (\n \n {childrenWrapper}\n {drawerViewWrapper}\n \n );\n }\n\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n _onDrawerSlide = event => {\n if (this.props.onDrawerSlide) {\n // $FlowFixMe[unused-promise]\n this.props.onDrawerSlide(event);\n }\n if (this.props.keyboardDismissMode === 'on-drag') {\n dismissKeyboard();\n }\n };\n\n _onDrawerOpen = () => {\n this.setState({\n drawerOpened: true,\n });\n if (this.props.onDrawerOpen) {\n this.props.onDrawerOpen();\n }\n };\n\n _onDrawerClose = () => {\n this.setState({\n drawerOpened: false,\n });\n if (this.props.onDrawerClose) {\n this.props.onDrawerClose();\n }\n };\n\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n _onDrawerStateChanged = event => {\n if (this.props.onDrawerStateChanged) {\n this.props.onDrawerStateChanged(\n DRAWER_STATES[event.nativeEvent.drawerState],\n );\n }\n };\n\n /**\n * Opens the drawer.\n */\n openDrawer() {\n Commands.openDrawer(nullthrows(this._nativeRef.current));\n }\n\n /**\n * Closes the drawer.\n */\n closeDrawer() {\n Commands.closeDrawer(nullthrows(this._nativeRef.current));\n }\n\n /**\n * Closing and opening example\n * Note: To access the drawer you have to give it a ref\n *\n * Class component:\n *\n * render () {\n * this.openDrawer = () => {\n * this.refs.DRAWER.openDrawer()\n * }\n * this.closeDrawer = () => {\n * this.refs.DRAWER.closeDrawer()\n * }\n * return (\n * \n * {children}\n * \n * )\n * }\n *\n * Function component:\n *\n * const drawerRef = useRef()\n * const openDrawer = () => {\n * drawerRef.current.openDrawer()\n * }\n * const closeDrawer = () => {\n * drawerRef.current.closeDrawer()\n * }\n * return (\n * \n * {children}\n * \n * )\n */\n\n /**\n * Native methods\n */\n blur() {\n nullthrows(this._nativeRef.current).blur();\n }\n\n focus() {\n nullthrows(this._nativeRef.current).focus();\n }\n\n measure(callback: MeasureOnSuccessCallback) {\n nullthrows(this._nativeRef.current).measure(callback);\n }\n\n measureInWindow(callback: MeasureInWindowOnSuccessCallback) {\n nullthrows(this._nativeRef.current).measureInWindow(callback);\n }\n\n measureLayout(\n relativeToNativeNode: number,\n onSuccess: MeasureLayoutOnSuccessCallback,\n onFail?: () => void,\n ) {\n nullthrows(this._nativeRef.current).measureLayout(\n relativeToNativeNode,\n onSuccess,\n onFail,\n );\n }\n\n setNativeProps(nativeProps: Object) {\n nullthrows(this._nativeRef.current).setNativeProps(nativeProps);\n }\n}\n\nconst styles = StyleSheet.create({\n base: {\n flex: 1,\n elevation: 16,\n },\n mainSubview: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n },\n drawerSubview: {\n position: 'absolute',\n top: 0,\n bottom: 0,\n },\n statusBar: {\n height: StatusBar.currentHeight,\n },\n drawerStatusBar: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n height: StatusBar.currentHeight,\n backgroundColor: 'rgba(0, 0, 0, 0.251)',\n },\n});\n\nmodule.exports = DrawerLayoutAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\n\nimport processColor from '../../StyleSheet/processColor';\nimport Platform from '../../Utilities/Platform';\nimport NativeStatusBarManagerAndroid from './NativeStatusBarManagerAndroid';\nimport NativeStatusBarManagerIOS from './NativeStatusBarManagerIOS';\nimport invariant from 'invariant';\nimport * as React from 'react';\n\n/**\n * Status bar style\n */\nexport type StatusBarStyle = $Keys<{\n /**\n * Default status bar style (dark for iOS, light for Android)\n */\n default: string,\n /**\n * Dark background, white texts and icons\n */\n 'light-content': string,\n /**\n * Light background, dark texts and icons\n */\n 'dark-content': string,\n ...\n}>;\n\n/**\n * Status bar animation\n */\nexport type StatusBarAnimation = $Keys<{\n /**\n * No animation\n */\n none: string,\n /**\n * Fade animation\n */\n fade: string,\n /**\n * Slide animation\n */\n slide: string,\n ...\n}>;\n\ntype AndroidProps = $ReadOnly<{|\n /**\n * The background color of the status bar.\n * @platform android\n */\n backgroundColor?: ?ColorValue,\n /**\n * If the status bar is translucent.\n * When translucent is set to true, the app will draw under the status bar.\n * This is useful when using a semi transparent status bar color.\n *\n * @platform android\n */\n translucent?: ?boolean,\n|}>;\n\ntype IOSProps = $ReadOnly<{|\n /**\n * If the network activity indicator should be visible.\n *\n * @platform ios\n */\n networkActivityIndicatorVisible?: ?boolean,\n /**\n * The transition effect when showing and hiding the status bar using the `hidden`\n * prop. Defaults to 'fade'.\n *\n * @platform ios\n */\n showHideTransition?: ?('fade' | 'slide' | 'none'),\n|}>;\n\ntype Props = $ReadOnly<{|\n ...AndroidProps,\n ...IOSProps,\n /**\n * If the status bar is hidden.\n */\n hidden?: ?boolean,\n /**\n * If the transition between status bar property changes should be animated.\n * Supported for backgroundColor, barStyle and hidden.\n */\n animated?: ?boolean,\n /**\n * Sets the color of the status bar text.\n */\n barStyle?: ?('default' | 'light-content' | 'dark-content'),\n|}>;\n\n/**\n * Merges the prop stack with the default values.\n */\nfunction mergePropsStack(\n propsStack: Array,\n defaultValues: Object,\n): Object {\n return propsStack.reduce(\n (prev, cur) => {\n for (const prop in cur) {\n if (cur[prop] != null) {\n prev[prop] = cur[prop];\n }\n }\n return prev;\n },\n {...defaultValues},\n );\n}\n\n/**\n * Returns an object to insert in the props stack from the props\n * and the transition/animation info.\n */\nfunction createStackEntry(props: any): any {\n const animated = props.animated ?? false;\n const showHideTransition = props.showHideTransition ?? 'fade';\n return {\n backgroundColor:\n props.backgroundColor != null\n ? {\n value: props.backgroundColor,\n animated,\n }\n : null,\n barStyle:\n props.barStyle != null\n ? {\n value: props.barStyle,\n animated,\n }\n : null,\n translucent: props.translucent,\n hidden:\n props.hidden != null\n ? {\n value: props.hidden,\n animated,\n transition: showHideTransition,\n }\n : null,\n networkActivityIndicatorVisible: props.networkActivityIndicatorVisible,\n };\n}\n\n/**\n * Component to control the app status bar.\n *\n * It is possible to have multiple `StatusBar` components mounted at the same\n * time. The props will be merged in the order the `StatusBar` components were\n * mounted.\n *\n * ### Imperative API\n *\n * For cases where using a component is not ideal, there are static methods\n * to manipulate the `StatusBar` display stack. These methods have the same\n * behavior as mounting and unmounting a `StatusBar` component.\n *\n * For example, you can call `StatusBar.pushStackEntry` to update the status bar\n * before launching a third-party native UI component, and then call\n * `StatusBar.popStackEntry` when completed.\n *\n * ```\n * const openThirdPartyBugReporter = async () => {\n * // The bug reporter has a dark background, so we push a new status bar style.\n * const stackEntry = StatusBar.pushStackEntry({barStyle: 'light-content'});\n *\n * // `open` returns a promise that resolves when the UI is dismissed.\n * await BugReporter.open();\n *\n * // Don't forget to call `popStackEntry` when you're done.\n * StatusBar.popStackEntry(stackEntry);\n * };\n * ```\n *\n * There is a legacy imperative API that enables you to manually update the\n * status bar styles. However, the legacy API does not update the internal\n * `StatusBar` display stack, which means that any changes will be overridden\n * whenever a `StatusBar` component is mounted or unmounted.\n *\n * It is strongly advised that you use `pushStackEntry`, `popStackEntry`, or\n * `replaceStackEntry` instead of the static methods beginning with `set`.\n *\n * ### Constants\n *\n * `currentHeight` (Android only) The height of the status bar.\n */\nclass StatusBar extends React.Component {\n static _propsStack: Array = [];\n\n static _defaultProps: any = createStackEntry({\n backgroundColor:\n Platform.OS === 'android'\n ? NativeStatusBarManagerAndroid.getConstants()\n .DEFAULT_BACKGROUND_COLOR ?? 'black'\n : 'black',\n barStyle: 'default',\n translucent: false,\n hidden: false,\n networkActivityIndicatorVisible: false,\n });\n\n // Timer for updating the native module values at the end of the frame.\n // $FlowFixMe[missing-local-annot]\n static _updateImmediate = null;\n\n // The current merged values from the props stack.\n // $FlowFixMe[missing-local-annot]\n static _currentValues = null;\n\n // TODO(janic): Provide a real API to deal with status bar height. See the\n // discussion in #6195.\n /**\n * The current height of the status bar on the device.\n *\n * @platform android\n */\n static currentHeight: ?number =\n Platform.OS === 'android'\n ? NativeStatusBarManagerAndroid.getConstants().HEIGHT\n : null;\n\n // Provide an imperative API as static functions of the component.\n // See the corresponding prop for more detail.\n\n /**\n * Show or hide the status bar\n * @param hidden Hide the status bar.\n * @param animation Optional animation when\n * changing the status bar hidden property.\n */\n static setHidden(hidden: boolean, animation?: StatusBarAnimation) {\n animation = animation || 'none';\n StatusBar._defaultProps.hidden.value = hidden;\n if (Platform.OS === 'ios') {\n NativeStatusBarManagerIOS.setHidden(hidden, animation);\n } else if (Platform.OS === 'android') {\n NativeStatusBarManagerAndroid.setHidden(hidden);\n }\n }\n\n /**\n * Set the status bar style\n * @param style Status bar style to set\n * @param animated Animate the style change.\n */\n static setBarStyle(style: StatusBarStyle, animated?: boolean) {\n animated = animated || false;\n StatusBar._defaultProps.barStyle.value = style;\n if (Platform.OS === 'ios') {\n NativeStatusBarManagerIOS.setStyle(style, animated);\n } else if (Platform.OS === 'android') {\n NativeStatusBarManagerAndroid.setStyle(style);\n }\n }\n\n /**\n * Control the visibility of the network activity indicator\n * @param visible Show the indicator.\n */\n static setNetworkActivityIndicatorVisible(visible: boolean) {\n if (Platform.OS !== 'ios') {\n console.warn(\n '`setNetworkActivityIndicatorVisible` is only available on iOS',\n );\n return;\n }\n StatusBar._defaultProps.networkActivityIndicatorVisible = visible;\n NativeStatusBarManagerIOS.setNetworkActivityIndicatorVisible(visible);\n }\n\n /**\n * Set the background color for the status bar\n * @param color Background color.\n * @param animated Animate the style change.\n */\n static setBackgroundColor(color: string, animated?: boolean): void {\n if (Platform.OS !== 'android') {\n console.warn('`setBackgroundColor` is only available on Android');\n return;\n }\n animated = animated || false;\n StatusBar._defaultProps.backgroundColor.value = color;\n\n const processedColor = processColor(color);\n if (processedColor == null) {\n console.warn(\n `\\`StatusBar.setBackgroundColor\\`: Color ${color} parsed to null or undefined`,\n );\n return;\n }\n invariant(\n typeof processedColor === 'number',\n 'Unexpected color given for StatusBar.setBackgroundColor',\n );\n\n NativeStatusBarManagerAndroid.setColor(processedColor, animated);\n }\n\n /**\n * Control the translucency of the status bar\n * @param translucent Set as translucent.\n */\n static setTranslucent(translucent: boolean) {\n if (Platform.OS !== 'android') {\n console.warn('`setTranslucent` is only available on Android');\n return;\n }\n StatusBar._defaultProps.translucent = translucent;\n NativeStatusBarManagerAndroid.setTranslucent(translucent);\n }\n\n /**\n * Push a StatusBar entry onto the stack.\n * The return value should be passed to `popStackEntry` when complete.\n *\n * @param props Object containing the StatusBar props to use in the stack entry.\n */\n static pushStackEntry(props: any): any {\n const entry = createStackEntry(props);\n StatusBar._propsStack.push(entry);\n StatusBar._updatePropsStack();\n return entry;\n }\n\n /**\n * Pop a StatusBar entry from the stack.\n *\n * @param entry Entry returned from `pushStackEntry`.\n */\n static popStackEntry(entry: any) {\n const index = StatusBar._propsStack.indexOf(entry);\n if (index !== -1) {\n StatusBar._propsStack.splice(index, 1);\n }\n StatusBar._updatePropsStack();\n }\n\n /**\n * Replace an existing StatusBar stack entry with new props.\n *\n * @param entry Entry returned from `pushStackEntry` to replace.\n * @param props Object containing the StatusBar props to use in the replacement stack entry.\n */\n static replaceStackEntry(entry: any, props: any): any {\n const newEntry = createStackEntry(props);\n const index = StatusBar._propsStack.indexOf(entry);\n if (index !== -1) {\n StatusBar._propsStack[index] = newEntry;\n }\n StatusBar._updatePropsStack();\n return newEntry;\n }\n\n // $FlowFixMe[missing-local-annot]\n _stackEntry = null;\n\n componentDidMount() {\n // Every time a StatusBar component is mounted, we push it's prop to a stack\n // and always update the native status bar with the props from the top of then\n // stack. This allows having multiple StatusBar components and the one that is\n // added last or is deeper in the view hierarchy will have priority.\n this._stackEntry = StatusBar.pushStackEntry(this.props);\n }\n\n componentWillUnmount() {\n // When a StatusBar is unmounted, remove itself from the stack and update\n // the native bar with the next props.\n StatusBar.popStackEntry(this._stackEntry);\n }\n\n componentDidUpdate() {\n this._stackEntry = StatusBar.replaceStackEntry(\n this._stackEntry,\n this.props,\n );\n }\n\n /**\n * Updates the native status bar with the props from the stack.\n */\n static _updatePropsStack = () => {\n // Send the update to the native module only once at the end of the frame.\n clearImmediate(StatusBar._updateImmediate);\n StatusBar._updateImmediate = setImmediate(() => {\n const oldProps = StatusBar._currentValues;\n const mergedProps = mergePropsStack(\n StatusBar._propsStack,\n StatusBar._defaultProps,\n );\n\n // Update the props that have changed using the merged values from the props stack.\n if (Platform.OS === 'ios') {\n if (\n !oldProps ||\n oldProps.barStyle.value !== mergedProps.barStyle.value\n ) {\n NativeStatusBarManagerIOS.setStyle(\n mergedProps.barStyle.value,\n mergedProps.barStyle.animated || false,\n );\n }\n if (!oldProps || oldProps.hidden.value !== mergedProps.hidden.value) {\n NativeStatusBarManagerIOS.setHidden(\n mergedProps.hidden.value,\n mergedProps.hidden.animated\n ? mergedProps.hidden.transition\n : 'none',\n );\n }\n\n if (\n !oldProps ||\n oldProps.networkActivityIndicatorVisible !==\n mergedProps.networkActivityIndicatorVisible\n ) {\n NativeStatusBarManagerIOS.setNetworkActivityIndicatorVisible(\n mergedProps.networkActivityIndicatorVisible,\n );\n }\n } else if (Platform.OS === 'android') {\n //todo(T60684787): Add back optimization to only update bar style and\n //background color if the new value is different from the old value.\n NativeStatusBarManagerAndroid.setStyle(mergedProps.barStyle.value);\n const processedColor = processColor(mergedProps.backgroundColor.value);\n if (processedColor == null) {\n console.warn(\n `\\`StatusBar._updatePropsStack\\`: Color ${mergedProps.backgroundColor.value} parsed to null or undefined`,\n );\n } else {\n invariant(\n typeof processedColor === 'number',\n 'Unexpected color given in StatusBar._updatePropsStack',\n );\n NativeStatusBarManagerAndroid.setColor(\n processedColor,\n mergedProps.backgroundColor.animated,\n );\n }\n if (!oldProps || oldProps.hidden.value !== mergedProps.hidden.value) {\n NativeStatusBarManagerAndroid.setHidden(mergedProps.hidden.value);\n }\n // Activities are not translucent by default, so always set if true.\n if (\n !oldProps ||\n oldProps.translucent !== mergedProps.translucent ||\n mergedProps.translucent\n ) {\n NativeStatusBarManagerAndroid.setTranslucent(mergedProps.translucent);\n }\n }\n // Update the current prop values.\n StatusBar._currentValues = mergedProps;\n });\n };\n\n render(): React.Node {\n return null;\n }\n}\n\nmodule.exports = StatusBar;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeStatusBarManagerAndroid';\nimport NativeStatusBarManagerAndroid from '../../../src/private/specs/modules/NativeStatusBarManagerAndroid';\nexport default NativeStatusBarManagerAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {|\n +HEIGHT: number,\n +DEFAULT_BACKGROUND_COLOR: number,\n |};\n +setColor: (color: number, animated: boolean) => void;\n +setTranslucent: (translucent: boolean) => void;\n\n /**\n * - statusBarStyles can be:\n * - 'default'\n * - 'dark-content'\n */\n +setStyle: (statusBarStyle?: ?string) => void;\n +setHidden: (hidden: boolean) => void;\n}\n\nconst NativeModule = TurboModuleRegistry.getEnforcing('StatusBarManager');\nlet constants = null;\n\nconst NativeStatusBarManager = {\n getConstants(): {|\n +HEIGHT: number,\n +DEFAULT_BACKGROUND_COLOR?: number,\n |} {\n if (constants == null) {\n constants = NativeModule.getConstants();\n }\n return constants;\n },\n\n setColor(color: number, animated: boolean): void {\n NativeModule.setColor(color, animated);\n },\n\n setTranslucent(translucent: boolean): void {\n NativeModule.setTranslucent(translucent);\n },\n\n /**\n * - statusBarStyles can be:\n * - 'default'\n * - 'dark-content'\n */\n setStyle(statusBarStyle?: ?string): void {\n NativeModule.setStyle(statusBarStyle);\n },\n\n setHidden(hidden: boolean): void {\n NativeModule.setHidden(hidden);\n },\n};\n\nexport default NativeStatusBarManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeStatusBarManagerIOS';\nimport NativeStatusBarManagerIOS from '../../../src/private/specs/modules/NativeStatusBarManagerIOS';\nexport default NativeStatusBarManagerIOS;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {|\n +HEIGHT: number,\n +DEFAULT_BACKGROUND_COLOR?: number,\n |};\n\n // TODO(T47754272) Can we remove this method?\n +getHeight: (callback: (result: {|height: number|}) => void) => void;\n +setNetworkActivityIndicatorVisible: (visible: boolean) => void;\n +addListener: (eventType: string) => void;\n +removeListeners: (count: number) => void;\n\n /**\n * - statusBarStyles can be:\n * - 'default'\n * - 'dark-content'\n * - 'light-content'\n */\n +setStyle: (statusBarStyle?: ?string, animated: boolean) => void;\n /**\n * - withAnimation can be: 'none' | 'fade' | 'slide'\n */\n +setHidden: (hidden: boolean, withAnimation: string) => void;\n}\n\nconst NativeModule = TurboModuleRegistry.getEnforcing('StatusBarManager');\nlet constants = null;\n\nconst NativeStatusBarManager = {\n getConstants(): {|\n +HEIGHT: number,\n +DEFAULT_BACKGROUND_COLOR?: number,\n |} {\n if (constants == null) {\n constants = NativeModule.getConstants();\n }\n return constants;\n },\n\n // TODO(T47754272) Can we remove this method?\n getHeight(callback: (result: {|height: number|}) => void): void {\n NativeModule.getHeight(callback);\n },\n\n setNetworkActivityIndicatorVisible(visible: boolean): void {\n NativeModule.setNetworkActivityIndicatorVisible(visible);\n },\n\n addListener(eventType: string): void {\n NativeModule.addListener(eventType);\n },\n\n removeListeners(count: number): void {\n NativeModule.removeListeners(count);\n },\n\n /**\n * - statusBarStyles can be:\n * - 'default'\n * - 'dark-content'\n * - 'light-content'\n */\n setStyle(statusBarStyle?: ?string, animated: boolean): void {\n NativeModule.setStyle(statusBarStyle, animated);\n },\n\n /**\n * - withAnimation can be: 'none' | 'fade' | 'slide'\n */\n setHidden(hidden: boolean, withAnimation: string): void {\n NativeModule.setHidden(hidden, withAnimation);\n },\n};\n\nexport default NativeStatusBarManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/AndroidDrawerLayoutNativeComponent';\nimport AndroidDrawerLayoutNativeComponent from '../../../src/private/specs/components/AndroidDrawerLayoutNativeComponent';\nexport default AndroidDrawerLayoutNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';\nimport type {\n DirectEventHandler,\n Float,\n Int32,\n WithDefault,\n} from '../../../../Libraries/Types/CodegenTypes';\n\nimport codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\nimport * as React from 'react';\n\ntype DrawerStateEvent = $ReadOnly<{|\n drawerState: Int32,\n|}>;\n\ntype DrawerSlideEvent = $ReadOnly<{|\n offset: Float,\n|}>;\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n /**\n * Determines whether the keyboard gets dismissed in response to a drag.\n * - 'none' (the default), drags do not dismiss the keyboard.\n * - 'on-drag', the keyboard is dismissed when a drag begins.\n */\n keyboardDismissMode?: WithDefault<'none' | 'on-drag', 'none'>,\n\n /**\n * Specifies the background color of the drawer. The default value is white.\n * If you want to set the opacity of the drawer, use rgba. Example:\n *\n * ```\n * return (\n * \n * \n * );\n * ```\n */\n drawerBackgroundColor: ColorValue,\n\n /**\n * Specifies the side of the screen from which the drawer will slide in.\n */\n drawerPosition?: WithDefault<'left' | 'right', 'left'>,\n\n /**\n * Specifies the width of the drawer, more precisely the width of the view that be pulled in\n * from the edge of the window.\n */\n\n drawerWidth?: WithDefault,\n\n /**\n * Specifies the lock mode of the drawer. The drawer can be locked in 3 states:\n * - unlocked (default), meaning that the drawer will respond (open/close) to touch gestures.\n * - locked-closed, meaning that the drawer will stay closed and not respond to gestures.\n * - locked-open, meaning that the drawer will stay opened and not respond to gestures.\n * The drawer may still be opened and closed programmatically (`openDrawer`/`closeDrawer`).\n */\n drawerLockMode?: WithDefault<\n 'unlocked' | 'locked-closed' | 'locked-open',\n 'unlocked',\n >,\n\n /**\n * Function called whenever there is an interaction with the navigation view.\n */\n onDrawerSlide?: ?DirectEventHandler,\n\n /**\n * Function called when the drawer state has changed. The drawer can be in 3 states:\n * - Idle, meaning there is no interaction with the navigation view happening at the time\n * - Dragging, meaning there is currently an interaction with the navigation view\n * - Settling, meaning that there was an interaction with the navigation view, and the\n * navigation view is now finishing its closing or opening animation\n */\n onDrawerStateChanged?: ?DirectEventHandler,\n\n /**\n * Function called whenever the navigation view has been opened.\n */\n onDrawerOpen?: ?DirectEventHandler,\n\n /**\n * Function called whenever the navigation view has been closed.\n */\n onDrawerClose?: ?DirectEventHandler,\n\n /**\n * Make the drawer take the entire screen and draw the background of the\n * status bar to allow it to open over the status bar. It will only have an\n * effect on API 21+.\n */\n statusBarBackgroundColor?: ?ColorValue,\n|}>;\n\ntype NativeType = HostComponent;\n\ninterface NativeCommands {\n +openDrawer: (viewRef: React.ElementRef) => void;\n +closeDrawer: (viewRef: React.ElementRef) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['openDrawer', 'closeDrawer'],\n});\n\nexport default (codegenNativeComponent(\n 'AndroidDrawerLayout',\n): NativeType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport type {ViewProps} from '../Components/View/ViewPropTypes';\nimport type {HostComponent} from '../Renderer/shims/ReactNativeTypes';\nimport type {ImageBackgroundProps} from './ImageProps';\n\nimport View from '../Components/View/View';\nimport flattenStyle from '../StyleSheet/flattenStyle';\nimport StyleSheet from '../StyleSheet/StyleSheet';\nimport Image from './Image';\nimport * as React from 'react';\n\n/**\n * Very simple drop-in replacement for which supports nesting views.\n *\n * ```ReactNativeWebPlayer\n * import React, { Component } from 'react';\n * import { AppRegistry, View, ImageBackground, Text } from 'react-native';\n *\n * class DisplayAnImageBackground extends Component {\n * render() {\n * return (\n * \n * React\n * \n * );\n * }\n * }\n *\n * // App registration and rendering\n * AppRegistry.registerComponent('DisplayAnImageBackground', () => DisplayAnImageBackground);\n * ```\n */\nclass ImageBackground extends React.Component {\n setNativeProps(props: {...}) {\n // Work-around flow\n const viewRef = this._viewRef;\n if (viewRef) {\n viewRef.setNativeProps(props);\n }\n }\n\n _viewRef: ?React.ElementRef = null;\n\n _captureRef = (\n ref: null | React$ElementRef<\n React$AbstractComponent<\n ViewProps,\n React.ElementRef>,\n >,\n >,\n ) => {\n this._viewRef = ref;\n };\n\n render(): React.Node {\n const {\n children,\n style,\n imageStyle,\n imageRef,\n importantForAccessibility,\n ...props\n } = this.props;\n\n // $FlowFixMe[underconstrained-implicit-instantiation]\n const flattenedStyle = flattenStyle(style);\n return (\n \n {/* $FlowFixMe[incompatible-use] */}\n overwrites width and height styles\n // (which is not quite correct), and these styles conflict with explicitly set styles\n // of and with our internal layout model here.\n // So, we have to proxy/reapply these styles explicitly for actual component.\n // This workaround should be removed after implementing proper support of\n // intrinsic content size of the .\n // $FlowFixMe[prop-missing]\n width: flattenedStyle?.width,\n // $FlowFixMe[prop-missing]\n height: flattenedStyle?.height,\n },\n imageStyle,\n ]}\n ref={imageRef}\n />\n {children}\n \n );\n }\n}\n\nmodule.exports = ImageBackground;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport SafeAreaView from '../../Components/SafeAreaView/SafeAreaView';\nimport StyleSheet, {\n type ColorValue,\n type ViewStyleProp,\n} from '../../StyleSheet/StyleSheet';\nimport Platform from '../../Utilities/Platform';\nimport useWindowDimensions from '../../Utilities/useWindowDimensions';\nimport RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent';\nimport * as React from 'react';\n\n/**\n * Note: iOS only\n *\n * A component which enables customization of the keyboard input accessory view.\n * The input accessory view is displayed above the keyboard whenever a TextInput\n * has focus. This component can be used to create custom toolbars.\n *\n * To use this component wrap your custom toolbar with the\n * InputAccessoryView component, and set a nativeID. Then, pass that nativeID\n * as the inputAccessoryViewID of whatever TextInput you desire. A simple\n * example:\n *\n * ```ReactNativeWebPlayer\n * import React, { Component } from 'react';\n * import { AppRegistry, TextInput, InputAccessoryView, Button } from 'react-native';\n *\n * export default class UselessTextInput extends Component {\n * constructor(props) {\n * super(props);\n * this.state = {text: 'Placeholder Text'};\n * }\n *\n * render() {\n * const inputAccessoryViewID = \"uniqueID\";\n * return (\n * \n * \n * this.setState({text})}\n * value={this.state.text}\n * />\n * \n * \n * this.setState({text: 'Placeholder Text'})}\n * title=\"Reset Text\"\n * />\n * \n * \n * );\n * }\n * }\n *\n * // skip this line if using Create React Native App\n * AppRegistry.registerComponent('AwesomeProject', () => UselessTextInput);\n * ```\n *\n * This component can also be used to create sticky text inputs (text inputs\n * which are anchored to the top of the keyboard). To do this, wrap a\n * TextInput with the InputAccessoryView component, and don't set a nativeID.\n * For an example, look at InputAccessoryViewExample.js in RNTester.\n */\n\ntype Props = $ReadOnly<{|\n +children: React.Node,\n /**\n * An ID which is used to associate this `InputAccessoryView` to\n * specified TextInput(s).\n */\n nativeID?: ?string,\n style?: ?ViewStyleProp,\n backgroundColor?: ?ColorValue,\n|}>;\n\nconst InputAccessoryView: React.AbstractComponent = (props: Props) => {\n const {width} = useWindowDimensions();\n\n if (Platform.OS === 'ios') {\n if (React.Children.count(props.children) === 0) {\n return null;\n }\n\n return (\n \n \n {props.children}\n \n \n );\n } else {\n console.warn(' is only supported on iOS.');\n return null;\n }\n};\n\nconst styles = StyleSheet.create({\n container: {\n position: 'absolute',\n },\n safeAreaView: {\n flex: 1,\n },\n});\n\nexport default InputAccessoryView;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ViewProps} from '../View/ViewPropTypes';\n\nimport Platform from '../../Utilities/Platform';\nimport View from '../View/View';\nimport * as React from 'react';\n\n/**\n * Renders nested content and automatically applies paddings reflect the portion\n * of the view that is not covered by navigation bars, tab bars, toolbars, and\n * other ancestor views.\n *\n * Moreover, and most importantly, Safe Area's paddings reflect physical\n * limitation of the screen, such as rounded corners or camera notches (aka\n * sensor housing area on iPhone X).\n */\nconst exported: React.AbstractComponent<\n ViewProps,\n React.ElementRef,\n> = Platform.select({\n ios: require('./RCTSafeAreaViewNativeComponent').default,\n default: View,\n});\n\nexport default exported;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/RCTSafeAreaViewNativeComponent';\nimport RCTSafeAreaViewNativeComponent from '../../../src/private/specs/components/RCTSafeAreaViewNativeComponent';\nexport default RCTSafeAreaViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\n\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n // No props\n|}>;\n\nexport default (codegenNativeComponent('SafeAreaView', {\n paperComponentName: 'RCTSafeAreaView',\n interfaceOnly: true,\n}): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport Dimensions from './Dimensions';\nimport {\n type DisplayMetrics,\n type DisplayMetricsAndroid,\n} from './NativeDeviceInfo';\nimport {useEffect, useState} from 'react';\n\nexport default function useWindowDimensions():\n | DisplayMetrics\n | DisplayMetricsAndroid {\n const [dimensions, setDimensions] = useState(() => Dimensions.get('window'));\n useEffect(() => {\n function handleChange({\n window,\n }: {\n window: DisplayMetrics | DisplayMetricsAndroid,\n }) {\n if (\n dimensions.width !== window.width ||\n dimensions.height !== window.height ||\n dimensions.scale !== window.scale ||\n dimensions.fontScale !== window.fontScale\n ) {\n setDimensions(window);\n }\n }\n const subscription = Dimensions.addEventListener('change', handleChange);\n // We might have missed an update between calling `get` in render and\n // `addEventListener` in this handler, so we set it here. If there was\n // no change, React will filter out this update as a no-op.\n handleChange({window: Dimensions.get('window')});\n return () => {\n subscription.remove();\n };\n }, [dimensions]);\n return dimensions;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/RCTInputAccessoryViewNativeComponent';\nimport RCTInputAccessoryViewNativeComponent from '../../../src/private/specs/components/RCTInputAccessoryViewNativeComponent';\nexport default RCTInputAccessoryViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';\n\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n backgroundColor?: ?ColorValue,\n|}>;\n\nexport default (codegenNativeComponent('InputAccessory', {\n interfaceOnly: true,\n paperComponentName: 'RCTInputAccessoryView',\n excludedPlatforms: ['android'],\n}): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewStyleProp} from '../../StyleSheet/StyleSheet';\nimport type {\n ViewLayout,\n ViewLayoutEvent,\n ViewProps,\n} from '../View/ViewPropTypes';\nimport type {KeyboardEvent, KeyboardMetrics} from './Keyboard';\n\nimport LayoutAnimation from '../../LayoutAnimation/LayoutAnimation';\nimport StyleSheet from '../../StyleSheet/StyleSheet';\nimport Platform from '../../Utilities/Platform';\nimport {type EventSubscription} from '../../vendor/emitter/EventEmitter';\nimport AccessibilityInfo from '../AccessibilityInfo/AccessibilityInfo';\nimport View from '../View/View';\nimport Keyboard from './Keyboard';\nimport * as React from 'react';\n\ntype Props = $ReadOnly<{|\n ...ViewProps,\n\n /**\n * Specify how to react to the presence of the keyboard.\n */\n behavior?: ?('height' | 'position' | 'padding'),\n\n /**\n * Style of the content container when `behavior` is 'position'.\n */\n contentContainerStyle?: ?ViewStyleProp,\n\n /**\n * Controls whether this `KeyboardAvoidingView` instance should take effect.\n * This is useful when more than one is on the screen. Defaults to true.\n */\n enabled?: ?boolean,\n\n /**\n * Distance between the top of the user screen and the React Native view. This\n * may be non-zero in some cases. Defaults to 0.\n */\n keyboardVerticalOffset?: number,\n|}>;\n\ntype State = {|\n bottom: number,\n|};\n\n/**\n * View that moves out of the way when the keyboard appears by automatically\n * adjusting its height, position, or bottom padding.\n */\nclass KeyboardAvoidingView extends React.Component {\n _frame: ?ViewLayout = null;\n _keyboardEvent: ?KeyboardEvent = null;\n _subscriptions: Array = [];\n viewRef: {current: React.ElementRef | null, ...};\n _initialFrameHeight: number = 0;\n _bottom: number = 0;\n\n constructor(props: Props) {\n super(props);\n this.state = {bottom: 0};\n this.viewRef = React.createRef();\n }\n\n async _relativeKeyboardHeight(\n keyboardFrame: KeyboardMetrics,\n ): Promise {\n const frame = this._frame;\n if (!frame || !keyboardFrame) {\n return 0;\n }\n\n // On iOS when Prefer Cross-Fade Transitions is enabled, the keyboard position\n // & height is reported differently (0 instead of Y position value matching height of frame)\n if (\n Platform.OS === 'ios' &&\n keyboardFrame.screenY === 0 &&\n (await AccessibilityInfo.prefersCrossFadeTransitions())\n ) {\n return 0;\n }\n\n const keyboardY =\n keyboardFrame.screenY - (this.props.keyboardVerticalOffset ?? 0);\n\n if (this.props.behavior === 'height') {\n return Math.max(\n this.state.bottom + frame.y + frame.height - keyboardY,\n 0,\n );\n }\n\n // Calculate the displacement needed for the view such that it\n // no longer overlaps with the keyboard\n return Math.max(frame.y + frame.height - keyboardY, 0);\n }\n\n _onKeyboardChange = (event: ?KeyboardEvent) => {\n this._keyboardEvent = event;\n // $FlowFixMe[unused-promise]\n this._updateBottomIfNecessary();\n };\n\n _onLayout = async (event: ViewLayoutEvent) => {\n const oldFrame = this._frame;\n this._frame = event.nativeEvent.layout;\n if (!this._initialFrameHeight) {\n // save the initial frame height, before the keyboard is visible\n this._initialFrameHeight = this._frame.height;\n }\n\n // update bottom height for the first time or when the height is changed\n if (!oldFrame || oldFrame.height !== this._frame.height) {\n await this._updateBottomIfNecessary();\n }\n\n if (this.props.onLayout) {\n this.props.onLayout(event);\n }\n };\n\n // Avoid unnecessary renders if the KeyboardAvoidingView is disabled.\n _setBottom = (value: number) => {\n const enabled = this.props.enabled ?? true;\n this._bottom = value;\n if (enabled) {\n this.setState({bottom: value});\n }\n };\n\n _updateBottomIfNecessary = async () => {\n if (this._keyboardEvent == null) {\n this._setBottom(0);\n return;\n }\n\n const {duration, easing, endCoordinates} = this._keyboardEvent;\n const height = await this._relativeKeyboardHeight(endCoordinates);\n\n if (this._bottom === height) {\n return;\n }\n\n this._setBottom(height);\n\n const enabled = this.props.enabled ?? true;\n if (enabled && duration && easing) {\n LayoutAnimation.configureNext({\n // We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m\n duration: duration > 10 ? duration : 10,\n update: {\n duration: duration > 10 ? duration : 10,\n type: LayoutAnimation.Types[easing] || 'keyboard',\n },\n });\n }\n };\n\n componentDidUpdate(_: Props, prevState: State): void {\n const enabled = this.props.enabled ?? true;\n if (enabled && this._bottom !== prevState.bottom) {\n this.setState({bottom: this._bottom});\n }\n }\n\n componentDidMount(): void {\n if (Platform.OS === 'ios') {\n this._subscriptions = [\n Keyboard.addListener('keyboardWillChangeFrame', this._onKeyboardChange),\n ];\n } else {\n this._subscriptions = [\n Keyboard.addListener('keyboardDidHide', this._onKeyboardChange),\n Keyboard.addListener('keyboardDidShow', this._onKeyboardChange),\n ];\n }\n }\n\n componentWillUnmount(): void {\n this._subscriptions.forEach(subscription => {\n subscription.remove();\n });\n }\n\n render(): React.Node {\n const {\n behavior,\n children,\n contentContainerStyle,\n enabled = true,\n // eslint-disable-next-line no-unused-vars\n keyboardVerticalOffset = 0,\n style,\n onLayout,\n ...props\n } = this.props;\n const bottomHeight = enabled === true ? this.state.bottom : 0;\n switch (behavior) {\n case 'height':\n let heightStyle;\n if (this._frame != null && this.state.bottom > 0) {\n // Note that we only apply a height change when there is keyboard present,\n // i.e. this.state.bottom is greater than 0. If we remove that condition,\n // this.frame.height will never go back to its original value.\n // When height changes, we need to disable flex.\n heightStyle = {\n height: this._initialFrameHeight - bottomHeight,\n flex: 0,\n };\n }\n return (\n \n {children}\n \n );\n\n case 'position':\n return (\n \n \n {children}\n \n \n );\n\n case 'padding':\n return (\n \n {children}\n \n );\n\n default:\n return (\n \n {children}\n \n );\n }\n }\n}\n\nexport default KeyboardAvoidingView;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from '../Components/View/ViewPropTypes';\nimport type {RootTag} from '../ReactNative/RootTag';\nimport type {DirectEventHandler} from '../Types/CodegenTypes';\n\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport {type EventSubscription} from '../vendor/emitter/EventEmitter';\nimport ModalInjection from './ModalInjection';\nimport NativeModalManager from './NativeModalManager';\nimport RCTModalHostView from './RCTModalHostViewNativeComponent';\nimport {VirtualizedListContextResetter} from '@react-native/virtualized-lists';\n\nconst ScrollView = require('../Components/ScrollView/ScrollView');\nconst View = require('../Components/View/View');\nconst AppContainer = require('../ReactNative/AppContainer');\nconst I18nManager = require('../ReactNative/I18nManager');\nconst {RootTagContext} = require('../ReactNative/RootTag');\nconst StyleSheet = require('../StyleSheet/StyleSheet');\nconst Platform = require('../Utilities/Platform');\nconst React = require('react');\n\ntype ModalEventDefinitions = {\n modalDismissed: [{modalID: number}],\n};\n\nconst ModalEventEmitter =\n Platform.OS === 'ios' && NativeModalManager != null\n ? new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeModalManager,\n )\n : null;\n\n/**\n * The Modal component is a simple way to present content above an enclosing view.\n *\n * See https://reactnative.dev/docs/modal\n */\n\n// In order to route onDismiss callbacks, we need to uniquely identifier each\n// on screen. There can be different ones, either nested or as siblings.\n// We cannot pass the onDismiss callback to native as the view will be\n// destroyed before the callback is fired.\nlet uniqueModalIdentifier = 0;\n\ntype OrientationChangeEvent = $ReadOnly<{|\n orientation: 'portrait' | 'landscape',\n|}>;\n\nexport type Props = $ReadOnly<{|\n ...ViewProps,\n\n /**\n * The `animationType` prop controls how the modal animates.\n *\n * See https://reactnative.dev/docs/modal#animationtype\n */\n animationType?: ?('none' | 'slide' | 'fade'),\n\n /**\n * The `presentationStyle` prop controls how the modal appears.\n *\n * See https://reactnative.dev/docs/modal#presentationstyle\n */\n presentationStyle?: ?(\n | 'fullScreen'\n | 'pageSheet'\n | 'formSheet'\n | 'overFullScreen'\n ),\n\n /**\n * The `transparent` prop determines whether your modal will fill the\n * entire view.\n *\n * See https://reactnative.dev/docs/modal#transparent\n */\n transparent?: ?boolean,\n\n /**\n * The `statusBarTranslucent` prop determines whether your modal should go under\n * the system statusbar.\n *\n * See https://reactnative.dev/docs/modal.html#statusbartranslucent-android\n */\n statusBarTranslucent?: ?boolean,\n\n /**\n * The `hardwareAccelerated` prop controls whether to force hardware\n * acceleration for the underlying window.\n *\n * This prop works only on Android.\n *\n * See https://reactnative.dev/docs/modal#hardwareaccelerated\n */\n hardwareAccelerated?: ?boolean,\n\n /**\n * The `visible` prop determines whether your modal is visible.\n *\n * See https://reactnative.dev/docs/modal#visible\n */\n visible?: ?boolean,\n\n /**\n * The `onRequestClose` callback is called when the user taps the hardware\n * back button on Android or the menu button on Apple TV.\n *\n * This is required on Apple TV and Android.\n *\n * See https://reactnative.dev/docs/modal#onrequestclose\n */\n onRequestClose?: ?DirectEventHandler,\n\n /**\n * The `onShow` prop allows passing a function that will be called once the\n * modal has been shown.\n *\n * See https://reactnative.dev/docs/modal#onshow\n */\n onShow?: ?DirectEventHandler,\n\n /**\n * The `onDismiss` prop allows passing a function that will be called once\n * the modal has been dismissed.\n *\n * See https://reactnative.dev/docs/modal#ondismiss\n */\n onDismiss?: ?() => mixed,\n\n /**\n * The `supportedOrientations` prop allows the modal to be rotated to any of the specified orientations.\n *\n * See https://reactnative.dev/docs/modal#supportedorientations\n */\n supportedOrientations?: ?$ReadOnlyArray<\n | 'portrait'\n | 'portrait-upside-down'\n | 'landscape'\n | 'landscape-left'\n | 'landscape-right',\n >,\n\n /**\n * The `onOrientationChange` callback is called when the orientation changes while the modal is being displayed.\n *\n * See https://reactnative.dev/docs/modal#onorientationchange\n */\n onOrientationChange?: ?DirectEventHandler,\n|}>;\n\nfunction confirmProps(props: Props) {\n if (__DEV__) {\n if (\n props.presentationStyle &&\n props.presentationStyle !== 'overFullScreen' &&\n props.transparent === true\n ) {\n console.warn(\n `Modal with '${props.presentationStyle}' presentation style and 'transparent' value is not supported.`,\n );\n }\n }\n}\n\n// Create a state to track whether the Modal is rendering or not.\n// This is the only prop that controls whether the modal is rendered or not.\ntype State = {\n isRendered: boolean,\n};\n\nclass Modal extends React.Component {\n static defaultProps: {|hardwareAccelerated: boolean, visible: boolean|} = {\n visible: true,\n hardwareAccelerated: false,\n };\n\n static contextType: React.Context = RootTagContext;\n\n _identifier: number;\n _eventSubscription: ?EventSubscription;\n\n constructor(props: Props) {\n super(props);\n if (__DEV__) {\n confirmProps(props);\n }\n this._identifier = uniqueModalIdentifier++;\n this.state = {\n isRendered: props.visible === true,\n };\n }\n\n componentDidMount() {\n // 'modalDismissed' is for the old renderer in iOS only\n if (ModalEventEmitter) {\n this._eventSubscription = ModalEventEmitter.addListener(\n 'modalDismissed',\n event => {\n this.setState({isRendered: false}, () => {\n if (event.modalID === this._identifier && this.props.onDismiss) {\n this.props.onDismiss();\n }\n });\n },\n );\n }\n }\n\n componentWillUnmount() {\n this.setState({isRendered: false});\n if (this._eventSubscription) {\n this._eventSubscription.remove();\n }\n }\n\n componentDidUpdate(prevProps: Props) {\n if (prevProps.visible === false && this.props.visible === true) {\n this.setState({isRendered: true});\n }\n\n if (__DEV__) {\n confirmProps(this.props);\n }\n }\n\n // Helper function to encapsulate platform specific logic to show or not the Modal.\n _shouldShowModal(): boolean {\n if (Platform.OS === 'ios') {\n return this.props.visible === true || this.state.isRendered === true;\n }\n\n return this.props.visible === true;\n }\n\n render(): React.Node {\n if (!this._shouldShowModal()) {\n return null;\n }\n\n const containerStyles = {\n backgroundColor:\n this.props.transparent === true ? 'transparent' : 'white',\n };\n\n let animationType = this.props.animationType || 'none';\n\n let presentationStyle = this.props.presentationStyle;\n if (!presentationStyle) {\n presentationStyle = 'fullScreen';\n if (this.props.transparent === true) {\n presentationStyle = 'overFullScreen';\n }\n }\n\n const innerChildren = __DEV__ ? (\n {this.props.children}\n ) : (\n this.props.children\n );\n\n const onDismiss = () => {\n // OnDismiss is implemented on iOS only.\n if (Platform.OS === 'ios') {\n this.setState({isRendered: false}, () => {\n if (this.props.onDismiss) {\n this.props.onDismiss();\n }\n });\n }\n };\n\n return (\n \n \n \n \n {innerChildren}\n \n \n \n \n );\n }\n\n // We don't want any responder events bubbling out of the modal.\n _shouldSetResponder(): boolean {\n return true;\n }\n}\n\nconst side = I18nManager.getConstants().isRTL ? 'right' : 'left';\nconst styles = StyleSheet.create({\n modal: {\n position: 'absolute',\n },\n container: {\n /* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.111 was deployed. To see\n * the error, delete this comment and run Flow. */\n [side]: 0,\n top: 0,\n flex: 1,\n },\n});\n\nconst ExportedModal: React.AbstractComponent<\n React.ElementConfig,\n> = ModalInjection.unstable_Modal ?? Modal;\n\nmodule.exports = ExportedModal;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport typeof Modal from './Modal';\n\nexport default {\n unstable_Modal: (null: ?Modal),\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeModalManager';\nimport NativeModalManager from '../../src/private/specs/modules/NativeModalManager';\nexport default NativeModalManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n // RCTEventEmitter\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n}\n\nexport default (TurboModuleRegistry.get('ModalManager'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../src/private/specs/components/RCTModalHostViewNativeComponent';\nimport RCTModalHostViewNativeComponent from '../../src/private/specs/components/RCTModalHostViewNativeComponent';\nexport default RCTModalHostViewNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {\n DirectEventHandler,\n Int32,\n WithDefault,\n} from '../../../../Libraries/Types/CodegenTypes';\n\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\n\ntype OrientationChangeEvent = $ReadOnly<{|\n orientation: 'portrait' | 'landscape',\n|}>;\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n /**\n * The `animationType` prop controls how the modal animates.\n *\n * See https://reactnative.dev/docs/modal#animationtype\n */\n animationType?: WithDefault<'none' | 'slide' | 'fade', 'none'>,\n\n /**\n * The `presentationStyle` prop controls how the modal appears.\n *\n * See https://reactnative.dev/docs/modal#presentationstyle\n */\n presentationStyle?: WithDefault<\n 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen',\n 'fullScreen',\n >,\n\n /**\n * The `transparent` prop determines whether your modal will fill the\n * entire view.\n *\n * See https://reactnative.dev/docs/modal#transparent\n */\n transparent?: WithDefault,\n\n /**\n * The `statusBarTranslucent` prop determines whether your modal should go under\n * the system statusbar.\n *\n * See https://reactnative.dev/docs/modal#statusBarTranslucent\n */\n statusBarTranslucent?: WithDefault,\n\n /**\n * The `hardwareAccelerated` prop controls whether to force hardware\n * acceleration for the underlying window.\n *\n * See https://reactnative.dev/docs/modal#hardwareaccelerated\n */\n hardwareAccelerated?: WithDefault,\n\n /**\n * The `onRequestClose` callback is called when the user taps the hardware\n * back button on Android or the menu button on Apple TV.\n *\n * This is required on Apple TV and Android.\n *\n * See https://reactnative.dev/docs/modal#onrequestclose\n */\n onRequestClose?: ?DirectEventHandler,\n\n /**\n * The `onShow` prop allows passing a function that will be called once the\n * modal has been shown.\n *\n * See https://reactnative.dev/docs/modal#onshow\n */\n onShow?: ?DirectEventHandler,\n\n /**\n * The `onDismiss` prop allows passing a function that will be called once\n * the modal has been dismissed.\n *\n * See https://reactnative.dev/docs/modal#ondismiss\n */\n onDismiss?: ?DirectEventHandler,\n\n /**\n * The `visible` prop determines whether your modal is visible.\n *\n * See https://reactnative.dev/docs/modal#visible\n */\n visible?: WithDefault,\n\n /**\n * Deprecated. Use the `animationType` prop instead.\n */\n animated?: WithDefault,\n\n /**\n * The `supportedOrientations` prop allows the modal to be rotated to any of the specified orientations.\n *\n * See https://reactnative.dev/docs/modal#supportedorientations\n */\n supportedOrientations?: WithDefault<\n $ReadOnlyArray<\n | 'portrait'\n | 'portrait-upside-down'\n | 'landscape'\n | 'landscape-left'\n | 'landscape-right',\n >,\n 'portrait',\n >,\n\n /**\n * The `onOrientationChange` callback is called when the orientation changes while the modal is being displayed.\n *\n * See https://reactnative.dev/docs/modal#onorientationchange\n */\n onOrientationChange?: ?DirectEventHandler,\n\n /**\n * The `identifier` is the unique number for identifying Modal components.\n */\n identifier?: WithDefault,\n|}>;\n\nexport default (codegenNativeComponent('ModalHostView', {\n interfaceOnly: true,\n paperComponentName: 'RCTModalHostView',\n}): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {I18nManagerConstants} from './NativeI18nManager';\n\nimport NativeI18nManager from './NativeI18nManager';\n\nconst i18nConstants: I18nManagerConstants = getI18nManagerConstants();\n\nfunction getI18nManagerConstants(): I18nManagerConstants {\n if (NativeI18nManager) {\n const {isRTL, doLeftAndRightSwapInRTL, localeIdentifier} =\n NativeI18nManager.getConstants();\n return {isRTL, doLeftAndRightSwapInRTL, localeIdentifier};\n }\n\n return {\n isRTL: false,\n doLeftAndRightSwapInRTL: true,\n };\n}\n\nmodule.exports = {\n getConstants: (): I18nManagerConstants => {\n return i18nConstants;\n },\n\n allowRTL: (shouldAllow: boolean) => {\n if (!NativeI18nManager) {\n return;\n }\n\n NativeI18nManager.allowRTL(shouldAllow);\n },\n\n forceRTL: (shouldForce: boolean) => {\n if (!NativeI18nManager) {\n return;\n }\n\n NativeI18nManager.forceRTL(shouldForce);\n },\n\n swapLeftAndRightInRTL: (flipStyles: boolean) => {\n if (!NativeI18nManager) {\n return;\n }\n\n NativeI18nManager.swapLeftAndRightInRTL(flipStyles);\n },\n\n isRTL: i18nConstants.isRTL,\n doLeftAndRightSwapInRTL: i18nConstants.doLeftAndRightSwapInRTL,\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeI18nManager';\nimport NativeI18nManager from '../../src/private/specs/modules/NativeI18nManager';\nexport default NativeI18nManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type I18nManagerConstants = {|\n doLeftAndRightSwapInRTL: boolean,\n isRTL: boolean,\n localeIdentifier?: ?string,\n|};\n\nexport interface Spec extends TurboModule {\n +getConstants: () => I18nManagerConstants;\n allowRTL: (allowRTL: boolean) => void;\n forceRTL: (forceRTL: boolean) => void;\n swapLeftAndRightInRTL: (flipStyles: boolean) => void;\n}\n\nexport default (TurboModuleRegistry.get('I18nManager'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n LayoutEvent,\n MouseEvent,\n PressEvent,\n} from '../../Types/CoreEventTypes';\nimport type {\n AccessibilityActionEvent,\n AccessibilityActionInfo,\n AccessibilityRole,\n AccessibilityState,\n AccessibilityValue,\n} from '../View/ViewAccessibility';\n\nimport {PressabilityDebugView} from '../../Pressability/PressabilityDebug';\nimport usePressability from '../../Pressability/usePressability';\nimport {type RectOrSize} from '../../StyleSheet/Rect';\nimport useMergeRefs from '../../Utilities/useMergeRefs';\nimport View from '../View/View';\nimport useAndroidRippleForView, {\n type RippleConfig,\n} from './useAndroidRippleForView';\nimport * as React from 'react';\nimport {useMemo, useRef, useState} from 'react';\n\ntype ViewStyleProp = $ElementType, 'style'>;\n\nexport type StateCallbackType = $ReadOnly<{|\n pressed: boolean,\n|}>;\n\ntype Props = $ReadOnly<{|\n /**\n * Accessibility.\n */\n accessibilityActions?: ?$ReadOnlyArray,\n accessibilityElementsHidden?: ?boolean,\n accessibilityHint?: ?Stringish,\n accessibilityLanguage?: ?Stringish,\n accessibilityIgnoresInvertColors?: ?boolean,\n accessibilityLabel?: ?Stringish,\n accessibilityLiveRegion?: ?('none' | 'polite' | 'assertive'),\n accessibilityRole?: ?AccessibilityRole,\n accessibilityState?: ?AccessibilityState,\n accessibilityValue?: ?AccessibilityValue,\n 'aria-valuemax'?: AccessibilityValue['max'],\n 'aria-valuemin'?: AccessibilityValue['min'],\n 'aria-valuenow'?: AccessibilityValue['now'],\n 'aria-valuetext'?: AccessibilityValue['text'],\n accessibilityViewIsModal?: ?boolean,\n 'aria-modal'?: ?boolean,\n accessible?: ?boolean,\n\n /**\n * alias for accessibilityState\n *\n * see https://reactnative.dev/docs/accessibility#accessibilitystate\n */\n 'aria-busy'?: ?boolean,\n 'aria-checked'?: ?boolean | 'mixed',\n 'aria-disabled'?: ?boolean,\n 'aria-expanded'?: ?boolean,\n 'aria-selected'?: ?boolean,\n /**\n * A value indicating whether the accessibility elements contained within\n * this accessibility element are hidden.\n */\n 'aria-hidden'?: ?boolean,\n 'aria-live'?: ?('polite' | 'assertive' | 'off'),\n focusable?: ?boolean,\n importantForAccessibility?: ?('auto' | 'yes' | 'no' | 'no-hide-descendants'),\n onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed,\n\n /**\n * Whether a press gesture can be interrupted by a parent gesture such as a\n * scroll event. Defaults to true.\n */\n cancelable?: ?boolean,\n\n /**\n * Either children or a render prop that receives a boolean reflecting whether\n * the component is currently pressed.\n */\n children: React.Node | ((state: StateCallbackType) => React.Node),\n\n /**\n * Duration to wait after hover in before calling `onHoverIn`.\n */\n delayHoverIn?: ?number,\n\n /**\n * Duration to wait after hover out before calling `onHoverOut`.\n */\n delayHoverOut?: ?number,\n\n /**\n * Duration (in milliseconds) from `onPressIn` before `onLongPress` is called.\n */\n delayLongPress?: ?number,\n\n /**\n * Whether the press behavior is disabled.\n */\n disabled?: ?boolean,\n\n /**\n * Additional distance outside of this view in which a press is detected.\n */\n hitSlop?: ?RectOrSize,\n\n /**\n * Additional distance outside of this view in which a touch is considered a\n * press before `onPressOut` is triggered.\n */\n pressRetentionOffset?: ?RectOrSize,\n\n /**\n * Called when this view's layout changes.\n */\n onLayout?: ?(event: LayoutEvent) => mixed,\n\n /**\n * Called when the hover is activated to provide visual feedback.\n */\n onHoverIn?: ?(event: MouseEvent) => mixed,\n\n /**\n * Called when the hover is deactivated to undo visual feedback.\n */\n onHoverOut?: ?(event: MouseEvent) => mixed,\n\n /**\n * Called when a long-tap gesture is detected.\n */\n onLongPress?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when a single tap gesture is detected.\n */\n onPress?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when a touch is engaged before `onPress`.\n */\n onPressIn?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when a touch is released before `onPress`.\n */\n onPressOut?: ?(event: PressEvent) => mixed,\n\n /**\n * Either view styles or a function that receives a boolean reflecting whether\n * the component is currently pressed and returns view styles.\n */\n style?: ViewStyleProp | ((state: StateCallbackType) => ViewStyleProp),\n\n /**\n * Identifier used to find this view in tests.\n */\n testID?: ?string,\n\n /**\n * If true, doesn't play system sound on touch.\n */\n android_disableSound?: ?boolean,\n\n /**\n * Enables the Android ripple effect and configures its color.\n */\n android_ripple?: ?RippleConfig,\n\n /**\n * Used only for documentation or testing (e.g. snapshot testing).\n */\n testOnly_pressed?: ?boolean,\n\n /**\n * Duration to wait after press down before calling `onPressIn`.\n */\n unstable_pressDelay?: ?number,\n /**\n * Web to Native Accessibility props\n * https://github.com/facebook/react-native/issues/34424\n */\n 'aria-label'?: ?string,\n|}>;\n\ntype Instance = React.ElementRef;\n\n/**\n * Component used to build display components that should respond to whether the\n * component is currently pressed or not.\n */\nfunction Pressable(\n props: Props,\n forwardedRef: React.RefSetter,\n): React.Node {\n const {\n accessible,\n accessibilityState,\n 'aria-live': ariaLive,\n android_disableSound,\n android_ripple,\n 'aria-busy': ariaBusy,\n 'aria-checked': ariaChecked,\n 'aria-disabled': ariaDisabled,\n 'aria-expanded': ariaExpanded,\n 'aria-label': ariaLabel,\n 'aria-selected': ariaSelected,\n cancelable,\n children,\n delayHoverIn,\n delayHoverOut,\n delayLongPress,\n disabled,\n focusable,\n hitSlop,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n pressRetentionOffset,\n style,\n testOnly_pressed,\n unstable_pressDelay,\n ...restProps\n } = props;\n\n const viewRef = useRef(null);\n const mergedRef = useMergeRefs(forwardedRef, viewRef);\n\n const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef);\n\n const [pressed, setPressed] = usePressState(testOnly_pressed === true);\n\n const shouldUpdatePressed =\n typeof children === 'function' || typeof style === 'function';\n\n let _accessibilityState = {\n busy: ariaBusy ?? accessibilityState?.busy,\n checked: ariaChecked ?? accessibilityState?.checked,\n disabled: ariaDisabled ?? accessibilityState?.disabled,\n expanded: ariaExpanded ?? accessibilityState?.expanded,\n selected: ariaSelected ?? accessibilityState?.selected,\n };\n\n _accessibilityState =\n disabled != null ? {..._accessibilityState, disabled} : _accessibilityState;\n\n const accessibilityValue = {\n max: props['aria-valuemax'] ?? props.accessibilityValue?.max,\n min: props['aria-valuemin'] ?? props.accessibilityValue?.min,\n now: props['aria-valuenow'] ?? props.accessibilityValue?.now,\n text: props['aria-valuetext'] ?? props.accessibilityValue?.text,\n };\n\n const accessibilityLiveRegion =\n ariaLive === 'off' ? 'none' : ariaLive ?? props.accessibilityLiveRegion;\n\n const accessibilityLabel = ariaLabel ?? props.accessibilityLabel;\n const restPropsWithDefaults: React.ElementConfig = {\n ...restProps,\n ...android_rippleConfig?.viewProps,\n accessible: accessible !== false,\n accessibilityViewIsModal:\n restProps['aria-modal'] ?? restProps.accessibilityViewIsModal,\n accessibilityLiveRegion,\n accessibilityLabel,\n accessibilityState: _accessibilityState,\n focusable: focusable !== false,\n accessibilityValue,\n hitSlop,\n };\n\n const config = useMemo(\n () => ({\n cancelable,\n disabled,\n hitSlop,\n pressRectOffset: pressRetentionOffset,\n android_disableSound,\n delayHoverIn,\n delayHoverOut,\n delayLongPress,\n delayPressIn: unstable_pressDelay,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPress,\n onPressIn(event: PressEvent): void {\n if (android_rippleConfig != null) {\n android_rippleConfig.onPressIn(event);\n }\n shouldUpdatePressed && setPressed(true);\n if (onPressIn != null) {\n onPressIn(event);\n }\n },\n onPressMove: android_rippleConfig?.onPressMove,\n onPressOut(event: PressEvent): void {\n if (android_rippleConfig != null) {\n android_rippleConfig.onPressOut(event);\n }\n shouldUpdatePressed && setPressed(false);\n if (onPressOut != null) {\n onPressOut(event);\n }\n },\n }),\n [\n android_disableSound,\n android_rippleConfig,\n cancelable,\n delayHoverIn,\n delayHoverOut,\n delayLongPress,\n disabled,\n hitSlop,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n pressRetentionOffset,\n setPressed,\n shouldUpdatePressed,\n unstable_pressDelay,\n ],\n );\n const eventHandlers = usePressability(config);\n\n return (\n \n {typeof children === 'function' ? children({pressed}) : children}\n {__DEV__ ? : null}\n \n );\n}\n\nfunction usePressState(forcePressed: boolean): [boolean, (boolean) => void] {\n const [pressed, setPressed] = useState(false);\n return [pressed || forcePressed, setPressed];\n}\n\nconst MemoedPressable = React.memo(React.forwardRef(Pressable));\nMemoedPressable.displayName = 'Pressable';\n\nexport default (MemoedPressable: React.AbstractComponent<\n Props,\n React.ElementRef,\n>);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\nimport type {PressEvent} from '../../Types/CoreEventTypes';\n\nimport processColor from '../../StyleSheet/processColor';\nimport Platform from '../../Utilities/Platform';\nimport View from '../View/View';\nimport {Commands} from '../View/ViewNativeComponent';\nimport invariant from 'invariant';\nimport * as React from 'react';\nimport {useMemo} from 'react';\n\ntype NativeBackgroundProp = $ReadOnly<{|\n type: 'RippleAndroid',\n color: ?number,\n borderless: boolean,\n rippleRadius: ?number,\n|}>;\n\nexport type RippleConfig = {|\n color?: ColorValue,\n borderless?: boolean,\n radius?: number,\n foreground?: boolean,\n|};\n\n/**\n * Provides the event handlers and props for configuring the ripple effect on\n * supported versions of Android.\n */\nexport default function useAndroidRippleForView(\n rippleConfig: ?RippleConfig,\n viewRef: {|current: null | React.ElementRef|},\n): ?$ReadOnly<{|\n onPressIn: (event: PressEvent) => void,\n onPressMove: (event: PressEvent) => void,\n onPressOut: (event: PressEvent) => void,\n viewProps:\n | $ReadOnly<{|nativeBackgroundAndroid: NativeBackgroundProp|}>\n | $ReadOnly<{|nativeForegroundAndroid: NativeBackgroundProp|}>,\n|}> {\n const {color, borderless, radius, foreground} = rippleConfig ?? {};\n\n return useMemo(() => {\n if (\n Platform.OS === 'android' &&\n (color != null || borderless != null || radius != null)\n ) {\n const processedColor = processColor(color);\n invariant(\n processedColor == null || typeof processedColor === 'number',\n 'Unexpected color given for Ripple color',\n );\n\n const nativeRippleValue = {\n type: 'RippleAndroid',\n color: processedColor,\n borderless: borderless === true,\n rippleRadius: radius,\n };\n\n return {\n viewProps:\n foreground === true\n ? // $FlowFixMe[incompatible-return]\n {nativeForegroundAndroid: nativeRippleValue}\n : // $FlowFixMe[incompatible-return]\n {nativeBackgroundAndroid: nativeRippleValue},\n onPressIn(event: PressEvent): void {\n const view = viewRef.current;\n if (view != null) {\n Commands.hotspotUpdate(\n view,\n event.nativeEvent.locationX ?? 0,\n event.nativeEvent.locationY ?? 0,\n );\n Commands.setPressed(view, true);\n }\n },\n onPressMove(event: PressEvent): void {\n const view = viewRef.current;\n if (view != null) {\n Commands.hotspotUpdate(\n view,\n event.nativeEvent.locationX ?? 0,\n event.nativeEvent.locationY ?? 0,\n );\n }\n },\n onPressOut(event: PressEvent): void {\n const view = viewRef.current;\n if (view != null) {\n Commands.setPressed(view, false);\n }\n },\n };\n }\n return null;\n }, [borderless, color, foreground, radius, viewRef]);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\nimport type {SyntheticEvent} from '../../Types/CoreEventTypes';\nimport type {ViewProps} from '../View/ViewPropTypes';\n\nimport StyleSheet from '../../StyleSheet/StyleSheet';\nimport Platform from '../../Utilities/Platform';\nimport useMergeRefs from '../../Utilities/useMergeRefs';\nimport AndroidSwitchNativeComponent, {\n Commands as AndroidSwitchCommands,\n} from './AndroidSwitchNativeComponent';\nimport SwitchNativeComponent, {\n Commands as SwitchCommands,\n} from './SwitchNativeComponent';\nimport * as React from 'react';\n\ntype SwitchChangeEvent = SyntheticEvent<\n $ReadOnly<{|\n value: boolean,\n target: number,\n |}>,\n>;\n\nexport type Props = $ReadOnly<{|\n ...ViewProps,\n\n /**\n If true the user won't be able to toggle the switch.\n\n @default false\n */\n disabled?: ?boolean,\n\n /**\n The value of the switch. If true the switch will be turned on.\n\n @default false\n */\n value?: ?boolean,\n\n /**\n Color of the foreground switch grip. If this is set on iOS, the switch grip will lose its drop shadow.\n */\n thumbColor?: ?ColorValue,\n\n /**\n Custom colors for the switch track.\n\n _iOS_: When the switch value is false, the track shrinks into the border. If you want to change the\n color of the background exposed by the shrunken track, use\n [`ios_backgroundColor`](https://reactnative.dev/docs/switch#ios_backgroundColor).\n */\n trackColor?: ?$ReadOnly<{|\n false?: ?ColorValue,\n true?: ?ColorValue,\n |}>,\n\n /**\n On iOS, custom color for the background. This background color can be\n seen either when the switch value is false or when the switch is\n disabled (and the switch is translucent).\n */\n ios_backgroundColor?: ?ColorValue,\n\n /**\n Invoked when the user tries to change the value of the switch. Receives\n the change event as an argument. If you want to only receive the new\n value, use `onValueChange` instead.\n */\n onChange?: ?(event: SwitchChangeEvent) => Promise | void,\n\n /**\n Invoked when the user tries to change the value of the switch. Receives\n the new value as an argument. If you want to instead receive an event,\n use `onChange`.\n */\n onValueChange?: ?(value: boolean) => Promise | void,\n|}>;\nconst returnsFalse = () => false;\nconst returnsTrue = () => true;\n\n/**\n Renders a boolean input.\n\n This is a controlled component that requires an `onValueChange`\n callback that updates the `value` prop in order for the component to\n reflect user actions. If the `value` prop is not updated, the\n component will continue to render the supplied `value` prop instead of\n the expected result of any user actions.\n\n ```SnackPlayer name=Switch\n import React, { useState } from \"react\";\n import { View, Switch, StyleSheet } from \"react-native\";\n\n const App = () => {\n const [isEnabled, setIsEnabled] = useState(false);\n const toggleSwitch = () => setIsEnabled(previousState => !previousState);\n\n return (\n \n \n \n );\n }\n\n const styles = StyleSheet.create({\n container: {\n flex: 1,\n alignItems: \"center\",\n justifyContent: \"center\"\n }\n });\n\n export default App;\n ```\n */\n\nconst SwitchWithForwardedRef: React.AbstractComponent<\n Props,\n React.ElementRef<\n typeof SwitchNativeComponent | typeof AndroidSwitchNativeComponent,\n >,\n> = React.forwardRef(function Switch(props, forwardedRef): React.Node {\n const {\n disabled,\n ios_backgroundColor,\n onChange,\n onValueChange,\n style,\n thumbColor,\n trackColor,\n value,\n ...restProps\n } = props;\n const trackColorForFalse = trackColor?.false;\n const trackColorForTrue = trackColor?.true;\n\n const nativeSwitchRef = React.useRef | null>(null);\n\n const ref = useMergeRefs(nativeSwitchRef, forwardedRef);\n\n const [native, setNative] = React.useState({value: (null: ?boolean)});\n\n const handleChange = (event: SwitchChangeEvent) => {\n // $FlowFixMe[unused-promise]\n onChange?.(event);\n // $FlowFixMe[unused-promise]\n onValueChange?.(event.nativeEvent.value);\n setNative({value: event.nativeEvent.value});\n };\n\n React.useLayoutEffect(() => {\n // This is necessary in case native updates the switch and JS decides\n // that the update should be ignored and we should stick with the value\n // that we have in JS.\n const jsValue = value === true;\n const shouldUpdateNativeSwitch =\n native.value != null && native.value !== jsValue;\n if (\n shouldUpdateNativeSwitch &&\n nativeSwitchRef.current?.setNativeProps != null\n ) {\n if (Platform.OS === 'android') {\n AndroidSwitchCommands.setNativeValue(nativeSwitchRef.current, jsValue);\n } else {\n SwitchCommands.setValue(nativeSwitchRef.current, jsValue);\n }\n }\n }, [value, native]);\n\n if (Platform.OS === 'android') {\n const {accessibilityState} = restProps;\n const _disabled =\n disabled != null ? disabled : accessibilityState?.disabled;\n\n const _accessibilityState =\n _disabled !== accessibilityState?.disabled\n ? {...accessibilityState, disabled: _disabled}\n : accessibilityState;\n\n const platformProps = {\n accessibilityState: _accessibilityState,\n enabled: _disabled !== true,\n on: value === true,\n style,\n thumbTintColor: thumbColor,\n trackColorForFalse: trackColorForFalse,\n trackColorForTrue: trackColorForTrue,\n trackTintColor: value === true ? trackColorForTrue : trackColorForFalse,\n };\n\n return (\n \n );\n } else {\n const platformProps = {\n disabled,\n onTintColor: trackColorForTrue,\n style: StyleSheet.compose(\n {height: 31, width: 51},\n StyleSheet.compose(\n style,\n ios_backgroundColor == null\n ? null\n : {\n backgroundColor: ios_backgroundColor,\n borderRadius: 16,\n },\n ),\n ),\n thumbTintColor: thumbColor,\n tintColor: trackColorForFalse,\n value: value === true,\n };\n\n return (\n \n );\n }\n});\n\nexport default SwitchWithForwardedRef;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/AndroidSwitchNativeComponent';\nimport AndroidSwitchNativeComponent from '../../../src/private/specs/components/AndroidSwitchNativeComponent';\nexport default AndroidSwitchNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';\nimport type {\n BubblingEventHandler,\n Int32,\n WithDefault,\n} from '../../../../Libraries/Types/CodegenTypes';\n\nimport codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\nimport * as React from 'react';\n\ntype SwitchChangeEvent = $ReadOnly<{|\n value: boolean,\n target: Int32,\n|}>;\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n // Props\n disabled?: WithDefault,\n enabled?: WithDefault,\n thumbColor?: ?ColorValue,\n trackColorForFalse?: ?ColorValue,\n trackColorForTrue?: ?ColorValue,\n value?: WithDefault,\n on?: WithDefault,\n thumbTintColor?: ?ColorValue,\n trackTintColor?: ?ColorValue,\n\n // Events\n onChange?: BubblingEventHandler,\n|}>;\n\ntype NativeType = HostComponent;\n\ninterface NativeCommands {\n +setNativeValue: (\n viewRef: React.ElementRef,\n value: boolean,\n ) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['setNativeValue'],\n});\n\nexport default (codegenNativeComponent('AndroidSwitch', {\n interfaceOnly: true,\n}): NativeType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nexport * from '../../../src/private/specs/components/SwitchNativeComponent';\nimport SwitchNativeComponent from '../../../src/private/specs/components/SwitchNativeComponent';\nexport default SwitchNativeComponent;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';\nimport type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';\nimport type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';\nimport type {\n BubblingEventHandler,\n Int32,\n WithDefault,\n} from '../../../../Libraries/Types/CodegenTypes';\n\nimport codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';\nimport codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';\nimport * as React from 'react';\n\ntype SwitchChangeEvent = $ReadOnly<{|\n value: boolean,\n target: Int32,\n|}>;\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n\n // Props\n disabled?: WithDefault,\n value?: WithDefault,\n tintColor?: ?ColorValue,\n onTintColor?: ?ColorValue,\n thumbTintColor?: ?ColorValue,\n\n // Deprecated props\n thumbColor?: ?ColorValue,\n trackColorForFalse?: ?ColorValue,\n trackColorForTrue?: ?ColorValue,\n\n // Events\n onChange?: ?BubblingEventHandler,\n|}>;\n\ntype ComponentType = HostComponent;\n\ninterface NativeCommands {\n +setValue: (viewRef: React.ElementRef, value: boolean) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['setValue'],\n});\n\nexport default (codegenNativeComponent('Switch', {\n paperComponentName: 'RCTSwitch',\n excludedPlatforms: ['android'],\n}): ComponentType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';\nimport type {\n PressEvent,\n ScrollEvent,\n SyntheticEvent,\n} from '../../Types/CoreEventTypes';\nimport type {ViewProps} from '../View/ViewPropTypes';\nimport type {TextInputType} from './TextInput.flow';\n\nimport usePressability from '../../Pressability/usePressability';\nimport flattenStyle from '../../StyleSheet/flattenStyle';\nimport StyleSheet, {\n type ColorValue,\n type TextStyleProp,\n type ViewStyleProp,\n} from '../../StyleSheet/StyleSheet';\nimport Text from '../../Text/Text';\nimport TextAncestor from '../../Text/TextAncestor';\nimport Platform from '../../Utilities/Platform';\nimport useMergeRefs from '../../Utilities/useMergeRefs';\nimport TextInputState from './TextInputState';\nimport invariant from 'invariant';\nimport nullthrows from 'nullthrows';\nimport * as React from 'react';\nimport {useCallback, useLayoutEffect, useRef, useState} from 'react';\n\ntype ReactRefSetter = {current: null | T, ...} | ((ref: null | T) => mixed);\ntype TextInputInstance = React.ElementRef> & {\n +clear: () => void,\n +isFocused: () => boolean,\n +getNativeRef: () => ?React.ElementRef>,\n +setSelection: (start: number, end: number) => void,\n};\n\nlet AndroidTextInput;\nlet AndroidTextInputCommands;\nlet RCTSinglelineTextInputView;\nlet RCTSinglelineTextInputNativeCommands;\nlet RCTMultilineTextInputView;\nlet RCTMultilineTextInputNativeCommands;\n\nif (Platform.OS === 'android') {\n AndroidTextInput = require('./AndroidTextInputNativeComponent').default;\n AndroidTextInputCommands =\n require('./AndroidTextInputNativeComponent').Commands;\n} else if (Platform.OS === 'ios') {\n RCTSinglelineTextInputView =\n require('./RCTSingelineTextInputNativeComponent').default;\n RCTSinglelineTextInputNativeCommands =\n require('./RCTSingelineTextInputNativeComponent').Commands;\n RCTMultilineTextInputView =\n require('./RCTMultilineTextInputNativeComponent').default;\n RCTMultilineTextInputNativeCommands =\n require('./RCTMultilineTextInputNativeComponent').Commands;\n}\n\nexport type ChangeEvent = SyntheticEvent<\n $ReadOnly<{|\n eventCount: number,\n target: number,\n text: string,\n |}>,\n>;\n\nexport type TextInputEvent = SyntheticEvent<\n $ReadOnly<{|\n eventCount: number,\n previousText: string,\n range: $ReadOnly<{|\n start: number,\n end: number,\n |}>,\n target: number,\n text: string,\n |}>,\n>;\n\nexport type ContentSizeChangeEvent = SyntheticEvent<\n $ReadOnly<{|\n target: number,\n contentSize: $ReadOnly<{|\n width: number,\n height: number,\n |}>,\n |}>,\n>;\n\ntype TargetEvent = SyntheticEvent<\n $ReadOnly<{|\n target: number,\n |}>,\n>;\n\nexport type BlurEvent = TargetEvent;\nexport type FocusEvent = TargetEvent;\n\ntype Selection = $ReadOnly<{|\n start: number,\n end: number,\n|}>;\n\nexport type SelectionChangeEvent = SyntheticEvent<\n $ReadOnly<{|\n selection: Selection,\n target: number,\n |}>,\n>;\n\nexport type KeyPressEvent = SyntheticEvent<\n $ReadOnly<{|\n key: string,\n target?: ?number,\n eventCount?: ?number,\n |}>,\n>;\n\nexport type EditingEvent = SyntheticEvent<\n $ReadOnly<{|\n eventCount: number,\n text: string,\n target: number,\n |}>,\n>;\n\ntype DataDetectorTypesType =\n | 'phoneNumber'\n | 'link'\n | 'address'\n | 'calendarEvent'\n | 'trackingNumber'\n | 'flightNumber'\n | 'lookupSuggestion'\n | 'none'\n | 'all';\n\nexport type KeyboardType =\n // Cross Platform\n | 'default'\n | 'email-address'\n | 'numeric'\n | 'phone-pad'\n | 'number-pad'\n | 'decimal-pad'\n | 'url'\n // iOS-only\n | 'ascii-capable'\n | 'numbers-and-punctuation'\n | 'name-phone-pad'\n | 'twitter'\n | 'web-search'\n // iOS 10+ only\n | 'ascii-capable-number-pad'\n // Android-only\n | 'visible-password';\n\nexport type InputMode =\n | 'none'\n | 'text'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\nexport type ReturnKeyType =\n // Cross Platform\n | 'done'\n | 'go'\n | 'next'\n | 'search'\n | 'send'\n // Android-only\n | 'none'\n | 'previous'\n // iOS-only\n | 'default'\n | 'emergency-call'\n | 'google'\n | 'join'\n | 'route'\n | 'yahoo';\n\nexport type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline';\n\nexport type AutoCapitalize = 'none' | 'sentences' | 'words' | 'characters';\n\nexport type TextContentType =\n | 'none'\n | 'URL'\n | 'addressCity'\n | 'addressCityAndState'\n | 'addressState'\n | 'countryName'\n | 'creditCardNumber'\n | 'creditCardExpiration'\n | 'creditCardExpirationMonth'\n | 'creditCardExpirationYear'\n | 'creditCardSecurityCode'\n | 'creditCardType'\n | 'creditCardName'\n | 'creditCardGivenName'\n | 'creditCardMiddleName'\n | 'creditCardFamilyName'\n | 'emailAddress'\n | 'familyName'\n | 'fullStreetAddress'\n | 'givenName'\n | 'jobTitle'\n | 'location'\n | 'middleName'\n | 'name'\n | 'namePrefix'\n | 'nameSuffix'\n | 'nickname'\n | 'organizationName'\n | 'postalCode'\n | 'streetAddressLine1'\n | 'streetAddressLine2'\n | 'sublocality'\n | 'telephoneNumber'\n | 'username'\n | 'password'\n | 'newPassword'\n | 'oneTimeCode'\n | 'birthdate'\n | 'birthdateDay'\n | 'birthdateMonth'\n | 'birthdateYear';\n\nexport type enterKeyHintType =\n // Cross Platform\n | 'done'\n | 'go'\n | 'next'\n | 'search'\n | 'send'\n // Android-only\n | 'previous'\n // iOS-only\n | 'enter';\n\ntype PasswordRules = string;\n\ntype IOSProps = $ReadOnly<{|\n /**\n * When the clear button should appear on the right side of the text view.\n * This property is supported only for single-line TextInput component.\n * @platform ios\n */\n clearButtonMode?: ?('never' | 'while-editing' | 'unless-editing' | 'always'),\n\n /**\n * If `true`, clears the text field automatically when editing begins.\n * @platform ios\n */\n clearTextOnFocus?: ?boolean,\n\n /**\n * Determines the types of data converted to clickable URLs in the text input.\n * Only valid if `multiline={true}` and `editable={false}`.\n * By default no data types are detected.\n *\n * You can provide one type or an array of many types.\n *\n * Possible values for `dataDetectorTypes` are:\n *\n * - `'phoneNumber'`\n * - `'link'`\n * - `'address'`\n * - `'calendarEvent'`\n * - `'none'`\n * - `'all'`\n *\n * @platform ios\n */\n dataDetectorTypes?:\n | ?DataDetectorTypesType\n | $ReadOnlyArray,\n\n /**\n * If `true`, the keyboard disables the return key when there is no text and\n * automatically enables it when there is text. The default value is `false`.\n * @platform ios\n */\n enablesReturnKeyAutomatically?: ?boolean,\n\n /**\n * An optional identifier which links a custom InputAccessoryView to\n * this text input. The InputAccessoryView is rendered above the\n * keyboard when this text input is focused.\n * @platform ios\n */\n inputAccessoryViewID?: ?string,\n\n /**\n * Determines the color of the keyboard.\n * @platform ios\n */\n keyboardAppearance?: ?('default' | 'light' | 'dark'),\n\n /**\n * Provide rules for your password.\n * For example, say you want to require a password with at least eight characters consisting of a mix of uppercase and lowercase letters, at least one number, and at most two consecutive characters.\n * \"required: upper; required: lower; required: digit; max-consecutive: 2; minlength: 8;\"\n * @platform ios\n */\n passwordRules?: ?PasswordRules,\n\n /*\n * If `true`, allows TextInput to pass touch events to the parent component.\n * This allows components to be swipeable from the TextInput on iOS,\n * as is the case on Android by default.\n * If `false`, TextInput always asks to handle the input (except when disabled).\n * @platform ios\n */\n rejectResponderTermination?: ?boolean,\n\n /**\n * If `false`, scrolling of the text view will be disabled.\n * The default value is `true`. Does only work with 'multiline={true}'.\n * @platform ios\n */\n scrollEnabled?: ?boolean,\n\n /**\n * If `false`, disables spell-check style (i.e. red underlines).\n * The default value is inherited from `autoCorrect`.\n * @platform ios\n */\n spellCheck?: ?boolean,\n\n /**\n * Give the keyboard and the system information about the\n * expected semantic meaning for the content that users enter.\n * `autoComplete` property accomplishes same behavior and is recommended as its supported by both platforms.\n * Avoid using both `autoComplete` and `textContentType`, you can use `Platform.select` for differing platform behaviors.\n * For backwards compatibility, when both set, `textContentType` takes precedence on iOS.\n * @platform ios\n */\n textContentType?: ?TextContentType,\n\n /**\n * Set line break strategy on iOS.\n * @platform ios\n */\n lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'),\n\n /**\n * If `false`, the iOS system will not insert an extra space after a paste operation\n * neither delete one or two spaces after a cut or delete operation.\n *\n * The default value is `true`.\n *\n * @platform ios\n */\n smartInsertDelete?: ?boolean,\n|}>;\n\ntype AndroidProps = $ReadOnly<{|\n /**\n * When provided it will set the color of the cursor (or \"caret\") in the component.\n * Unlike the behavior of `selectionColor` the cursor color will be set independently\n * from the color of the text selection box.\n * @platform android\n */\n cursorColor?: ?ColorValue,\n\n /**\n * When `false`, if there is a small amount of space available around a text input\n * (e.g. landscape orientation on a phone), the OS may choose to have the user edit\n * the text inside of a full screen text input mode. When `true`, this feature is\n * disabled and users will always edit the text directly inside of the text input.\n * Defaults to `false`.\n * @platform android\n */\n disableFullscreenUI?: ?boolean,\n\n importantForAutofill?: ?(\n | 'auto'\n | 'no'\n | 'noExcludeDescendants'\n | 'yes'\n | 'yesExcludeDescendants'\n ),\n\n /**\n * If defined, the provided image resource will be rendered on the left.\n * The image resource must be inside `/android/app/src/main/res/drawable` and referenced\n * like\n * ```\n * \n * ```\n * @platform android\n */\n inlineImageLeft?: ?string,\n\n /**\n * Padding between the inline image, if any, and the text input itself.\n * @platform android\n */\n inlineImagePadding?: ?number,\n\n /**\n * Sets the number of lines for a `TextInput`. Use it with multiline set to\n * `true` to be able to fill the lines.\n * @platform android\n */\n numberOfLines?: ?number,\n\n /**\n * Sets the return key to the label. Use it instead of `returnKeyType`.\n * @platform android\n */\n returnKeyLabel?: ?string,\n\n /**\n * Sets the number of rows for a `TextInput`. Use it with multiline set to\n * `true` to be able to fill the lines.\n * @platform android\n */\n rows?: ?number,\n\n /**\n * When `false`, it will prevent the soft keyboard from showing when the field is focused.\n * Defaults to `true`.\n */\n showSoftInputOnFocus?: ?boolean,\n\n /**\n * Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced`\n * The default value is `simple`.\n * @platform android\n */\n textBreakStrategy?: ?('simple' | 'highQuality' | 'balanced'),\n\n /**\n * The color of the `TextInput` underline.\n * @platform android\n */\n underlineColorAndroid?: ?ColorValue,\n|}>;\n\nexport type Props = $ReadOnly<{|\n ...$Diff>,\n ...IOSProps,\n ...AndroidProps,\n\n /**\n * Can tell `TextInput` to automatically capitalize certain characters.\n *\n * - `characters`: all characters.\n * - `words`: first letter of each word.\n * - `sentences`: first letter of each sentence (*default*).\n * - `none`: don't auto capitalize anything.\n */\n autoCapitalize?: ?AutoCapitalize,\n\n /**\n * Specifies autocomplete hints for the system, so it can provide autofill.\n * On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.\n * To disable autocomplete, set autoComplete to off.\n *\n * The following values work across platforms:\n *\n * - `additional-name`\n * - `address-line1`\n * - `address-line2`\n * - `birthdate-day` (iOS 17+)\n * - `birthdate-full` (iOS 17+)\n * - `birthdate-month` (iOS 17+)\n * - `birthdate-year` (iOS 17+)\n * - `cc-number`\n * - `cc-csc` (iOS 17+)\n * - `cc-exp` (iOS 17+)\n * - `cc-exp-day` (iOS 17+)\n * - `cc-exp-month` (iOS 17+)\n * - `cc-exp-year` (iOS 17+)\n * - `country`\n * - `current-password`\n * - `email`\n * - `family-name`\n * - `given-name`\n * - `honorific-prefix`\n * - `honorific-suffix`\n * - `name`\n * - `new-password`\n * - `off`\n * - `one-time-code`\n * - `postal-code`\n * - `street-address`\n * - `tel`\n * - `username`\n *\n * The following values work on iOS only:\n *\n * - `cc-name` (iOS 17+)\n * - `cc-given-name` (iOS 17+)\n * - `cc-middle-name` (iOS 17+)\n * - `cc-family-name` (iOS 17+)\n * - `cc-type` (iOS 17+)\n * - `nickname`\n * - `organization`\n * - `organization-title`\n * - `url`\n *\n * The following values work on Android only:\n *\n * - `gender`\n * - `name-family`\n * - `name-given`\n * - `name-middle`\n * - `name-middle-initial`\n * - `name-prefix`\n * - `name-suffix`\n * - `password`\n * - `password-new`\n * - `postal-address`\n * - `postal-address-country`\n * - `postal-address-extended`\n * - `postal-address-extended-postal-code`\n * - `postal-address-locality`\n * - `postal-address-region`\n * - `sms-otp`\n * - `tel-country-code`\n * - `tel-national`\n * - `tel-device`\n * - `username-new`\n */\n autoComplete?: ?(\n | 'additional-name'\n | 'address-line1'\n | 'address-line2'\n | 'birthdate-day'\n | 'birthdate-full'\n | 'birthdate-month'\n | 'birthdate-year'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-day'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-number'\n | 'cc-name'\n | 'cc-given-name'\n | 'cc-middle-name'\n | 'cc-family-name'\n | 'cc-type'\n | 'country'\n | 'current-password'\n | 'email'\n | 'family-name'\n | 'gender'\n | 'given-name'\n | 'honorific-prefix'\n | 'honorific-suffix'\n | 'name'\n | 'name-family'\n | 'name-given'\n | 'name-middle'\n | 'name-middle-initial'\n | 'name-prefix'\n | 'name-suffix'\n | 'new-password'\n | 'nickname'\n | 'one-time-code'\n | 'organization'\n | 'organization-title'\n | 'password'\n | 'password-new'\n | 'postal-address'\n | 'postal-address-country'\n | 'postal-address-extended'\n | 'postal-address-extended-postal-code'\n | 'postal-address-locality'\n | 'postal-address-region'\n | 'postal-code'\n | 'street-address'\n | 'sms-otp'\n | 'tel'\n | 'tel-country-code'\n | 'tel-national'\n | 'tel-device'\n | 'url'\n | 'username'\n | 'username-new'\n | 'off'\n ),\n\n /**\n * If `false`, disables auto-correct. The default value is `true`.\n */\n autoCorrect?: ?boolean,\n\n /**\n * If `true`, focuses the input on `componentDidMount`.\n * The default value is `false`.\n */\n autoFocus?: ?boolean,\n\n /**\n * Specifies whether fonts should scale to respect Text Size accessibility settings. The\n * default is `true`.\n */\n allowFontScaling?: ?boolean,\n\n /**\n * If `true`, caret is hidden. The default value is `false`.\n *\n * On Android devices manufactured by Xiaomi with Android Q,\n * when keyboardType equals 'email-address'this will be set\n * in native to 'true' to prevent a system related crash. This\n * will cause cursor to be disabled as a side-effect.\n *\n */\n caretHidden?: ?boolean,\n\n /*\n * If `true`, contextMenuHidden is hidden. The default value is `false`.\n */\n contextMenuHidden?: ?boolean,\n\n /**\n * Provides an initial value that will change when the user starts typing.\n * Useful for simple use-cases where you do not want to deal with listening\n * to events and updating the value prop to keep the controlled state in sync.\n */\n defaultValue?: ?Stringish,\n\n /**\n * If `false`, text is not editable. The default value is `true`.\n */\n editable?: ?boolean,\n\n forwardedRef?: ?ReactRefSetter,\n\n /**\n * `enterKeyHint` defines what action label (or icon) to present for the enter key on virtual keyboards.\n *\n * The following values is supported:\n *\n * - `enter`\n * - `done`\n * - `go`\n * - `next`\n * - `previous`\n * - `search`\n * - `send`\n */\n enterKeyHint?: ?enterKeyHintType,\n\n /**\n * `inputMode` works like the `inputmode` attribute in HTML, it determines which\n * keyboard to open, e.g.`numeric` and has precedence over keyboardType\n *\n * Support the following values:\n *\n * - `none`\n * - `text`\n * - `decimal`\n * - `numeric`\n * - `tel`\n * - `search`\n * - `email`\n * - `url`\n */\n inputMode?: ?InputMode,\n\n /**\n * Determines which keyboard to open, e.g.`numeric`.\n *\n * The following values work across platforms:\n *\n * - `default`\n * - `numeric`\n * - `number-pad`\n * - `decimal-pad`\n * - `email-address`\n * - `phone-pad`\n * - `url`\n *\n * *iOS Only*\n *\n * The following values work on iOS only:\n *\n * - `ascii-capable`\n * - `numbers-and-punctuation`\n * - `name-phone-pad`\n * - `twitter`\n * - `web-search`\n *\n * *Android Only*\n *\n * The following values work on Android only:\n *\n * - `visible-password`\n *\n */\n keyboardType?: ?KeyboardType,\n\n /**\n * Specifies largest possible scale a font can reach when `allowFontScaling` is enabled.\n * Possible values:\n * `null/undefined` (default): inherit from the parent node or the global default (0)\n * `0`: no max, ignore parent/global default\n * `>= 1`: sets the maxFontSizeMultiplier of this node to this value\n */\n maxFontSizeMultiplier?: ?number,\n\n /**\n * Limits the maximum number of characters that can be entered. Use this\n * instead of implementing the logic in JS to avoid flicker.\n */\n maxLength?: ?number,\n\n /**\n * If `true`, the text input can be multiple lines.\n * The default value is `false`.\n */\n multiline?: ?boolean,\n\n /**\n * Callback that is called when the text input is blurred.\n */\n onBlur?: ?(e: BlurEvent) => mixed,\n\n /**\n * Callback that is called when the text input's text changes.\n */\n onChange?: ?(e: ChangeEvent) => mixed,\n\n /**\n * Callback that is called when the text input's text changes.\n * Changed text is passed as an argument to the callback handler.\n */\n onChangeText?: ?(text: string) => mixed,\n\n /**\n * Callback that is called when the text input's content size changes.\n * This will be called with\n * `{ nativeEvent: { contentSize: { width, height } } }`.\n *\n * Only called for multiline text inputs.\n */\n onContentSizeChange?: ?(e: ContentSizeChangeEvent) => mixed,\n\n /**\n * Callback that is called when text input ends.\n */\n onEndEditing?: ?(e: EditingEvent) => mixed,\n\n /**\n * Callback that is called when the text input is focused.\n */\n onFocus?: ?(e: FocusEvent) => mixed,\n\n /**\n * Callback that is called when a key is pressed.\n * This will be called with `{ nativeEvent: { key: keyValue } }`\n * where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and\n * the typed-in character otherwise including `' '` for space.\n * Fires before `onChange` callbacks.\n */\n onKeyPress?: ?(e: KeyPressEvent) => mixed,\n\n /**\n * Called when a single tap gesture is detected.\n */\n onPress?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when a touch is engaged.\n */\n onPressIn?: ?(event: PressEvent) => mixed,\n\n /**\n * Called when a touch is released.\n */\n onPressOut?: ?(event: PressEvent) => mixed,\n\n /**\n * Callback that is called when the text input selection is changed.\n * This will be called with\n * `{ nativeEvent: { selection: { start, end } } }`.\n */\n onSelectionChange?: ?(e: SelectionChangeEvent) => mixed,\n\n /**\n * Callback that is called when the text input's submit button is pressed.\n * Invalid if `multiline={true}` is specified.\n */\n onSubmitEditing?: ?(e: EditingEvent) => mixed,\n\n /**\n * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`.\n * May also contain other properties from ScrollEvent but on Android contentSize\n * is not provided for performance reasons.\n */\n onScroll?: ?(e: ScrollEvent) => mixed,\n\n /**\n * The string that will be rendered before text input has been entered.\n */\n placeholder?: ?Stringish,\n\n /**\n * The text color of the placeholder string.\n */\n placeholderTextColor?: ?ColorValue,\n\n /** `readOnly` works like the `readonly` attribute in HTML.\n * If `true`, text is not editable. The default value is `false`.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly\n * for more details.\n */\n readOnly?: ?boolean,\n\n /**\n * Determines how the return key should look. On Android you can also use\n * `returnKeyLabel`.\n *\n * *Cross platform*\n *\n * The following values work across platforms:\n *\n * - `done`\n * - `go`\n * - `next`\n * - `search`\n * - `send`\n *\n * *Android Only*\n *\n * The following values work on Android only:\n *\n * - `none`\n * - `previous`\n *\n * *iOS Only*\n *\n * The following values work on iOS only:\n *\n * - `default`\n * - `emergency-call`\n * - `google`\n * - `join`\n * - `route`\n * - `yahoo`\n */\n returnKeyType?: ?ReturnKeyType,\n\n /**\n * If `true`, the text input obscures the text entered so that sensitive text\n * like passwords stay secure. The default value is `false`. Does not work with 'multiline={true}'.\n */\n secureTextEntry?: ?boolean,\n\n /**\n * The start and end of the text input's selection. Set start and end to\n * the same value to position the cursor.\n */\n selection?: ?$ReadOnly<{|\n start: number,\n end?: ?number,\n |}>,\n\n /**\n * The highlight and cursor color of the text input.\n */\n selectionColor?: ?ColorValue,\n\n /**\n * The text selection handle color.\n * @platform android\n */\n selectionHandleColor?: ?ColorValue,\n\n /**\n * If `true`, all text will automatically be selected on focus.\n */\n selectTextOnFocus?: ?boolean,\n\n /**\n * If `true`, the text field will blur when submitted.\n * The default value is true for single-line fields and false for\n * multiline fields. Note that for multiline fields, setting `blurOnSubmit`\n * to `true` means that pressing return will blur the field and trigger the\n * `onSubmitEditing` event instead of inserting a newline into the field.\n *\n * @deprecated\n * Note that `submitBehavior` now takes the place of `blurOnSubmit` and will\n * override any behavior defined by `blurOnSubmit`.\n * @see submitBehavior\n */\n blurOnSubmit?: ?boolean,\n\n /**\n * When the return key is pressed,\n *\n * For single line inputs:\n *\n * - `'newline`' defaults to `'blurAndSubmit'`\n * - `undefined` defaults to `'blurAndSubmit'`\n *\n * For multiline inputs:\n *\n * - `'newline'` adds a newline\n * - `undefined` defaults to `'newline'`\n *\n * For both single line and multiline inputs:\n *\n * - `'submit'` will only send a submit event and not blur the input\n * - `'blurAndSubmit`' will both blur the input and send a submit event\n */\n submitBehavior?: ?SubmitBehavior,\n\n /**\n * Note that not all Text styles are supported, an incomplete list of what is not supported includes:\n *\n * - `borderLeftWidth`\n * - `borderTopWidth`\n * - `borderRightWidth`\n * - `borderBottomWidth`\n * - `borderTopLeftRadius`\n * - `borderTopRightRadius`\n * - `borderBottomRightRadius`\n * - `borderBottomLeftRadius`\n *\n * see [Issue#7070](https://github.com/facebook/react-native/issues/7070)\n * for more detail.\n *\n * [Styles](docs/style.html)\n */\n style?: ?TextStyleProp,\n\n /**\n * The value to show for the text input. `TextInput` is a controlled\n * component, which means the native value will be forced to match this\n * value prop if provided. For most uses, this works great, but in some\n * cases this may cause flickering - one common cause is preventing edits\n * by keeping value the same. In addition to simply setting the same value,\n * either set `editable={false}`, or set/update `maxLength` to prevent\n * unwanted edits without flicker.\n */\n value?: ?Stringish,\n|}>;\n\nconst emptyFunctionThatReturnsTrue = () => true;\n\n/**\n * A foundational component for inputting text into the app via a\n * keyboard. Props provide configurability for several features, such as\n * auto-correction, auto-capitalization, placeholder text, and different keyboard\n * types, such as a numeric keypad.\n *\n * The simplest use case is to plop down a `TextInput` and subscribe to the\n * `onChangeText` events to read the user input. There are also other events,\n * such as `onSubmitEditing` and `onFocus` that can be subscribed to. A simple\n * example:\n *\n * ```ReactNativeWebPlayer\n * import React, { Component } from 'react';\n * import { AppRegistry, TextInput } from 'react-native';\n *\n * export default class UselessTextInput extends Component {\n * constructor(props) {\n * super(props);\n * this.state = { text: 'Useless Placeholder' };\n * }\n *\n * render() {\n * return (\n * this.setState({text})}\n * value={this.state.text}\n * />\n * );\n * }\n * }\n *\n * // skip this line if using Create React Native App\n * AppRegistry.registerComponent('AwesomeProject', () => UselessTextInput);\n * ```\n *\n * Two methods exposed via the native element are .focus() and .blur() that\n * will focus or blur the TextInput programmatically.\n *\n * Note that some props are only available with `multiline={true/false}`.\n * Additionally, border styles that apply to only one side of the element\n * (e.g., `borderBottomColor`, `borderLeftWidth`, etc.) will not be applied if\n * `multiline=false`. To achieve the same effect, you can wrap your `TextInput`\n * in a `View`:\n *\n * ```ReactNativeWebPlayer\n * import React, { Component } from 'react';\n * import { AppRegistry, View, TextInput } from 'react-native';\n *\n * class UselessTextInput extends Component {\n * render() {\n * return (\n * \n * );\n * }\n * }\n *\n * export default class UselessTextInputMultiline extends Component {\n * constructor(props) {\n * super(props);\n * this.state = {\n * text: 'Useless Multiline Placeholder',\n * };\n * }\n *\n * // If you type something in the text box that is a color, the background will change to that\n * // color.\n * render() {\n * return (\n * \n * this.setState({text})}\n * value={this.state.text}\n * />\n * \n * );\n * }\n * }\n *\n * // skip these lines if using Create React Native App\n * AppRegistry.registerComponent(\n * 'AwesomeProject',\n * () => UselessTextInputMultiline\n * );\n * ```\n *\n * `TextInput` has by default a border at the bottom of its view. This border\n * has its padding set by the background image provided by the system, and it\n * cannot be changed. Solutions to avoid this is to either not set height\n * explicitly, case in which the system will take care of displaying the border\n * in the correct position, or to not display the border by setting\n * `underlineColorAndroid` to transparent.\n *\n * Note that on Android performing text selection in input can change\n * app's activity `windowSoftInputMode` param to `adjustResize`.\n * This may cause issues with components that have position: 'absolute'\n * while keyboard is active. To avoid this behavior either specify `windowSoftInputMode`\n * in AndroidManifest.xml ( https://developer.android.com/guide/topics/manifest/activity-element.html )\n * or control this param programmatically with native code.\n *\n */\nfunction InternalTextInput(props: Props): React.Node {\n const {\n 'aria-busy': ariaBusy,\n 'aria-checked': ariaChecked,\n 'aria-disabled': ariaDisabled,\n 'aria-expanded': ariaExpanded,\n 'aria-selected': ariaSelected,\n accessibilityState,\n id,\n tabIndex,\n selection: propsSelection,\n selectionColor,\n selectionHandleColor,\n cursorColor,\n ...otherProps\n } = props;\n\n const inputRef = useRef>>(null);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const selection: ?Selection =\n propsSelection == null\n ? null\n : {\n start: propsSelection.start,\n end: propsSelection.end ?? propsSelection.start,\n };\n\n const [mostRecentEventCount, setMostRecentEventCount] = useState(0);\n const [lastNativeText, setLastNativeText] = useState(props.value);\n const [lastNativeSelectionState, setLastNativeSelection] = useState<{|\n selection: Selection,\n mostRecentEventCount: number,\n |}>({\n selection: {start: -1, end: -1},\n mostRecentEventCount: mostRecentEventCount,\n });\n\n const lastNativeSelection = lastNativeSelectionState.selection;\n\n let viewCommands;\n if (AndroidTextInputCommands) {\n viewCommands = AndroidTextInputCommands;\n } else {\n viewCommands =\n props.multiline === true\n ? RCTMultilineTextInputNativeCommands\n : RCTSinglelineTextInputNativeCommands;\n }\n\n const text =\n typeof props.value === 'string'\n ? props.value\n : typeof props.defaultValue === 'string'\n ? props.defaultValue\n : '';\n\n // This is necessary in case native updates the text and JS decides\n // that the update should be ignored and we should stick with the value\n // that we have in JS.\n useLayoutEffect(() => {\n const nativeUpdate: {text?: string, selection?: Selection} = {};\n\n if (lastNativeText !== props.value && typeof props.value === 'string') {\n nativeUpdate.text = props.value;\n setLastNativeText(props.value);\n }\n\n if (\n selection &&\n lastNativeSelection &&\n (lastNativeSelection.start !== selection.start ||\n lastNativeSelection.end !== selection.end)\n ) {\n nativeUpdate.selection = selection;\n setLastNativeSelection({selection, mostRecentEventCount});\n }\n\n if (Object.keys(nativeUpdate).length === 0) {\n return;\n }\n\n if (inputRef.current != null) {\n viewCommands.setTextAndSelection(\n inputRef.current,\n mostRecentEventCount,\n text,\n selection?.start ?? -1,\n selection?.end ?? -1,\n );\n }\n }, [\n mostRecentEventCount,\n inputRef,\n props.value,\n props.defaultValue,\n lastNativeText,\n selection,\n lastNativeSelection,\n text,\n viewCommands,\n ]);\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n\n if (inputRefValue != null) {\n TextInputState.registerInput(inputRefValue);\n\n return () => {\n TextInputState.unregisterInput(inputRefValue);\n\n if (TextInputState.currentlyFocusedInput() === inputRefValue) {\n nullthrows(inputRefValue).blur();\n }\n };\n }\n }, [inputRef]);\n\n const setLocalRef = useCallback(\n (instance: TextInputInstance | null) => {\n inputRef.current = instance;\n\n /*\n Hi reader from the future. I'm sorry for this.\n\n This is a hack. Ideally we would forwardRef to the underlying\n host component. However, since TextInput has it's own methods that can be\n called as well, if we used the standard forwardRef then these\n methods wouldn't be accessible and thus be a breaking change.\n\n We have a couple of options of how to handle this:\n - Return a new ref with everything we methods from both. This is problematic\n because we need React to also know it is a host component which requires\n internals of the class implementation of the ref.\n - Break the API and have some other way to call one set of the methods or\n the other. This is our long term approach as we want to eventually\n get the methods on host components off the ref. So instead of calling\n ref.measure() you might call ReactNative.measure(ref). This would hopefully\n let the ref for TextInput then have the methods like `.clear`. Or we do it\n the other way and make it TextInput.clear(textInputRef) which would be fine\n too. Either way though is a breaking change that is longer term.\n - Mutate this ref. :( Gross, but accomplishes what we need in the meantime\n before we can get to the long term breaking change.\n */\n if (instance != null) {\n // $FlowFixMe[incompatible-use] - See the explanation above.\n Object.assign(instance, {\n clear(): void {\n if (inputRef.current != null) {\n viewCommands.setTextAndSelection(\n inputRef.current,\n mostRecentEventCount,\n '',\n 0,\n 0,\n );\n }\n },\n // TODO: Fix this returning true on null === null, when no input is focused\n isFocused(): boolean {\n return TextInputState.currentlyFocusedInput() === inputRef.current;\n },\n getNativeRef(): ?React.ElementRef> {\n return inputRef.current;\n },\n setSelection(start: number, end: number): void {\n if (inputRef.current != null) {\n viewCommands.setTextAndSelection(\n inputRef.current,\n mostRecentEventCount,\n null,\n start,\n end,\n );\n }\n },\n });\n }\n },\n [mostRecentEventCount, viewCommands],\n );\n\n const ref = useMergeRefs(setLocalRef, props.forwardedRef);\n\n const _onChange = (event: ChangeEvent) => {\n const currentText = event.nativeEvent.text;\n props.onChange && props.onChange(event);\n props.onChangeText && props.onChangeText(currentText);\n\n if (inputRef.current == null) {\n // calling `props.onChange` or `props.onChangeText`\n // may clean up the input itself. Exits here.\n return;\n }\n\n setLastNativeText(currentText);\n // This must happen last, after we call setLastNativeText.\n // Different ordering can cause bugs when editing AndroidTextInputs\n // with multiple Fragments.\n // We must update this so that controlled input updates work.\n setMostRecentEventCount(event.nativeEvent.eventCount);\n };\n\n const _onSelectionChange = (event: SelectionChangeEvent) => {\n props.onSelectionChange && props.onSelectionChange(event);\n\n if (inputRef.current == null) {\n // calling `props.onSelectionChange`\n // may clean up the input itself. Exits here.\n return;\n }\n\n setLastNativeSelection({\n selection: event.nativeEvent.selection,\n mostRecentEventCount,\n });\n };\n\n const _onFocus = (event: FocusEvent) => {\n TextInputState.focusInput(inputRef.current);\n if (props.onFocus) {\n props.onFocus(event);\n }\n };\n\n const _onBlur = (event: BlurEvent) => {\n TextInputState.blurInput(inputRef.current);\n if (props.onBlur) {\n props.onBlur(event);\n }\n };\n\n const _onScroll = (event: ScrollEvent) => {\n props.onScroll && props.onScroll(event);\n };\n\n let textInput = null;\n\n const multiline = props.multiline ?? false;\n\n let submitBehavior: SubmitBehavior;\n if (props.submitBehavior != null) {\n // `submitBehavior` is set explicitly\n if (!multiline && props.submitBehavior === 'newline') {\n // For single line text inputs, `'newline'` is not a valid option\n submitBehavior = 'blurAndSubmit';\n } else {\n submitBehavior = props.submitBehavior;\n }\n } else if (multiline) {\n if (props.blurOnSubmit === true) {\n submitBehavior = 'blurAndSubmit';\n } else {\n submitBehavior = 'newline';\n }\n } else {\n // Single line\n if (props.blurOnSubmit !== false) {\n submitBehavior = 'blurAndSubmit';\n } else {\n submitBehavior = 'submit';\n }\n }\n\n const accessible = props.accessible !== false;\n const focusable = props.focusable !== false;\n\n const {\n editable,\n hitSlop,\n onPress,\n onPressIn,\n onPressOut,\n rejectResponderTermination,\n } = props;\n\n const config = React.useMemo(\n () => ({\n hitSlop,\n onPress: (event: PressEvent) => {\n onPress?.(event);\n if (editable !== false) {\n if (inputRef.current != null) {\n inputRef.current.focus();\n }\n }\n },\n onPressIn: onPressIn,\n onPressOut: onPressOut,\n cancelable: Platform.OS === 'ios' ? !rejectResponderTermination : null,\n }),\n [\n editable,\n hitSlop,\n onPress,\n onPressIn,\n onPressOut,\n rejectResponderTermination,\n ],\n );\n\n // Hide caret during test runs due to a flashing caret\n // makes screenshot tests flakey\n let caretHidden = props.caretHidden;\n if (Platform.isTesting) {\n caretHidden = true;\n }\n\n // TextInput handles onBlur and onFocus events\n // so omitting onBlur and onFocus pressability handlers here.\n const {onBlur, onFocus, ...eventHandlers} = usePressability(config) || {};\n\n let _accessibilityState;\n if (\n accessibilityState != null ||\n ariaBusy != null ||\n ariaChecked != null ||\n ariaDisabled != null ||\n ariaExpanded != null ||\n ariaSelected != null\n ) {\n _accessibilityState = {\n busy: ariaBusy ?? accessibilityState?.busy,\n checked: ariaChecked ?? accessibilityState?.checked,\n disabled: ariaDisabled ?? accessibilityState?.disabled,\n expanded: ariaExpanded ?? accessibilityState?.expanded,\n selected: ariaSelected ?? accessibilityState?.selected,\n };\n }\n\n const style = flattenStyle(props.style);\n\n if (typeof style?.fontWeight === 'number') {\n // $FlowFixMe[prop-missing]\n // $FlowFixMe[cannot-write]\n style.fontWeight = style?.fontWeight.toString();\n }\n\n if (Platform.OS === 'ios') {\n const RCTTextInputView =\n props.multiline === true\n ? RCTMultilineTextInputView\n : RCTSinglelineTextInputView;\n\n const useMultilineDefaultStyle =\n props.multiline === true &&\n (style == null ||\n (style.padding == null &&\n style.paddingVertical == null &&\n style.paddingTop == null));\n\n textInput = (\n \n );\n } else if (Platform.OS === 'android') {\n const autoCapitalize = props.autoCapitalize || 'sentences';\n const _accessibilityLabelledBy =\n props?.['aria-labelledby'] ?? props?.accessibilityLabelledBy;\n const placeholder = props.placeholder ?? '';\n let children = props.children;\n const childCount = React.Children.count(children);\n invariant(\n !(props.value != null && childCount),\n 'Cannot specify both value and children.',\n );\n if (childCount > 1) {\n children = {children};\n }\n // For consistency with iOS set cursor/selectionHandle color as selectionColor\n const colorProps = {\n selectionColor,\n selectionHandleColor:\n selectionHandleColor === undefined\n ? selectionColor\n : selectionHandleColor,\n cursorColor: cursorColor === undefined ? selectionColor : cursorColor,\n };\n textInput = (\n /* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match up\n * exactly with the props for TextInput. This will need to get fixed */\n /* $FlowFixMe[incompatible-type] the types for AndroidTextInput don't\n * match up exactly with the props for TextInput. This will need to get\n * fixed */\n /* $FlowFixMe[incompatible-type-arg] the types for AndroidTextInput don't\n * match up exactly with the props for TextInput. This will need to get\n * fixed */\n \n );\n }\n return (\n {textInput}\n );\n}\n\nconst enterKeyHintToReturnTypeMap = {\n enter: 'default',\n done: 'done',\n go: 'go',\n next: 'next',\n previous: 'previous',\n search: 'search',\n send: 'send',\n};\n\nconst inputModeToKeyboardTypeMap = {\n none: 'default',\n text: 'default',\n decimal: 'decimal-pad',\n numeric: 'number-pad',\n tel: 'phone-pad',\n search: Platform.OS === 'ios' ? 'web-search' : 'default',\n email: 'email-address',\n url: 'url',\n};\n\n// Map HTML autocomplete values to Android autoComplete values\nconst autoCompleteWebToAutoCompleteAndroidMap = {\n 'address-line1': 'postal-address-region',\n 'address-line2': 'postal-address-locality',\n bday: 'birthdate-full',\n 'bday-day': 'birthdate-day',\n 'bday-month': 'birthdate-month',\n 'bday-year': 'birthdate-year',\n 'cc-csc': 'cc-csc',\n 'cc-exp': 'cc-exp',\n 'cc-exp-month': 'cc-exp-month',\n 'cc-exp-year': 'cc-exp-year',\n 'cc-number': 'cc-number',\n country: 'postal-address-country',\n 'current-password': 'password',\n email: 'email',\n 'honorific-prefix': 'name-prefix',\n 'honorific-suffix': 'name-suffix',\n name: 'name',\n 'additional-name': 'name-middle',\n 'family-name': 'name-family',\n 'given-name': 'name-given',\n 'new-password': 'password-new',\n off: 'off',\n 'one-time-code': 'sms-otp',\n 'postal-code': 'postal-code',\n sex: 'gender',\n 'street-address': 'street-address',\n tel: 'tel',\n 'tel-country-code': 'tel-country-code',\n 'tel-national': 'tel-national',\n username: 'username',\n};\n\n// Map HTML autocomplete values to iOS textContentType values\nconst autoCompleteWebToTextContentTypeMap = {\n 'address-line1': 'streetAddressLine1',\n 'address-line2': 'streetAddressLine2',\n bday: 'birthdate',\n 'bday-day': 'birthdateDay',\n 'bday-month': 'birthdateMonth',\n 'bday-year': 'birthdateYear',\n 'cc-csc': 'creditCardSecurityCode',\n 'cc-exp-month': 'creditCardExpirationMonth',\n 'cc-exp-year': 'creditCardExpirationYear',\n 'cc-exp': 'creditCardExpiration',\n 'cc-given-name': 'creditCardGivenName',\n 'cc-additional-name': 'creditCardMiddleName',\n 'cc-family-name': 'creditCardFamilyName',\n 'cc-name': 'creditCardName',\n 'cc-number': 'creditCardNumber',\n 'cc-type': 'creditCardType',\n 'current-password': 'password',\n country: 'countryName',\n email: 'emailAddress',\n name: 'name',\n 'additional-name': 'middleName',\n 'family-name': 'familyName',\n 'given-name': 'givenName',\n nickname: 'nickname',\n 'honorific-prefix': 'namePrefix',\n 'honorific-suffix': 'nameSuffix',\n 'new-password': 'newPassword',\n off: 'none',\n 'one-time-code': 'oneTimeCode',\n organization: 'organizationName',\n 'organization-title': 'jobTitle',\n 'postal-code': 'postalCode',\n 'street-address': 'fullStreetAddress',\n tel: 'telephoneNumber',\n url: 'URL',\n username: 'username',\n};\n\nconst ExportedForwardRef: React.AbstractComponent<\n React.ElementConfig,\n TextInputInstance,\n // $FlowFixMe[incompatible-call]\n> = React.forwardRef(function TextInput(\n {\n allowFontScaling = true,\n rejectResponderTermination = true,\n underlineColorAndroid = 'transparent',\n autoComplete,\n textContentType,\n readOnly,\n editable,\n enterKeyHint,\n returnKeyType,\n inputMode,\n showSoftInputOnFocus,\n keyboardType,\n ...restProps\n },\n forwardedRef: ReactRefSetter,\n) {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n let style = flattenStyle(restProps.style);\n\n if (style?.verticalAlign != null) {\n // $FlowFixMe[prop-missing]\n // $FlowFixMe[cannot-write]\n style.textAlignVertical =\n // $FlowFixMe[invalid-computed-prop]\n verticalAlignToTextAlignVerticalMap[style.verticalAlign];\n // $FlowFixMe[prop-missing]\n // $FlowFixMe[cannot-write]\n delete style.verticalAlign;\n }\n\n return (\n \n );\n});\n\nExportedForwardRef.displayName = 'TextInput';\n\n// $FlowFixMe[prop-missing]\nExportedForwardRef.State = {\n currentlyFocusedInput: TextInputState.currentlyFocusedInput,\n\n currentlyFocusedField: TextInputState.currentlyFocusedField,\n focusTextInput: TextInputState.focusTextInput,\n blurTextInput: TextInputState.blurTextInput,\n};\n\nexport type TextInputComponentStatics = $ReadOnly<{|\n State: $ReadOnly<{|\n currentlyFocusedInput: typeof TextInputState.currentlyFocusedInput,\n currentlyFocusedField: typeof TextInputState.currentlyFocusedField,\n focusTextInput: typeof TextInputState.focusTextInput,\n blurTextInput: typeof TextInputState.blurTextInput,\n |}>,\n|}>;\n\nconst styles = StyleSheet.create({\n multilineDefault: {\n // This default top inset makes RCTMultilineTextInputView seem as close as possible\n // to single-line RCTSinglelineTextInputView defaults, using the system defaults\n // of font size 17 and a height of 31 points.\n paddingTop: 5,\n },\n});\n\nconst verticalAlignToTextAlignVerticalMap = {\n auto: 'auto',\n top: 'top',\n bottom: 'bottom',\n middle: 'center',\n};\n\n// $FlowFixMe[unclear-type] Unclear type. Using `any` type is not safe.\nmodule.exports = ((ExportedForwardRef: any): TextInputType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type {TextInputNativeCommands} from './TextInputNativeCommands';\n\nimport * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';\nimport codegenNativeCommands from '../../Utilities/codegenNativeCommands';\nimport RCTTextInputViewConfig from './RCTTextInputViewConfig';\n\ntype NativeType = HostComponent;\n\ntype NativeCommands = TextInputNativeCommands;\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['focus', 'blur', 'setTextAndSelection'],\n});\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {\n uiViewClassName: 'RCTSinglelineTextInputView',\n ...RCTTextInputViewConfig,\n};\n\nconst SinglelineTextInputNativeComponent: HostComponent =\n NativeComponentRegistry.get(\n 'RCTSinglelineTextInputView',\n () => __INTERNAL_VIEW_CONFIG,\n );\n\n// flowlint-next-line unclear-type:off\nexport default ((SinglelineTextInputNativeComponent: any): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {PartialViewConfig} from '../../Renderer/shims/ReactNativeTypes';\n\nimport {ConditionallyIgnoredEventHandlers} from '../../NativeComponent/ViewConfigIgnore';\n\ntype PartialViewConfigWithoutName = $Rest<\n PartialViewConfig,\n {uiViewClassName: string},\n>;\n\nconst RCTTextInputViewConfig = {\n bubblingEventTypes: {\n topBlur: {\n phasedRegistrationNames: {\n bubbled: 'onBlur',\n captured: 'onBlurCapture',\n },\n },\n topChange: {\n phasedRegistrationNames: {\n bubbled: 'onChange',\n captured: 'onChangeCapture',\n },\n },\n topEndEditing: {\n phasedRegistrationNames: {\n bubbled: 'onEndEditing',\n captured: 'onEndEditingCapture',\n },\n },\n topFocus: {\n phasedRegistrationNames: {\n bubbled: 'onFocus',\n captured: 'onFocusCapture',\n },\n },\n topKeyPress: {\n phasedRegistrationNames: {\n bubbled: 'onKeyPress',\n captured: 'onKeyPressCapture',\n },\n },\n topSubmitEditing: {\n phasedRegistrationNames: {\n bubbled: 'onSubmitEditing',\n captured: 'onSubmitEditingCapture',\n },\n },\n topTouchCancel: {\n phasedRegistrationNames: {\n bubbled: 'onTouchCancel',\n captured: 'onTouchCancelCapture',\n },\n },\n topTouchEnd: {\n phasedRegistrationNames: {\n bubbled: 'onTouchEnd',\n captured: 'onTouchEndCapture',\n },\n },\n\n topTouchMove: {\n phasedRegistrationNames: {\n bubbled: 'onTouchMove',\n captured: 'onTouchMoveCapture',\n },\n },\n },\n directEventTypes: {\n topScroll: {\n registrationName: 'onScroll',\n },\n topSelectionChange: {\n registrationName: 'onSelectionChange',\n },\n topContentSizeChange: {\n registrationName: 'onContentSizeChange',\n },\n },\n validAttributes: {\n fontSize: true,\n fontWeight: true,\n fontVariant: true,\n // flowlint-next-line untyped-import:off\n textShadowOffset: {diff: require('../../Utilities/differ/sizesDiffer')},\n allowFontScaling: true,\n fontStyle: true,\n textTransform: true,\n textAlign: true,\n fontFamily: true,\n lineHeight: true,\n isHighlighted: true,\n writingDirection: true,\n textDecorationLine: true,\n textShadowRadius: true,\n letterSpacing: true,\n textDecorationStyle: true,\n textDecorationColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n color: {process: require('../../StyleSheet/processColor').default},\n maxFontSizeMultiplier: true,\n textShadowColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n editable: true,\n inputAccessoryViewID: true,\n caretHidden: true,\n enablesReturnKeyAutomatically: true,\n placeholderTextColor: {\n process: require('../../StyleSheet/processColor').default,\n },\n clearButtonMode: true,\n keyboardType: true,\n selection: true,\n returnKeyType: true,\n submitBehavior: true,\n mostRecentEventCount: true,\n scrollEnabled: true,\n selectionColor: {process: require('../../StyleSheet/processColor').default},\n contextMenuHidden: true,\n secureTextEntry: true,\n placeholder: true,\n autoCorrect: true,\n multiline: true,\n textContentType: true,\n maxLength: true,\n autoCapitalize: true,\n keyboardAppearance: true,\n passwordRules: true,\n spellCheck: true,\n selectTextOnFocus: true,\n text: true,\n clearTextOnFocus: true,\n showSoftInputOnFocus: true,\n autoFocus: true,\n lineBreakStrategyIOS: true,\n smartInsertDelete: true,\n ...ConditionallyIgnoredEventHandlers({\n onChange: true,\n onSelectionChange: true,\n onContentSizeChange: true,\n onScroll: true,\n }),\n },\n};\n\nmodule.exports = (RCTTextInputViewConfig: PartialViewConfigWithoutName);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n HostComponent,\n PartialViewConfig,\n} from '../../Renderer/shims/ReactNativeTypes';\nimport type {TextInputNativeCommands} from './TextInputNativeCommands';\n\nimport * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';\nimport codegenNativeCommands from '../../Utilities/codegenNativeCommands';\nimport RCTTextInputViewConfig from './RCTTextInputViewConfig';\n\ntype NativeType = HostComponent;\n\ntype NativeCommands = TextInputNativeCommands;\n\nexport const Commands: NativeCommands = codegenNativeCommands({\n supportedCommands: ['focus', 'blur', 'setTextAndSelection'],\n});\n\nexport const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {\n uiViewClassName: 'RCTMultilineTextInputView',\n ...RCTTextInputViewConfig,\n validAttributes: {\n ...RCTTextInputViewConfig.validAttributes,\n dataDetectorTypes: true,\n },\n};\n\nconst MultilineTextInputNativeComponent: HostComponent =\n NativeComponentRegistry.get(\n 'RCTMultilineTextInputView',\n () => __INTERNAL_VIEW_CONFIG,\n );\n\n// flowlint-next-line unclear-type:off\nexport default ((MultilineTextInputNativeComponent: any): HostComponent);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\nimport type {PressEvent} from '../../Types/CoreEventTypes';\n\nimport {PressabilityDebugView} from '../../Pressability/PressabilityDebug';\nimport UIManager from '../../ReactNative/UIManager';\nimport Platform from '../../Utilities/Platform';\nimport SoundManager from '../Sound/SoundManager';\nimport BoundingDimensions from './BoundingDimensions';\nimport Position from './Position';\nimport * as React from 'react';\n\nconst extractSingleTouch = (nativeEvent: {\n +changedTouches: $ReadOnlyArray,\n +force?: number,\n +identifier: number,\n +locationX: number,\n +locationY: number,\n +pageX: number,\n +pageY: number,\n +target: ?number,\n +timestamp: number,\n +touches: $ReadOnlyArray,\n}) => {\n const touches = nativeEvent.touches;\n const changedTouches = nativeEvent.changedTouches;\n const hasTouches = touches && touches.length > 0;\n const hasChangedTouches = changedTouches && changedTouches.length > 0;\n\n return !hasTouches && hasChangedTouches\n ? changedTouches[0]\n : hasTouches\n ? touches[0]\n : nativeEvent;\n};\n\n/**\n * `Touchable`: Taps done right.\n *\n * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable`\n * will measure time/geometry and tells you when to give feedback to the user.\n *\n * ====================== Touchable Tutorial ===============================\n * The `Touchable` mixin helps you handle the \"press\" interaction. It analyzes\n * the geometry of elements, and observes when another responder (scroll view\n * etc) has stolen the touch lock. It notifies your component when it should\n * give feedback to the user. (bouncing/highlighting/unhighlighting).\n *\n * - When a touch was activated (typically you highlight)\n * - When a touch was deactivated (typically you unhighlight)\n * - When a touch was \"pressed\" - a touch ended while still within the geometry\n * of the element, and no other element (like scroller) has \"stolen\" touch\n * lock (\"responder\") (Typically you bounce the element).\n *\n * A good tap interaction isn't as simple as you might think. There should be a\n * slight delay before showing a highlight when starting a touch. If a\n * subsequent touch move exceeds the boundary of the element, it should\n * unhighlight, but if that same touch is brought back within the boundary, it\n * should rehighlight again. A touch can move in and out of that boundary\n * several times, each time toggling highlighting, but a \"press\" is only\n * triggered if that touch ends while within the element's boundary and no\n * scroller (or anything else) has stolen the lock on touches.\n *\n * To create a new type of component that handles interaction using the\n * `Touchable` mixin, do the following:\n *\n * - Initialize the `Touchable` state.\n *\n * getInitialState: function() {\n * return merge(this.touchableGetInitialState(), yourComponentState);\n * }\n *\n * - Choose the rendered component who's touches should start the interactive\n * sequence. On that rendered node, forward all `Touchable` responder\n * handlers. You can choose any rendered node you like. Choose a node whose\n * hit target you'd like to instigate the interaction sequence:\n *\n * // In render function:\n * return (\n * \n * \n * Even though the hit detection/interactions are triggered by the\n * wrapping (typically larger) node, we usually end up implementing\n * custom logic that highlights this inner one.\n * \n * \n * );\n *\n * - You may set up your own handlers for each of these events, so long as you\n * also invoke the `touchable*` handlers inside of your custom handler.\n *\n * - Implement the handlers on your component class in order to provide\n * feedback to the user. See documentation for each of these class methods\n * that you should implement.\n *\n * touchableHandlePress: function() {\n * this.performBounceAnimation(); // or whatever you want to do.\n * },\n * touchableHandleActivePressIn: function() {\n * this.beginHighlighting(...); // Whatever you like to convey activation\n * },\n * touchableHandleActivePressOut: function() {\n * this.endHighlighting(...); // Whatever you like to convey deactivation\n * },\n *\n * - There are more advanced methods you can implement (see documentation below):\n * touchableGetHighlightDelayMS: function() {\n * return 20;\n * }\n * // In practice, *always* use a predeclared constant (conserve memory).\n * touchableGetPressRectOffset: function() {\n * return {top: 20, left: 20, right: 20, bottom: 100};\n * }\n */\n\n/**\n * Touchable states.\n */\n\nconst States = {\n NOT_RESPONDER: 'NOT_RESPONDER', // Not the responder\n RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN', // Responder, inactive, in the `PressRect`\n RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT', // Responder, inactive, out of `PressRect`\n RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN', // Responder, active, in the `PressRect`\n RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT', // Responder, active, out of `PressRect`\n RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN', // Responder, active, in the `PressRect`, after long press threshold\n RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT', // Responder, active, out of `PressRect`, after long press threshold\n ERROR: 'ERROR',\n};\n\ntype State =\n | typeof States.NOT_RESPONDER\n | typeof States.RESPONDER_INACTIVE_PRESS_IN\n | typeof States.RESPONDER_INACTIVE_PRESS_OUT\n | typeof States.RESPONDER_ACTIVE_PRESS_IN\n | typeof States.RESPONDER_ACTIVE_PRESS_OUT\n | typeof States.RESPONDER_ACTIVE_LONG_PRESS_IN\n | typeof States.RESPONDER_ACTIVE_LONG_PRESS_OUT\n | typeof States.ERROR;\n\n/*\n * Quick lookup map for states that are considered to be \"active\"\n */\n\nconst baseStatesConditions = {\n NOT_RESPONDER: false,\n RESPONDER_INACTIVE_PRESS_IN: false,\n RESPONDER_INACTIVE_PRESS_OUT: false,\n RESPONDER_ACTIVE_PRESS_IN: false,\n RESPONDER_ACTIVE_PRESS_OUT: false,\n RESPONDER_ACTIVE_LONG_PRESS_IN: false,\n RESPONDER_ACTIVE_LONG_PRESS_OUT: false,\n ERROR: false,\n};\n\nconst IsActive = {\n ...baseStatesConditions,\n RESPONDER_ACTIVE_PRESS_OUT: true,\n RESPONDER_ACTIVE_PRESS_IN: true,\n};\n\n/**\n * Quick lookup for states that are considered to be \"pressing\" and are\n * therefore eligible to result in a \"selection\" if the press stops.\n */\nconst IsPressingIn = {\n ...baseStatesConditions,\n RESPONDER_INACTIVE_PRESS_IN: true,\n RESPONDER_ACTIVE_PRESS_IN: true,\n RESPONDER_ACTIVE_LONG_PRESS_IN: true,\n};\n\nconst IsLongPressingIn = {\n ...baseStatesConditions,\n RESPONDER_ACTIVE_LONG_PRESS_IN: true,\n};\n\n/**\n * Inputs to the state machine.\n */\nconst Signals = {\n DELAY: 'DELAY',\n RESPONDER_GRANT: 'RESPONDER_GRANT',\n RESPONDER_RELEASE: 'RESPONDER_RELEASE',\n RESPONDER_TERMINATED: 'RESPONDER_TERMINATED',\n ENTER_PRESS_RECT: 'ENTER_PRESS_RECT',\n LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT',\n LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED',\n};\n\ntype Signal =\n | typeof Signals.DELAY\n | typeof Signals.RESPONDER_GRANT\n | typeof Signals.RESPONDER_RELEASE\n | typeof Signals.RESPONDER_TERMINATED\n | typeof Signals.ENTER_PRESS_RECT\n | typeof Signals.LEAVE_PRESS_RECT\n | typeof Signals.LONG_PRESS_DETECTED;\n\n/**\n * Mapping from States x Signals => States\n */\nconst Transitions = {\n NOT_RESPONDER: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,\n RESPONDER_RELEASE: States.ERROR,\n RESPONDER_TERMINATED: States.ERROR,\n ENTER_PRESS_RECT: States.ERROR,\n LEAVE_PRESS_RECT: States.ERROR,\n LONG_PRESS_DETECTED: States.ERROR,\n },\n RESPONDER_INACTIVE_PRESS_IN: {\n DELAY: States.RESPONDER_ACTIVE_PRESS_IN,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR,\n },\n RESPONDER_INACTIVE_PRESS_OUT: {\n DELAY: States.RESPONDER_ACTIVE_PRESS_OUT,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR,\n },\n RESPONDER_ACTIVE_PRESS_IN: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n },\n RESPONDER_ACTIVE_PRESS_OUT: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR,\n },\n RESPONDER_ACTIVE_LONG_PRESS_IN: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,\n LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n },\n RESPONDER_ACTIVE_LONG_PRESS_OUT: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR,\n },\n error: {\n DELAY: States.NOT_RESPONDER,\n RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.NOT_RESPONDER,\n LEAVE_PRESS_RECT: States.NOT_RESPONDER,\n LONG_PRESS_DETECTED: States.NOT_RESPONDER,\n },\n};\n\n// ==== Typical Constants for integrating into UI components ====\n// var HIT_EXPAND_PX = 20;\n// var HIT_VERT_OFFSET_PX = 10;\nconst HIGHLIGHT_DELAY_MS = 130;\n\nconst PRESS_EXPAND_PX = 20;\n\nconst LONG_PRESS_THRESHOLD = 500;\n\nconst LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS;\n\nconst LONG_PRESS_ALLOWED_MOVEMENT = 10;\n\n// Default amount \"active\" region protrudes beyond box\n\n/**\n * By convention, methods prefixed with underscores are meant to be @private,\n * and not @protected. Mixers shouldn't access them - not even to provide them\n * as callback handlers.\n *\n *\n * ========== Geometry =========\n * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect`\n * is an abstract box that is extended beyond the `HitRect`.\n *\n * +--------------------------+\n * | | - \"Start\" events in `HitRect` cause `HitRect`\n * | +--------------------+ | to become the responder.\n * | | +--------------+ | | - `HitRect` is typically expanded around\n * | | | | | | the `VisualRect`, but shifted downward.\n * | | | VisualRect | | | - After pressing down, after some delay,\n * | | | | | | and before letting up, the Visual React\n * | | +--------------+ | | will become \"active\". This makes it eligible\n * | | HitRect | | for being highlighted (so long as the\n * | +--------------------+ | press remains in the `PressRect`).\n * | PressRect o |\n * +----------------------|---+\n * Out Region |\n * +-----+ This gap between the `HitRect` and\n * `PressRect` allows a touch to move far away\n * from the original hit rect, and remain\n * highlighted, and eligible for a \"Press\".\n * Customize this via\n * `touchableGetPressRectOffset()`.\n *\n *\n *\n * ======= State Machine =======\n *\n * +-------------+ <---+ RESPONDER_RELEASE\n * |NOT_RESPONDER|\n * +-------------+ <---+ RESPONDER_TERMINATED\n * +\n * | RESPONDER_GRANT (HitRect)\n * v\n * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+\n * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN|\n * +---------------------------+ +-------------------------+ +------------------------------+\n * + ^ + ^ + ^\n * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_\n * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT\n * | | | | | |\n * v + v + v +\n * +----------------------------+ DELAY +--------------------------+ +-------------------------------+\n * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT|\n * +----------------------------+ +--------------------------+ +-------------------------------+\n *\n * T + DELAY => LONG_PRESS_DELAY_MS + DELAY\n *\n * Not drawn are the side effects of each transition. The most important side\n * effect is the `touchableHandlePress` abstract method invocation that occurs\n * when a responder is released while in either of the \"Press\" states.\n *\n * The other important side effects are the highlight abstract method\n * invocations (internal callbacks) to be implemented by the mixer.\n *\n *\n * @lends Touchable.prototype\n */\nconst TouchableMixin = {\n componentDidMount: function () {\n if (!Platform.isTV) {\n return;\n }\n },\n\n /**\n * Clear all timeouts on unmount\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n componentWillUnmount: function () {\n this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);\n this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);\n this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);\n },\n\n /**\n * It's prefer that mixins determine state in this way, having the class\n * explicitly mix the state in the one and only `getInitialState` method.\n *\n * @return {object} State object to be placed inside of\n * `this.state.touchable`.\n */\n touchableGetInitialState: function (): {\n touchable: {\n touchState: ?State,\n responderID: ?PressEvent['currentTarget'],\n },\n } {\n return {\n touchable: {touchState: undefined, responderID: null},\n };\n },\n\n // ==== Hooks to Gesture Responder system ====\n /**\n * Must return true if embedded in a native platform scroll view.\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n touchableHandleResponderTerminationRequest: function (): any {\n return !this.props.rejectResponderTermination;\n },\n\n /**\n * Must return true to start the process of `Touchable`.\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n touchableHandleStartShouldSetResponder: function (): any {\n return !this.props.disabled;\n },\n\n /**\n * Return true to cancel press on long press.\n */\n touchableLongPressCancelsPress: function (): boolean {\n return true;\n },\n\n /**\n * Place as callback for a DOM element's `onResponderGrant` event.\n * @param {SyntheticEvent} e Synthetic event from event system.\n *\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n touchableHandleResponderGrant: function (e: PressEvent) {\n const dispatchID = e.currentTarget;\n // Since e is used in a callback invoked on another event loop\n // (as in setTimeout etc), we need to call e.persist() on the\n // event to make sure it doesn't get reused in the event object pool.\n e.persist();\n\n this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);\n this.pressOutDelayTimeout = null;\n\n this.state.touchable.touchState = States.NOT_RESPONDER;\n this.state.touchable.responderID = dispatchID;\n this._receiveSignal(Signals.RESPONDER_GRANT, e);\n let delayMS =\n this.touchableGetHighlightDelayMS !== undefined\n ? Math.max(this.touchableGetHighlightDelayMS(), 0)\n : HIGHLIGHT_DELAY_MS;\n delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS;\n if (delayMS !== 0) {\n this.touchableDelayTimeout = setTimeout(\n this._handleDelay.bind(this, e),\n delayMS,\n );\n } else {\n this._handleDelay(e);\n }\n\n let longDelayMS =\n this.touchableGetLongPressDelayMS !== undefined\n ? Math.max(this.touchableGetLongPressDelayMS(), 10)\n : LONG_PRESS_DELAY_MS;\n longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS;\n this.longPressDelayTimeout = setTimeout(\n this._handleLongDelay.bind(this, e),\n longDelayMS + delayMS,\n );\n },\n\n /**\n * Place as callback for a DOM element's `onResponderRelease` event.\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n touchableHandleResponderRelease: function (e: PressEvent) {\n this.pressInLocation = null;\n this._receiveSignal(Signals.RESPONDER_RELEASE, e);\n },\n\n /**\n * Place as callback for a DOM element's `onResponderTerminate` event.\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n touchableHandleResponderTerminate: function (e: PressEvent) {\n this.pressInLocation = null;\n this._receiveSignal(Signals.RESPONDER_TERMINATED, e);\n },\n\n /**\n * Place as callback for a DOM element's `onResponderMove` event.\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n touchableHandleResponderMove: function (e: PressEvent) {\n // Measurement may not have returned yet.\n if (!this.state.touchable.positionOnActivate) {\n return;\n }\n\n const positionOnActivate = this.state.touchable.positionOnActivate;\n const dimensionsOnActivate = this.state.touchable.dimensionsOnActivate;\n const pressRectOffset = this.touchableGetPressRectOffset\n ? this.touchableGetPressRectOffset()\n : {\n left: PRESS_EXPAND_PX,\n right: PRESS_EXPAND_PX,\n top: PRESS_EXPAND_PX,\n bottom: PRESS_EXPAND_PX,\n };\n\n let pressExpandLeft = pressRectOffset.left;\n let pressExpandTop = pressRectOffset.top;\n let pressExpandRight = pressRectOffset.right;\n let pressExpandBottom = pressRectOffset.bottom;\n\n const hitSlop = this.touchableGetHitSlop\n ? this.touchableGetHitSlop()\n : null;\n\n if (hitSlop) {\n pressExpandLeft += hitSlop.left || 0;\n pressExpandTop += hitSlop.top || 0;\n pressExpandRight += hitSlop.right || 0;\n pressExpandBottom += hitSlop.bottom || 0;\n }\n\n const touch = extractSingleTouch(e.nativeEvent);\n const pageX = touch && touch.pageX;\n const pageY = touch && touch.pageY;\n\n if (this.pressInLocation) {\n const movedDistance = this._getDistanceBetweenPoints(\n pageX,\n pageY,\n this.pressInLocation.pageX,\n this.pressInLocation.pageY,\n );\n if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) {\n this._cancelLongPressDelayTimeout();\n }\n }\n\n const isTouchWithinActive =\n pageX > positionOnActivate.left - pressExpandLeft &&\n pageY > positionOnActivate.top - pressExpandTop &&\n pageX <\n positionOnActivate.left +\n dimensionsOnActivate.width +\n pressExpandRight &&\n pageY <\n positionOnActivate.top +\n dimensionsOnActivate.height +\n pressExpandBottom;\n if (isTouchWithinActive) {\n const prevState = this.state.touchable.touchState;\n this._receiveSignal(Signals.ENTER_PRESS_RECT, e);\n const curState = this.state.touchable.touchState;\n if (\n curState === States.RESPONDER_INACTIVE_PRESS_IN &&\n prevState !== States.RESPONDER_INACTIVE_PRESS_IN\n ) {\n // fix for t7967420\n this._cancelLongPressDelayTimeout();\n }\n } else {\n this._cancelLongPressDelayTimeout();\n this._receiveSignal(Signals.LEAVE_PRESS_RECT, e);\n }\n },\n\n /**\n * Invoked when the item receives focus. Mixers might override this to\n * visually distinguish the `VisualRect` so that the user knows that it\n * currently has the focus. Most platforms only support a single element being\n * focused at a time, in which case there may have been a previously focused\n * element that was blurred just prior to this. This can be overridden when\n * using `Touchable.Mixin.withoutDefaultFocusAndBlur`.\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n touchableHandleFocus: function (e: Event) {\n this.props.onFocus && this.props.onFocus(e);\n },\n\n /**\n * Invoked when the item loses focus. Mixers might override this to\n * visually distinguish the `VisualRect` so that the user knows that it\n * no longer has focus. Most platforms only support a single element being\n * focused at a time, in which case the focus may have moved to another.\n * This can be overridden when using\n * `Touchable.Mixin.withoutDefaultFocusAndBlur`.\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n touchableHandleBlur: function (e: Event) {\n this.props.onBlur && this.props.onBlur(e);\n },\n\n // ==== Abstract Application Callbacks ====\n\n /**\n * Invoked when the item should be highlighted. Mixers should implement this\n * to visually distinguish the `VisualRect` so that the user knows that\n * releasing a touch will result in a \"selection\" (analog to click).\n *\n * @abstract\n * touchableHandleActivePressIn: function,\n */\n\n /**\n * Invoked when the item is \"active\" (in that it is still eligible to become\n * a \"select\") but the touch has left the `PressRect`. Usually the mixer will\n * want to unhighlight the `VisualRect`. If the user (while pressing) moves\n * back into the `PressRect` `touchableHandleActivePressIn` will be invoked\n * again and the mixer should probably highlight the `VisualRect` again. This\n * event will not fire on an `touchEnd/mouseUp` event, only move events while\n * the user is depressing the mouse/touch.\n *\n * @abstract\n * touchableHandleActivePressOut: function\n */\n\n /**\n * Invoked when the item is \"selected\" - meaning the interaction ended by\n * letting up while the item was either in the state\n * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`.\n *\n * @abstract\n * touchableHandlePress: function\n */\n\n /**\n * Invoked when the item is long pressed - meaning the interaction ended by\n * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If\n * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will\n * be called as it normally is. If `touchableHandleLongPress` is provided, by\n * default any `touchableHandlePress` callback will not be invoked. To\n * override this default behavior, override `touchableLongPressCancelsPress`\n * to return false. As a result, `touchableHandlePress` will be called when\n * lifting up, even if `touchableHandleLongPress` has also been called.\n *\n * @abstract\n * touchableHandleLongPress: function\n */\n\n /**\n * Returns the number of millis to wait before triggering a highlight.\n *\n * @abstract\n * touchableGetHighlightDelayMS: function\n */\n\n /**\n * Returns the amount to extend the `HitRect` into the `PressRect`. Positive\n * numbers mean the size expands outwards.\n *\n * @abstract\n * touchableGetPressRectOffset: function\n */\n\n // ==== Internal Logic ====\n\n /**\n * Measures the `HitRect` node on activation. The Bounding rectangle is with\n * respect to viewport - not page, so adding the `pageXOffset/pageYOffset`\n * should result in points that are in the same coordinate system as an\n * event's `globalX/globalY` data values.\n *\n * - Consider caching this for the lifetime of the component, or possibly\n * being able to share this cache between any `ScrollMap` view.\n *\n * @sideeffects\n * @private\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _remeasureMetricsOnActivation: function () {\n const responderID = this.state.touchable.responderID;\n if (responderID == null) {\n return;\n }\n\n if (typeof responderID === 'number') {\n UIManager.measure(responderID, this._handleQueryLayout);\n } else {\n responderID.measure(this._handleQueryLayout);\n }\n },\n\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _handleQueryLayout: function (\n l: number,\n t: number,\n w: number,\n h: number,\n globalX: number,\n globalY: number,\n ) {\n //don't do anything UIManager failed to measure node\n if (!l && !t && !w && !h && !globalX && !globalY) {\n return;\n }\n this.state.touchable.positionOnActivate &&\n Position.release(this.state.touchable.positionOnActivate);\n this.state.touchable.dimensionsOnActivate &&\n BoundingDimensions.release(this.state.touchable.dimensionsOnActivate);\n this.state.touchable.positionOnActivate = Position.getPooled(\n globalX,\n globalY,\n );\n this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(\n w,\n h,\n );\n },\n\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _handleDelay: function (e: PressEvent) {\n this.touchableDelayTimeout = null;\n this._receiveSignal(Signals.DELAY, e);\n },\n\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _handleLongDelay: function (e: PressEvent) {\n this.longPressDelayTimeout = null;\n const curState = this.state.touchable.touchState;\n if (\n curState === States.RESPONDER_ACTIVE_PRESS_IN ||\n curState === States.RESPONDER_ACTIVE_LONG_PRESS_IN\n ) {\n this._receiveSignal(Signals.LONG_PRESS_DETECTED, e);\n }\n },\n\n /**\n * Receives a state machine signal, performs side effects of the transition\n * and stores the new state. Validates the transition as well.\n *\n * @param {Signals} signal State machine signal.\n * @throws Error if invalid state transition or unrecognized signal.\n * @sideeffects\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _receiveSignal: function (signal: Signal, e: PressEvent) {\n const responderID = this.state.touchable.responderID;\n const curState = this.state.touchable.touchState;\n const nextState = Transitions[curState] && Transitions[curState][signal];\n if (!responderID && signal === Signals.RESPONDER_RELEASE) {\n return;\n }\n if (!nextState) {\n throw new Error(\n 'Unrecognized signal `' +\n signal +\n '` or state `' +\n curState +\n '` for Touchable responder `' +\n typeof this.state.touchable.responderID ===\n 'number'\n ? this.state.touchable.responderID\n : 'host component' + '`',\n );\n }\n if (nextState === States.ERROR) {\n throw new Error(\n 'Touchable cannot transition from `' +\n curState +\n '` to `' +\n signal +\n '` for responder `' +\n typeof this.state.touchable.responderID ===\n 'number'\n ? this.state.touchable.responderID\n : '<>' + '`',\n );\n }\n if (curState !== nextState) {\n this._performSideEffectsForTransition(curState, nextState, signal, e);\n this.state.touchable.touchState = nextState;\n }\n },\n\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _cancelLongPressDelayTimeout: function () {\n this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);\n this.longPressDelayTimeout = null;\n },\n\n _isHighlight: function (state: State): boolean {\n return (\n state === States.RESPONDER_ACTIVE_PRESS_IN ||\n state === States.RESPONDER_ACTIVE_LONG_PRESS_IN\n );\n },\n\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _savePressInLocation: function (e: PressEvent) {\n const touch = extractSingleTouch(e.nativeEvent);\n const pageX = touch && touch.pageX;\n const pageY = touch && touch.pageY;\n const locationX = touch && touch.locationX;\n const locationY = touch && touch.locationY;\n this.pressInLocation = {pageX, pageY, locationX, locationY};\n },\n\n _getDistanceBetweenPoints: function (\n aX: number,\n aY: number,\n bX: number,\n bY: number,\n ): number {\n const deltaX = aX - bX;\n const deltaY = aY - bY;\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n },\n\n /**\n * Will perform a transition between touchable states, and identify any\n * highlighting or unhighlighting that must be performed for this particular\n * transition.\n *\n * @param {States} curState Current Touchable state.\n * @param {States} nextState Next Touchable state.\n * @param {Signal} signal Signal that triggered the transition.\n * @param {Event} e Native event.\n * @sideeffects\n */\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _performSideEffectsForTransition: function (\n curState: State,\n nextState: State,\n signal: Signal,\n e: PressEvent,\n ) {\n const curIsHighlight = this._isHighlight(curState);\n const newIsHighlight = this._isHighlight(nextState);\n\n const isFinalSignal =\n signal === Signals.RESPONDER_TERMINATED ||\n signal === Signals.RESPONDER_RELEASE;\n\n if (isFinalSignal) {\n this._cancelLongPressDelayTimeout();\n }\n\n const isInitialTransition =\n curState === States.NOT_RESPONDER &&\n nextState === States.RESPONDER_INACTIVE_PRESS_IN;\n\n const isActiveTransition = !IsActive[curState] && IsActive[nextState];\n if (isInitialTransition || isActiveTransition) {\n this._remeasureMetricsOnActivation();\n }\n\n if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) {\n this.touchableHandleLongPress && this.touchableHandleLongPress(e);\n }\n\n if (newIsHighlight && !curIsHighlight) {\n this._startHighlight(e);\n } else if (!newIsHighlight && curIsHighlight) {\n this._endHighlight(e);\n }\n\n if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) {\n const hasLongPressHandler = !!this.props.onLongPress;\n const pressIsLongButStillCallOnPress =\n IsLongPressingIn[curState] && // We *are* long pressing.. // But either has no long handler\n (!hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it.\n\n const shouldInvokePress =\n !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress;\n if (shouldInvokePress && this.touchableHandlePress) {\n if (!newIsHighlight && !curIsHighlight) {\n // we never highlighted because of delay, but we should highlight now\n this._startHighlight(e);\n this._endHighlight(e);\n }\n if (Platform.OS === 'android' && !this.props.touchSoundDisabled) {\n SoundManager.playTouchSound();\n }\n this.touchableHandlePress(e);\n }\n }\n\n this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);\n this.touchableDelayTimeout = null;\n },\n\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _startHighlight: function (e: PressEvent) {\n this._savePressInLocation(e);\n this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);\n },\n\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n _endHighlight: function (e: PressEvent) {\n if (this.touchableHandleActivePressOut) {\n if (\n this.touchableGetPressOutDelayMS &&\n this.touchableGetPressOutDelayMS()\n ) {\n this.pressOutDelayTimeout = setTimeout(() => {\n this.touchableHandleActivePressOut(e);\n }, this.touchableGetPressOutDelayMS());\n } else {\n this.touchableHandleActivePressOut(e);\n }\n }\n },\n\n withoutDefaultFocusAndBlur: ({}: {...}),\n};\n\n/**\n * Provide an optional version of the mixin where `touchableHandleFocus` and\n * `touchableHandleBlur` can be overridden. This allows appropriate defaults to\n * be set on TV platforms, without breaking existing implementations of\n * `Touchable`.\n */\nconst {\n touchableHandleFocus,\n touchableHandleBlur,\n ...TouchableMixinWithoutDefaultFocusAndBlur\n} = TouchableMixin;\nTouchableMixin.withoutDefaultFocusAndBlur =\n TouchableMixinWithoutDefaultFocusAndBlur;\n\nconst Touchable = {\n Mixin: TouchableMixin,\n /**\n * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android).\n */\n renderDebugView: ({\n color,\n hitSlop,\n }: {\n color: ColorValue,\n hitSlop: EdgeInsetsProp,\n ...\n }): null | React.Node => {\n if (__DEV__) {\n return ;\n }\n return null;\n },\n};\n\nexport default Touchable;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\n'use strict';\nimport PooledClass from './PooledClass';\n\nconst twoArgumentPooler = PooledClass.twoArgumentPooler;\n\n/**\n * PooledClass representing the bounding rectangle of a region.\n *\n * @param {number} width Width of bounding rectangle.\n * @param {number} height Height of bounding rectangle.\n * @constructor BoundingDimensions\n */\nfunction BoundingDimensions(width, height) {\n this.width = width;\n this.height = height;\n}\n\nBoundingDimensions.prototype.destructor = function () {\n this.width = null;\n this.height = null;\n};\n\n/**\n * @param {HTMLElement} element Element to return `BoundingDimensions` for.\n * @return {BoundingDimensions} Bounding dimensions of `element`.\n */\nBoundingDimensions.getPooledFromElement = function (element) {\n return BoundingDimensions.getPooled(\n element.offsetWidth,\n element.offsetHeight,\n );\n};\n\nPooledClass.addPoolingTo(BoundingDimensions, twoArgumentPooler);\n\nmodule.exports = BoundingDimensions;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\nimport invariant from 'invariant';\n\n/**\n * Static poolers. Several custom versions for each potential number of\n * arguments. A completely generic pooler is easy to implement, but would\n * require accessing the `arguments` object. In each of these, `this` refers to\n * the Class itself, not an instance. If any others are needed, simply add them\n * here, or in their own files.\n */\n/* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\nconst oneArgumentPooler = function (copyFieldsFrom: any) {\n const Klass = this; // eslint-disable-line consistent-this\n if (Klass.instancePool.length) {\n const instance = Klass.instancePool.pop();\n Klass.call(instance, copyFieldsFrom);\n return instance;\n } else {\n return new Klass(copyFieldsFrom);\n }\n};\n\n/* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\nconst twoArgumentPooler = function (a1: any, a2: any) {\n const Klass = this; // eslint-disable-line consistent-this\n if (Klass.instancePool.length) {\n const instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\n\n/* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\nconst threeArgumentPooler = function (a1: any, a2: any, a3: any) {\n const Klass = this; // eslint-disable-line consistent-this\n if (Klass.instancePool.length) {\n const instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3);\n return instance;\n } else {\n return new Klass(a1, a2, a3);\n }\n};\n\n/* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\nconst fourArgumentPooler = function (a1: any, a2: any, a3: any, a4: any) {\n const Klass = this; // eslint-disable-line consistent-this\n if (Klass.instancePool.length) {\n const instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2, a3, a4);\n return instance;\n } else {\n return new Klass(a1, a2, a3, a4);\n }\n};\n\n/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n/* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\nconst standardReleaser = function (instance) {\n const Klass = this; // eslint-disable-line consistent-this\n invariant(\n instance instanceof Klass,\n 'Trying to release an instance into a pool of a different type.',\n );\n instance.destructor();\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\n\nconst DEFAULT_POOL_SIZE = 10;\nconst DEFAULT_POOLER = oneArgumentPooler;\n\ntype Pooler = any;\n\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\nconst addPoolingTo = function (\n CopyConstructor: Class,\n pooler: Pooler,\n): Class & {\n getPooled(\n ...args: $ReadOnlyArray\n ): /* arguments of the constructor */ T,\n release(instance: mixed): void,\n ...\n} {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n const NewKlass: any = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\n\nconst PooledClass = {\n addPoolingTo: addPoolingTo,\n oneArgumentPooler: (oneArgumentPooler: Pooler),\n twoArgumentPooler: (twoArgumentPooler: Pooler),\n threeArgumentPooler: (threeArgumentPooler: Pooler),\n fourArgumentPooler: (fourArgumentPooler: Pooler),\n};\n\nmodule.exports = PooledClass;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\n'use strict';\nimport PooledClass from './PooledClass';\n\nconst twoArgumentPooler = PooledClass.twoArgumentPooler;\n\n/**\n * Position does not expose methods for construction via an `HTMLDOMElement`,\n * because it isn't meaningful to construct such a thing without first defining\n * a frame of reference.\n *\n * @param {number} windowStartKey Key that window starts at.\n * @param {number} windowEndKey Key that window ends at.\n */\nfunction Position(left, top) {\n this.left = left;\n this.top = top;\n}\n\nPosition.prototype.destructor = function () {\n this.left = null;\n this.top = null;\n};\n\nPooledClass.addPoolingTo(Position, twoArgumentPooler);\n\nmodule.exports = Position;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {ColorValue} from '../../StyleSheet/StyleSheet';\nimport typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';\n\nimport View from '../../Components/View/View';\nimport Pressability, {\n type PressabilityConfig,\n} from '../../Pressability/Pressability';\nimport {PressabilityDebugView} from '../../Pressability/PressabilityDebug';\nimport StyleSheet, {type ViewStyleProp} from '../../StyleSheet/StyleSheet';\nimport Platform from '../../Utilities/Platform';\nimport * as React from 'react';\n\ntype AndroidProps = $ReadOnly<{|\n nextFocusDown?: ?number,\n nextFocusForward?: ?number,\n nextFocusLeft?: ?number,\n nextFocusRight?: ?number,\n nextFocusUp?: ?number,\n|}>;\n\ntype IOSProps = $ReadOnly<{|\n hasTVPreferredFocus?: ?boolean,\n|}>;\n\ntype Props = $ReadOnly<{|\n ...React.ElementConfig,\n ...AndroidProps,\n ...IOSProps,\n\n activeOpacity?: ?number,\n underlayColor?: ?ColorValue,\n style?: ?ViewStyleProp,\n onShowUnderlay?: ?() => void,\n onHideUnderlay?: ?() => void,\n testOnly_pressed?: ?boolean,\n\n hostRef: React.Ref,\n|}>;\n\ntype ExtraStyles = $ReadOnly<{|\n child: ViewStyleProp,\n underlay: ViewStyleProp,\n|}>;\n\ntype State = $ReadOnly<{|\n pressability: Pressability,\n extraStyles: ?ExtraStyles,\n|}>;\n\n/**\n * A wrapper for making views respond properly to touches.\n * On press down, the opacity of the wrapped view is decreased, which allows\n * the underlay color to show through, darkening or tinting the view.\n *\n * The underlay comes from wrapping the child in a new View, which can affect\n * layout, and sometimes cause unwanted visual artifacts if not used correctly,\n * for example if the backgroundColor of the wrapped view isn't explicitly set\n * to an opaque color.\n *\n * TouchableHighlight must have one child (not zero or more than one).\n * If you wish to have several child components, wrap them in a View.\n *\n * Example:\n *\n * ```\n * renderButton: function() {\n * return (\n * \n * \n * \n * );\n * },\n * ```\n *\n *\n * ### Example\n *\n * ```ReactNativeWebPlayer\n * import React, { Component } from 'react'\n * import {\n * AppRegistry,\n * StyleSheet,\n * TouchableHighlight,\n * Text,\n * View,\n * } from 'react-native'\n *\n * class App extends Component {\n * constructor(props) {\n * super(props)\n * this.state = { count: 0 }\n * }\n *\n * onPress = () => {\n * this.setState({\n * count: this.state.count+1\n * })\n * }\n *\n * render() {\n * return (\n * \n * \n * Touch Here \n * \n * \n * \n * { this.state.count !== 0 ? this.state.count: null}\n * \n * \n * \n * )\n * }\n * }\n *\n * const styles = StyleSheet.create({\n * container: {\n * flex: 1,\n * justifyContent: 'center',\n * paddingHorizontal: 10\n * },\n * button: {\n * alignItems: 'center',\n * backgroundColor: '#DDDDDD',\n * padding: 10\n * },\n * countContainer: {\n * alignItems: 'center',\n * padding: 10\n * },\n * countText: {\n * color: '#FF00FF'\n * }\n * })\n *\n * AppRegistry.registerComponent('App', () => App)\n * ```\n *\n */\nclass TouchableHighlight extends React.Component {\n _hideTimeout: ?TimeoutID;\n _isMounted: boolean = false;\n\n state: State = {\n pressability: new Pressability(this._createPressabilityConfig()),\n extraStyles:\n this.props.testOnly_pressed === true ? this._createExtraStyles() : null,\n };\n\n _createPressabilityConfig(): PressabilityConfig {\n return {\n cancelable: !this.props.rejectResponderTermination,\n disabled:\n this.props.disabled != null\n ? this.props.disabled\n : this.props.accessibilityState?.disabled,\n hitSlop: this.props.hitSlop,\n delayLongPress: this.props.delayLongPress,\n delayPressIn: this.props.delayPressIn,\n delayPressOut: this.props.delayPressOut,\n minPressDuration: 0,\n pressRectOffset: this.props.pressRetentionOffset,\n android_disableSound: this.props.touchSoundDisabled,\n onBlur: event => {\n if (Platform.isTV) {\n this._hideUnderlay();\n }\n if (this.props.onBlur != null) {\n this.props.onBlur(event);\n }\n },\n onFocus: event => {\n if (Platform.isTV) {\n this._showUnderlay();\n }\n if (this.props.onFocus != null) {\n this.props.onFocus(event);\n }\n },\n onLongPress: this.props.onLongPress,\n onPress: event => {\n if (this._hideTimeout != null) {\n clearTimeout(this._hideTimeout);\n }\n if (!Platform.isTV) {\n this._showUnderlay();\n this._hideTimeout = setTimeout(() => {\n this._hideUnderlay();\n }, this.props.delayPressOut ?? 0);\n }\n if (this.props.onPress != null) {\n this.props.onPress(event);\n }\n },\n onPressIn: event => {\n if (this._hideTimeout != null) {\n clearTimeout(this._hideTimeout);\n this._hideTimeout = null;\n }\n this._showUnderlay();\n if (this.props.onPressIn != null) {\n this.props.onPressIn(event);\n }\n },\n onPressOut: event => {\n if (this._hideTimeout == null) {\n this._hideUnderlay();\n }\n if (this.props.onPressOut != null) {\n this.props.onPressOut(event);\n }\n },\n };\n }\n\n _createExtraStyles(): ExtraStyles {\n return {\n child: {opacity: this.props.activeOpacity ?? 0.85},\n underlay: {\n backgroundColor:\n this.props.underlayColor === undefined\n ? 'black'\n : this.props.underlayColor,\n },\n };\n }\n\n _showUnderlay(): void {\n if (!this._isMounted || !this._hasPressHandler()) {\n return;\n }\n this.setState({extraStyles: this._createExtraStyles()});\n if (this.props.onShowUnderlay != null) {\n this.props.onShowUnderlay();\n }\n }\n\n _hideUnderlay(): void {\n if (this._hideTimeout != null) {\n clearTimeout(this._hideTimeout);\n this._hideTimeout = null;\n }\n if (this.props.testOnly_pressed === true) {\n return;\n }\n if (this._hasPressHandler()) {\n this.setState({extraStyles: null});\n if (this.props.onHideUnderlay != null) {\n this.props.onHideUnderlay();\n }\n }\n }\n\n _hasPressHandler(): boolean {\n return (\n this.props.onPress != null ||\n this.props.onPressIn != null ||\n this.props.onPressOut != null ||\n this.props.onLongPress != null\n );\n }\n\n render(): React.Node {\n const child = React.Children.only<$FlowFixMe>(this.props.children);\n\n // BACKWARD-COMPATIBILITY: Focus and blur events were never supported before\n // adopting `Pressability`, so preserve that behavior.\n const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} =\n this.state.pressability.getEventHandlers();\n\n const accessibilityState =\n this.props.disabled != null\n ? {\n ...this.props.accessibilityState,\n disabled: this.props.disabled,\n }\n : this.props.accessibilityState;\n\n const accessibilityValue = {\n max: this.props['aria-valuemax'] ?? this.props.accessibilityValue?.max,\n min: this.props['aria-valuemin'] ?? this.props.accessibilityValue?.min,\n now: this.props['aria-valuenow'] ?? this.props.accessibilityValue?.now,\n text: this.props['aria-valuetext'] ?? this.props.accessibilityValue?.text,\n };\n\n const accessibilityLiveRegion =\n this.props['aria-live'] === 'off'\n ? 'none'\n : this.props['aria-live'] ?? this.props.accessibilityLiveRegion;\n\n const accessibilityLabel =\n this.props['aria-label'] ?? this.props.accessibilityLabel;\n return (\n \n {React.cloneElement(child, {\n style: StyleSheet.compose(\n child.props.style,\n this.state.extraStyles?.child,\n ),\n })}\n {__DEV__ ? (\n \n ) : null}\n \n );\n }\n\n componentDidMount(): void {\n this._isMounted = true;\n this.state.pressability.configure(this._createPressabilityConfig());\n }\n\n componentDidUpdate(prevProps: Props, prevState: State) {\n this.state.pressability.configure(this._createPressabilityConfig());\n }\n\n componentWillUnmount(): void {\n this._isMounted = false;\n if (this._hideTimeout != null) {\n clearTimeout(this._hideTimeout);\n }\n this.state.pressability.reset();\n }\n}\n\nconst Touchable: React.AbstractComponent<\n $ReadOnly<$Diff|}>>,\n React.ElementRef,\n> = React.forwardRef((props, hostRef) => (\n \n));\n\nTouchable.displayName = 'TouchableHighlight';\n\nmodule.exports = Touchable;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {\n AccessibilityActionEvent,\n AccessibilityActionInfo,\n AccessibilityRole,\n AccessibilityState,\n AccessibilityValue,\n} from '../../Components/View/ViewAccessibility';\nimport type {EdgeInsetsOrSizeProp} from '../../StyleSheet/EdgeInsetsPropType';\nimport type {\n BlurEvent,\n FocusEvent,\n LayoutEvent,\n PressEvent,\n} from '../../Types/CoreEventTypes';\n\nimport View from '../../Components/View/View';\nimport {PressabilityDebugView} from '../../Pressability/PressabilityDebug';\nimport usePressability from '../../Pressability/usePressability';\nimport * as React from 'react';\nimport {useMemo} from 'react';\n\ntype Props = $ReadOnly<{|\n accessibilityActions?: ?$ReadOnlyArray,\n accessibilityElementsHidden?: ?boolean,\n accessibilityHint?: ?Stringish,\n accessibilityLanguage?: ?Stringish,\n accessibilityIgnoresInvertColors?: ?boolean,\n accessibilityLabel?: ?Stringish,\n accessibilityLiveRegion?: ?('none' | 'polite' | 'assertive'),\n accessibilityRole?: ?AccessibilityRole,\n accessibilityState?: ?AccessibilityState,\n accessibilityValue?: ?AccessibilityValue,\n 'aria-valuemax'?: AccessibilityValue['max'],\n 'aria-valuemin'?: AccessibilityValue['min'],\n 'aria-valuenow'?: AccessibilityValue['now'],\n 'aria-valuetext'?: AccessibilityValue['text'],\n accessibilityViewIsModal?: ?boolean,\n 'aria-modal'?: ?boolean,\n accessible?: ?boolean,\n /**\n * alias for accessibilityState\n *\n * see https://reactnative.dev/docs/accessibility#accessibilitystate\n */\n 'aria-busy'?: ?boolean,\n 'aria-checked'?: ?boolean | 'mixed',\n 'aria-disabled'?: ?boolean,\n 'aria-expanded'?: ?boolean,\n 'aria-selected'?: ?boolean,\n 'aria-hidden'?: ?boolean,\n 'aria-live'?: ?('polite' | 'assertive' | 'off'),\n 'aria-label'?: ?Stringish,\n children?: ?React.Node,\n delayLongPress?: ?number,\n delayPressIn?: ?number,\n delayPressOut?: ?number,\n disabled?: ?boolean,\n focusable?: ?boolean,\n hitSlop?: ?EdgeInsetsOrSizeProp,\n id?: string,\n importantForAccessibility?: ?('auto' | 'yes' | 'no' | 'no-hide-descendants'),\n nativeID?: ?string,\n onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed,\n onBlur?: ?(event: BlurEvent) => mixed,\n onFocus?: ?(event: FocusEvent) => mixed,\n onLayout?: ?(event: LayoutEvent) => mixed,\n onLongPress?: ?(event: PressEvent) => mixed,\n onPress?: ?(event: PressEvent) => mixed,\n onPressIn?: ?(event: PressEvent) => mixed,\n onPressOut?: ?(event: PressEvent) => mixed,\n pressRetentionOffset?: ?EdgeInsetsOrSizeProp,\n rejectResponderTermination?: ?boolean,\n testID?: ?string,\n touchSoundDisabled?: ?boolean,\n|}>;\n\nconst PASSTHROUGH_PROPS = [\n 'accessibilityActions',\n 'accessibilityElementsHidden',\n 'accessibilityHint',\n 'accessibilityLanguage',\n 'accessibilityIgnoresInvertColors',\n 'accessibilityLabel',\n 'accessibilityLiveRegion',\n 'accessibilityRole',\n 'accessibilityValue',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n 'accessibilityViewIsModal',\n 'aria-modal',\n 'hitSlop',\n 'importantForAccessibility',\n 'nativeID',\n 'onAccessibilityAction',\n 'onBlur',\n 'onFocus',\n 'onLayout',\n 'testID',\n];\n\nmodule.exports = function TouchableWithoutFeedback(props: Props): React.Node {\n const {\n disabled,\n rejectResponderTermination,\n 'aria-disabled': ariaDisabled,\n accessibilityState,\n hitSlop,\n delayLongPress,\n delayPressIn,\n delayPressOut,\n pressRetentionOffset,\n touchSoundDisabled,\n onBlur: _onBlur,\n onFocus: _onFocus,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n } = props;\n\n const pressabilityConfig = useMemo(\n () => ({\n cancelable: !rejectResponderTermination,\n disabled:\n disabled !== null\n ? disabled\n : ariaDisabled ?? accessibilityState?.disabled,\n hitSlop: hitSlop,\n delayLongPress: delayLongPress,\n delayPressIn: delayPressIn,\n delayPressOut: delayPressOut,\n minPressDuration: 0,\n pressRectOffset: pressRetentionOffset,\n android_disableSound: touchSoundDisabled,\n onBlur: _onBlur,\n onFocus: _onFocus,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressIn: onPressIn,\n onPressOut: onPressOut,\n }),\n [\n rejectResponderTermination,\n disabled,\n ariaDisabled,\n accessibilityState?.disabled,\n hitSlop,\n delayLongPress,\n delayPressIn,\n delayPressOut,\n pressRetentionOffset,\n touchSoundDisabled,\n _onBlur,\n _onFocus,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n ],\n );\n\n const eventHandlers = usePressability(pressabilityConfig);\n\n const element = React.Children.only<$FlowFixMe>(props.children);\n const children: Array = [element.props.children];\n const ariaLive = props['aria-live'];\n\n if (__DEV__) {\n if (element.type === View) {\n children.push(\n ,\n );\n }\n }\n\n let _accessibilityState = {\n busy: props['aria-busy'] ?? props.accessibilityState?.busy,\n checked: props['aria-checked'] ?? props.accessibilityState?.checked,\n disabled: props['aria-disabled'] ?? props.accessibilityState?.disabled,\n expanded: props['aria-expanded'] ?? props.accessibilityState?.expanded,\n selected: props['aria-selected'] ?? props.accessibilityState?.selected,\n };\n\n // BACKWARD-COMPATIBILITY: Focus and blur events were never supported before\n // adopting `Pressability`, so preserve that behavior.\n const {onBlur, onFocus, ...eventHandlersWithoutBlurAndFocus} =\n eventHandlers || {};\n\n const elementProps: {[string]: mixed, ...} = {\n ...eventHandlersWithoutBlurAndFocus,\n accessible: props.accessible !== false,\n accessibilityState:\n props.disabled != null\n ? {\n ..._accessibilityState,\n disabled: props.disabled,\n }\n : _accessibilityState,\n focusable:\n props.focusable !== false &&\n props.onPress !== undefined &&\n !props.disabled,\n\n accessibilityElementsHidden:\n props['aria-hidden'] ?? props.accessibilityElementsHidden,\n importantForAccessibility:\n props['aria-hidden'] === true\n ? 'no-hide-descendants'\n : props.importantForAccessibility,\n accessibilityLiveRegion:\n ariaLive === 'off' ? 'none' : ariaLive ?? props.accessibilityLiveRegion,\n nativeID: props.id ?? props.nativeID,\n };\n\n for (const prop of PASSTHROUGH_PROPS) {\n if (props[prop] !== undefined) {\n elementProps[prop] = props[prop];\n }\n }\n\n // $FlowFixMe[incompatible-call]\n return React.cloneElement(element, elementProps, ...children);\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport {typeof VirtualizedList as VirtualizedListType} from '@react-native/virtualized-lists';\n\nconst VirtualizedList: VirtualizedListType =\n require('@react-native/virtualized-lists').VirtualizedList;\n\nexport type {\n RenderItemProps,\n RenderItemType,\n Separators,\n} from '@react-native/virtualized-lists';\nmodule.exports = VirtualizedList;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport {typeof VirtualizedSectionList as VirtualizedSectionListType} from '@react-native/virtualized-lists';\n\nconst VirtualizedSectionList: VirtualizedSectionListType =\n require('@react-native/virtualized-lists').VirtualizedSectionList;\n\nexport type {\n SectionBase,\n ScrollToLocationParamsType,\n} from '@react-native/virtualized-lists';\nmodule.exports = VirtualizedSectionList;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {ProcessedColorValue} from '../StyleSheet/processColor';\nimport type {ColorValue} from '../StyleSheet/StyleSheet';\n\nimport RCTActionSheetManager from './NativeActionSheetManager';\n\nconst processColor = require('../StyleSheet/processColor').default;\nconst invariant = require('invariant');\n\n/**\n * Display action sheets and share sheets on iOS.\n *\n * See https://reactnative.dev/docs/actionsheetios\n */\nconst ActionSheetIOS = {\n /**\n * Display an iOS action sheet.\n *\n * The `options` object must contain one or more of:\n *\n * - `options` (array of strings) - a list of button titles (required)\n * - `cancelButtonIndex` (int) - index of cancel button in `options`\n * - `destructiveButtonIndex` (int or array of ints) - index or indices of destructive buttons in `options`\n * - `title` (string) - a title to show above the action sheet\n * - `message` (string) - a message to show below the title\n * - `disabledButtonIndices` (array of numbers) - a list of button indices which should be disabled\n *\n * The 'callback' function takes one parameter, the zero-based index\n * of the selected item.\n *\n * See https://reactnative.dev/docs/actionsheetios#showactionsheetwithoptions\n */\n showActionSheetWithOptions(\n options: {|\n +title?: ?string,\n +message?: ?string,\n +options: Array,\n +destructiveButtonIndex?: ?number | ?Array,\n +cancelButtonIndex?: ?number,\n +anchor?: ?number,\n +tintColor?: ColorValue | ProcessedColorValue,\n +cancelButtonTintColor?: ColorValue | ProcessedColorValue,\n +userInterfaceStyle?: string,\n +disabledButtonIndices?: Array,\n |},\n callback: (buttonIndex: number) => void,\n ) {\n invariant(\n typeof options === 'object' && options !== null,\n 'Options must be a valid object',\n );\n invariant(typeof callback === 'function', 'Must provide a valid callback');\n invariant(RCTActionSheetManager, \"ActionSheetManager doesn't exist\");\n\n const {\n tintColor,\n cancelButtonTintColor,\n destructiveButtonIndex,\n ...remainingOptions\n } = options;\n let destructiveButtonIndices = null;\n\n if (Array.isArray(destructiveButtonIndex)) {\n destructiveButtonIndices = destructiveButtonIndex;\n } else if (typeof destructiveButtonIndex === 'number') {\n destructiveButtonIndices = [destructiveButtonIndex];\n }\n\n const processedTintColor = processColor(tintColor);\n const processedCancelButtonTintColor = processColor(cancelButtonTintColor);\n invariant(\n processedTintColor == null || typeof processedTintColor === 'number',\n 'Unexpected color given for ActionSheetIOS.showActionSheetWithOptions tintColor',\n );\n invariant(\n processedCancelButtonTintColor == null ||\n typeof processedCancelButtonTintColor === 'number',\n 'Unexpected color given for ActionSheetIOS.showActionSheetWithOptions cancelButtonTintColor',\n );\n RCTActionSheetManager.showActionSheetWithOptions(\n {\n ...remainingOptions,\n // $FlowFixMe[incompatible-call]\n tintColor: processedTintColor,\n // $FlowFixMe[incompatible-call]\n cancelButtonTintColor: processedCancelButtonTintColor,\n destructiveButtonIndices,\n },\n callback,\n );\n },\n\n /**\n * Display the iOS share sheet. The `options` object should contain\n * one or both of `message` and `url` and can additionally have\n * a `subject` or `excludedActivityTypes`:\n *\n * - `url` (string) - a URL to share\n * - `message` (string) - a message to share\n * - `subject` (string) - a subject for the message\n * - `excludedActivityTypes` (array) - the activities to exclude from\n * the ActionSheet\n * - `tintColor` (color) - tint color of the buttons\n *\n * The 'failureCallback' function takes one parameter, an error object.\n * The only property defined on this object is an optional `stack` property\n * of type `string`.\n *\n * The 'successCallback' function takes two parameters:\n *\n * - a boolean value signifying success or failure\n * - a string that, in the case of success, indicates the method of sharing\n *\n * See https://reactnative.dev/docs/actionsheetios#showshareactionsheetwithoptions\n */\n showShareActionSheetWithOptions(\n options: Object,\n failureCallback: Function,\n successCallback: Function,\n ) {\n invariant(\n typeof options === 'object' && options !== null,\n 'Options must be a valid object',\n );\n invariant(\n typeof failureCallback === 'function',\n 'Must provide a valid failureCallback',\n );\n invariant(\n typeof successCallback === 'function',\n 'Must provide a valid successCallback',\n );\n invariant(RCTActionSheetManager, \"ActionSheetManager doesn't exist\");\n RCTActionSheetManager.showShareActionSheetWithOptions(\n {...options, tintColor: processColor(options.tintColor)},\n failureCallback,\n successCallback,\n );\n },\n\n /**\n * Dismisses the most upper iOS action sheet presented, if no action sheet is\n * present a warning is displayed.\n */\n dismissActionSheet: () => {\n invariant(RCTActionSheetManager, \"ActionSheetManager doesn't exist\");\n if (typeof RCTActionSheetManager.dismissActionSheet === 'function') {\n RCTActionSheetManager.dismissActionSheet();\n }\n },\n};\n\nmodule.exports = ActionSheetIOS;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeActionSheetManager';\nimport NativeActionSheetManager from '../../src/private/specs/modules/NativeActionSheetManager';\nexport default NativeActionSheetManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {||};\n +showActionSheetWithOptions: (\n options: {|\n +title?: ?string,\n +message?: ?string,\n +options: ?Array,\n +destructiveButtonIndices?: ?Array,\n +cancelButtonIndex?: ?number,\n +anchor?: ?number,\n +tintColor?: ?number,\n +cancelButtonTintColor?: ?number,\n +userInterfaceStyle?: ?string,\n +disabledButtonIndices?: Array,\n |},\n callback: (buttonIndex: number) => void,\n ) => void;\n +showShareActionSheetWithOptions: (\n options: {|\n +message?: ?string,\n +url?: ?string,\n +subject?: ?string,\n +anchor?: ?number,\n +tintColor?: ?number,\n +cancelButtonTintColor?: ?number,\n +excludedActivityTypes?: ?Array,\n +userInterfaceStyle?: ?string,\n |},\n failureCallback: (error: {|\n +domain: string,\n +code: string,\n +userInfo?: ?Object,\n +message: string,\n |}) => void,\n successCallback: (completed: boolean, activityType: ?string) => void,\n ) => void;\n +dismissActionSheet?: () => void;\n}\n\nexport default (TurboModuleRegistry.get('ActionSheetManager'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport Platform from '../Utilities/Platform';\nimport EventEmitter, {\n type EventSubscription,\n} from '../vendor/emitter/EventEmitter';\nimport {isAsyncDebugging} from './DebugEnvironment';\nimport NativeAppearance, {\n type AppearancePreferences,\n type ColorSchemeName,\n} from './NativeAppearance';\nimport invariant from 'invariant';\n\ntype AppearanceListener = (preferences: AppearancePreferences) => void;\nconst eventEmitter = new EventEmitter<{\n change: [AppearancePreferences],\n}>();\n\ntype NativeAppearanceEventDefinitions = {\n appearanceChanged: [AppearancePreferences],\n};\n\nif (NativeAppearance) {\n const nativeEventEmitter =\n new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeAppearance,\n );\n nativeEventEmitter.addListener(\n 'appearanceChanged',\n (newAppearance: AppearancePreferences) => {\n const {colorScheme} = newAppearance;\n invariant(\n colorScheme === 'dark' ||\n colorScheme === 'light' ||\n colorScheme == null,\n \"Unrecognized color scheme. Did you mean 'dark' or 'light'?\",\n );\n eventEmitter.emit('change', {colorScheme});\n },\n );\n}\n\nmodule.exports = {\n /**\n * Note: Although color scheme is available immediately, it may change at any\n * time. Any rendering logic or styles that depend on this should try to call\n * this function on every render, rather than caching the value (for example,\n * using inline styles rather than setting a value in a `StyleSheet`).\n *\n * Example: `const colorScheme = Appearance.getColorScheme();`\n *\n * @returns {?ColorSchemeName} Value for the color scheme preference.\n */\n getColorScheme(): ?ColorSchemeName {\n if (__DEV__) {\n if (isAsyncDebugging) {\n // Hard code light theme when using the async debugger as\n // sync calls aren't supported\n return 'light';\n }\n }\n\n // TODO: (hramos) T52919652 Use ?ColorSchemeName once codegen supports union\n const nativeColorScheme: ?string =\n NativeAppearance == null\n ? null\n : NativeAppearance.getColorScheme() || null;\n invariant(\n nativeColorScheme === 'dark' ||\n nativeColorScheme === 'light' ||\n nativeColorScheme == null,\n \"Unrecognized color scheme. Did you mean 'dark' or 'light'?\",\n );\n return nativeColorScheme;\n },\n\n setColorScheme(colorScheme: ?ColorSchemeName): void {\n const nativeColorScheme = colorScheme == null ? 'unspecified' : colorScheme;\n\n invariant(\n colorScheme === 'dark' || colorScheme === 'light' || colorScheme == null,\n \"Unrecognized color scheme. Did you mean 'dark', 'light' or null?\",\n );\n\n if (NativeAppearance != null && NativeAppearance.setColorScheme != null) {\n NativeAppearance.setColorScheme(nativeColorScheme);\n }\n },\n\n /**\n * Add an event handler that is fired when appearance preferences change.\n */\n addChangeListener(listener: AppearanceListener): EventSubscription {\n return eventEmitter.addListener('change', listener);\n },\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport type * from '../../src/private/specs/modules/NativeAppearance';\nimport NativeAppearance from '../../src/private/specs/modules/NativeAppearance';\nexport default NativeAppearance;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type ColorSchemeName = 'light' | 'dark';\n\nexport type AppearancePreferences = {|\n // TODO: (hramos) T52919652 Use ?ColorSchemeName once codegen supports union\n // types.\n /* 'light' | 'dark' */\n colorScheme?: ?string,\n|};\n\nexport interface Spec extends TurboModule {\n // TODO: (hramos) T52919652 Use ?ColorSchemeName once codegen supports union\n // types.\n /* 'light' | 'dark' */\n +getColorScheme: () => ?string;\n +setColorScheme?: (colorScheme: string) => void;\n\n // RCTEventEmitter\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n}\n\nexport default (TurboModuleRegistry.get('Appearance'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport logError from '../Utilities/logError';\nimport Platform from '../Utilities/Platform';\nimport {type EventSubscription} from '../vendor/emitter/EventEmitter';\nimport NativeAppState from './NativeAppState';\n\nexport type AppStateValues = 'inactive' | 'background' | 'active';\n\ntype AppStateEventDefinitions = {\n change: [AppStateValues],\n memoryWarning: [],\n blur: [],\n focus: [],\n};\n\ntype NativeAppStateEventDefinitions = {\n appStateDidChange: [{app_state: AppStateValues}],\n appStateFocusChange: [boolean],\n memoryWarning: [],\n};\n\n/**\n * `AppState` can tell you if the app is in the foreground or background,\n * and notify you when the state changes.\n *\n * See https://reactnative.dev/docs/appstate\n */\nclass AppState {\n currentState: ?string = null;\n isAvailable: boolean;\n\n _emitter: ?NativeEventEmitter;\n\n constructor() {\n if (NativeAppState == null) {\n this.isAvailable = false;\n } else {\n this.isAvailable = true;\n\n const emitter: NativeEventEmitter =\n new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeAppState,\n );\n this._emitter = emitter;\n\n this.currentState = NativeAppState.getConstants().initialAppState;\n\n let eventUpdated = false;\n\n // TODO: this is a terrible solution - in order to ensure `currentState`\n // prop is up to date, we have to register an observer that updates it\n // whenever the state changes, even if nobody cares. We should just\n // deprecate the `currentState` property and get rid of this.\n emitter.addListener('appStateDidChange', appStateData => {\n eventUpdated = true;\n this.currentState = appStateData.app_state;\n });\n\n // TODO: see above - this request just populates the value of `currentState`\n // when the module is first initialized. Would be better to get rid of the\n // prop and expose `getCurrentAppState` method directly.\n // $FlowExpectedError[incompatible-call]\n NativeAppState.getCurrentAppState(appStateData => {\n // It's possible that the state will have changed here & listeners need to be notified\n if (!eventUpdated && this.currentState !== appStateData.app_state) {\n this.currentState = appStateData.app_state;\n // $FlowFixMe[incompatible-call]\n emitter.emit('appStateDidChange', appStateData);\n }\n }, logError);\n }\n }\n\n /**\n * Add a handler to AppState changes by listening to the `change` event type\n * and providing the handler.\n *\n * See https://reactnative.dev/docs/appstate#addeventlistener\n */\n addEventListener>(\n type: K,\n handler: (...$ElementType) => void,\n ): EventSubscription {\n const emitter = this._emitter;\n if (emitter == null) {\n throw new Error('Cannot use AppState when `isAvailable` is false.');\n }\n switch (type) {\n case 'change':\n // $FlowIssue[invalid-tuple-arity] Flow cannot refine handler based on the event type\n const changeHandler: AppStateValues => void = handler;\n return emitter.addListener('appStateDidChange', appStateData => {\n changeHandler(appStateData.app_state);\n });\n case 'memoryWarning':\n // $FlowIssue[invalid-tuple-arity] Flow cannot refine handler based on the event type\n const memoryWarningHandler: () => void = handler;\n return emitter.addListener('memoryWarning', memoryWarningHandler);\n case 'blur':\n case 'focus':\n // $FlowIssue[invalid-tuple-arity] Flow cannot refine handler based on the event type\n const focusOrBlurHandler: () => void = handler;\n return emitter.addListener('appStateFocusChange', hasFocus => {\n if (type === 'blur' && !hasFocus) {\n focusOrBlurHandler();\n }\n if (type === 'focus' && hasFocus) {\n focusOrBlurHandler();\n }\n });\n }\n throw new Error('Trying to subscribe to unknown event: ' + type);\n }\n}\n\nmodule.exports = (new AppState(): AppState);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\n/**\n * Small utility that can be used as an error handler. You cannot just pass\n * `console.error` as a failure callback - it's not properly bound. If passes an\n * `Error` object, it will print the message and stack.\n */\nconst logError = function (...args: $ReadOnlyArray) {\n if (args.length === 1 && args[0] instanceof Error) {\n const err = args[0];\n console.error('Error: \"' + err.message + '\". Stack:\\n' + err.stack);\n } else {\n console.error.apply(console, args);\n }\n};\n\nmodule.exports = logError;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeAppState';\nimport NativeAppState from '../../src/private/specs/modules/NativeAppState';\nexport default NativeAppState;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport type AppStateConstants = {|\n initialAppState: string,\n|};\n\nexport type AppState = {|app_state: string|};\n\nexport interface Spec extends TurboModule {\n +getConstants: () => AppStateConstants;\n +getCurrentAppState: (\n success: (appState: AppState) => void,\n error: (error: Object) => void,\n ) => void;\n\n // Events\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('AppState'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport NativeClipboard from './NativeClipboard';\n\n/**\n * `Clipboard` gives you an interface for setting and getting content from Clipboard on both iOS and Android\n */\nmodule.exports = {\n /**\n * Get content of string type, this method returns a `Promise`, so you can use following code to get clipboard content\n * ```javascript\n * async _getContent() {\n * var content = await Clipboard.getString();\n * }\n * ```\n */\n getString(): Promise {\n return NativeClipboard.getString();\n },\n /**\n * Set content of string type. You can use following code to set clipboard content\n * ```javascript\n * _setContent() {\n * Clipboard.setString('hello world');\n * }\n * ```\n * @param {string} content the content to be stored in the clipboard.\n */\n setString(content: string) {\n NativeClipboard.setString(content);\n },\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeClipboard';\nimport NativeClipboard from '../../../src/private/specs/modules/NativeClipboard';\nexport default NativeClipboard;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {||};\n +getString: () => Promise;\n +setString: (content: string) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('Clipboard'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport NativeDeviceInfo from './NativeDeviceInfo';\n\nmodule.exports = NativeDeviceInfo;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {EventSubscription} from '../vendor/emitter/EventEmitter';\n\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport NativeDevSettings from '../NativeModules/specs/NativeDevSettings';\nimport Platform from '../Utilities/Platform';\n\nlet DevSettings: {\n addMenuItem(title: string, handler: () => mixed): void,\n reload(reason?: string): void,\n onFastRefresh(): void,\n} = {\n addMenuItem(title: string, handler: () => mixed): void {},\n reload(reason?: string): void {},\n onFastRefresh(): void {},\n};\n\ntype DevSettingsEventDefinitions = {\n didPressMenuItem: [{title: string}],\n};\n\nif (__DEV__) {\n const emitter = new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeDevSettings,\n );\n const subscriptions = new Map();\n\n DevSettings = {\n addMenuItem(title: string, handler: () => mixed): void {\n // Make sure items are not added multiple times. This can\n // happen when hot reloading the module that registers the\n // menu items. The title is used as the id which means we\n // don't support multiple items with the same name.\n let subscription = subscriptions.get(title);\n if (subscription != null) {\n subscription.remove();\n } else {\n NativeDevSettings.addMenuItem(title);\n }\n\n subscription = emitter.addListener('didPressMenuItem', event => {\n if (event.title === title) {\n handler();\n }\n });\n subscriptions.set(title, subscription);\n },\n reload(reason?: string): void {\n if (NativeDevSettings.reloadWithReason != null) {\n NativeDevSettings.reloadWithReason(reason ?? 'Uncategorized from JS');\n } else {\n NativeDevSettings.reload();\n }\n },\n onFastRefresh(): void {\n NativeDevSettings.onFastRefresh?.();\n },\n };\n}\n\nmodule.exports = DevSettings;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeDevSettings';\nimport NativeDevSettings from '../../../src/private/specs/modules/NativeDevSettings';\nexport default NativeDevSettings;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +reload: () => void;\n +reloadWithReason?: (reason: string) => void;\n +onFastRefresh?: () => void;\n +setHotLoadingEnabled: (isHotLoadingEnabled: boolean) => void;\n +setIsDebuggingRemotely: (isDebuggingRemotelyEnabled: boolean) => void;\n +setProfilingEnabled: (isProfilingEnabled: boolean) => void;\n +toggleElementInspector: () => void;\n +addMenuItem: (title: string) => void;\n +openDebugger?: () => void;\n\n // Events\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n\n // iOS only.\n +setIsShakeToShowDevMenuEnabled: (enabled: boolean) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('DevSettings'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {EventSubscription} from '../vendor/emitter/EventEmitter';\n\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport Platform from '../Utilities/Platform';\nimport NativeIntentAndroid from './NativeIntentAndroid';\nimport NativeLinkingManager from './NativeLinkingManager';\nimport invariant from 'invariant';\nimport nullthrows from 'nullthrows';\n\ntype LinkingEventDefinitions = {\n url: [{url: string}],\n};\n\n/**\n * `Linking` gives you a general interface to interact with both incoming\n * and outgoing app links.\n *\n * See https://reactnative.dev/docs/linking\n */\nclass Linking extends NativeEventEmitter {\n constructor() {\n super(Platform.OS === 'ios' ? nullthrows(NativeLinkingManager) : undefined);\n }\n\n /**\n * Add a handler to Linking changes by listening to the `url` event type\n * and providing the handler\n *\n * See https://reactnative.dev/docs/linking#addeventlistener\n */\n addEventListener>(\n eventType: K,\n listener: (...$ElementType) => mixed,\n context: $FlowFixMe,\n ): EventSubscription {\n return this.addListener(eventType, listener);\n }\n\n /**\n * Try to open the given `url` with any of the installed apps.\n *\n * See https://reactnative.dev/docs/linking#openurl\n */\n openURL(url: string): Promise {\n this._validateURL(url);\n if (Platform.OS === 'android') {\n return nullthrows(NativeIntentAndroid).openURL(url);\n } else {\n return nullthrows(NativeLinkingManager).openURL(url);\n }\n }\n\n /**\n * Determine whether or not an installed app can handle a given URL.\n *\n * See https://reactnative.dev/docs/linking#canopenurl\n */\n canOpenURL(url: string): Promise {\n this._validateURL(url);\n if (Platform.OS === 'android') {\n return nullthrows(NativeIntentAndroid).canOpenURL(url);\n } else {\n return nullthrows(NativeLinkingManager).canOpenURL(url);\n }\n }\n\n /**\n * Open app settings.\n *\n * See https://reactnative.dev/docs/linking#opensettings\n */\n openSettings(): Promise {\n if (Platform.OS === 'android') {\n return nullthrows(NativeIntentAndroid).openSettings();\n } else {\n return nullthrows(NativeLinkingManager).openSettings();\n }\n }\n\n /**\n * If the app launch was triggered by an app link,\n * it will give the link url, otherwise it will give `null`\n *\n * See https://reactnative.dev/docs/linking#getinitialurl\n */\n getInitialURL(): Promise {\n return Platform.OS === 'android'\n ? nullthrows(NativeIntentAndroid).getInitialURL()\n : nullthrows(NativeLinkingManager).getInitialURL();\n }\n\n /*\n * Launch an Android intent with extras (optional)\n *\n * @platform android\n *\n * See https://reactnative.dev/docs/linking#sendintent\n */\n sendIntent(\n action: string,\n extras?: Array<{\n key: string,\n value: string | number | boolean,\n ...\n }>,\n ): Promise {\n if (Platform.OS === 'android') {\n return nullthrows(NativeIntentAndroid).sendIntent(action, extras);\n } else {\n return new Promise((resolve, reject) => reject(new Error('Unsupported')));\n }\n }\n\n _validateURL(url: string): void {\n invariant(\n typeof url === 'string',\n 'Invalid URL: should be a string. Was: ' + url,\n );\n invariant(url, 'Invalid URL: cannot be empty');\n }\n}\n\nmodule.exports = (new Linking(): Linking);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeIntentAndroid';\nimport NativeIntentAndroid from '../../src/private/specs/modules/NativeIntentAndroid';\nexport default NativeIntentAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getInitialURL: () => Promise;\n +canOpenURL: (url: string) => Promise;\n +openURL: (url: string) => Promise;\n +openSettings: () => Promise;\n +sendIntent: (\n action: string,\n extras: ?Array<{\n key: string,\n value: string | number | boolean, // TODO(T67672788): Union types are not type safe\n ...\n }>,\n ) => Promise;\n}\n\nexport default (TurboModuleRegistry.get('IntentAndroid'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeLinkingManager';\nimport NativeLinkingManager from '../../src/private/specs/modules/NativeLinkingManager';\nexport default NativeLinkingManager;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n // Common interface\n +getInitialURL: () => Promise;\n +canOpenURL: (url: string) => Promise;\n +openURL: (url: string) => Promise;\n +openSettings: () => Promise;\n\n // Events\n +addListener: (eventName: string) => void;\n +removeListeners: (count: number) => void;\n}\n\nexport default (TurboModuleRegistry.get('LinkingManager'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {IgnorePattern, LogData} from './Data/LogBoxData';\nimport type {ExtendedExceptionData} from './Data/parseLogBoxLog';\n\nimport Platform from '../Utilities/Platform';\nimport RCTLog from '../Utilities/RCTLog';\nimport {hasComponentStack} from './Data/parseLogBoxLog';\n\nexport type {LogData, ExtendedExceptionData, IgnorePattern};\n\nlet LogBox;\n\ninterface ILogBox {\n install(): void;\n uninstall(): void;\n isInstalled(): boolean;\n ignoreLogs($ReadOnlyArray): void;\n ignoreAllLogs(?boolean): void;\n clearAllLogs(): void;\n addLog(log: LogData): void;\n addException(error: ExtendedExceptionData): void;\n}\n\n/**\n * LogBox displays logs in the app.\n */\nif (__DEV__) {\n const LogBoxData = require('./Data/LogBoxData');\n const {parseLogBoxLog, parseInterpolation} = require('./Data/parseLogBoxLog');\n\n let originalConsoleError;\n let originalConsoleWarn;\n let consoleErrorImpl;\n let consoleWarnImpl: (...args: Array) => void;\n\n let isLogBoxInstalled: boolean = false;\n\n LogBox = {\n install(): void {\n if (isLogBoxInstalled) {\n return;\n }\n\n isLogBoxInstalled = true;\n\n // Trigger lazy initialization of module.\n require('../NativeModules/specs/NativeLogBox');\n\n // IMPORTANT: we only overwrite `console.error` and `console.warn` once.\n // When we uninstall we keep the same reference and only change its\n // internal implementation\n const isFirstInstall = originalConsoleError == null;\n if (isFirstInstall) {\n originalConsoleError = console.error.bind(console);\n originalConsoleWarn = console.warn.bind(console);\n\n // $FlowExpectedError[cannot-write]\n console.error = (...args) => {\n consoleErrorImpl(...args);\n };\n // $FlowExpectedError[cannot-write]\n console.warn = (...args) => {\n consoleWarnImpl(...args);\n };\n }\n\n consoleErrorImpl = registerError;\n consoleWarnImpl = registerWarning;\n\n if (Platform.isTesting) {\n LogBoxData.setDisabled(true);\n }\n\n RCTLog.setWarningHandler((...args) => {\n registerWarning(...args);\n });\n },\n\n uninstall(): void {\n if (!isLogBoxInstalled) {\n return;\n }\n\n isLogBoxInstalled = false;\n\n // IMPORTANT: we don't re-assign to `console` in case the method has been\n // decorated again after installing LogBox. E.g.:\n // Before uninstalling: original > LogBox > OtherErrorHandler\n // After uninstalling: original > LogBox (noop) > OtherErrorHandler\n consoleErrorImpl = originalConsoleError;\n consoleWarnImpl = originalConsoleWarn;\n },\n\n isInstalled(): boolean {\n return isLogBoxInstalled;\n },\n\n ignoreLogs(patterns: $ReadOnlyArray): void {\n LogBoxData.addIgnorePatterns(patterns);\n },\n\n ignoreAllLogs(value?: ?boolean): void {\n LogBoxData.setDisabled(value == null ? true : value);\n },\n\n clearAllLogs(): void {\n LogBoxData.clear();\n },\n\n addLog(log: LogData): void {\n if (isLogBoxInstalled) {\n LogBoxData.addLog(log);\n }\n },\n\n addException(error: ExtendedExceptionData): void {\n if (isLogBoxInstalled) {\n LogBoxData.addException(error);\n }\n },\n };\n\n const isRCTLogAdviceWarning = (...args: Array) => {\n // RCTLogAdvice is a native logging function designed to show users\n // a message in the console, but not show it to them in Logbox.\n return typeof args[0] === 'string' && args[0].startsWith('(ADVICE)');\n };\n\n const isWarningModuleWarning = (...args: Array) => {\n return typeof args[0] === 'string' && args[0].startsWith('Warning: ');\n };\n\n const registerWarning = (...args: Array): void => {\n // Let warnings within LogBox itself fall through.\n if (LogBoxData.isLogBoxErrorMessage(String(args[0]))) {\n originalConsoleError(...args);\n return;\n } else {\n // Be sure to pass LogBox warnings through.\n originalConsoleWarn(...args);\n }\n\n try {\n if (!isRCTLogAdviceWarning(...args)) {\n const {category, message, componentStack, componentStackType} =\n parseLogBoxLog(args);\n\n if (!LogBoxData.isMessageIgnored(message.content)) {\n LogBoxData.addLog({\n level: 'warn',\n category,\n message,\n componentStack,\n componentStackType,\n });\n }\n }\n } catch (err) {\n LogBoxData.reportLogBoxError(err);\n }\n };\n\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n const registerError = (...args): void => {\n // Let errors within LogBox itself fall through.\n if (LogBoxData.isLogBoxErrorMessage(args[0])) {\n originalConsoleError(...args);\n return;\n }\n\n try {\n if (!isWarningModuleWarning(...args) && !hasComponentStack(args)) {\n // Only show LogBox for the 'warning' module, or React errors with\n // component stacks, otherwise pass the error through.u\n //\n // By passing through, this will get picked up by the React console override,\n // potentially adding the component stack. React then passes it back to the\n // React Native ExceptionsManager, which reports it to LogBox as an error.\n //\n // Ideally, we refactor all RN error handling so that LogBox patching\n // errors is not necessary, and they are reported the same as a framework.\n // The blocker to this is that the ExceptionManager console.error override\n // strigifys all of the args before passing it through to LogBox, which\n // would lose all of the interpolation information.\n //\n // The 'warning' module needs to be handled here because React internally calls\n // `console.error('Warning: ')` with the component stack already included.\n originalConsoleError(...args);\n return;\n }\n\n const format = args[0].replace('Warning: ', '');\n const filterResult = LogBoxData.checkWarningFilter(format);\n let level = 'error';\n if (filterResult.monitorEvent !== 'warning_unhandled') {\n if (filterResult.suppressCompletely) {\n return;\n }\n\n if (filterResult.suppressDialog_LEGACY === true) {\n level = 'warn';\n } else if (filterResult.forceDialogImmediately === true) {\n level = 'fatal'; // Do not downgrade. These are real bugs with same severity as throws.\n }\n }\n\n // Unfortunately, we need to add the Warning: prefix back for downstream dependencies.\n // Downstream, we check for this prefix to know that LogBox already handled it, so\n // it doesn't get reported back to LogBox. It's an absolute mess.\n args[0] = `Warning: ${filterResult.finalFormat}`;\n const {category, message, componentStack, componentStackType} =\n parseLogBoxLog(args);\n\n // Interpolate the message so they are formatted for adb and other CLIs.\n // This is different than the message.content above because it includes component stacks.\n const interpolated = parseInterpolation(args);\n originalConsoleError(interpolated.message.content);\n\n if (!LogBoxData.isMessageIgnored(message.content)) {\n LogBoxData.addLog({\n level,\n category,\n message,\n componentStack,\n componentStackType,\n });\n }\n } catch (err) {\n LogBoxData.reportLogBoxError(err);\n }\n };\n} else {\n LogBox = {\n install(): void {\n // Do nothing.\n },\n\n uninstall(): void {\n // Do nothing.\n },\n\n isInstalled(): boolean {\n return false;\n },\n\n ignoreLogs(patterns: $ReadOnlyArray): void {\n // Do nothing.\n },\n\n ignoreAllLogs(value?: ?boolean): void {\n // Do nothing.\n },\n\n clearAllLogs(): void {\n // Do nothing.\n },\n\n addLog(log: LogData): void {\n // Do nothing.\n },\n\n addException(error: ExtendedExceptionData): void {\n // Do nothing.\n },\n };\n}\n\nexport default (LogBox: ILogBox);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nimport type {PressEvent} from '../Types/CoreEventTypes';\n\nconst InteractionManager = require('./InteractionManager');\nconst TouchHistoryMath = require('./TouchHistoryMath');\n\nconst currentCentroidXOfTouchesChangedAfter =\n TouchHistoryMath.currentCentroidXOfTouchesChangedAfter;\nconst currentCentroidYOfTouchesChangedAfter =\n TouchHistoryMath.currentCentroidYOfTouchesChangedAfter;\nconst previousCentroidXOfTouchesChangedAfter =\n TouchHistoryMath.previousCentroidXOfTouchesChangedAfter;\nconst previousCentroidYOfTouchesChangedAfter =\n TouchHistoryMath.previousCentroidYOfTouchesChangedAfter;\nconst currentCentroidX = TouchHistoryMath.currentCentroidX;\nconst currentCentroidY = TouchHistoryMath.currentCentroidY;\n\n/**\n * `PanResponder` reconciles several touches into a single gesture. It makes\n * single-touch gestures resilient to extra touches, and can be used to\n * recognize simple multi-touch gestures.\n *\n * By default, `PanResponder` holds an `InteractionManager` handle to block\n * long-running JS events from interrupting active gestures.\n *\n * It provides a predictable wrapper of the responder handlers provided by the\n * [gesture responder system](docs/gesture-responder-system.html).\n * For each handler, it provides a new `gestureState` object alongside the\n * native event object:\n *\n * ```\n * onPanResponderMove: (event, gestureState) => {}\n * ```\n *\n * A native event is a synthetic touch event with the following form:\n *\n * - `nativeEvent`\n * + `changedTouches` - Array of all touch events that have changed since the last event\n * + `identifier` - The ID of the touch\n * + `locationX` - The X position of the touch, relative to the element\n * + `locationY` - The Y position of the touch, relative to the element\n * + `pageX` - The X position of the touch, relative to the root element\n * + `pageY` - The Y position of the touch, relative to the root element\n * + `target` - The node id of the element receiving the touch event\n * + `timestamp` - A time identifier for the touch, useful for velocity calculation\n * + `touches` - Array of all current touches on the screen\n *\n * A `gestureState` object has the following:\n *\n * - `stateID` - ID of the gestureState- persisted as long as there at least\n * one touch on screen\n * - `moveX` - the latest screen coordinates of the recently-moved touch\n * - `moveY` - the latest screen coordinates of the recently-moved touch\n * - `x0` - the screen coordinates of the responder grant\n * - `y0` - the screen coordinates of the responder grant\n * - `dx` - accumulated distance of the gesture since the touch started\n * - `dy` - accumulated distance of the gesture since the touch started\n * - `vx` - current velocity of the gesture\n * - `vy` - current velocity of the gesture\n * - `numberActiveTouches` - Number of touches currently on screen\n *\n * ### Basic Usage\n *\n * ```\n * componentWillMount: function() {\n * this._panResponder = PanResponder.create({\n * // Ask to be the responder:\n * onStartShouldSetPanResponder: (evt, gestureState) => true,\n * onStartShouldSetPanResponderCapture: (evt, gestureState) => true,\n * onMoveShouldSetPanResponder: (evt, gestureState) => true,\n * onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,\n *\n * onPanResponderGrant: (evt, gestureState) => {\n * // The gesture has started. Show visual feedback so the user knows\n * // what is happening!\n *\n * // gestureState.d{x,y} will be set to zero now\n * },\n * onPanResponderMove: (evt, gestureState) => {\n * // The most recent move distance is gestureState.move{X,Y}\n *\n * // The accumulated gesture distance since becoming responder is\n * // gestureState.d{x,y}\n * },\n * onPanResponderTerminationRequest: (evt, gestureState) => true,\n * onPanResponderRelease: (evt, gestureState) => {\n * // The user has released all touches while this view is the\n * // responder. This typically means a gesture has succeeded\n * },\n * onPanResponderTerminate: (evt, gestureState) => {\n * // Another component has become the responder, so this gesture\n * // should be cancelled\n * },\n * onShouldBlockNativeResponder: (evt, gestureState) => {\n * // Returns whether this component should block native components from becoming the JS\n * // responder. Returns true by default. Is currently only supported on android.\n * return true;\n * },\n * });\n * },\n *\n * render: function() {\n * return (\n * \n * );\n * },\n *\n * ```\n *\n * ### Working Example\n *\n * To see it in action, try the\n * [PanResponder example in RNTester](https://github.com/facebook/react-native/blob/HEAD/packages/rn-tester/js/examples/PanResponder/PanResponderExample.js)\n */\n\nexport type GestureState = {|\n /**\n * ID of the gestureState - persisted as long as there at least one touch on screen\n */\n stateID: number,\n\n /**\n * The latest screen coordinates of the recently-moved touch\n */\n moveX: number,\n\n /**\n * The latest screen coordinates of the recently-moved touch\n */\n moveY: number,\n\n /**\n * The screen coordinates of the responder grant\n */\n x0: number,\n\n /**\n * The screen coordinates of the responder grant\n */\n y0: number,\n\n /**\n * Accumulated distance of the gesture since the touch started\n */\n dx: number,\n\n /**\n * Accumulated distance of the gesture since the touch started\n */\n dy: number,\n\n /**\n * Current velocity of the gesture\n */\n vx: number,\n\n /**\n * Current velocity of the gesture\n */\n vy: number,\n\n /**\n * Number of touches currently on screen\n */\n numberActiveTouches: number,\n\n /**\n * All `gestureState` accounts for timeStamps up until this value\n *\n * @private\n */\n _accountsForMovesUpTo: number,\n|};\n\ntype ActiveCallback = (\n event: PressEvent,\n gestureState: GestureState,\n) => boolean;\n\ntype PassiveCallback = (event: PressEvent, gestureState: GestureState) => mixed;\n\nexport type PanHandlers = {|\n onMoveShouldSetResponder: (event: PressEvent) => boolean,\n onMoveShouldSetResponderCapture: (event: PressEvent) => boolean,\n onResponderEnd: (event: PressEvent) => void,\n onResponderGrant: (event: PressEvent) => boolean,\n onResponderMove: (event: PressEvent) => void,\n onResponderReject: (event: PressEvent) => void,\n onResponderRelease: (event: PressEvent) => void,\n onResponderStart: (event: PressEvent) => void,\n onResponderTerminate: (event: PressEvent) => void,\n onResponderTerminationRequest: (event: PressEvent) => boolean,\n onStartShouldSetResponder: (event: PressEvent) => boolean,\n onStartShouldSetResponderCapture: (event: PressEvent) => boolean,\n|};\n\ntype PanResponderConfig = $ReadOnly<{|\n onMoveShouldSetPanResponder?: ?ActiveCallback,\n onMoveShouldSetPanResponderCapture?: ?ActiveCallback,\n onStartShouldSetPanResponder?: ?ActiveCallback,\n onStartShouldSetPanResponderCapture?: ?ActiveCallback,\n /**\n * The body of `onResponderGrant` returns a bool, but the vast majority of\n * callsites return void and this TODO notice is found in it:\n * TODO: t7467124 investigate if this can be removed\n */\n onPanResponderGrant?: ?(PassiveCallback | ActiveCallback),\n onPanResponderReject?: ?PassiveCallback,\n onPanResponderStart?: ?PassiveCallback,\n onPanResponderEnd?: ?PassiveCallback,\n onPanResponderRelease?: ?PassiveCallback,\n onPanResponderMove?: ?PassiveCallback,\n onPanResponderTerminate?: ?PassiveCallback,\n onPanResponderTerminationRequest?: ?ActiveCallback,\n onShouldBlockNativeResponder?: ?ActiveCallback,\n|}>;\n\nconst PanResponder = {\n /**\n *\n * A graphical explanation of the touch data flow:\n *\n * +----------------------------+ +--------------------------------+\n * | ResponderTouchHistoryStore | |TouchHistoryMath |\n * +----------------------------+ +----------+---------------------+\n * |Global store of touchHistory| |Allocation-less math util |\n * |including activeness, start | |on touch history (centroids |\n * |position, prev/cur position.| |and multitouch movement etc) |\n * | | | |\n * +----^-----------------------+ +----^---------------------------+\n * | |\n * | (records relevant history |\n * | of touches relevant for |\n * | implementing higher level |\n * | gestures) |\n * | |\n * +----+-----------------------+ +----|---------------------------+\n * | ResponderEventPlugin | | | Your App/Component |\n * +----------------------------+ +----|---------------------------+\n * |Negotiates which view gets | Low level | | High level |\n * |onResponderMove events. | events w/ | +-+-------+ events w/ |\n * |Also records history into | touchHistory| | Pan | multitouch + |\n * |ResponderTouchHistoryStore. +---------------->Responder+-----> accumulative|\n * +----------------------------+ attached to | | | distance and |\n * each event | +---------+ velocity. |\n * | |\n * | |\n * +--------------------------------+\n *\n *\n *\n * Gesture that calculates cumulative movement over time in a way that just\n * \"does the right thing\" for multiple touches. The \"right thing\" is very\n * nuanced. When moving two touches in opposite directions, the cumulative\n * distance is zero in each dimension. When two touches move in parallel five\n * pixels in the same direction, the cumulative distance is five, not ten. If\n * two touches start, one moves five in a direction, then stops and the other\n * touch moves fives in the same direction, the cumulative distance is ten.\n *\n * This logic requires a kind of processing of time \"clusters\" of touch events\n * so that two touch moves that essentially occur in parallel but move every\n * other frame respectively, are considered part of the same movement.\n *\n * Explanation of some of the non-obvious fields:\n *\n * - moveX/moveY: If no move event has been observed, then `(moveX, moveY)` is\n * invalid. If a move event has been observed, `(moveX, moveY)` is the\n * centroid of the most recently moved \"cluster\" of active touches.\n * (Currently all move have the same timeStamp, but later we should add some\n * threshold for what is considered to be \"moving\"). If a palm is\n * accidentally counted as a touch, but a finger is moving greatly, the palm\n * will move slightly, but we only want to count the single moving touch.\n * - x0/y0: Centroid location (non-cumulative) at the time of becoming\n * responder.\n * - dx/dy: Cumulative touch distance - not the same thing as sum of each touch\n * distance. Accounts for touch moves that are clustered together in time,\n * moving the same direction. Only valid when currently responder (otherwise,\n * it only represents the drag distance below the threshold).\n * - vx/vy: Velocity.\n */\n\n _initializeGestureState(gestureState: GestureState) {\n gestureState.moveX = 0;\n gestureState.moveY = 0;\n gestureState.x0 = 0;\n gestureState.y0 = 0;\n gestureState.dx = 0;\n gestureState.dy = 0;\n gestureState.vx = 0;\n gestureState.vy = 0;\n gestureState.numberActiveTouches = 0;\n // All `gestureState` accounts for timeStamps up until:\n gestureState._accountsForMovesUpTo = 0;\n },\n\n /**\n * This is nuanced and is necessary. It is incorrect to continuously take all\n * active *and* recently moved touches, find the centroid, and track how that\n * result changes over time. Instead, we must take all recently moved\n * touches, and calculate how the centroid has changed just for those\n * recently moved touches, and append that change to an accumulator. This is\n * to (at least) handle the case where the user is moving three fingers, and\n * then one of the fingers stops but the other two continue.\n *\n * This is very different than taking all of the recently moved touches and\n * storing their centroid as `dx/dy`. For correctness, we must *accumulate\n * changes* in the centroid of recently moved touches.\n *\n * There is also some nuance with how we handle multiple moved touches in a\n * single event. With the way `ReactNativeEventEmitter` dispatches touches as\n * individual events, multiple touches generate two 'move' events, each of\n * them triggering `onResponderMove`. But with the way `PanResponder` works,\n * all of the gesture inference is performed on the first dispatch, since it\n * looks at all of the touches (even the ones for which there hasn't been a\n * native dispatch yet). Therefore, `PanResponder` does not call\n * `onResponderMove` passed the first dispatch. This diverges from the\n * typical responder callback pattern (without using `PanResponder`), but\n * avoids more dispatches than necessary.\n */\n _updateGestureStateOnMove(\n gestureState: GestureState,\n touchHistory: $PropertyType,\n ) {\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n gestureState.moveX = currentCentroidXOfTouchesChangedAfter(\n touchHistory,\n gestureState._accountsForMovesUpTo,\n );\n gestureState.moveY = currentCentroidYOfTouchesChangedAfter(\n touchHistory,\n gestureState._accountsForMovesUpTo,\n );\n const movedAfter = gestureState._accountsForMovesUpTo;\n const prevX = previousCentroidXOfTouchesChangedAfter(\n touchHistory,\n movedAfter,\n );\n const x = currentCentroidXOfTouchesChangedAfter(touchHistory, movedAfter);\n const prevY = previousCentroidYOfTouchesChangedAfter(\n touchHistory,\n movedAfter,\n );\n const y = currentCentroidYOfTouchesChangedAfter(touchHistory, movedAfter);\n const nextDX = gestureState.dx + (x - prevX);\n const nextDY = gestureState.dy + (y - prevY);\n\n // TODO: This must be filtered intelligently.\n const dt =\n touchHistory.mostRecentTimeStamp - gestureState._accountsForMovesUpTo;\n gestureState.vx = (nextDX - gestureState.dx) / dt;\n gestureState.vy = (nextDY - gestureState.dy) / dt;\n\n gestureState.dx = nextDX;\n gestureState.dy = nextDY;\n gestureState._accountsForMovesUpTo = touchHistory.mostRecentTimeStamp;\n },\n\n /**\n * @param {object} config Enhanced versions of all of the responder callbacks\n * that provide not only the typical `ResponderSyntheticEvent`, but also the\n * `PanResponder` gesture state. Simply replace the word `Responder` with\n * `PanResponder` in each of the typical `onResponder*` callbacks. For\n * example, the `config` object would look like:\n *\n * - `onMoveShouldSetPanResponder: (e, gestureState) => {...}`\n * - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}`\n * - `onStartShouldSetPanResponder: (e, gestureState) => {...}`\n * - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}`\n * - `onPanResponderReject: (e, gestureState) => {...}`\n * - `onPanResponderGrant: (e, gestureState) => {...}`\n * - `onPanResponderStart: (e, gestureState) => {...}`\n * - `onPanResponderEnd: (e, gestureState) => {...}`\n * - `onPanResponderRelease: (e, gestureState) => {...}`\n * - `onPanResponderMove: (e, gestureState) => {...}`\n * - `onPanResponderTerminate: (e, gestureState) => {...}`\n * - `onPanResponderTerminationRequest: (e, gestureState) => {...}`\n * - `onShouldBlockNativeResponder: (e, gestureState) => {...}`\n *\n * In general, for events that have capture equivalents, we update the\n * gestureState once in the capture phase and can use it in the bubble phase\n * as well.\n *\n * Be careful with onStartShould* callbacks. They only reflect updated\n * `gestureState` for start/end events that bubble/capture to the Node.\n * Once the node is the responder, you can rely on every start/end event\n * being processed by the gesture and `gestureState` being updated\n * accordingly. (numberActiveTouches) may not be totally accurate unless you\n * are the responder.\n */\n create(config: PanResponderConfig): {\n getInteractionHandle: () => ?number,\n panHandlers: PanHandlers,\n } {\n const interactionState = {\n handle: (null: ?number),\n };\n const gestureState: GestureState = {\n // Useful for debugging\n stateID: Math.random(),\n moveX: 0,\n moveY: 0,\n x0: 0,\n y0: 0,\n dx: 0,\n dy: 0,\n vx: 0,\n vy: 0,\n numberActiveTouches: 0,\n _accountsForMovesUpTo: 0,\n };\n const panHandlers = {\n onStartShouldSetResponder(event: PressEvent): boolean {\n return config.onStartShouldSetPanResponder == null\n ? false\n : config.onStartShouldSetPanResponder(event, gestureState);\n },\n onMoveShouldSetResponder(event: PressEvent): boolean {\n return config.onMoveShouldSetPanResponder == null\n ? false\n : config.onMoveShouldSetPanResponder(event, gestureState);\n },\n onStartShouldSetResponderCapture(event: PressEvent): boolean {\n // TODO: Actually, we should reinitialize the state any time\n // touches.length increases from 0 active to > 0 active.\n if (event.nativeEvent.touches.length === 1) {\n PanResponder._initializeGestureState(gestureState);\n }\n gestureState.numberActiveTouches =\n event.touchHistory.numberActiveTouches;\n return config.onStartShouldSetPanResponderCapture != null\n ? config.onStartShouldSetPanResponderCapture(event, gestureState)\n : false;\n },\n\n onMoveShouldSetResponderCapture(event: PressEvent): boolean {\n const touchHistory = event.touchHistory;\n // Responder system incorrectly dispatches should* to current responder\n // Filter out any touch moves past the first one - we would have\n // already processed multi-touch geometry during the first event.\n if (\n gestureState._accountsForMovesUpTo ===\n touchHistory.mostRecentTimeStamp\n ) {\n return false;\n }\n PanResponder._updateGestureStateOnMove(gestureState, touchHistory);\n return config.onMoveShouldSetPanResponderCapture\n ? config.onMoveShouldSetPanResponderCapture(event, gestureState)\n : false;\n },\n\n onResponderGrant(event: PressEvent): boolean {\n if (!interactionState.handle) {\n interactionState.handle =\n InteractionManager.createInteractionHandle();\n }\n gestureState.x0 = currentCentroidX(event.touchHistory);\n gestureState.y0 = currentCentroidY(event.touchHistory);\n gestureState.dx = 0;\n gestureState.dy = 0;\n if (config.onPanResponderGrant) {\n config.onPanResponderGrant(event, gestureState);\n }\n // TODO: t7467124 investigate if this can be removed\n return config.onShouldBlockNativeResponder == null\n ? true\n : config.onShouldBlockNativeResponder(event, gestureState);\n },\n\n onResponderReject(event: PressEvent): void {\n clearInteractionHandle(\n interactionState,\n config.onPanResponderReject,\n event,\n gestureState,\n );\n },\n\n onResponderRelease(event: PressEvent): void {\n clearInteractionHandle(\n interactionState,\n config.onPanResponderRelease,\n event,\n gestureState,\n );\n PanResponder._initializeGestureState(gestureState);\n },\n\n onResponderStart(event: PressEvent): void {\n const touchHistory = event.touchHistory;\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n if (config.onPanResponderStart) {\n config.onPanResponderStart(event, gestureState);\n }\n },\n\n onResponderMove(event: PressEvent): void {\n const touchHistory = event.touchHistory;\n // Guard against the dispatch of two touch moves when there are two\n // simultaneously changed touches.\n if (\n gestureState._accountsForMovesUpTo ===\n touchHistory.mostRecentTimeStamp\n ) {\n return;\n }\n // Filter out any touch moves past the first one - we would have\n // already processed multi-touch geometry during the first event.\n PanResponder._updateGestureStateOnMove(gestureState, touchHistory);\n if (config.onPanResponderMove) {\n config.onPanResponderMove(event, gestureState);\n }\n },\n\n onResponderEnd(event: PressEvent): void {\n const touchHistory = event.touchHistory;\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n clearInteractionHandle(\n interactionState,\n config.onPanResponderEnd,\n event,\n gestureState,\n );\n },\n\n onResponderTerminate(event: PressEvent): void {\n clearInteractionHandle(\n interactionState,\n config.onPanResponderTerminate,\n event,\n gestureState,\n );\n PanResponder._initializeGestureState(gestureState);\n },\n\n onResponderTerminationRequest(event: PressEvent): boolean {\n return config.onPanResponderTerminationRequest == null\n ? true\n : config.onPanResponderTerminationRequest(event, gestureState);\n },\n };\n return {\n panHandlers,\n getInteractionHandle(): ?number {\n return interactionState.handle;\n },\n };\n },\n};\n\nfunction clearInteractionHandle(\n interactionState: {handle: ?number, ...},\n callback: ?(ActiveCallback | PassiveCallback),\n event: PressEvent,\n gestureState: GestureState,\n) {\n if (interactionState.handle) {\n InteractionManager.clearInteractionHandle(interactionState.handle);\n interactionState.handle = null;\n }\n if (callback) {\n callback(event, gestureState);\n }\n}\n\nexport type PanResponderInstance = ReturnType<(typeof PanResponder)['create']>;\n\nexport default PanResponder;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\n\nconst TouchHistoryMath = {\n /**\n * This code is optimized and not intended to look beautiful. This allows\n * computing of touch centroids that have moved after `touchesChangedAfter`\n * timeStamp. You can compute the current centroid involving all touches\n * moves after `touchesChangedAfter`, or you can compute the previous\n * centroid of all touches that were moved after `touchesChangedAfter`.\n *\n * @param {TouchHistoryMath} touchHistory Standard Responder touch track\n * data.\n * @param {number} touchesChangedAfter timeStamp after which moved touches\n * are considered \"actively moving\" - not just \"active\".\n * @param {boolean} isXAxis Consider `x` dimension vs. `y` dimension.\n * @param {boolean} ofCurrent Compute current centroid for actively moving\n * touches vs. previous centroid of now actively moving touches.\n * @return {number} value of centroid in specified dimension.\n */\n centroidDimension: function (\n touchHistory,\n touchesChangedAfter,\n isXAxis,\n ofCurrent,\n ) {\n const touchBank = touchHistory.touchBank;\n let total = 0;\n let count = 0;\n\n const oneTouchData =\n touchHistory.numberActiveTouches === 1\n ? touchHistory.touchBank[touchHistory.indexOfSingleActiveTouch]\n : null;\n\n if (oneTouchData !== null) {\n if (\n oneTouchData.touchActive &&\n oneTouchData.currentTimeStamp > touchesChangedAfter\n ) {\n total +=\n ofCurrent && isXAxis\n ? oneTouchData.currentPageX\n : ofCurrent && !isXAxis\n ? oneTouchData.currentPageY\n : !ofCurrent && isXAxis\n ? oneTouchData.previousPageX\n : oneTouchData.previousPageY;\n count = 1;\n }\n } else {\n for (let i = 0; i < touchBank.length; i++) {\n const touchTrack = touchBank[i];\n if (\n touchTrack !== null &&\n touchTrack !== undefined &&\n touchTrack.touchActive &&\n touchTrack.currentTimeStamp >= touchesChangedAfter\n ) {\n let toAdd; // Yuck, program temporarily in invalid state.\n if (ofCurrent && isXAxis) {\n toAdd = touchTrack.currentPageX;\n } else if (ofCurrent && !isXAxis) {\n toAdd = touchTrack.currentPageY;\n } else if (!ofCurrent && isXAxis) {\n toAdd = touchTrack.previousPageX;\n } else {\n toAdd = touchTrack.previousPageY;\n }\n total += toAdd;\n count++;\n }\n }\n }\n return count > 0 ? total / count : TouchHistoryMath.noCentroid;\n },\n\n currentCentroidXOfTouchesChangedAfter: function (\n touchHistory,\n touchesChangedAfter,\n ) {\n return TouchHistoryMath.centroidDimension(\n touchHistory,\n touchesChangedAfter,\n true, // isXAxis\n true, // ofCurrent\n );\n },\n\n currentCentroidYOfTouchesChangedAfter: function (\n touchHistory,\n touchesChangedAfter,\n ) {\n return TouchHistoryMath.centroidDimension(\n touchHistory,\n touchesChangedAfter,\n false, // isXAxis\n true, // ofCurrent\n );\n },\n\n previousCentroidXOfTouchesChangedAfter: function (\n touchHistory,\n touchesChangedAfter,\n ) {\n return TouchHistoryMath.centroidDimension(\n touchHistory,\n touchesChangedAfter,\n true, // isXAxis\n false, // ofCurrent\n );\n },\n\n previousCentroidYOfTouchesChangedAfter: function (\n touchHistory,\n touchesChangedAfter,\n ) {\n return TouchHistoryMath.centroidDimension(\n touchHistory,\n touchesChangedAfter,\n false, // isXAxis\n false, // ofCurrent\n );\n },\n\n currentCentroidX: function (touchHistory) {\n return TouchHistoryMath.centroidDimension(\n touchHistory,\n 0, // touchesChangedAfter\n true, // isXAxis\n true, // ofCurrent\n );\n },\n\n currentCentroidY: function (touchHistory) {\n return TouchHistoryMath.centroidDimension(\n touchHistory,\n 0, // touchesChangedAfter\n false, // isXAxis\n true, // ofCurrent\n );\n },\n\n noCentroid: -1,\n};\n\nmodule.exports = TouchHistoryMath;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {\n PermissionStatus,\n PermissionType,\n} from './NativePermissionsAndroid';\n\nimport NativeDialogManagerAndroid from '../NativeModules/specs/NativeDialogManagerAndroid';\nimport NativePermissionsAndroid from './NativePermissionsAndroid';\nimport invariant from 'invariant';\n\nconst Platform = require('../Utilities/Platform');\n\nexport type Rationale = {\n title: string,\n message: string,\n buttonPositive?: string,\n buttonNegative?: string,\n buttonNeutral?: string,\n ...\n};\n\nconst PERMISSION_REQUEST_RESULT = Object.freeze({\n GRANTED: 'granted',\n DENIED: 'denied',\n NEVER_ASK_AGAIN: 'never_ask_again',\n});\n\nconst PERMISSIONS = Object.freeze({\n READ_CALENDAR: 'android.permission.READ_CALENDAR',\n WRITE_CALENDAR: 'android.permission.WRITE_CALENDAR',\n CAMERA: 'android.permission.CAMERA',\n READ_CONTACTS: 'android.permission.READ_CONTACTS',\n WRITE_CONTACTS: 'android.permission.WRITE_CONTACTS',\n GET_ACCOUNTS: 'android.permission.GET_ACCOUNTS',\n ACCESS_FINE_LOCATION: 'android.permission.ACCESS_FINE_LOCATION',\n ACCESS_COARSE_LOCATION: 'android.permission.ACCESS_COARSE_LOCATION',\n ACCESS_BACKGROUND_LOCATION: 'android.permission.ACCESS_BACKGROUND_LOCATION',\n RECORD_AUDIO: 'android.permission.RECORD_AUDIO',\n READ_PHONE_STATE: 'android.permission.READ_PHONE_STATE',\n CALL_PHONE: 'android.permission.CALL_PHONE',\n READ_CALL_LOG: 'android.permission.READ_CALL_LOG',\n WRITE_CALL_LOG: 'android.permission.WRITE_CALL_LOG',\n ADD_VOICEMAIL: 'com.android.voicemail.permission.ADD_VOICEMAIL',\n READ_VOICEMAIL: 'com.android.voicemail.permission.READ_VOICEMAIL',\n WRITE_VOICEMAIL: 'com.android.voicemail.permission.WRITE_VOICEMAIL',\n USE_SIP: 'android.permission.USE_SIP',\n PROCESS_OUTGOING_CALLS: 'android.permission.PROCESS_OUTGOING_CALLS',\n BODY_SENSORS: 'android.permission.BODY_SENSORS',\n BODY_SENSORS_BACKGROUND: 'android.permission.BODY_SENSORS_BACKGROUND',\n SEND_SMS: 'android.permission.SEND_SMS',\n RECEIVE_SMS: 'android.permission.RECEIVE_SMS',\n READ_SMS: 'android.permission.READ_SMS',\n RECEIVE_WAP_PUSH: 'android.permission.RECEIVE_WAP_PUSH',\n RECEIVE_MMS: 'android.permission.RECEIVE_MMS',\n READ_EXTERNAL_STORAGE: 'android.permission.READ_EXTERNAL_STORAGE',\n READ_MEDIA_IMAGES: 'android.permission.READ_MEDIA_IMAGES',\n READ_MEDIA_VIDEO: 'android.permission.READ_MEDIA_VIDEO',\n READ_MEDIA_AUDIO: 'android.permission.READ_MEDIA_AUDIO',\n READ_MEDIA_VISUAL_USER_SELECTED:\n 'android.permission.READ_MEDIA_VISUAL_USER_SELECTED',\n WRITE_EXTERNAL_STORAGE: 'android.permission.WRITE_EXTERNAL_STORAGE',\n BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',\n BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',\n BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',\n ACCESS_MEDIA_LOCATION: 'android.permission.ACCESS_MEDIA_LOCATION',\n ACCEPT_HANDOVER: 'android.permission.ACCEPT_HANDOVER',\n ACTIVITY_RECOGNITION: 'android.permission.ACTIVITY_RECOGNITION',\n ANSWER_PHONE_CALLS: 'android.permission.ANSWER_PHONE_CALLS',\n READ_PHONE_NUMBERS: 'android.permission.READ_PHONE_NUMBERS',\n UWB_RANGING: 'android.permission.UWB_RANGING',\n POST_NOTIFICATIONS: 'android.permission.POST_NOTIFICATIONS',\n NEARBY_WIFI_DEVICES: 'android.permission.NEARBY_WIFI_DEVICES',\n});\n\n/**\n * `PermissionsAndroid` provides access to Android M's new permissions model.\n *\n * See https://reactnative.dev/docs/permissionsandroid\n */\n\nclass PermissionsAndroid {\n PERMISSIONS: {|\n ACCEPT_HANDOVER: string,\n ACCESS_BACKGROUND_LOCATION: string,\n ACCESS_COARSE_LOCATION: string,\n ACCESS_FINE_LOCATION: string,\n ACCESS_MEDIA_LOCATION: string,\n ACTIVITY_RECOGNITION: string,\n ADD_VOICEMAIL: string,\n READ_VOICEMAIL: string,\n WRITE_VOICEMAIL: string,\n ANSWER_PHONE_CALLS: string,\n BLUETOOTH_ADVERTISE: string,\n BLUETOOTH_CONNECT: string,\n BLUETOOTH_SCAN: string,\n BODY_SENSORS: string,\n BODY_SENSORS_BACKGROUND: string,\n CALL_PHONE: string,\n CAMERA: string,\n GET_ACCOUNTS: string,\n NEARBY_WIFI_DEVICES: string,\n POST_NOTIFICATIONS: string,\n PROCESS_OUTGOING_CALLS: string,\n READ_CALENDAR: string,\n READ_CALL_LOG: string,\n READ_CONTACTS: string,\n READ_EXTERNAL_STORAGE: string,\n READ_MEDIA_IMAGES: string,\n READ_MEDIA_VIDEO: string,\n READ_MEDIA_AUDIO: string,\n READ_MEDIA_VISUAL_USER_SELECTED: string,\n READ_PHONE_NUMBERS: string,\n READ_PHONE_STATE: string,\n READ_SMS: string,\n RECEIVE_MMS: string,\n RECEIVE_SMS: string,\n RECEIVE_WAP_PUSH: string,\n RECORD_AUDIO: string,\n SEND_SMS: string,\n USE_SIP: string,\n UWB_RANGING: string,\n WRITE_CALENDAR: string,\n WRITE_CALL_LOG: string,\n WRITE_CONTACTS: string,\n WRITE_EXTERNAL_STORAGE: string,\n |} = PERMISSIONS;\n RESULTS: {|\n DENIED: 'denied',\n GRANTED: 'granted',\n NEVER_ASK_AGAIN: 'never_ask_again',\n |} = PERMISSION_REQUEST_RESULT;\n\n /**\n * DEPRECATED - use check\n *\n * Returns a promise resolving to a boolean value as to whether the specified\n * permissions has been granted\n *\n * @deprecated\n */\n checkPermission(permission: PermissionType): Promise {\n console.warn(\n '\"PermissionsAndroid.checkPermission\" is deprecated. Use \"PermissionsAndroid.check\" instead',\n );\n if (Platform.OS !== 'android') {\n console.warn(\n '\"PermissionsAndroid\" module works only for Android platform.',\n );\n return Promise.resolve(false);\n }\n\n invariant(\n NativePermissionsAndroid,\n 'PermissionsAndroid is not installed correctly.',\n );\n\n return NativePermissionsAndroid.checkPermission(permission);\n }\n\n /**\n * Returns a promise resolving to a boolean value as to whether the specified\n * permissions has been granted\n *\n * See https://reactnative.dev/docs/permissionsandroid#check\n */\n check(permission: PermissionType): Promise {\n if (Platform.OS !== 'android') {\n console.warn(\n '\"PermissionsAndroid\" module works only for Android platform.',\n );\n return Promise.resolve(false);\n }\n\n invariant(\n NativePermissionsAndroid,\n 'PermissionsAndroid is not installed correctly.',\n );\n\n return NativePermissionsAndroid.checkPermission(permission);\n }\n\n /**\n * DEPRECATED - use request\n *\n * Prompts the user to enable a permission and returns a promise resolving to a\n * boolean value indicating whether the user allowed or denied the request\n *\n * If the optional rationale argument is included (which is an object with a\n * `title` and `message`), this function checks with the OS whether it is\n * necessary to show a dialog explaining why the permission is needed\n * (https://developer.android.com/training/permissions/requesting#explain)\n * and then shows the system permission dialog\n *\n * @deprecated\n */\n async requestPermission(\n permission: PermissionType,\n rationale?: Rationale,\n ): Promise {\n console.warn(\n '\"PermissionsAndroid.requestPermission\" is deprecated. Use \"PermissionsAndroid.request\" instead',\n );\n if (Platform.OS !== 'android') {\n console.warn(\n '\"PermissionsAndroid\" module works only for Android platform.',\n );\n return Promise.resolve(false);\n }\n\n const response = await this.request(permission, rationale);\n return response === this.RESULTS.GRANTED;\n }\n\n /**\n * Prompts the user to enable a permission and returns a promise resolving to a\n * string value indicating whether the user allowed or denied the request\n *\n * See https://reactnative.dev/docs/permissionsandroid#request\n */\n async request(\n permission: PermissionType,\n rationale?: Rationale,\n ): Promise {\n if (Platform.OS !== 'android') {\n console.warn(\n '\"PermissionsAndroid\" module works only for Android platform.',\n );\n return Promise.resolve(this.RESULTS.DENIED);\n }\n\n invariant(\n NativePermissionsAndroid,\n 'PermissionsAndroid is not installed correctly.',\n );\n\n if (rationale) {\n const shouldShowRationale =\n await NativePermissionsAndroid.shouldShowRequestPermissionRationale(\n permission,\n );\n\n if (shouldShowRationale && !!NativeDialogManagerAndroid) {\n return new Promise((resolve, reject) => {\n const options = {\n ...rationale,\n };\n NativeDialogManagerAndroid.showAlert(\n /* $FlowFixMe[incompatible-exact] (>=0.111.0 site=react_native_fb)\n * This comment suppresses an error found when Flow v0.111 was\n * deployed. To see the error, delete this comment and run Flow.\n */\n options,\n () => reject(new Error('Error showing rationale')),\n () =>\n resolve(NativePermissionsAndroid.requestPermission(permission)),\n );\n });\n }\n }\n return NativePermissionsAndroid.requestPermission(permission);\n }\n\n /**\n * Prompts the user to enable multiple permissions in the same dialog and\n * returns an object with the permissions as keys and strings as values\n * indicating whether the user allowed or denied the request\n *\n * See https://reactnative.dev/docs/permissionsandroid#requestmultiple\n */\n requestMultiple(\n permissions: Array,\n ): Promise<{[permission: PermissionType]: PermissionStatus, ...}> {\n if (Platform.OS !== 'android') {\n console.warn(\n '\"PermissionsAndroid\" module works only for Android platform.',\n );\n return Promise.resolve({});\n }\n\n invariant(\n NativePermissionsAndroid,\n 'PermissionsAndroid is not installed correctly.',\n );\n return NativePermissionsAndroid.requestMultiplePermissions(permissions);\n }\n}\n\nconst PermissionsAndroidInstance: PermissionsAndroid = new PermissionsAndroid();\n\nmodule.exports = PermissionsAndroidInstance;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativePermissionsAndroid';\nimport NativePermissionsAndroid from '../../src/private/specs/modules/NativePermissionsAndroid';\nexport default NativePermissionsAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\n// TODO: Use proper enum types.\nexport type PermissionStatus = string;\nexport type PermissionType = string;\n/*\nexport type PermissionStatus = 'granted' | 'denied' | 'never_ask_again';\nexport type PermissionType =\n | 'android.permission.READ_CALENDAR'\n | 'android.permission.WRITE_CALENDAR'\n | 'android.permission.CAMERA'\n | 'android.permission.READ_CONTACTS'\n | 'android.permission.WRITE_CONTACTS'\n | 'android.permission.GET_ACCOUNTS'\n | 'android.permission.ACCESS_BACKGROUND_LOCATION'\n | 'android.permission.ACCESS_FINE_LOCATION'\n | 'android.permission.ACCESS_COARSE_LOCATION'\n | 'android.permission.RECORD_AUDIO'\n | 'android.permission.READ_PHONE_STATE'\n | 'android.permission.CALL_PHONE'\n | 'android.permission.READ_CALL_LOG'\n | 'android.permission.WRITE_CALL_LOG'\n | 'com.android.voicemail.permission.ADD_VOICEMAIL'\n | 'com.android.voicemail.permission.READ_VOICEMAIL'\n | 'com.android.voicemail.permission.WRITE_VOICEMAIL'\n | 'android.permission.USE_SIP'\n | 'android.permission.PROCESS_OUTGOING_CALLS'\n | 'android.permission.BODY_SENSORS'\n | 'android.permission.BODY_SENSORS_BACKGROUND'\n | 'android.permission.SEND_SMS'\n | 'android.permission.RECEIVE_SMS'\n | 'android.permission.READ_SMS'\n | 'android.permission.RECEIVE_WAP_PUSH'\n | 'android.permission.RECEIVE_MMS'\n | 'android.permission.READ_EXTERNAL_STORAGE'\n | 'android.permission.READ_MEDIA_IMAGES',\n | 'android.permission.READ_MEDIA_VIDEO',\n | 'android.permission.READ_MEDIA_AUDIO',\n | 'android.permission.READ_MEDIA_VISUAL_USER_SELECTED'\n | 'android.permission.WRITE_EXTERNAL_STORAGE'\n | 'android.permission.BLUETOOTH_CONNECT'\n | 'android.permission.BLUETOOTH_SCAN'\n | 'android.permission.BLUETOOTH_ADVERTISE'\n | 'android.permission.ACCESS_MEDIA_LOCATION'\n | 'android.permission.ACCEPT_HANDOVER'\n | 'android.permission.ACTIVITY_RECOGNITION'\n | 'android.permission.ANSWER_PHONE_CALLS'\n | 'android.permission.READ_PHONE_NUMBERS'\n | 'android.permission.UWB_RANGING'\n | 'android.permission.POST_NOTIFICATIONS'\n | 'android.permission.NEARBY_WIFI_DEVICES';\n*/\n\nexport interface Spec extends TurboModule {\n +checkPermission: (permission: PermissionType) => Promise;\n +requestPermission: (permission: PermissionType) => Promise;\n +shouldShowRequestPermissionRationale: (\n permission: string,\n ) => Promise;\n +requestMultiplePermissions: (\n permissions: Array,\n ) => Promise<{[permission: PermissionType]: PermissionStatus, ...}>;\n}\n\nexport default (TurboModuleRegistry.get('PermissionsAndroid'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {EventSubscription} from '../vendor/emitter/EventEmitter';\n\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport Platform from '../Utilities/Platform';\nimport NativePushNotificationManagerIOS from './NativePushNotificationManagerIOS';\nimport invariant from 'invariant';\n\ntype NativePushNotificationIOSEventDefinitions = {\n remoteNotificationReceived: [\n {\n notificationId: string,\n remote: boolean,\n ...\n },\n ],\n remoteNotificationsRegistered: [\n {\n deviceToken?: ?string,\n ...\n },\n ],\n remoteNotificationRegistrationError: [\n {\n message: string,\n code: number,\n details: {...},\n },\n ],\n localNotificationReceived: [{...}],\n};\n\nconst PushNotificationEmitter =\n new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativePushNotificationManagerIOS,\n );\n\nconst _notifHandlers = new Map();\n\nconst DEVICE_NOTIF_EVENT = 'remoteNotificationReceived';\nconst NOTIF_REGISTER_EVENT = 'remoteNotificationsRegistered';\nconst NOTIF_REGISTRATION_ERROR_EVENT = 'remoteNotificationRegistrationError';\nconst DEVICE_LOCAL_NOTIF_EVENT = 'localNotificationReceived';\n\nexport type ContentAvailable = 1 | null | void;\n\nexport type FetchResult = {\n NewData: string,\n NoData: string,\n ResultFailed: string,\n ...\n};\n\n/**\n * An event emitted by PushNotificationIOS.\n */\nexport type PushNotificationEventName = $Keys<{\n /**\n * Fired when a remote notification is received. The handler will be invoked\n * with an instance of `PushNotificationIOS`. This will handle notifications\n * that arrive in the foreground or were tapped to open the app from the\n * background.\n */\n notification: string,\n /**\n * Fired when a local notification is received. The handler will be invoked\n * with an instance of `PushNotificationIOS`. This will handle notifications\n * that arrive in the foreground or were tapped to open the app from the\n * background.\n */\n localNotification: string,\n /**\n * Fired when the user registers for remote notifications. The handler will be\n * invoked with a hex string representing the deviceToken.\n */\n register: string,\n /**\n * Fired when the user fails to register for remote notifications. Typically\n * occurs due to APNS issues or if the device is a simulator. The handler\n * will be invoked with {message: string, code: number, details: any}.\n */\n registrationError: string,\n ...\n}>;\n\n/**\n *\n * Handle notifications for your app, including scheduling and permissions.\n *\n * See https://reactnative.dev/docs/pushnotificationios\n */\nclass PushNotificationIOS {\n _data: Object;\n _alert: string | Object;\n _sound: string;\n _category: string;\n _contentAvailable: ContentAvailable;\n _badgeCount: number;\n _notificationId: string;\n _isRemote: boolean;\n _remoteNotificationCompleteCallbackCalled: boolean;\n _threadID: string;\n\n static FetchResult: FetchResult = {\n NewData: 'UIBackgroundFetchResultNewData',\n NoData: 'UIBackgroundFetchResultNoData',\n ResultFailed: 'UIBackgroundFetchResultFailed',\n };\n\n /**\n * Schedules a local notification for immediate presentation.\n *\n * See https://reactnative.dev/docs/pushnotificationios#presentlocalnotification\n */\n static presentLocalNotification(details: Object): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.presentLocalNotification(details);\n }\n\n /**\n * Schedules a local notification for future presentation.\n *\n * See https://reactnative.dev/docs/pushnotificationios#schedulelocalnotification\n */\n static scheduleLocalNotification(details: Object): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.scheduleLocalNotification(details);\n }\n\n /**\n * Cancels all scheduled local notifications.\n *\n * See https://reactnative.dev/docs/pushnotificationios#cancelalllocalnotifications\n */\n static cancelAllLocalNotifications(): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.cancelAllLocalNotifications();\n }\n\n /**\n * Removes all delivered notifications from Notification Center.\n *\n * See https://reactnative.dev/docs/pushnotificationios#removealldeliverednotifications\n */\n static removeAllDeliveredNotifications(): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.removeAllDeliveredNotifications();\n }\n\n /**\n * Provides a list of the app’s notifications that are currently displayed\n * in Notification Center.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getdeliverednotifications\n */\n static getDeliveredNotifications(\n callback: (notifications: Array) => void,\n ): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.getDeliveredNotifications(callback);\n }\n\n /**\n * Removes the specified notifications from Notification Center.\n *\n * See https://reactnative.dev/docs/pushnotificationios#removedeliverednotifications\n */\n static removeDeliveredNotifications(identifiers: Array): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.removeDeliveredNotifications(identifiers);\n }\n\n /**\n * Sets the badge number for the app icon on the Home Screen.\n *\n * See https://reactnative.dev/docs/pushnotificationios#setapplicationiconbadgenumber\n */\n static setApplicationIconBadgeNumber(number: number): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.setApplicationIconBadgeNumber(number);\n }\n\n /**\n * Gets the current badge number for the app icon on the Home Screen.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getapplicationiconbadgenumber\n */\n static getApplicationIconBadgeNumber(callback: Function): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.getApplicationIconBadgeNumber(callback);\n }\n\n /**\n * Cancels any scheduled local notifications which match the fields in the\n * provided `userInfo`.\n *\n * See https://reactnative.dev/docs/pushnotificationios#cancellocalnotification\n */\n static cancelLocalNotifications(userInfo: Object): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.cancelLocalNotifications(userInfo);\n }\n\n /**\n * Gets the list of local notifications that are currently scheduled.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getscheduledlocalnotifications\n */\n static getScheduledLocalNotifications(callback: Function): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.getScheduledLocalNotifications(callback);\n }\n\n /**\n * Attaches a listener to notification events including local notifications,\n * remote notifications, and notification registration results.\n *\n * See https://reactnative.dev/docs/pushnotificationios#addeventlistener\n */\n static addEventListener(\n type: PushNotificationEventName,\n handler: Function,\n ): void {\n invariant(\n type === 'notification' ||\n type === 'register' ||\n type === 'registrationError' ||\n type === 'localNotification',\n 'PushNotificationIOS only supports `notification`, `register`, `registrationError`, and `localNotification` events',\n );\n let listener;\n if (type === 'notification') {\n listener = PushNotificationEmitter.addListener(\n DEVICE_NOTIF_EVENT,\n notifData => {\n handler(new PushNotificationIOS(notifData));\n },\n );\n } else if (type === 'localNotification') {\n listener = PushNotificationEmitter.addListener(\n DEVICE_LOCAL_NOTIF_EVENT,\n notifData => {\n handler(new PushNotificationIOS(notifData));\n },\n );\n } else if (type === 'register') {\n listener = PushNotificationEmitter.addListener(\n NOTIF_REGISTER_EVENT,\n registrationInfo => {\n handler(registrationInfo.deviceToken);\n },\n );\n } else if (type === 'registrationError') {\n listener = PushNotificationEmitter.addListener(\n NOTIF_REGISTRATION_ERROR_EVENT,\n errorInfo => {\n handler(errorInfo);\n },\n );\n }\n _notifHandlers.set(type, listener);\n }\n\n /**\n * Removes the event listener. Do this in `componentWillUnmount` to prevent\n * memory leaks.\n *\n * See https://reactnative.dev/docs/pushnotificationios#removeeventlistener\n */\n static removeEventListener(type: PushNotificationEventName): void {\n invariant(\n type === 'notification' ||\n type === 'register' ||\n type === 'registrationError' ||\n type === 'localNotification',\n 'PushNotificationIOS only supports `notification`, `register`, `registrationError`, and `localNotification` events',\n );\n const listener = _notifHandlers.get(type);\n if (!listener) {\n return;\n }\n listener.remove();\n _notifHandlers.delete(type);\n }\n\n /**\n * Requests notification permissions from iOS, prompting the user with a\n * dialog box. By default, it will request all notification permissions, but\n * you can optionally specify which permissions to request.\n *\n * See https://reactnative.dev/docs/pushnotificationios#requestpermissions\n */\n static requestPermissions(permissions?: {\n alert?: boolean,\n badge?: boolean,\n sound?: boolean,\n ...\n }): Promise<{\n alert: boolean,\n badge: boolean,\n sound: boolean,\n ...\n }> {\n let requestedPermissions = {\n alert: true,\n badge: true,\n sound: true,\n };\n if (permissions) {\n requestedPermissions = {\n alert: !!permissions.alert,\n badge: !!permissions.badge,\n sound: !!permissions.sound,\n };\n }\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n return NativePushNotificationManagerIOS.requestPermissions(\n requestedPermissions,\n );\n }\n\n /**\n * Unregister for all remote notifications received via Apple Push Notification\n * service. This should be called in rare circumstances only.\n *\n * See https://reactnative.dev/docs/pushnotificationios#abandonpermissions\n */\n static abandonPermissions(): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.abandonPermissions();\n }\n\n /**\n * Check which push permissions are currently enabled. `callback` will be\n * invoked with a `Permissions` object.\n *\n * See https://reactnative.dev/docs/pushnotificationios#checkpermissions\n */\n static checkPermissions(callback: Function): void {\n invariant(typeof callback === 'function', 'Must provide a valid callback');\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.checkPermissions(callback);\n }\n\n /**\n * This method returns a promise that resolves to either the notification\n * object if the app was launched by a push notification, or `null` otherwise.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getinitialnotification\n */\n static getInitialNotification(): Promise {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n return NativePushNotificationManagerIOS.getInitialNotification().then(\n notification => {\n return notification && new PushNotificationIOS(notification);\n },\n );\n }\n\n /**\n * This method returns a promise that resolves to the current notification\n * authorization status. See UNAuthorizationStatus for possible values.\n */\n static getAuthorizationStatus(\n callback: (authorizationStatus: number) => void,\n ): void {\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n\n NativePushNotificationManagerIOS.getAuthorizationStatus(callback);\n }\n\n /**\n * You will never need to instantiate `PushNotificationIOS` yourself.\n * Listening to the `notification` event and invoking\n * `getInitialNotification` is sufficient.\n *\n */\n constructor(nativeNotif: Object) {\n this._data = {};\n this._remoteNotificationCompleteCallbackCalled = false;\n this._isRemote = nativeNotif.remote;\n if (this._isRemote) {\n this._notificationId = nativeNotif.notificationId;\n }\n\n if (nativeNotif.remote) {\n // Extract data from Apple's `aps` dict as defined:\n // https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService\n Object.keys(nativeNotif).forEach(notifKey => {\n const notifVal = nativeNotif[notifKey];\n if (notifKey === 'aps') {\n this._alert = notifVal.alert;\n this._sound = notifVal.sound;\n this._badgeCount = notifVal.badge;\n this._category = notifVal.category;\n this._contentAvailable = notifVal['content-available'];\n this._threadID = notifVal['thread-id'];\n } else {\n this._data[notifKey] = notifVal;\n }\n });\n } else {\n // Local notifications aren't being sent down with `aps` dict.\n this._badgeCount = nativeNotif.applicationIconBadgeNumber;\n this._sound = nativeNotif.soundName;\n this._alert = nativeNotif.alertBody;\n this._data = nativeNotif.userInfo;\n this._category = nativeNotif.category;\n }\n }\n\n /**\n * This method is available for remote notifications that have been received via:\n * `application:didReceiveRemoteNotification:fetchCompletionHandler:`. See docs\n * for more information.\n *\n * See https://reactnative.dev/docs/pushnotificationios#finish\n */\n finish(fetchResult: string): void {\n if (\n !this._isRemote ||\n !this._notificationId ||\n this._remoteNotificationCompleteCallbackCalled\n ) {\n return;\n }\n this._remoteNotificationCompleteCallbackCalled = true;\n\n invariant(\n NativePushNotificationManagerIOS,\n 'PushNotificationManager is not available.',\n );\n NativePushNotificationManagerIOS.onFinishRemoteNotification(\n this._notificationId,\n fetchResult,\n );\n }\n\n /**\n * An alias for `getAlert` to get the notification's main message string.\n */\n getMessage(): ?string | ?Object {\n // alias because \"alert\" is an ambiguous name\n return this._alert;\n }\n\n /**\n * Gets the sound string from the `aps` object. This will be `null` for local\n * notifications.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getsound\n */\n getSound(): ?string {\n return this._sound;\n }\n\n /**\n * Gets the category string from the `aps` object.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getcategory\n */\n getCategory(): ?string {\n return this._category;\n }\n\n /**\n * Gets the notification's main message from the `aps` object. Also see the\n * alias: `getMessage()`.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getalert\n */\n getAlert(): ?string | ?Object {\n return this._alert;\n }\n\n /**\n * Gets the content-available number from the `aps` object.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getcontentavailable\n */\n getContentAvailable(): ContentAvailable {\n return this._contentAvailable;\n }\n\n /**\n * Gets the badge count number from the `aps` object.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getbadgecount\n */\n getBadgeCount(): ?number {\n return this._badgeCount;\n }\n\n /**\n * Gets the data object on the notification.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getdata\n */\n getData(): ?Object {\n return this._data;\n }\n\n /**\n * Gets the thread ID on the notification.\n *\n * See https://reactnative.dev/docs/pushnotificationios#getthreadid\n */\n getThreadID(): ?string {\n return this._threadID;\n }\n}\n\nmodule.exports = PushNotificationIOS;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativePushNotificationManagerIOS';\nimport NativePushNotificationManagerIOS from '../../src/private/specs/modules/NativePushNotificationManagerIOS';\nexport default NativePushNotificationManagerIOS;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\ntype Permissions = {|\n alert: boolean,\n badge: boolean,\n sound: boolean,\n|};\n\ntype Notification = {|\n +alertTitle?: ?string,\n +alertBody?: ?string,\n +userInfo?: ?Object,\n /**\n * Identifier for the notification category. See the [Apple documentation](https://developer.apple.com/documentation/usernotifications/declaring_your_actionable_notification_types)\n * for more details.\n */\n +category?: ?string,\n /**\n * Actual type: string | number\n *\n * Schedule notifications using EITHER `fireDate` or `fireIntervalSeconds`.\n * If both are specified, `fireDate` takes precedence.\n * If you use `presentLocalNotification`, both will be ignored\n * and the notification will be shown immediately.\n */\n +fireDate?: ?number,\n /**\n * Seconds from now to display the notification.\n *\n * Schedule notifications using EITHER `fireDate` or `fireIntervalSeconds`.\n * If both are specified, `fireDate` takes precedence.\n * If you use `presentLocalNotification`, both will be ignored\n * and the notification will be shown immediately.\n */\n +fireIntervalSeconds?: ?number,\n /** Badge count to display on the app icon. */\n +applicationIconBadgeNumber?: ?number,\n /** Whether to silence the notification sound. */\n +isSilent?: ?boolean,\n /**\n * Custom notification sound. Can only be set when creating notifications.\n * This will be null for notifications retrieved via\n * getScheduledLocalNotifications or getDeliveredNotifications.\n */\n +soundName?: ?string,\n|};\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {||};\n +onFinishRemoteNotification: (\n notificationId: string,\n /**\n * Type:\n * 'UIBackgroundFetchResultNewData' |\n * 'UIBackgroundFetchResultNoData' |\n * 'UIBackgroundFetchResultFailed'\n */\n fetchResult: string,\n ) => void;\n +setApplicationIconBadgeNumber: (num: number) => void;\n +getApplicationIconBadgeNumber: (callback: (num: number) => void) => void;\n +requestPermissions: (permission: {|\n +alert: boolean,\n +badge: boolean,\n +sound: boolean,\n |}) => Promise;\n +abandonPermissions: () => void;\n +checkPermissions: (callback: (permissions: Permissions) => void) => void;\n +presentLocalNotification: (notification: Notification) => void;\n +scheduleLocalNotification: (notification: Notification) => void;\n +cancelAllLocalNotifications: () => void;\n +cancelLocalNotifications: (userInfo: Object) => void;\n +getInitialNotification: () => Promise;\n +getScheduledLocalNotifications: (\n callback: (notification: Notification) => void,\n ) => void;\n +removeAllDeliveredNotifications: () => void;\n +removeDeliveredNotifications: (identifiers: Array) => void;\n +getDeliveredNotifications: (\n callback: (notification: Array) => void,\n ) => void;\n +getAuthorizationStatus: (\n callback: (authorizationStatus: number) => void,\n ) => void;\n +addListener: (eventType: string) => void;\n +removeListeners: (count: number) => void;\n}\n\nexport default (TurboModuleRegistry.get(\n 'PushNotificationManager',\n): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';\n\nconst Settings = {\n get(key: string): mixed {\n console.warn('Settings is not yet supported on this platform.');\n return null;\n },\n\n set(settings: Object) {\n console.warn('Settings is not yet supported on this platform.');\n },\n\n watchKeys(keys: string | Array, callback: Function): number {\n console.warn('Settings is not yet supported on this platform.');\n return -1;\n },\n\n clearWatch(watchId: number) {\n console.warn('Settings is not yet supported on this platform.');\n },\n};\n\nmodule.exports = Settings;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport NativeActionSheetManager from '../ActionSheetIOS/NativeActionSheetManager';\nimport NativeShareModule from './NativeShareModule';\n\nconst processColor = require('../StyleSheet/processColor').default;\nconst Platform = require('../Utilities/Platform');\nconst invariant = require('invariant');\n\nexport type ShareContent =\n | {\n title?: string,\n url: string,\n message?: string,\n }\n | {\n title?: string,\n url?: string,\n message: string,\n };\nexport type ShareOptions = {\n dialogTitle?: string,\n excludedActivityTypes?: Array,\n tintColor?: string,\n subject?: string,\n anchor?: number,\n};\n\nclass Share {\n /**\n * Open a dialog to share text content.\n *\n * In iOS, Returns a Promise which will be invoked an object containing `action`, `activityType`.\n * If the user dismissed the dialog, the Promise will still be resolved with action being `Share.dismissedAction`\n * and all the other keys being undefined.\n *\n * In Android, Returns a Promise which always resolves with action being `Share.sharedAction`.\n *\n * ### Content\n *\n * #### iOS\n *\n * - `url` - a URL to share\n * - `message` - a message to share\n *\n * At least one of `URL` or `message` is required.\n *\n * #### Android\n *\n * - `title` - title of the message (optional)\n * - `message` - a message to share (often will include a URL).\n *\n * ### Options\n *\n * #### iOS\n *\n * - `subject` - a subject to share via email\n * - `excludedActivityTypes`\n * - `tintColor`\n *\n * #### Android\n *\n * - `dialogTitle`\n *\n */\n static share(\n content: ShareContent,\n options: ShareOptions = {},\n ): Promise<{action: string, activityType: ?string}> {\n invariant(\n typeof content === 'object' && content !== null,\n 'Content to share must be a valid object',\n );\n invariant(\n typeof content.url === 'string' || typeof content.message === 'string',\n 'At least one of URL or message is required',\n );\n invariant(\n typeof options === 'object' && options !== null,\n 'Options must be a valid object',\n );\n\n if (Platform.OS === 'android') {\n invariant(\n NativeShareModule,\n 'ShareModule should be registered on Android.',\n );\n invariant(\n content.title == null || typeof content.title === 'string',\n 'Invalid title: title should be a string.',\n );\n\n const newContent = {\n title: content.title,\n message:\n typeof content.message === 'string' ? content.message : undefined,\n };\n\n return NativeShareModule.share(newContent, options.dialogTitle).then(\n result => ({\n activityType: null,\n ...result,\n }),\n );\n } else if (Platform.OS === 'ios') {\n return new Promise((resolve, reject) => {\n const tintColor = processColor(options.tintColor);\n\n invariant(\n tintColor == null || typeof tintColor === 'number',\n 'Unexpected color given for options.tintColor',\n );\n\n invariant(\n NativeActionSheetManager,\n 'NativeActionSheetManager is not registered on iOS, but it should be.',\n );\n\n NativeActionSheetManager.showShareActionSheetWithOptions(\n {\n message:\n typeof content.message === 'string' ? content.message : undefined,\n url: typeof content.url === 'string' ? content.url : undefined,\n subject: options.subject,\n tintColor: typeof tintColor === 'number' ? tintColor : undefined,\n anchor:\n typeof options.anchor === 'number' ? options.anchor : undefined,\n excludedActivityTypes: options.excludedActivityTypes,\n },\n error => reject(error),\n (success, activityType) => {\n if (success) {\n resolve({\n action: 'sharedAction',\n activityType: activityType,\n });\n } else {\n resolve({\n action: 'dismissedAction',\n activityType: null,\n });\n }\n },\n );\n });\n } else {\n return Promise.reject(new Error('Unsupported platform'));\n }\n }\n\n /**\n * The content was successfully shared.\n */\n static sharedAction: 'sharedAction' = 'sharedAction';\n\n /**\n * The dialog has been dismissed.\n * @platform ios\n */\n static dismissedAction: 'dismissedAction' = 'dismissedAction';\n}\n\nmodule.exports = Share;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeShareModule';\nimport NativeShareModule from '../../src/private/specs/modules/NativeShareModule';\nexport default NativeShareModule;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {||};\n +share: (\n content: {|title?: string, message?: string|},\n dialogTitle?: string,\n ) => Promise<{|action: string|}>;\n}\n\nexport default (TurboModuleRegistry.get('ShareModule'): ?Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport NativeToastAndroid from './NativeToastAndroid';\n\n/**\n * This exposes the native ToastAndroid module as a JS module. This has a function 'show'\n * which takes the following parameters:\n *\n * 1. String message: A string with the text to toast\n * 2. int duration: The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG\n *\n * There is also a function `showWithGravity` to specify the layout gravity. May be\n * ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER.\n *\n * The 'showWithGravityAndOffset' function adds on the ability to specify offset\n * These offset values will translate to pixels.\n *\n * Basic usage:\n * ```javascript\n * ToastAndroid.show('A pikachu appeared nearby !', ToastAndroid.SHORT);\n * ToastAndroid.showWithGravity('All Your Base Are Belong To Us', ToastAndroid.SHORT, ToastAndroid.CENTER);\n * ToastAndroid.showWithGravityAndOffset('A wild toast appeared!', ToastAndroid.LONG, ToastAndroid.BOTTOM, 25, 50);\n * ```\n */\n\nconst ToastAndroidConstants = NativeToastAndroid.getConstants();\n\nconst ToastAndroid = {\n // Toast duration constants\n SHORT: (ToastAndroidConstants.SHORT: number),\n LONG: (ToastAndroidConstants.LONG: number),\n // Toast gravity constants\n TOP: (ToastAndroidConstants.TOP: number),\n BOTTOM: (ToastAndroidConstants.BOTTOM: number),\n CENTER: (ToastAndroidConstants.CENTER: number),\n\n show: function (message: string, duration: number): void {\n NativeToastAndroid.show(message, duration);\n },\n\n showWithGravity: function (\n message: string,\n duration: number,\n gravity: number,\n ): void {\n NativeToastAndroid.showWithGravity(message, duration, gravity);\n },\n\n showWithGravityAndOffset: function (\n message: string,\n duration: number,\n gravity: number,\n xOffset: number,\n yOffset: number,\n ): void {\n NativeToastAndroid.showWithGravityAndOffset(\n message,\n duration,\n gravity,\n xOffset,\n yOffset,\n );\n },\n};\n\nmodule.exports = ToastAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../../src/private/specs/modules/NativeToastAndroid';\nimport NativeToastAndroid from '../../../src/private/specs/modules/NativeToastAndroid';\nexport default NativeToastAndroid;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {|\n SHORT: number,\n LONG: number,\n TOP: number,\n BOTTOM: number,\n CENTER: number,\n |};\n +show: (message: string, duration: number) => void;\n +showWithGravity: (\n message: string,\n duration: number,\n gravity: number,\n ) => void;\n +showWithGravityAndOffset: (\n message: string,\n duration: number,\n gravity: number,\n xOffset: number,\n yOffset: number,\n ) => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('ToastAndroid'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\nimport type {AnimatedValueConfig} from './nodes/AnimatedValue';\n\nimport Animated from './Animated';\nimport {useRef} from 'react';\n\nexport default function useAnimatedValue(\n initialValue: number,\n config?: ?AnimatedValueConfig,\n): Animated.Value {\n const ref = useRef(null);\n if (ref.current == null) {\n ref.current = new Animated.Value(initialValue, config);\n }\n return ref.current;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\n'use strict';\n\nimport type {ColorSchemeName} from './NativeAppearance';\n\nimport Appearance from './Appearance';\nimport {useSyncExternalStore} from 'react';\n\nconst subscribe = (onStoreChange: () => void) => {\n const appearanceSubscription = Appearance.addChangeListener(onStoreChange);\n return () => appearanceSubscription.remove();\n};\n\nexport default function useColorScheme(): ?ColorSchemeName {\n return useSyncExternalStore(subscribe, Appearance.getColorScheme);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use strict';\n\nconst deepFreezeAndThrowOnMutationInDev = require('./Utilities/deepFreezeAndThrowOnMutationInDev');\n\n/**\n * A collection of Unicode sequences for various characters and emoji.\n *\n * - More explicit than using the sequences directly in code.\n * - Source code should be limited to ASCII.\n * - Less chance of typos.\n */\nconst UTFSequence: {|\n BOM: string,\n BULLET: string,\n BULLET_SP: string,\n MDASH: string,\n MDASH_SP: string,\n MIDDOT: string,\n MIDDOT_KATAKANA: string,\n MIDDOT_SP: string,\n NBSP: string,\n NDASH: string,\n NDASH_SP: string,\n NEWLINE: string,\n PIZZA: string,\n TRIANGLE_LEFT: string,\n TRIANGLE_RIGHT: string,\n|} = deepFreezeAndThrowOnMutationInDev({\n BOM: '\\ufeff', // byte order mark\n BULLET: '\\u2022', // bullet: •\n BULLET_SP: '\\u00A0\\u2022\\u00A0', //  • \n MIDDOT: '\\u00B7', // normal middle dot: ·\n MIDDOT_SP: '\\u00A0\\u00B7\\u00A0', //  · \n MIDDOT_KATAKANA: '\\u30FB', // katakana middle dot\n MDASH: '\\u2014', // em dash: —\n MDASH_SP: '\\u00A0\\u2014\\u00A0', //  — \n NDASH: '\\u2013', // en dash: –\n NDASH_SP: '\\u00A0\\u2013\\u00A0', //  – \n NEWLINE: '\\u000A',\n NBSP: '\\u00A0', // non-breaking space:  \n PIZZA: '\\uD83C\\uDF55',\n TRIANGLE_LEFT: '\\u25c0', // black left-pointing triangle\n TRIANGLE_RIGHT: '\\u25b6', // black right-pointing triangle\n});\n\nexport default UTFSequence;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n * @jsdoc\n */\n\nimport NativeVibration from './NativeVibration';\n\nconst Platform = require('../Utilities/Platform');\n\n/**\n * Vibration API\n *\n * See https://reactnative.dev/docs/vibration\n */\n\nlet _vibrating: boolean = false;\nlet _id: number = 0; // _id is necessary to prevent race condition.\nconst _default_vibration_length = 400;\n\nfunction vibrateByPattern(pattern: Array, repeat: boolean = false) {\n if (_vibrating) {\n return;\n }\n _vibrating = true;\n if (pattern[0] === 0) {\n NativeVibration.vibrate(_default_vibration_length);\n // $FlowFixMe[reassign-const]\n pattern = pattern.slice(1);\n }\n if (pattern.length === 0) {\n _vibrating = false;\n return;\n }\n setTimeout(() => vibrateScheduler(++_id, pattern, repeat, 1), pattern[0]);\n}\n\nfunction vibrateScheduler(\n id: number,\n pattern: Array,\n repeat: boolean,\n nextIndex: number,\n) {\n if (!_vibrating || id !== _id) {\n return;\n }\n NativeVibration.vibrate(_default_vibration_length);\n if (nextIndex >= pattern.length) {\n if (repeat) {\n // $FlowFixMe[reassign-const]\n nextIndex = 0;\n } else {\n _vibrating = false;\n return;\n }\n }\n setTimeout(\n () => vibrateScheduler(id, pattern, repeat, nextIndex + 1),\n pattern[nextIndex],\n );\n}\n\nconst Vibration = {\n /**\n * Trigger a vibration with specified `pattern`.\n *\n * See https://reactnative.dev/docs/vibration#vibrate\n */\n vibrate: function (\n pattern: number | Array = _default_vibration_length,\n repeat: boolean = false,\n ) {\n if (Platform.OS === 'android') {\n if (typeof pattern === 'number') {\n NativeVibration.vibrate(pattern);\n } else if (Array.isArray(pattern)) {\n NativeVibration.vibrateByPattern(pattern, repeat ? 0 : -1);\n } else {\n throw new Error('Vibration pattern should be a number or array');\n }\n } else {\n if (_vibrating) {\n return;\n }\n if (typeof pattern === 'number') {\n NativeVibration.vibrate(pattern);\n } else if (Array.isArray(pattern)) {\n vibrateByPattern(pattern, repeat);\n } else {\n throw new Error('Vibration pattern should be a number or array');\n }\n }\n },\n /**\n * Stop vibration\n *\n * See https://reactnative.dev/docs/vibration#cancel\n */\n cancel: function () {\n if (Platform.OS === 'ios') {\n _vibrating = false;\n } else {\n NativeVibration.cancel();\n }\n },\n};\n\nmodule.exports = Vibration;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nexport * from '../../src/private/specs/modules/NativeVibration';\nimport NativeVibration from '../../src/private/specs/modules/NativeVibration';\nexport default NativeVibration;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\nimport type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';\n\nimport * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';\n\nexport interface Spec extends TurboModule {\n +getConstants: () => {||};\n +vibrate: (pattern: number) => void;\n\n // Android only\n +vibrateByPattern: (pattern: Array, repeat: number) => void;\n +cancel: () => void;\n}\n\nexport default (TurboModuleRegistry.getEnforcing('Vibration'): Spec);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n'use strict';\n\nimport type {IgnorePattern} from '../LogBox/Data/LogBoxData';\n\nconst LogBox = require('../LogBox/LogBox').default;\nconst React = require('react');\n\ntype Props = $ReadOnly<{||}>;\n\nlet YellowBox;\nif (__DEV__) {\n YellowBox = class extends React.Component {\n static ignoreWarnings(patterns: $ReadOnlyArray): void {\n console.warn(\n 'YellowBox has been replaced with LogBox. Please call LogBox.ignoreLogs() instead.',\n );\n\n LogBox.ignoreLogs(patterns);\n }\n\n static install(): void {\n console.warn(\n 'YellowBox has been replaced with LogBox. Please call LogBox.install() instead.',\n );\n LogBox.install();\n }\n\n static uninstall(): void {\n console.warn(\n 'YellowBox has been replaced with LogBox. Please call LogBox.uninstall() instead.',\n );\n LogBox.uninstall();\n }\n\n render(): React.Node {\n return null;\n }\n };\n} else {\n YellowBox = class extends React.Component {\n static ignoreWarnings(patterns: $ReadOnlyArray): void {\n // Do nothing.\n }\n\n static install(): void {\n // Do nothing.\n }\n\n static uninstall(): void {\n // Do nothing.\n }\n\n render(): React.Node {\n return null;\n }\n };\n}\n\n// $FlowFixMe[method-unbinding]\nmodule.exports = (YellowBox: Class> & {\n ignoreWarnings($ReadOnlyArray): void,\n install(): void,\n uninstall(): void,\n ...\n});\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict-local\n */\n\nimport type {ColorValue} from './StyleSheet';\n\nexport type DynamicColorIOSTuple = {\n light: ColorValue,\n dark: ColorValue,\n highContrastLight?: ColorValue,\n highContrastDark?: ColorValue,\n};\n\nexport const DynamicColorIOS = (tuple: DynamicColorIOSTuple): ColorValue => {\n throw new Error('DynamicColorIOS is not available on this platform.');\n};\n","import * as React from 'react';\nimport { useImperativeHandle, useRef } from 'react';\n\nimport {\n NativeViewGestureHandler,\n NativeViewGestureHandlerProps,\n nativeViewProps,\n} from './NativeViewGestureHandler';\n\n/*\n * This array should consist of:\n * - All keys in propTypes from NativeGestureHandler\n * (and all keys in GestureHandlerPropTypes)\n * - 'onGestureHandlerEvent'\n * - 'onGestureHandlerStateChange'\n */\nconst NATIVE_WRAPPER_PROPS_FILTER = [\n ...nativeViewProps,\n 'onGestureHandlerEvent',\n 'onGestureHandlerStateChange',\n] as const;\n\nexport default function createNativeWrapper

(\n Component: React.ComponentType

,\n config: Readonly = {}\n) {\n const ComponentWrapper = React.forwardRef<\n React.ComponentType,\n P & NativeViewGestureHandlerProps\n >((props, ref) => {\n // Filter out props that should be passed to gesture handler wrapper\n const gestureHandlerProps = Object.keys(props).reduce(\n (res, key) => {\n // TS being overly protective with it's types, see https://github.com/microsoft/TypeScript/issues/26255#issuecomment-458013731 for more info\n const allowedKeys: readonly string[] = NATIVE_WRAPPER_PROPS_FILTER;\n if (allowedKeys.includes(key)) {\n // @ts-ignore FIXME(TS)\n res[key] = props[key];\n }\n return res;\n },\n { ...config } // Watch out not to modify config\n );\n const _ref = useRef>();\n const _gestureHandlerRef = useRef>();\n useImperativeHandle(\n ref,\n // @ts-ignore TODO(TS) decide how nulls work in this context\n () => {\n const node = _gestureHandlerRef.current;\n // Add handlerTag for relations config\n if (_ref.current && node) {\n // @ts-ignore FIXME(TS) think about createHandler return type\n _ref.current.handlerTag = node.handlerTag;\n return _ref.current;\n }\n return null;\n },\n [_ref, _gestureHandlerRef]\n );\n return (\n \n \n \n );\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n ComponentWrapper.displayName =\n Component?.displayName ||\n // @ts-ignore if render doesn't exist it will return undefined and go further\n Component?.render?.name ||\n (typeof Component === 'string' && Component) ||\n 'ComponentWrapper';\n\n return ComponentWrapper;\n}\n","import type { NativeViewGestureHandlerPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const nativeViewGestureHandlerProps = [\n 'shouldActivateOnStart',\n 'disallowInterruption',\n] as const;\n\nexport interface NativeViewGestureConfig {\n /**\n * Android only.\n *\n * Determines whether the handler should check for an existing touch event on\n * instantiation.\n */\n shouldActivateOnStart?: boolean;\n\n /**\n * When `true`, cancels all other gesture handlers when this\n * `NativeViewGestureHandler` receives an `ACTIVE` state event.\n */\n disallowInterruption?: boolean;\n}\n\nexport interface NativeViewGestureHandlerProps\n extends BaseGestureHandlerProps,\n NativeViewGestureConfig {}\n\nexport const nativeViewProps = [\n ...baseGestureHandlerProps,\n ...nativeViewGestureHandlerProps,\n] as const;\n\nexport const nativeViewHandlerName = 'NativeViewGestureHandler';\n\nexport type NativeViewGestureHandler = typeof NativeViewGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const NativeViewGestureHandler = createHandler<\n NativeViewGestureHandlerProps,\n NativeViewGestureHandlerPayload\n>({\n name: nativeViewHandlerName,\n allowedProps: nativeViewProps,\n config: {},\n});\n","import * as React from 'react';\nimport {\n Platform,\n UIManager,\n DeviceEventEmitter,\n EmitterSubscription,\n} from 'react-native';\nimport { customDirectEventTypes } from './customDirectEventTypes';\nimport RNGestureHandlerModule from '../RNGestureHandlerModule';\nimport { State } from '../State';\nimport { handlerIDToTag, registerOldGestureHandler } from './handlersRegistry';\nimport { getNextHandlerTag } from './getNextHandlerTag';\n\nimport {\n BaseGestureHandlerProps,\n GestureEvent,\n HandlerStateChangeEvent,\n} from './gestureHandlerCommon';\nimport { filterConfig, findNodeHandle, scheduleFlushOperations } from './utils';\nimport { ValueOf } from '../typeUtils';\nimport { deepEqual, isFabric, isJestEnv, tagMessage } from '../utils';\nimport { ActionType } from '../ActionType';\nimport { PressabilityDebugView } from './PressabilityDebugView';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\nimport { ghQueueMicrotask } from '../ghQueueMicrotask';\n\nconst UIManagerAny = UIManager as any;\n\ncustomDirectEventTypes.topGestureHandlerEvent = {\n registrationName: 'onGestureHandlerEvent',\n};\n\nconst customGHEventsConfigFabricAndroid = {\n topOnGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' },\n topOnGestureHandlerStateChange: {\n registrationName: 'onGestureHandlerStateChange',\n },\n};\n\nconst customGHEventsConfig = {\n onGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' },\n onGestureHandlerStateChange: {\n registrationName: 'onGestureHandlerStateChange',\n },\n\n // When using React Native Gesture Handler for Animated.event with useNativeDriver: true\n // on Android with Fabric enabled, the native part still sends the native events to JS\n // but prefixed with \"top\". We cannot simply rename the events above so they are prefixed\n // with \"top\" instead of \"on\" because in such case Animated.events would not be registered.\n // That's why we need to register another pair of event names.\n // The incoming events will be queued but never handled.\n // Without this piece of code below, you'll get the following JS error:\n // Unsupported top level event type \"topOnGestureHandlerEvent\" dispatched\n ...(isFabric() &&\n Platform.OS === 'android' &&\n customGHEventsConfigFabricAndroid),\n};\n\n// Add gesture specific events to genericDirectEventTypes object exported from UIManager\n// native module.\n// Once new event types are registered with react it is possible to dispatch these\n// events to all kind of native views.\nUIManagerAny.genericDirectEventTypes = {\n ...UIManagerAny.genericDirectEventTypes,\n ...customGHEventsConfig,\n};\n// In newer versions of RN the `genericDirectEventTypes` is located in the object\n// returned by UIManager.getViewManagerConfig('getConstants') or in older RN UIManager.getConstants(), we need to add it there as well to make\n// it compatible with RN 61+\nconst UIManagerConstants =\n UIManagerAny.getViewManagerConfig?.('getConstants') ??\n UIManagerAny.getConstants?.();\n\nif (UIManagerConstants) {\n UIManagerConstants.genericDirectEventTypes = {\n ...UIManagerConstants.genericDirectEventTypes,\n ...customGHEventsConfig,\n };\n}\n\n// Wrap JS responder calls and notify gesture handler manager\nconst {\n setJSResponder: oldSetJSResponder = () => {\n // no-op\n },\n clearJSResponder: oldClearJSResponder = () => {\n // no-op\n },\n} = UIManagerAny;\nUIManagerAny.setJSResponder = (tag: number, blockNativeResponder: boolean) => {\n RNGestureHandlerModule.handleSetJSResponder(tag, blockNativeResponder);\n oldSetJSResponder(tag, blockNativeResponder);\n};\nUIManagerAny.clearJSResponder = () => {\n RNGestureHandlerModule.handleClearJSResponder();\n oldClearJSResponder();\n};\n\nlet allowTouches = true;\nconst DEV_ON_ANDROID = __DEV__ && Platform.OS === 'android';\n// Toggled inspector blocks touch events in order to allow inspecting on Android\n// This needs to be a global variable in order to set initial state for `allowTouches` property in Handler component\nif (DEV_ON_ANDROID) {\n DeviceEventEmitter.addListener('toggleElementInspector', () => {\n allowTouches = !allowTouches;\n });\n}\n\ntype HandlerProps> = Readonly<\n React.PropsWithChildren>\n>;\nfunction hasUnresolvedRefs>(\n props: HandlerProps\n) {\n // TODO(TS) - add type for extract arg\n const extract = (refs: any | any[]) => {\n if (!Array.isArray(refs)) {\n return refs && refs.current === null;\n }\n return refs.some((r) => r && r.current === null);\n };\n return extract(props['simultaneousHandlers']) || extract(props['waitFor']);\n}\n\nconst stateToPropMappings = {\n [State.UNDETERMINED]: undefined,\n [State.BEGAN]: 'onBegan',\n [State.FAILED]: 'onFailed',\n [State.CANCELLED]: 'onCancelled',\n [State.ACTIVE]: 'onActivated',\n [State.END]: 'onEnded',\n} as const;\n\ntype CreateHandlerArgs> =\n Readonly<{\n name: string;\n allowedProps: Readonly[]>;\n config: Readonly>;\n transformProps?: (props: HandlerPropsT) => HandlerPropsT;\n customNativeProps?: Readonly;\n }>;\n\n// TODO(TS) fix event types\ntype InternalEventHandlers = {\n onGestureHandlerEvent?: (event: any) => void;\n onGestureHandlerStateChange?: (event: any) => void;\n};\n\ntype AttachGestureHandlerWeb = (\n handlerTag: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n newView: any,\n _actionType: ActionType,\n propsRef: React.RefObject\n) => void;\n\nconst UNRESOLVED_REFS_RETRY_LIMIT = 1;\n\n// TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.\nexport default function createHandler<\n T extends BaseGestureHandlerProps,\n U extends Record\n>({\n name,\n allowedProps = [],\n config = {},\n transformProps,\n customNativeProps = [],\n}: CreateHandlerArgs): React.ComponentType> {\n interface HandlerState {\n allowTouches: boolean;\n }\n class Handler extends React.Component<\n T & InternalEventHandlers,\n HandlerState\n > {\n static displayName = name;\n static contextType = GestureHandlerRootViewContext;\n\n private handlerTag: number;\n private config: Record;\n private propsRef: React.MutableRefObject;\n private isMountedRef: React.MutableRefObject;\n private viewNode: any;\n private viewTag?: number;\n private inspectorToggleListener?: EmitterSubscription;\n\n constructor(props: T & InternalEventHandlers) {\n super(props);\n this.handlerTag = getNextHandlerTag();\n this.config = {};\n this.propsRef = React.createRef();\n this.isMountedRef = React.createRef();\n this.state = { allowTouches };\n if (props.id) {\n if (handlerIDToTag[props.id] !== undefined) {\n throw new Error(`Handler with ID \"${props.id}\" already registered`);\n }\n handlerIDToTag[props.id] = this.handlerTag;\n }\n }\n\n componentDidMount() {\n const props: HandlerProps = this.props;\n this.isMountedRef.current = true;\n\n if (DEV_ON_ANDROID) {\n this.inspectorToggleListener = DeviceEventEmitter.addListener(\n 'toggleElementInspector',\n () => {\n this.setState((_) => ({ allowTouches }));\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n }\n );\n }\n if (hasUnresolvedRefs(props)) {\n // If there are unresolved refs (e.g. \".current\" has not yet been set)\n // passed as `simultaneousHandlers` or `waitFor`, we enqueue a call to\n // _update method that will try to update native handler props using\n // queueMicrotask. This makes it so update() function gets called after all\n // react components are mounted and we expect the missing ref object to\n // be resolved by then.\n ghQueueMicrotask(() => {\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n });\n }\n\n this.createGestureHandler(\n filterConfig(\n transformProps ? transformProps(this.props) : this.props,\n [...allowedProps, ...customNativeProps],\n config\n )\n );\n\n this.attachGestureHandler(findNodeHandle(this.viewNode) as number); // TODO(TS) - check if this can be null\n }\n\n componentDidUpdate() {\n const viewTag = findNodeHandle(this.viewNode);\n if (this.viewTag !== viewTag) {\n this.attachGestureHandler(viewTag as number); // TODO(TS) - check interaction between _viewTag & findNodeHandle\n }\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n }\n\n componentWillUnmount() {\n this.inspectorToggleListener?.remove();\n this.isMountedRef.current = false;\n RNGestureHandlerModule.dropGestureHandler(this.handlerTag);\n scheduleFlushOperations();\n // We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context\n const handlerID: string | undefined = this.props.id;\n if (handlerID) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete handlerIDToTag[handlerID];\n }\n }\n\n private onGestureHandlerEvent = (event: GestureEvent) => {\n if (event.nativeEvent.handlerTag === this.handlerTag) {\n if (typeof this.props.onGestureEvent === 'function') {\n this.props.onGestureEvent?.(event);\n }\n } else {\n this.props.onGestureHandlerEvent?.(event);\n }\n };\n\n // TODO(TS) - make sure this is right type for event\n private onGestureHandlerStateChange = (\n event: HandlerStateChangeEvent\n ) => {\n if (event.nativeEvent.handlerTag === this.handlerTag) {\n if (typeof this.props.onHandlerStateChange === 'function') {\n this.props.onHandlerStateChange?.(event);\n }\n\n const state: ValueOf = event.nativeEvent.state;\n const stateEventName = stateToPropMappings[state];\n const eventHandler = stateEventName && this.props[stateEventName];\n if (eventHandler && typeof eventHandler === 'function') {\n eventHandler(event);\n }\n } else {\n this.props.onGestureHandlerStateChange?.(event);\n }\n };\n\n private refHandler = (node: any) => {\n this.viewNode = node;\n\n const child = React.Children.only(this.props.children);\n // TODO(TS) fix ref type\n const { ref }: any = child;\n if (ref !== null) {\n if (typeof ref === 'function') {\n ref(node);\n } else {\n ref.current = node;\n }\n }\n };\n\n private createGestureHandler = (\n newConfig: Readonly>\n ) => {\n this.config = newConfig;\n\n RNGestureHandlerModule.createGestureHandler(\n name,\n this.handlerTag,\n newConfig\n );\n };\n\n private attachGestureHandler = (newViewTag: number) => {\n this.viewTag = newViewTag;\n\n if (Platform.OS === 'web') {\n // Typecast due to dynamic resolution, attachGestureHandler should have web version signature in this branch\n (\n RNGestureHandlerModule.attachGestureHandler as AttachGestureHandlerWeb\n )(\n this.handlerTag,\n newViewTag,\n ActionType.JS_FUNCTION_OLD_API, // ignored on web\n this.propsRef\n );\n } else {\n registerOldGestureHandler(this.handlerTag, {\n onGestureEvent: this.onGestureHandlerEvent,\n onGestureStateChange: this.onGestureHandlerStateChange,\n });\n\n const actionType = (() => {\n const onGestureEvent = this.props?.onGestureEvent;\n const isGestureHandlerWorklet =\n onGestureEvent &&\n ('current' in onGestureEvent ||\n 'workletEventHandler' in onGestureEvent);\n const onHandlerStateChange = this.props?.onHandlerStateChange;\n const isStateChangeHandlerWorklet =\n onHandlerStateChange &&\n ('current' in onHandlerStateChange ||\n 'workletEventHandler' in onHandlerStateChange);\n const isReanimatedHandler =\n isGestureHandlerWorklet || isStateChangeHandlerWorklet;\n if (isReanimatedHandler) {\n // Reanimated worklet\n return ActionType.REANIMATED_WORKLET;\n } else if (onGestureEvent && '__isNative' in onGestureEvent) {\n // Animated.event with useNativeDriver: true\n return ActionType.NATIVE_ANIMATED_EVENT;\n } else {\n // JS callback or Animated.event with useNativeDriver: false\n return ActionType.JS_FUNCTION_OLD_API;\n }\n })();\n\n RNGestureHandlerModule.attachGestureHandler(\n this.handlerTag,\n newViewTag,\n actionType\n );\n }\n\n scheduleFlushOperations();\n };\n\n private updateGestureHandler = (\n newConfig: Readonly>\n ) => {\n this.config = newConfig;\n\n RNGestureHandlerModule.updateGestureHandler(this.handlerTag, newConfig);\n scheduleFlushOperations();\n };\n\n private update(remainingTries: number) {\n if (!this.isMountedRef.current) {\n return;\n }\n\n const props: HandlerProps = this.props;\n\n // When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of\n // `ref={refObject}` it's possible that it won't be resolved in time. Seems like trying\n // again is easy enough fix.\n if (hasUnresolvedRefs(props) && remainingTries > 0) {\n ghQueueMicrotask(() => {\n this.update(remainingTries - 1);\n });\n } else {\n const newConfig = filterConfig(\n transformProps ? transformProps(this.props) : this.props,\n [...allowedProps, ...customNativeProps],\n config\n );\n if (!deepEqual(this.config, newConfig)) {\n this.updateGestureHandler(newConfig);\n }\n }\n }\n\n setNativeProps(updates: any) {\n const mergedProps = { ...this.props, ...updates };\n const newConfig = filterConfig(\n transformProps ? transformProps(mergedProps) : mergedProps,\n [...allowedProps, ...customNativeProps],\n config\n );\n this.updateGestureHandler(newConfig);\n }\n\n render() {\n if (__DEV__ && !this.context && !isJestEnv() && Platform.OS !== 'web') {\n throw new Error(\n name +\n ' must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'\n );\n }\n\n let gestureEventHandler = this.onGestureHandlerEvent;\n // Another instance of https://github.com/microsoft/TypeScript/issues/13995\n type OnGestureEventHandlers = {\n onGestureEvent?: BaseGestureHandlerProps['onGestureEvent'];\n onGestureHandlerEvent?: InternalEventHandlers['onGestureHandlerEvent'];\n };\n const { onGestureEvent, onGestureHandlerEvent }: OnGestureEventHandlers =\n this.props;\n if (onGestureEvent && typeof onGestureEvent !== 'function') {\n // If it's not a method it should be an native Animated.event\n // object. We set it directly as the handler for the view\n // In this case nested handlers are not going to be supported\n if (onGestureHandlerEvent) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n gestureEventHandler = onGestureEvent;\n } else {\n if (\n onGestureHandlerEvent &&\n typeof onGestureHandlerEvent !== 'function'\n ) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n }\n\n let gestureStateEventHandler = this.onGestureHandlerStateChange;\n // Another instance of https://github.com/microsoft/TypeScript/issues/13995\n type OnGestureStateChangeHandlers = {\n onHandlerStateChange?: BaseGestureHandlerProps['onHandlerStateChange'];\n onGestureHandlerStateChange?: InternalEventHandlers['onGestureHandlerStateChange'];\n };\n const {\n onHandlerStateChange,\n onGestureHandlerStateChange,\n }: OnGestureStateChangeHandlers = this.props;\n if (onHandlerStateChange && typeof onHandlerStateChange !== 'function') {\n // If it's not a method it should be an native Animated.event\n // object. We set it directly as the handler for the view\n // In this case nested handlers are not going to be supported\n if (onGestureHandlerStateChange) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n gestureStateEventHandler = onHandlerStateChange;\n } else {\n if (\n onGestureHandlerStateChange &&\n typeof onGestureHandlerStateChange !== 'function'\n ) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n }\n const events = {\n onGestureHandlerEvent: this.state.allowTouches\n ? gestureEventHandler\n : undefined,\n onGestureHandlerStateChange: this.state.allowTouches\n ? gestureStateEventHandler\n : undefined,\n };\n\n this.propsRef.current = events;\n\n let child: any = null;\n try {\n child = React.Children.only(this.props.children);\n } catch (e) {\n throw new Error(\n tagMessage(\n `${name} got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`\n )\n );\n }\n\n let grandChildren = child.props.children;\n if (\n __DEV__ &&\n child.type &&\n (child.type === 'RNGestureHandlerButton' ||\n child.type.name === 'View' ||\n child.type.displayName === 'View')\n ) {\n grandChildren = React.Children.toArray(grandChildren);\n grandChildren.push(\n \n );\n }\n\n return React.cloneElement(\n child,\n {\n ref: this.refHandler,\n collapsable: false,\n ...(isJestEnv()\n ? {\n handlerType: name,\n handlerTag: this.handlerTag,\n enabled: this.props.enabled,\n }\n : {}),\n testID: this.props.testID ?? child.props.testID,\n ...events,\n },\n grandChildren\n );\n }\n }\n return Handler;\n}\n","// Reexport the native module spec used by codegen. The relevant files are inluded on Android\n// to ensure the compatibility with the old arch, while iOS doesn't require those at all.\n\nimport Module from './specs/NativeRNGestureHandlerModule';\nexport default Module;\n","import { TurboModuleRegistry, TurboModule } from 'react-native';\nimport { Double } from 'react-native/Libraries/Types/CodegenTypes';\n\nexport interface Spec extends TurboModule {\n handleSetJSResponder: (tag: Double, blockNativeResponder: boolean) => void;\n handleClearJSResponder: () => void;\n createGestureHandler: (\n handlerName: string,\n handlerTag: Double,\n // Record<> is not supported by codegen\n // eslint-disable-next-line @typescript-eslint/ban-types\n config: Object\n ) => void;\n attachGestureHandler: (\n handlerTag: Double,\n newView: Double,\n actionType: Double\n ) => void;\n // eslint-disable-next-line @typescript-eslint/ban-types\n updateGestureHandler: (handlerTag: Double, newConfig: Object) => void;\n dropGestureHandler: (handlerTag: Double) => void;\n install: () => boolean;\n flushOperations: () => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing('RNGestureHandlerModule');\n","import React from 'react';\n\nexport default React.createContext(false);\n","// @ts-ignore - its taken straight from RN\nexport { customDirectEventTypes } from 'react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry';\n","export function toArray(object: T | T[]): T[] {\n if (!Array.isArray(object)) {\n return [object];\n }\n\n return object;\n}\n\nexport type withPrevAndCurrentMapFn = (\n previous: Transformed | null,\n current: T\n) => Transformed;\nexport function withPrevAndCurrent(\n array: T[],\n mapFn: withPrevAndCurrentMapFn\n): Transformed[] {\n const previousArr: (null | Transformed)[] = [null];\n const currentArr = [...array];\n const transformedArr: Transformed[] = [];\n currentArr.forEach((current, i) => {\n // This type cast is fine and solves problem mentioned in https://github.com/software-mansion/react-native-gesture-handler/pull/2867 (namely that `previous` can be undefined).\n // Unfortunately, linter on our CI does not allow this type of casting as it is unnecessary. To bypass that we use eslint-disable.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const previous = previousArr[i] as Transformed | null;\n const transformed = mapFn(previous, current);\n previousArr.push(transformed);\n transformedArr.push(transformed);\n });\n return transformedArr;\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function hasProperty(object: object, key: string) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nexport function isJestEnv(): boolean {\n // @ts-ignore Do not use `@types/node` because it will prioritise Node types over RN types which breaks the types (ex. setTimeout) in React Native projects.\n return hasProperty(global, 'process') && !!process.env.JEST_WORKER_ID;\n}\n\nexport function tagMessage(msg: string) {\n return `[react-native-gesture-handler] ${msg}`;\n}\n\n// Helper method to check whether Fabric is enabled, however global.nativeFabricUIManager\n// may not be initialized before the first render\nexport function isFabric(): boolean {\n // @ts-expect-error nativeFabricUIManager is not yet included in the RN types\n return !!global?.nativeFabricUIManager;\n}\n\nexport function isRemoteDebuggingEnabled(): boolean {\n // react-native-reanimated checks if in remote debugging in the same way\n // @ts-ignore global is available but node types are not included\n const localGlobal = global as any;\n return (\n (!localGlobal.nativeCallSyncHook || !!localGlobal.__REMOTEDEV__) &&\n !localGlobal.RN$Bridgeless\n );\n}\n\n/**\n * Recursively compares two objects for deep equality.\n *\n * **Note:** This function does not support cyclic references.\n *\n * @param obj1 - The first object to compare.\n * @param obj2 - The second object to compare.\n * @returns `true` if the objects are deeply equal, `false` otherwise.\n */\nexport function deepEqual(obj1: any, obj2: any) {\n if (obj1 === obj2) {\n return true;\n }\n\n if (\n typeof obj1 !== 'object' ||\n typeof obj2 !== 'object' ||\n obj1 === null ||\n obj2 === null\n ) {\n return false;\n }\n\n const keys1 = Object.keys(obj1);\n const keys2 = Object.keys(obj2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (const key of keys1) {\n if (!keys2.includes(key) || !deepEqual(obj1[key], obj2[key])) {\n return false;\n }\n }\n\n return true;\n}\n\nexport const INT32_MAX = 2 ** 31 - 1;\n","// TODO use State from RNModule\n\nexport const State = {\n UNDETERMINED: 0,\n FAILED: 1,\n BEGAN: 2,\n CANCELLED: 3,\n ACTIVE: 4,\n END: 5,\n} as const;\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value\nexport type State = typeof State[keyof typeof State];\n","export const ActionType = {\n REANIMATED_WORKLET: 1,\n NATIVE_ANIMATED_EVENT: 2,\n JS_FUNCTION_OLD_API: 3,\n JS_FUNCTION_NEW_API: 4,\n} as const;\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value\nexport type ActionType = typeof ActionType[keyof typeof ActionType];\n","import { isJestEnv } from '../utils';\nimport { GestureType } from './gestures/gesture';\nimport { GestureEvent, HandlerStateChangeEvent } from './gestureHandlerCommon';\n\nexport const handlerIDToTag: Record = {};\nconst gestures = new Map();\nconst oldHandlers = new Map();\nconst testIDs = new Map();\n\nexport function registerHandler(\n handlerTag: number,\n handler: GestureType,\n testID?: string\n) {\n gestures.set(handlerTag, handler);\n if (isJestEnv() && testID) {\n testIDs.set(testID, handlerTag);\n }\n}\n\nexport function registerOldGestureHandler(\n handlerTag: number,\n handler: GestureHandlerCallbacks\n) {\n oldHandlers.set(handlerTag, handler);\n}\n\nexport function unregisterHandler(handlerTag: number, testID?: string) {\n gestures.delete(handlerTag);\n if (isJestEnv() && testID) {\n testIDs.delete(testID);\n }\n}\n\nexport function findHandler(handlerTag: number) {\n return gestures.get(handlerTag);\n}\n\nexport function findOldGestureHandler(handlerTag: number) {\n return oldHandlers.get(handlerTag);\n}\n\nexport function findHandlerByTestID(testID: string) {\n const handlerTag = testIDs.get(testID);\n if (handlerTag !== undefined) {\n return findHandler(handlerTag) ?? null;\n }\n return null;\n}\n\nexport interface GestureHandlerCallbacks {\n onGestureEvent: (event: GestureEvent) => void;\n onGestureStateChange: (event: HandlerStateChangeEvent) => void;\n}\n","import * as React from 'react';\nimport { Platform, findNodeHandle as findNodeHandleRN } from 'react-native';\nimport { handlerIDToTag } from './handlersRegistry';\nimport { toArray } from '../utils';\nimport RNGestureHandlerModule from '../RNGestureHandlerModule';\nimport { ghQueueMicrotask } from '../ghQueueMicrotask';\n\nfunction isConfigParam(param: unknown, name: string) {\n // param !== Object(param) returns false if `param` is a function\n // or an object and returns true if `param` is null\n return (\n param !== undefined &&\n (param !== Object(param) ||\n !('__isNative' in (param as Record))) &&\n name !== 'onHandlerStateChange' &&\n name !== 'onGestureEvent'\n );\n}\n\nexport function filterConfig(\n props: Record,\n validProps: string[],\n defaults: Record = {}\n) {\n const filteredConfig = { ...defaults };\n for (const key of validProps) {\n let value = props[key];\n if (isConfigParam(value, key)) {\n if (key === 'simultaneousHandlers' || key === 'waitFor') {\n value = transformIntoHandlerTags(props[key]);\n } else if (key === 'hitSlop' && typeof value !== 'object') {\n value = { top: value, left: value, bottom: value, right: value };\n }\n filteredConfig[key] = value;\n }\n }\n return filteredConfig;\n}\nfunction transformIntoHandlerTags(handlerIDs: any) {\n handlerIDs = toArray(handlerIDs);\n\n if (Platform.OS === 'web') {\n return handlerIDs\n .map(({ current }: { current: any }) => current)\n .filter((handle: any) => handle);\n }\n // converts handler string IDs into their numeric tags\n return handlerIDs\n .map(\n (handlerID: any) =>\n handlerIDToTag[handlerID] || handlerID.current?.handlerTag || -1\n )\n .filter((handlerTag: number) => handlerTag > 0);\n}\n\nexport function findNodeHandle(\n node: null | number | React.Component | React.ComponentClass\n): null | number | React.Component | React.ComponentClass {\n if (Platform.OS === 'web') {\n return node;\n }\n return findNodeHandleRN(node);\n}\nlet flushOperationsScheduled = false;\n\nexport function scheduleFlushOperations() {\n if (!flushOperationsScheduled) {\n flushOperationsScheduled = true;\n ghQueueMicrotask(() => {\n RNGestureHandlerModule.flushOperations();\n\n flushOperationsScheduled = false;\n });\n }\n}\n","// We check for typeof requestAnimationFrame because of SSR\n// Functions are bound to null to avoid issues with scope when using Metro inline requires.\nexport const ghQueueMicrotask =\n typeof setImmediate === 'function'\n ? setImmediate.bind(null)\n : typeof requestAnimationFrame === 'function'\n ? requestAnimationFrame.bind(null)\n : queueMicrotask.bind(null);\n","let handlerTag = 1;\n\nexport function getNextHandlerTag(): number {\n return handlerTag++;\n}\n","// Previous types exported gesture handlers as classes which creates an interface and variable, both named the same as class.\n// Without those types, we'd introduce breaking change, forcing users to prefix every handler type specification with typeof\n// e.g. React.createRef -> React.createRef.\n// See https://www.typescriptlang.org/docs/handbook/classes.html#constructor-functions for reference.\nimport * as React from 'react';\n\nimport { State } from '../State';\nimport { TouchEventType } from '../TouchEventType';\nimport { ValueOf } from '../typeUtils';\nimport { PointerType } from '../PointerType';\n\nconst commonProps = [\n 'id',\n 'enabled',\n 'shouldCancelWhenOutside',\n 'hitSlop',\n 'cancelsTouchesInView',\n 'userSelect',\n 'activeCursor',\n 'mouseButton',\n 'enableContextMenu',\n 'touchAction',\n] as const;\n\nconst componentInteractionProps = [\n 'waitFor',\n 'simultaneousHandlers',\n 'blocksHandlers',\n] as const;\n\nexport const baseGestureHandlerProps = [\n ...commonProps,\n ...componentInteractionProps,\n 'onBegan',\n 'onFailed',\n 'onCancelled',\n 'onActivated',\n 'onEnded',\n 'onGestureEvent',\n 'onHandlerStateChange',\n] as const;\n\nexport const baseGestureHandlerWithDetectorProps = [\n ...commonProps,\n 'needsPointerData',\n 'manualActivation',\n];\n\nexport interface GestureEventPayload {\n handlerTag: number;\n numberOfPointers: number;\n state: ValueOf;\n pointerType: PointerType;\n}\nexport interface HandlerStateChangeEventPayload extends GestureEventPayload {\n oldState: ValueOf;\n}\n\nexport type HitSlop =\n | number\n | null\n | undefined\n | Partial<\n Record<\n 'left' | 'right' | 'top' | 'bottom' | 'vertical' | 'horizontal',\n number\n >\n >\n | Record<'width' | 'left', number>\n | Record<'width' | 'right', number>\n | Record<'height' | 'top', number>\n | Record<'height' | 'bottom', number>;\n\nexport type UserSelect = 'none' | 'auto' | 'text';\nexport type ActiveCursor =\n | 'auto'\n | 'default'\n | 'none'\n | 'context-menu'\n | 'help'\n | 'pointer'\n | 'progress'\n | 'wait'\n | 'cell'\n | 'crosshair'\n | 'text'\n | 'vertical-text'\n | 'alias'\n | 'copy'\n | 'move'\n | 'no-drop'\n | 'not-allowed'\n | 'grab'\n | 'grabbing'\n | 'e-resize'\n | 'n-resize'\n | 'ne-resize'\n | 'nw-resize'\n | 's-resize'\n | 'se-resize'\n | 'sw-resize'\n | 'w-resize'\n | 'ew-resize'\n | 'ns-resize'\n | 'nesw-resize'\n | 'nwse-resize'\n | 'col-resize'\n | 'row-resize'\n | 'all-scroll'\n | 'zoom-in'\n | 'zoom-out';\n\nexport enum MouseButton {\n LEFT = 1,\n RIGHT = 2,\n MIDDLE = 4,\n BUTTON_4 = 8,\n BUTTON_5 = 16,\n ALL = 31,\n}\n\nexport type TouchAction =\n | 'auto'\n | 'none'\n | 'pan-x'\n | 'pan-left'\n | 'pan-right'\n | 'pan-y'\n | 'pan-up'\n | 'pan-down'\n | 'pinch-zoom'\n | 'manipulation'\n | 'inherit'\n | 'initial'\n | 'revert'\n | 'revert-layer'\n | 'unset';\n\n// TODO(TS) events in handlers\n\nexport interface GestureEvent> {\n nativeEvent: Readonly;\n}\nexport interface HandlerStateChangeEvent<\n ExtraEventPayloadT = Record\n> {\n nativeEvent: Readonly;\n}\n\nexport type TouchData = {\n id: number;\n x: number;\n y: number;\n absoluteX: number;\n absoluteY: number;\n};\n\nexport type GestureTouchEvent = {\n handlerTag: number;\n numberOfTouches: number;\n state: ValueOf;\n eventType: TouchEventType;\n allTouches: TouchData[];\n changedTouches: TouchData[];\n pointerType: PointerType;\n};\n\nexport type GestureUpdateEvent> =\n GestureEventPayload & GestureEventPayloadT;\n\nexport type GestureStateChangeEvent<\n GestureStateChangeEventPayloadT = Record\n> = HandlerStateChangeEventPayload & GestureStateChangeEventPayloadT;\n\nexport type CommonGestureConfig = {\n enabled?: boolean;\n shouldCancelWhenOutside?: boolean;\n hitSlop?: HitSlop;\n userSelect?: UserSelect;\n activeCursor?: ActiveCursor;\n mouseButton?: MouseButton;\n enableContextMenu?: boolean;\n touchAction?: TouchAction;\n};\n\n// Events payloads are types instead of interfaces due to TS limitation.\n// See https://github.com/microsoft/TypeScript/issues/15300 for more info.\nexport type BaseGestureHandlerProps<\n ExtraEventPayloadT extends Record = Record\n> = CommonGestureConfig & {\n id?: string;\n waitFor?: React.Ref | React.Ref[];\n simultaneousHandlers?: React.Ref | React.Ref[];\n blocksHandlers?: React.Ref | React.Ref[];\n testID?: string;\n cancelsTouchesInView?: boolean;\n // TODO(TS) - fix event types\n onBegan?: (event: HandlerStateChangeEvent) => void;\n onFailed?: (event: HandlerStateChangeEvent) => void;\n onCancelled?: (event: HandlerStateChangeEvent) => void;\n onActivated?: (event: HandlerStateChangeEvent) => void;\n onEnded?: (event: HandlerStateChangeEvent) => void;\n\n // TODO(TS) consider using NativeSyntheticEvent\n onGestureEvent?: (event: GestureEvent) => void;\n onHandlerStateChange?: (\n event: HandlerStateChangeEvent\n ) => void;\n // Implicit `children` prop has been removed in @types/react^18.0.0\n children?: React.ReactNode;\n};\n","import { HostComponent } from 'react-native';\nimport type { RawButtonProps } from './GestureButtonsProps';\nimport RNGestureHandlerButtonNativeComponent from '../specs/RNGestureHandlerButtonNativeComponent';\n\nexport default RNGestureHandlerButtonNativeComponent as HostComponent;\n","import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type {\n Int32,\n WithDefault,\n Float,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport type { ViewProps, ColorValue } from 'react-native';\n\ninterface NativeProps extends ViewProps {\n exclusive?: WithDefault;\n foreground?: boolean;\n borderless?: boolean;\n enabled?: WithDefault;\n rippleColor?: ColorValue;\n rippleRadius?: Int32;\n touchSoundDisabled?: WithDefault;\n borderWidth?: Float;\n borderColor?: ColorValue;\n borderStyle?: WithDefault;\n}\n\nexport default codegenNativeComponent('RNGestureHandlerButton');\n","const RIGHT = 1;\nconst LEFT = 2;\nconst UP = 4;\nconst DOWN = 8;\n\n// Public interface\nexport const Directions = {\n RIGHT: RIGHT,\n LEFT: LEFT,\n UP: UP,\n DOWN: DOWN,\n} as const;\n\n// Internal interface\nexport const DiagonalDirections = {\n UP_RIGHT: UP | RIGHT,\n DOWN_RIGHT: DOWN | RIGHT,\n UP_LEFT: UP | LEFT,\n DOWN_LEFT: DOWN | LEFT,\n} as const;\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value\nexport type Directions = typeof Directions[keyof typeof Directions];\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type DiagonalDirections =\n typeof DiagonalDirections[keyof typeof DiagonalDirections];\n","import * as React from 'react';\nimport {\n PropsWithChildren,\n ForwardedRef,\n RefAttributes,\n ReactElement,\n} from 'react';\nimport {\n ScrollView as RNScrollView,\n ScrollViewProps as RNScrollViewProps,\n Switch as RNSwitch,\n SwitchProps as RNSwitchProps,\n TextInput as RNTextInput,\n TextInputProps as RNTextInputProps,\n DrawerLayoutAndroid as RNDrawerLayoutAndroid,\n DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps,\n FlatList as RNFlatList,\n FlatListProps as RNFlatListProps,\n RefreshControl as RNRefreshControl,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nimport {\n NativeViewGestureHandlerProps,\n nativeViewProps,\n} from '../handlers/NativeViewGestureHandler';\n\nimport { toArray } from '../utils';\n\nexport const RefreshControl = createNativeWrapper(RNRefreshControl, {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type RefreshControl = typeof RefreshControl & RNRefreshControl;\n\nconst GHScrollView = createNativeWrapper>(\n RNScrollView,\n {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n }\n);\nexport const ScrollView = React.forwardRef<\n RNScrollView,\n RNScrollViewProps & NativeViewGestureHandlerProps\n>((props, ref) => {\n const refreshControlGestureRef = React.useRef(null);\n const { refreshControl, waitFor, ...rest } = props;\n\n return (\n \n );\n});\n// Backward type compatibility with https://github.com/software-mansion/react-native-gesture-handler/blob/db78d3ca7d48e8ba57482d3fe9b0a15aa79d9932/react-native-gesture-handler.d.ts#L440-L457\n// include methods of wrapped components by creating an intersection type with the RN component instead of duplicating them.\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type ScrollView = typeof GHScrollView & RNScrollView;\n\nexport const Switch = createNativeWrapper(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type Switch = typeof Switch & RNSwitch;\n\nexport const TextInput = createNativeWrapper(RNTextInput);\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TextInput = typeof TextInput & RNTextInput;\n\nexport const DrawerLayoutAndroid = createNativeWrapper<\n PropsWithChildren\n>(RNDrawerLayoutAndroid, { disallowInterruption: true });\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type DrawerLayoutAndroid = typeof DrawerLayoutAndroid &\n RNDrawerLayoutAndroid;\n\nexport const FlatList = React.forwardRef((props, ref) => {\n const refreshControlGestureRef = React.useRef(null);\n\n const { waitFor, refreshControl, ...rest } = props;\n\n const flatListProps = {};\n const scrollViewProps = {};\n for (const [propName, value] of Object.entries(rest)) {\n // https://github.com/microsoft/TypeScript/issues/26255\n if ((nativeViewProps as readonly string[]).includes(propName)) {\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n scrollViewProps[propName] = value;\n } else {\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n flatListProps[propName] = value;\n }\n }\n\n return (\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n (\n \n )}\n // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref\n refreshControl={\n refreshControl\n ? React.cloneElement(refreshControl, {\n // @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS\n ref: refreshControlGestureRef,\n })\n : undefined\n }\n />\n );\n}) as (\n props: PropsWithChildren<\n Omit, 'renderScrollComponent'> &\n RefAttributes> &\n NativeViewGestureHandlerProps\n >,\n ref: ForwardedRef>\n) => ReactElement | null;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type FlatList = typeof FlatList & RNFlatList;\n","import type { FlingGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const flingGestureHandlerProps = [\n 'numberOfPointers',\n 'direction',\n] as const;\n\nexport interface FlingGestureConfig {\n /**\n * Expressed allowed direction of movement. It's possible to pass one or many\n * directions in one parameter:\n *\n * ```js\n * direction={Directions.RIGHT | Directions.LEFT}\n * ```\n *\n * or\n *\n * ```js\n * direction={Directions.DOWN}\n * ```\n */\n direction?: number;\n\n /**\n * Determine exact number of points required to handle the fling gesture.\n */\n numberOfPointers?: number;\n}\n\nexport interface FlingGestureHandlerProps\n extends BaseGestureHandlerProps,\n FlingGestureConfig {}\n\nexport const flingHandlerName = 'FlingGestureHandler';\n\nexport type FlingGestureHandler = typeof FlingGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const FlingGestureHandler = createHandler<\n FlingGestureHandlerProps,\n FlingGestureHandlerEventPayload\n>({\n name: flingHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...flingGestureHandlerProps,\n ] as const,\n config: {},\n});\n","import React, { PropsWithChildren } from 'react';\nimport { tagMessage } from '../utils';\nimport PlatformConstants from '../PlatformConstants';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\nimport type { ForceTouchGestureHandlerEventPayload } from './GestureHandlerEventPayload';\n\nexport const forceTouchGestureHandlerProps = [\n 'minForce',\n 'maxForce',\n 'feedbackOnActivation',\n] as const;\n\n// implicit `children` prop has been removed in @types/react^18.0.0\nclass ForceTouchFallback extends React.Component> {\n static forceTouchAvailable = false;\n componentDidMount() {\n console.warn(\n tagMessage(\n 'ForceTouchGestureHandler is not available on this platform. Please use ForceTouchGestureHandler.forceTouchAvailable to conditionally render other components that would provide a fallback behavior specific to your usecase'\n )\n );\n }\n render() {\n return this.props.children;\n }\n}\n\nexport interface ForceTouchGestureConfig {\n /**\n *\n * A minimal pressure that is required before handler can activate. Should be a\n * value from range `[0.0, 1.0]`. Default is `0.2`.\n */\n minForce?: number;\n\n /**\n * A maximal pressure that could be applied for handler. If the pressure is\n * greater, handler fails. Should be a value from range `[0.0, 1.0]`.\n */\n maxForce?: number;\n\n /**\n * Boolean value defining if haptic feedback has to be performed on\n * activation.\n */\n feedbackOnActivation?: boolean;\n}\n\nexport interface ForceTouchGestureHandlerProps\n extends BaseGestureHandlerProps,\n ForceTouchGestureConfig {}\n\nexport type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {\n forceTouchAvailable: boolean;\n};\n\nexport const forceTouchHandlerName = 'ForceTouchGestureHandler';\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const ForceTouchGestureHandler = PlatformConstants?.forceTouchAvailable\n ? createHandler<\n ForceTouchGestureHandlerProps,\n ForceTouchGestureHandlerEventPayload\n >({\n name: forceTouchHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...forceTouchGestureHandlerProps,\n ] as const,\n config: {},\n })\n : ForceTouchFallback;\n\n(ForceTouchGestureHandler as ForceTouchGestureHandler).forceTouchAvailable =\n PlatformConstants?.forceTouchAvailable || false;\n","import { NativeModules, Platform } from 'react-native';\n\ntype PlatformConstants = {\n forceTouchAvailable: boolean;\n};\n\nexport default (NativeModules?.PlatformConstants ??\n Platform.constants) as PlatformConstants;\n","import { FlingGesture } from './flingGesture';\nimport { ForceTouchGesture } from './forceTouchGesture';\nimport { Gesture } from './gesture';\nimport {\n ComposedGesture,\n ExclusiveGesture,\n SimultaneousGesture,\n} from './gestureComposition';\nimport { LongPressGesture } from './longPressGesture';\nimport { PanGesture } from './panGesture';\nimport { PinchGesture } from './pinchGesture';\nimport { RotationGesture } from './rotationGesture';\nimport { TapGesture } from './tapGesture';\nimport { NativeGesture } from './nativeGesture';\nimport { ManualGesture } from './manualGesture';\nimport { HoverGesture } from './hoverGesture';\n\n/**\n * `Gesture` is the object that allows you to create and compose gestures.\n *\n * ### Remarks\n * - Consider wrapping your gesture configurations with `useMemo`, as it will reduce the amount of work Gesture Handler has to do under the hood when updating gestures.\n *\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/gesture\n */\nexport const GestureObjects = {\n /**\n * A discrete gesture that recognizes one or many taps.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture\n */\n Tap: () => {\n return new TapGesture();\n },\n\n /**\n * A continuous gesture that can recognize a panning (dragging) gesture and track its movement.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture\n */\n Pan: () => {\n return new PanGesture();\n },\n\n /**\n * A continuous gesture that recognizes pinch gesture. It allows for tracking the distance between two fingers and use that information to scale or zoom your content.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pinch-gesture\n */\n Pinch: () => {\n return new PinchGesture();\n },\n\n /**\n * A continuous gesture that can recognize rotation and track its movement.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/rotation-gesture\n */\n Rotation: () => {\n return new RotationGesture();\n },\n\n /**\n * A discrete gesture that activates when the movement is sufficiently fast.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/fling-gesture\n */\n Fling: () => {\n return new FlingGesture();\n },\n\n /**\n * A discrete gesture that activates when the corresponding view is pressed for a sufficiently long time.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture\n */\n LongPress: () => {\n return new LongPressGesture();\n },\n\n /**\n * #### iOS only\n * A continuous gesture that recognizes force of a touch. It allows for tracking pressure of touch on some iOS devices.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/force-touch-gesture\n */\n ForceTouch: () => {\n return new ForceTouchGesture();\n },\n\n /**\n * A gesture that allows other touch handling components to participate in RNGH's gesture system.\n * When used, the other component should be the direct child of a `GestureDetector`.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/native-gesture\n */\n Native: () => {\n return new NativeGesture();\n },\n\n /**\n * A plain gesture that has no specific activation criteria nor event data set.\n * Its state has to be controlled manually using a state manager.\n * It will not fail when all the pointers are lifted from the screen.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/manual-gesture\n */\n Manual: () => {\n return new ManualGesture();\n },\n\n /**\n * A continuous gesture that can recognize hovering above the view it's attached to.\n * The hover effect may be activated by moving a mouse or a stylus over the view.\n *\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/hover-gesture\n */\n Hover: () => {\n return new HoverGesture();\n },\n\n /**\n * Builds a composed gesture consisting of gestures provided as parameters.\n * The first one that becomes active cancels the rest of gestures.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#race\n */\n Race: (...gestures: Gesture[]) => {\n return new ComposedGesture(...gestures);\n },\n\n /**\n * Builds a composed gesture that allows all base gestures to run simultaneously.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#simultaneous\n */\n Simultaneous(...gestures: Gesture[]) {\n return new SimultaneousGesture(...gestures);\n },\n\n /**\n * Builds a composed gesture where only one of the provided gestures can become active.\n * Priority is decided through the order of gestures: the first one has higher priority\n * than the second one, second one has higher priority than the third one, and so on.\n * For example, to make a gesture that recognizes both single and double tap you need\n * to call Exclusive(doubleTap, singleTap).\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#exclusive\n */\n Exclusive(...gestures: Gesture[]) {\n return new ExclusiveGesture(...gestures);\n },\n};\n","import { BaseGestureConfig, BaseGesture } from './gesture';\nimport { TapGestureConfig } from '../TapGestureHandler';\nimport type { TapGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\n\nexport class TapGesture extends BaseGesture {\n public config: BaseGestureConfig & TapGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'TapGestureHandler';\n this.shouldCancelWhenOutside(true);\n }\n\n /**\n * Minimum number of pointers (fingers) required to be placed before the gesture activates.\n * Should be a positive integer. The default value is 1.\n * @param minPointers\n */\n minPointers(minPointers: number) {\n this.config.minPointers = minPointers;\n return this;\n }\n\n /**\n * Number of tap gestures required to activate the gesture.\n * The default value is 1.\n * @param count\n */\n numberOfTaps(count: number) {\n this.config.numberOfTaps = count;\n return this;\n }\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is allowed to travel during a tap gesture.\n * @param maxDist\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture#maxdistancevalue-number\n */\n maxDistance(maxDist: number) {\n this.config.maxDist = maxDist;\n return this;\n }\n\n /**\n * Maximum time, expressed in milliseconds, that defines how fast a finger must be released after a touch.\n * The default value is 500.\n * @param duration\n */\n maxDuration(duration: number) {\n this.config.maxDurationMs = duration;\n return this;\n }\n\n /**\n * Maximum time, expressed in milliseconds, that can pass before the next tap — if many taps are required.\n * The default value is 500.\n * @param delay\n */\n maxDelay(delay: number) {\n this.config.maxDelayMs = delay;\n return this;\n }\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is allowed to travel along the X axis during a tap gesture.\n * @param delta\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture#maxdeltaxvalue-number\n */\n maxDeltaX(delta: number) {\n this.config.maxDeltaX = delta;\n return this;\n }\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is allowed to travel along the Y axis during a tap gesture.\n * @param delta\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture#maxdeltayvalue-number\n */\n maxDeltaY(delta: number) {\n this.config.maxDeltaY = delta;\n return this;\n }\n}\n\nexport type TapGestureType = InstanceType;\n","import {\n HitSlop,\n CommonGestureConfig,\n GestureTouchEvent,\n GestureStateChangeEvent,\n GestureUpdateEvent,\n ActiveCursor,\n MouseButton,\n} from '../gestureHandlerCommon';\nimport { getNextHandlerTag } from '../getNextHandlerTag';\nimport { GestureStateManagerType } from './gestureStateManager';\nimport type {\n FlingGestureHandlerEventPayload,\n ForceTouchGestureHandlerEventPayload,\n LongPressGestureHandlerEventPayload,\n PanGestureHandlerEventPayload,\n PinchGestureHandlerEventPayload,\n RotationGestureHandlerEventPayload,\n TapGestureHandlerEventPayload,\n NativeViewGestureHandlerPayload,\n HoverGestureHandlerEventPayload,\n} from '../GestureHandlerEventPayload';\nimport { isRemoteDebuggingEnabled } from '../../utils';\n\nexport type GestureType =\n | BaseGesture>\n | BaseGesture>\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture\n | BaseGesture;\n\nexport type GestureRef =\n | number\n | GestureType\n | React.RefObject\n | React.RefObject; // Allow adding a ref to a gesture handler\nexport interface BaseGestureConfig\n extends CommonGestureConfig,\n Record {\n ref?: React.MutableRefObject;\n requireToFail?: GestureRef[];\n simultaneousWith?: GestureRef[];\n blocksHandlers?: GestureRef[];\n needsPointerData?: boolean;\n manualActivation?: boolean;\n runOnJS?: boolean;\n testId?: string;\n cancelsTouchesInView?: boolean;\n}\n\ntype TouchEventHandlerType = (\n event: GestureTouchEvent,\n stateManager: GestureStateManagerType\n) => void;\n\nexport type HandlerCallbacks> = {\n gestureId: number;\n handlerTag: number;\n onBegin?: (event: GestureStateChangeEvent) => void;\n onStart?: (event: GestureStateChangeEvent) => void;\n onEnd?: (\n event: GestureStateChangeEvent,\n success: boolean\n ) => void;\n onFinalize?: (\n event: GestureStateChangeEvent,\n success: boolean\n ) => void;\n onUpdate?: (event: GestureUpdateEvent) => void;\n onChange?: (event: any) => void;\n onTouchesDown?: TouchEventHandlerType;\n onTouchesMove?: TouchEventHandlerType;\n onTouchesUp?: TouchEventHandlerType;\n onTouchesCancelled?: TouchEventHandlerType;\n changeEventCalculator?: (\n current: GestureUpdateEvent>,\n previous?: GestureUpdateEvent>\n ) => GestureUpdateEvent>;\n isWorklet: boolean[];\n};\n\nexport const CALLBACK_TYPE = {\n UNDEFINED: 0,\n BEGAN: 1,\n START: 2,\n UPDATE: 3,\n CHANGE: 4,\n END: 5,\n FINALIZE: 6,\n TOUCHES_DOWN: 7,\n TOUCHES_MOVE: 8,\n TOUCHES_UP: 9,\n TOUCHES_CANCELLED: 10,\n} as const;\n\n// Allow using CALLBACK_TYPE as object and type\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type CALLBACK_TYPE = typeof CALLBACK_TYPE[keyof typeof CALLBACK_TYPE];\n\nexport abstract class Gesture {\n /**\n * Return array of gestures, providing the same interface for creating and updating\n * handlers, no matter which object was used to create gesture instance.\n */\n abstract toGestureArray(): GestureType[];\n\n /**\n * Assign handlerTag to the gesture instance and set ref.current (if a ref is set)\n */\n abstract initialize(): void;\n\n /**\n * Make sure that values of properties defining relations are arrays. Do any necessary\n * preprocessing required to configure relations between handlers. Called just before\n * updating the handler on the native side.\n */\n abstract prepare(): void;\n}\n\nlet nextGestureId = 0;\nexport abstract class BaseGesture<\n EventPayloadT extends Record\n> extends Gesture {\n private gestureId = -1;\n public handlerTag = -1;\n public handlerName = '';\n public config: BaseGestureConfig = {};\n public handlers: HandlerCallbacks = {\n gestureId: -1,\n handlerTag: -1,\n isWorklet: [],\n };\n\n constructor() {\n super();\n\n // Used to check whether the gesture config has been updated when wrapping it\n // with `useMemo`. Since every config will have a unique id, when the dependencies\n // don't change, the config won't be recreated and the id will stay the same.\n // If the id is different, it means that the config has changed and the gesture\n // needs to be updated.\n this.gestureId = nextGestureId++;\n this.handlers.gestureId = this.gestureId;\n }\n\n private addDependency(\n key: 'simultaneousWith' | 'requireToFail' | 'blocksHandlers',\n gesture: Exclude\n ) {\n const value = this.config[key];\n this.config[key] = value\n ? Array().concat(value, gesture)\n : [gesture];\n }\n\n /**\n * Sets a `ref` to the gesture object, allowing for interoperability with the old API.\n * @param ref\n */\n withRef(ref: React.MutableRefObject) {\n this.config.ref = ref;\n return this;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n protected isWorklet(callback: Function) {\n // @ts-ignore if callback is a worklet, the property will be available, if not then the check will return false\n return callback.__workletHash !== undefined;\n }\n\n /**\n * Set the callback that is being called when given gesture handler starts receiving touches.\n * At the moment of this callback the handler is in `BEGAN` state and we don't know yet if it will recognize the gesture at all.\n * @param callback\n */\n onBegin(callback: (event: GestureStateChangeEvent) => void) {\n this.handlers.onBegin = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.BEGAN] = this.isWorklet(callback);\n return this;\n }\n\n /**\n * Set the callback that is being called when the gesture is recognized by the handler and it transitions to the `ACTIVE` state.\n * @param callback\n */\n onStart(callback: (event: GestureStateChangeEvent) => void) {\n this.handlers.onStart = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.START] = this.isWorklet(callback);\n return this;\n }\n\n /**\n * Set the callback that is being called when the gesture that was recognized by the handler finishes and handler reaches `END` state.\n * It will be called only if the handler was previously in the `ACTIVE` state.\n * @param callback\n */\n onEnd(\n callback: (\n event: GestureStateChangeEvent,\n success: boolean\n ) => void\n ) {\n this.handlers.onEnd = callback;\n // @ts-ignore if callback is a worklet, the property will be available, if not then the check will return false\n this.handlers.isWorklet[CALLBACK_TYPE.END] = this.isWorklet(callback);\n return this;\n }\n\n /**\n * Set the callback that is being called when the handler finalizes handling gesture - the gesture was recognized and has finished or it failed to recognize.\n * @param callback\n */\n onFinalize(\n callback: (\n event: GestureStateChangeEvent,\n success: boolean\n ) => void\n ) {\n this.handlers.onFinalize = callback;\n // @ts-ignore if callback is a worklet, the property will be available, if not then the check will return false\n this.handlers.isWorklet[CALLBACK_TYPE.FINALIZE] = this.isWorklet(callback);\n return this;\n }\n\n /**\n * Set the `onTouchesDown` callback which is called every time a pointer is placed on the screen.\n * @param callback\n */\n onTouchesDown(callback: TouchEventHandlerType) {\n this.config.needsPointerData = true;\n this.handlers.onTouchesDown = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.TOUCHES_DOWN] =\n this.isWorklet(callback);\n\n return this;\n }\n\n /**\n * Set the `onTouchesMove` callback which is called every time a pointer is moved on the screen.\n * @param callback\n */\n onTouchesMove(callback: TouchEventHandlerType) {\n this.config.needsPointerData = true;\n this.handlers.onTouchesMove = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.TOUCHES_MOVE] =\n this.isWorklet(callback);\n\n return this;\n }\n\n /**\n * Set the `onTouchesUp` callback which is called every time a pointer is lifted from the screen.\n * @param callback\n */\n onTouchesUp(callback: TouchEventHandlerType) {\n this.config.needsPointerData = true;\n this.handlers.onTouchesUp = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.TOUCHES_UP] =\n this.isWorklet(callback);\n\n return this;\n }\n\n /**\n * Set the `onTouchesCancelled` callback which is called every time a pointer stops being tracked, for example when the gesture finishes.\n * @param callback\n */\n onTouchesCancelled(callback: TouchEventHandlerType) {\n this.config.needsPointerData = true;\n this.handlers.onTouchesCancelled = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.TOUCHES_CANCELLED] =\n this.isWorklet(callback);\n\n return this;\n }\n\n /**\n * Indicates whether the given handler should be analyzing stream of touch events or not.\n * @param enabled\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#enabledvalue-boolean\n */\n enabled(enabled: boolean) {\n this.config.enabled = enabled;\n return this;\n }\n\n /**\n * When true the handler will cancel or fail recognition (depending on its current state) whenever the finger leaves the area of the connected view.\n * @param value\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#shouldcancelwhenoutsidevalue-boolean\n */\n shouldCancelWhenOutside(value: boolean) {\n this.config.shouldCancelWhenOutside = value;\n return this;\n }\n\n /**\n * This parameter enables control over what part of the connected view area can be used to begin recognizing the gesture.\n * When a negative number is provided the bounds of the view will reduce the area by the given number of points in each of the sides evenly.\n * @param hitSlop\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#hitslopsettings\n */\n hitSlop(hitSlop: HitSlop) {\n this.config.hitSlop = hitSlop;\n return this;\n }\n\n /**\n * #### Web only\n * This parameter allows to specify which `cursor` should be used when gesture activates.\n * Supports all CSS cursor values (e.g. `\"grab\"`, `\"zoom-in\"`). Default value is set to `\"auto\"`.\n * @param activeCursor\n */\n activeCursor(activeCursor: ActiveCursor) {\n this.config.activeCursor = activeCursor;\n return this;\n }\n\n /**\n * #### Web & Android only\n * Allows users to choose which mouse button should handler respond to.\n * Arguments can be combined using `|` operator, e.g. `mouseButton(MouseButton.LEFT | MouseButton.RIGHT)`.\n * Default value is set to `MouseButton.LEFT`.\n * @param mouseButton\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#mousebuttonvalue-mousebutton-web--android-only\n */\n mouseButton(mouseButton: MouseButton) {\n this.config.mouseButton = mouseButton;\n return this;\n }\n\n /**\n * When `react-native-reanimated` is installed, the callbacks passed to the gestures are automatically workletized and run on the UI thread when called.\n * This option allows for changing this behavior: when `true`, all the callbacks will be run on the JS thread instead of the UI thread, regardless of whether they are worklets or not.\n * Defaults to `false`.\n * @param runOnJS\n */\n runOnJS(runOnJS: boolean) {\n this.config.runOnJS = runOnJS;\n return this;\n }\n\n /**\n * Allows gestures across different components to be recognized simultaneously.\n * @param gestures\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#simultaneouswithexternalgesture\n */\n simultaneousWithExternalGesture(...gestures: Exclude[]) {\n for (const gesture of gestures) {\n this.addDependency('simultaneousWith', gesture);\n }\n return this;\n }\n\n /**\n * Allows to delay activation of the handler until all handlers passed as arguments to this method fail (or don't begin at all).\n * @param gestures\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#requireexternalgesturetofail\n */\n requireExternalGestureToFail(...gestures: Exclude[]) {\n for (const gesture of gestures) {\n this.addDependency('requireToFail', gesture);\n }\n return this;\n }\n\n /**\n * Works similarily to `requireExternalGestureToFail` but the direction of the relation is reversed - instead of being one-to-many relation, it's many-to-one.\n * @param gestures\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#blocksexternalgesture\n */\n blocksExternalGesture(...gestures: Exclude[]) {\n for (const gesture of gestures) {\n this.addDependency('blocksHandlers', gesture);\n }\n return this;\n }\n\n /**\n * Sets a `testID` property for gesture object, allowing for querying for it in tests.\n * @param id\n */\n withTestId(id: string) {\n this.config.testId = id;\n return this;\n }\n\n /**\n * #### iOS only\n * When `true`, the handler will cancel touches for native UI components (`UIButton`, `UISwitch`, etc) it's attached to when it becomes `ACTIVE`.\n * Default value is `true`.\n * @param value\n */\n cancelsTouchesInView(value: boolean) {\n this.config.cancelsTouchesInView = value;\n return this;\n }\n\n initialize() {\n this.handlerTag = getNextHandlerTag();\n\n this.handlers = { ...this.handlers, handlerTag: this.handlerTag };\n\n if (this.config.ref) {\n this.config.ref.current = this as GestureType;\n }\n }\n\n toGestureArray(): GestureType[] {\n return [this as GestureType];\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n prepare() {}\n\n get shouldUseReanimated(): boolean {\n // Use Reanimated when runOnJS isn't set explicitly,\n // all defined callbacks are worklets\n // and remote debugging is disabled\n return (\n this.config.runOnJS !== true &&\n !this.handlers.isWorklet.includes(false) &&\n !isRemoteDebuggingEnabled()\n );\n }\n}\n\nexport abstract class ContinousBaseGesture<\n EventPayloadT extends Record,\n EventChangePayloadT extends Record\n> extends BaseGesture {\n /**\n * Set the callback that is being called every time the gesture receives an update while it's active.\n * @param callback\n */\n onUpdate(callback: (event: GestureUpdateEvent) => void) {\n this.handlers.onUpdate = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.UPDATE] = this.isWorklet(callback);\n return this;\n }\n\n /**\n * Set the callback that is being called every time the gesture receives an update while it's active.\n * This callback will receive information about change in value in relation to the last received event.\n * @param callback\n */\n onChange(\n callback: (\n event: GestureUpdateEvent\n ) => void\n ) {\n this.handlers.onChange = callback;\n this.handlers.isWorklet[CALLBACK_TYPE.CHANGE] = this.isWorklet(callback);\n return this;\n }\n\n /**\n * When `true` the handler will not activate by itself even if its activation criteria are met.\n * Instead you can manipulate its state using state manager.\n * @param manualActivation\n */\n manualActivation(manualActivation: boolean) {\n this.config.manualActivation = manualActivation;\n return this;\n }\n}\n","import { BaseGestureConfig, ContinousBaseGesture } from './gesture';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\nimport { PanGestureConfig } from '../PanGestureHandler';\nimport type { PanGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\n\nexport type PanGestureChangeEventPayload = {\n changeX: number;\n changeY: number;\n};\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: PanGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n changeX: current.translationX,\n changeY: current.translationY,\n };\n } else {\n changePayload = {\n changeX: current.translationX - previous.translationX,\n changeY: current.translationY - previous.translationY,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class PanGesture extends ContinousBaseGesture<\n PanGestureHandlerEventPayload,\n PanGestureChangeEventPayload\n> {\n public config: BaseGestureConfig & PanGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'PanGestureHandler';\n }\n\n /**\n * Range along Y axis (in points) where fingers travels without activation of gesture.\n * @param offset\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#activeoffsetyvalue-number--number\n */\n activeOffsetY(\n offset: number | [activeOffsetYStart: number, activeOffsetYEnd: number]\n ) {\n if (Array.isArray(offset)) {\n this.config.activeOffsetYStart = offset[0];\n this.config.activeOffsetYEnd = offset[1];\n } else if (offset < 0) {\n this.config.activeOffsetYStart = offset;\n } else {\n this.config.activeOffsetYEnd = offset;\n }\n return this;\n }\n\n /**\n * Range along X axis (in points) where fingers travels without activation of gesture.\n * @param offset\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#activeoffsetxvalue-number--number\n */\n activeOffsetX(\n offset: number | [activeOffsetXStart: number, activeOffsetXEnd: number]\n ) {\n if (Array.isArray(offset)) {\n this.config.activeOffsetXStart = offset[0];\n this.config.activeOffsetXEnd = offset[1];\n } else if (offset < 0) {\n this.config.activeOffsetXStart = offset;\n } else {\n this.config.activeOffsetXEnd = offset;\n }\n return this;\n }\n\n /**\n * When the finger moves outside this range (in points) along Y axis and gesture hasn't yet activated it will fail recognizing the gesture.\n * @param offset\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#failoffsetyvalue-number--number\n */\n failOffsetY(\n offset: number | [failOffsetYStart: number, failOffsetYEnd: number]\n ) {\n if (Array.isArray(offset)) {\n this.config.failOffsetYStart = offset[0];\n this.config.failOffsetYEnd = offset[1];\n } else if (offset < 0) {\n this.config.failOffsetYStart = offset;\n } else {\n this.config.failOffsetYEnd = offset;\n }\n return this;\n }\n\n /**\n * When the finger moves outside this range (in points) along X axis and gesture hasn't yet activated it will fail recognizing the gesture.\n * @param offset\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#failoffsetxvalue-number--number\n */\n failOffsetX(\n offset: number | [failOffsetXStart: number, failOffsetXEnd: number]\n ) {\n if (Array.isArray(offset)) {\n this.config.failOffsetXStart = offset[0];\n this.config.failOffsetXEnd = offset[1];\n } else if (offset < 0) {\n this.config.failOffsetXStart = offset;\n } else {\n this.config.failOffsetXEnd = offset;\n }\n return this;\n }\n\n /**\n * A number of fingers that is required to be placed before gesture can activate. Should be a higher or equal to 0 integer.\n * @param minPointers\n */\n minPointers(minPointers: number) {\n this.config.minPointers = minPointers;\n return this;\n }\n\n /**\n * When the given number of fingers is placed on the screen and gesture hasn't yet activated it will fail recognizing the gesture.\n * Should be a higher or equal to 0 integer.\n * @param maxPointers\n */\n maxPointers(maxPointers: number) {\n this.config.maxPointers = maxPointers;\n return this;\n }\n\n /**\n * Minimum distance the finger (or multiple finger) need to travel before the gesture activates.\n * Expressed in points.\n * @param distance\n */\n minDistance(distance: number) {\n this.config.minDist = distance;\n return this;\n }\n\n /**\n * Minimum velocity the finger has to reach in order to activate handler.\n * @param velocity\n */\n minVelocity(velocity: number) {\n this.config.minVelocity = velocity;\n return this;\n }\n\n /**\n * Minimum velocity along X axis the finger has to reach in order to activate handler.\n * @param velocity\n */\n minVelocityX(velocity: number) {\n this.config.minVelocityX = velocity;\n return this;\n }\n\n /**\n * Minimum velocity along Y axis the finger has to reach in order to activate handler.\n * @param velocity\n */\n minVelocityY(velocity: number) {\n this.config.minVelocityY = velocity;\n return this;\n }\n\n /**\n * #### Android only\n * Android, by default, will calculate translation values based on the position of the leading pointer (the first one that was placed on the screen).\n * This modifier allows that behavior to be changed to the one that is default on iOS - the averaged position of all active pointers will be used to calculate the translation values.\n * @param value\n */\n averageTouches(value: boolean) {\n this.config.avgTouches = value;\n return this;\n }\n\n /**\n * #### iOS only\n * Enables two-finger gestures on supported devices, for example iPads with trackpads.\n * @param value\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture/#enabletrackpadtwofingergesturevalue-boolean-ios-only\n */\n enableTrackpadTwoFingerGesture(value: boolean) {\n this.config.enableTrackpadTwoFingerGesture = value;\n return this;\n }\n\n /**\n * Duration in milliseconds of the LongPress gesture before Pan is allowed to activate.\n * @param duration\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture/#activateafterlongpressduration-number\n */\n activateAfterLongPress(duration: number) {\n this.config.activateAfterLongPress = duration;\n return this;\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n PanGestureHandlerEventPayload & PanGestureChangeEventPayload\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, PanGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type PanGestureType = InstanceType;\n","import { ContinousBaseGesture } from './gesture';\nimport type { PinchGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\n\nexport type PinchGestureChangeEventPayload = {\n scaleChange: number;\n};\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: PinchGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n scaleChange: current.scale,\n };\n } else {\n changePayload = {\n scaleChange: current.scale / previous.scale,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class PinchGesture extends ContinousBaseGesture<\n PinchGestureHandlerEventPayload,\n PinchGestureChangeEventPayload\n> {\n constructor() {\n super();\n\n this.handlerName = 'PinchGestureHandler';\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n PinchGestureHandlerEventPayload & PinchGestureChangeEventPayload\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, PinchGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type PinchGestureType = InstanceType;\n","import { ContinousBaseGesture } from './gesture';\nimport type { RotationGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\n\ntype RotationGestureChangeEventPayload = {\n rotationChange: number;\n};\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: RotationGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n rotationChange: current.rotation,\n };\n } else {\n changePayload = {\n rotationChange: current.rotation - previous.rotation,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class RotationGesture extends ContinousBaseGesture<\n RotationGestureHandlerEventPayload,\n RotationGestureChangeEventPayload\n> {\n constructor() {\n super();\n\n this.handlerName = 'RotationGestureHandler';\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n RotationGestureHandlerEventPayload & RotationGestureChangeEventPayload\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, RotationGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type RotationGestureType = InstanceType;\n","import { BaseGesture, BaseGestureConfig } from './gesture';\nimport { FlingGestureConfig } from '../FlingGestureHandler';\nimport type { FlingGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\n\nexport class FlingGesture extends BaseGesture {\n public config: BaseGestureConfig & FlingGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'FlingGestureHandler';\n }\n\n /**\n * Determine exact number of points required to handle the fling gesture.\n * @param pointers\n */\n numberOfPointers(pointers: number) {\n this.config.numberOfPointers = pointers;\n return this;\n }\n\n /**\n * Expressed allowed direction of movement.\n * Expected values are exported as constants in the Directions object.\n * Arguments can be combined using `|` operator. Default value is set to `MouseButton.LEFT`.\n * @param direction\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/fling-gesture/#directionvalue-directions\n */\n direction(direction: number) {\n this.config.direction = direction;\n return this;\n }\n}\n\nexport type FlingGestureType = InstanceType;\n","import { BaseGesture, BaseGestureConfig } from './gesture';\nimport { LongPressGestureConfig } from '../LongPressGestureHandler';\nimport type { LongPressGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\n\nexport class LongPressGesture extends BaseGesture {\n public config: BaseGestureConfig & LongPressGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'LongPressGestureHandler';\n this.shouldCancelWhenOutside(true);\n }\n\n /**\n * Minimum time, expressed in milliseconds, that a finger must remain pressed on the corresponding view.\n * The default value is 500.\n * @param duration\n */\n minDuration(duration: number) {\n this.config.minDurationMs = duration;\n return this;\n }\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is allowed to travel during a long press gesture.\n * @param distance\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture#maxdistancevalue-number\n */\n maxDistance(distance: number) {\n this.config.maxDist = distance;\n return this;\n }\n\n /**\n * Determine exact number of points required to handle the long press gesture.\n * @param pointers\n */\n numberOfPointers(pointers: number) {\n this.config.numberOfPointers = pointers;\n return this;\n }\n}\n\nexport type LongPressGestureType = InstanceType;\n","import { BaseGestureConfig, ContinousBaseGesture } from './gesture';\nimport { ForceTouchGestureConfig } from '../ForceTouchGestureHandler';\nimport type { ForceTouchGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\n\nexport type ForceTouchGestureChangeEventPayload = {\n forceChange: number;\n};\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: ForceTouchGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n forceChange: current.force,\n };\n } else {\n changePayload = {\n forceChange: current.force - previous.force,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class ForceTouchGesture extends ContinousBaseGesture<\n ForceTouchGestureHandlerEventPayload,\n ForceTouchGestureChangeEventPayload\n> {\n public config: BaseGestureConfig & ForceTouchGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'ForceTouchGestureHandler';\n }\n\n /**\n * A minimal pressure that is required before gesture can activate.\n * Should be a value from range [0.0, 1.0]. Default is 0.2.\n * @param force\n */\n minForce(force: number) {\n this.config.minForce = force;\n return this;\n }\n\n /**\n * A maximal pressure that could be applied for gesture.\n * If the pressure is greater, gesture fails. Should be a value from range [0.0, 1.0].\n * @param force\n */\n maxForce(force: number) {\n this.config.maxForce = force;\n return this;\n }\n\n /**\n * Value defining if haptic feedback has to be performed on activation.\n * @param value\n */\n feedbackOnActivation(value: boolean) {\n this.config.feedbackOnActivation = value;\n return this;\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n GestureUpdateEvent<\n ForceTouchGestureHandlerEventPayload &\n ForceTouchGestureChangeEventPayload\n >\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, ForceTouchGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type ForceTouchGestureType = InstanceType;\n","import { BaseGestureConfig, BaseGesture } from './gesture';\nimport { NativeViewGestureConfig } from '../NativeViewGestureHandler';\nimport type { NativeViewGestureHandlerPayload } from '../GestureHandlerEventPayload';\n\nexport class NativeGesture extends BaseGesture {\n public config: BaseGestureConfig & NativeViewGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'NativeViewGestureHandler';\n }\n\n /**\n * When true, underlying handler will activate unconditionally when in `BEGAN` or `UNDETERMINED` state.\n * @param value\n */\n shouldActivateOnStart(value: boolean) {\n this.config.shouldActivateOnStart = value;\n return this;\n }\n\n /**\n * When true, cancels all other gesture handlers when this `NativeViewGestureHandler` receives an `ACTIVE` state event.\n * @param value\n */\n disallowInterruption(value: boolean) {\n this.config.disallowInterruption = value;\n return this;\n }\n}\n\nexport type NativeGestureType = InstanceType;\n","import { GestureUpdateEvent } from '../gestureHandlerCommon';\nimport { ContinousBaseGesture } from './gesture';\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent>,\n _previous?: GestureUpdateEvent>\n) {\n 'worklet';\n return current;\n}\n\nexport class ManualGesture extends ContinousBaseGesture<\n Record,\n Record\n> {\n constructor() {\n super();\n\n this.handlerName = 'ManualGestureHandler';\n }\n\n onChange(\n callback: (event: GestureUpdateEvent>) => void\n ) {\n // @ts-ignore TS being overprotective, Record is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type ManualGestureType = InstanceType;\n","import { BaseGestureConfig, ContinousBaseGesture } from './gesture';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\nimport type { HoverGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\n\nexport type HoverGestureChangeEventPayload = {\n changeX: number;\n changeY: number;\n};\n\nexport enum HoverEffect {\n NONE = 0,\n LIFT = 1,\n HIGHLIGHT = 2,\n}\n\nexport interface HoverGestureConfig {\n hoverEffect?: HoverEffect;\n}\n\nexport const hoverGestureHandlerProps = ['hoverEffect'] as const;\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent,\n previous?: GestureUpdateEvent\n) {\n 'worklet';\n let changePayload: HoverGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n changeX: current.x,\n changeY: current.y,\n };\n } else {\n changePayload = {\n changeX: current.x - previous.x,\n changeY: current.y - previous.y,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class HoverGesture extends ContinousBaseGesture<\n HoverGestureHandlerEventPayload,\n HoverGestureChangeEventPayload\n> {\n public config: BaseGestureConfig & HoverGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'HoverGestureHandler';\n }\n\n /**\n * #### iOS only\n * Sets the visual hover effect.\n */\n effect(effect: HoverEffect) {\n this.config.hoverEffect = effect;\n return this;\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n HoverGestureHandlerEventPayload & HoverGestureChangeEventPayload\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, HoverGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type HoverGestureType = InstanceType;\n","import { BaseGesture, Gesture, GestureRef, GestureType } from './gesture';\n\nfunction extendRelation(\n currentRelation: GestureRef[] | undefined,\n extendWith: GestureType[]\n) {\n if (currentRelation === undefined) {\n return [...extendWith];\n } else {\n return [...currentRelation, ...extendWith];\n }\n}\n\nexport class ComposedGesture extends Gesture {\n protected gestures: Gesture[] = [];\n protected simultaneousGestures: GestureType[] = [];\n protected requireGesturesToFail: GestureType[] = [];\n\n constructor(...gestures: Gesture[]) {\n super();\n this.gestures = gestures;\n }\n\n protected prepareSingleGesture(\n gesture: Gesture,\n simultaneousGestures: GestureType[],\n requireGesturesToFail: GestureType[]\n ) {\n if (gesture instanceof BaseGesture) {\n const newConfig = { ...gesture.config };\n\n // No need to extend `blocksHandlers` here, because it's not changed in composition.\n // The same effect is achieved by reversing the order of 2 gestures in `Exclusive`\n newConfig.simultaneousWith = extendRelation(\n newConfig.simultaneousWith,\n simultaneousGestures\n );\n newConfig.requireToFail = extendRelation(\n newConfig.requireToFail,\n requireGesturesToFail\n );\n\n gesture.config = newConfig;\n } else if (gesture instanceof ComposedGesture) {\n gesture.simultaneousGestures = simultaneousGestures;\n gesture.requireGesturesToFail = requireGesturesToFail;\n gesture.prepare();\n }\n }\n\n prepare() {\n for (const gesture of this.gestures) {\n this.prepareSingleGesture(\n gesture,\n this.simultaneousGestures,\n this.requireGesturesToFail\n );\n }\n }\n\n initialize() {\n for (const gesture of this.gestures) {\n gesture.initialize();\n }\n }\n\n toGestureArray(): GestureType[] {\n return this.gestures.flatMap((gesture) => gesture.toGestureArray());\n }\n}\n\nexport class SimultaneousGesture extends ComposedGesture {\n prepare() {\n // This piece of magic works something like this:\n // for every gesture in the array\n const simultaneousArrays = this.gestures.map((gesture) =>\n // we take the array it's in\n this.gestures\n // and make a copy without it\n .filter((x) => x !== gesture)\n // then we flatmap the result to get list of raw (not composed) gestures\n // this way we don't make the gestures simultaneous with themselves, which is\n // important when the gesture is `ExclusiveGesture` - we don't want to make\n // exclusive gestures simultaneous\n .flatMap((x) => x.toGestureArray())\n );\n\n for (let i = 0; i < this.gestures.length; i++) {\n this.prepareSingleGesture(\n this.gestures[i],\n simultaneousArrays[i],\n this.requireGesturesToFail\n );\n }\n }\n}\n\nexport class ExclusiveGesture extends ComposedGesture {\n prepare() {\n // Transforms the array of gestures into array of grouped raw (not composed) gestures\n // i.e. [gesture1, gesture2, ComposedGesture(gesture3, gesture4)] -> [[gesture1], [gesture2], [gesture3, gesture4]]\n const gestureArrays = this.gestures.map((gesture) =>\n gesture.toGestureArray()\n );\n\n let requireToFail: GestureType[] = [];\n\n for (let i = 0; i < this.gestures.length; i++) {\n this.prepareSingleGesture(\n this.gestures[i],\n this.simultaneousGestures,\n this.requireGesturesToFail.concat(requireToFail)\n );\n\n // Every group gets to wait for all groups before it\n requireToFail = requireToFail.concat(gestureArrays[i]);\n }\n }\n}\n\nexport type ComposedGestureType = InstanceType;\nexport type RaceGestureType = ComposedGestureType;\nexport type SimultaneousGestureType = InstanceType;\nexport type ExclusiveGestureType = InstanceType;\n","/* eslint-disable react/no-unused-prop-types */\nimport React, {\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n} from 'react';\nimport { Platform, findNodeHandle } from 'react-native';\nimport { GestureType } from '../gesture';\nimport { UserSelect, TouchAction } from '../../gestureHandlerCommon';\nimport { ComposedGesture } from '../gestureComposition';\nimport { isJestEnv } from '../../../utils';\n\nimport GestureHandlerRootViewContext from '../../../GestureHandlerRootViewContext';\nimport { AttachedGestureState, GestureDetectorState } from './types';\nimport { useAnimatedGesture } from './useAnimatedGesture';\nimport { attachHandlers } from './attachHandlers';\nimport { needsToReattach } from './needsToReattach';\nimport { dropHandlers } from './dropHandlers';\nimport { useWebEventHandlers } from './utils';\nimport { Wrap, AnimatedWrap } from './Wrap';\nimport { useDetectorUpdater } from './useDetectorUpdater';\nimport { useViewRefHandler } from './useViewRefHandler';\n\nfunction propagateDetectorConfig(\n props: GestureDetectorProps,\n gesture: ComposedGesture | GestureType\n) {\n const keysToPropagate: (keyof GestureDetectorProps)[] = [\n 'userSelect',\n 'enableContextMenu',\n 'touchAction',\n ];\n\n for (const key of keysToPropagate) {\n const value = props[key];\n if (value === undefined) {\n continue;\n }\n\n for (const g of gesture.toGestureArray()) {\n const config = g.config as { [key: string]: unknown };\n config[key] = value;\n }\n }\n}\n\ninterface GestureDetectorProps {\n children?: React.ReactNode;\n /**\n * A gesture object containing the configuration and callbacks.\n * Can be any of:\n * - base gestures (`Tap`, `Pan`, ...)\n * - `ComposedGesture` (`Race`, `Simultaneous`, `Exclusive`)\n */\n gesture: ComposedGesture | GestureType;\n /**\n * #### Web only\n * This parameter allows to specify which `userSelect` property should be applied to underlying view.\n * Possible values are `\"none\" | \"auto\" | \"text\"`. Default value is set to `\"none\"`.\n */\n userSelect?: UserSelect;\n /**\n * #### Web only\n * Specifies whether context menu should be enabled after clicking on underlying view with right mouse button.\n * Default value is set to `false`.\n */\n enableContextMenu?: boolean;\n /**\n * #### Web only\n * This parameter allows to specify which `touchAction` property should be applied to underlying view.\n * Supports all CSS touch-action values (e.g. `\"none\"`, `\"pan-y\"`). Default value is set to `\"none\"`.\n */\n touchAction?: TouchAction;\n}\n\n/**\n * `GestureDetector` is responsible for creating and updating native gesture handlers based on the config of provided gesture.\n *\n * ### Props\n * - `gesture`\n * - `userSelect` (**Web only**)\n * - `enableContextMenu` (**Web only**)\n * - `touchAction` (**Web only**)\n *\n * ### Remarks\n * - Gesture Detector will use first native view in its subtree to recognize gestures, however if this view is used only to group its children it may get automatically collapsed.\n * - Using the same instance of a gesture across multiple Gesture Detectors is not possible.\n *\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/gesture-detector\n */\nexport const GestureDetector = (props: GestureDetectorProps) => {\n const rootViewContext = useContext(GestureHandlerRootViewContext);\n if (__DEV__ && !rootViewContext && !isJestEnv() && Platform.OS !== 'web') {\n throw new Error(\n 'GestureDetector must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'\n );\n }\n\n // Gesture config should be wrapped with useMemo to prevent unnecessary re-renders\n const gestureConfig = props.gesture;\n propagateDetectorConfig(props, gestureConfig);\n\n const gesturesToAttach = useMemo(\n () => gestureConfig.toGestureArray(),\n [gestureConfig]\n );\n const shouldUseReanimated = gesturesToAttach.some(\n (g) => g.shouldUseReanimated\n );\n\n const webEventHandlersRef = useWebEventHandlers();\n // Store state in ref to prevent unnecessary renders\n const state = useRef({\n firstRender: true,\n viewRef: null,\n previousViewTag: -1,\n forceRebuildReanimatedEvent: false,\n }).current;\n\n const preparedGesture = React.useRef({\n attachedGestures: [],\n animatedEventHandler: null,\n animatedHandlers: null,\n shouldUseReanimated: shouldUseReanimated,\n isMounted: false,\n }).current;\n\n const updateAttachedGestures = useDetectorUpdater(\n state,\n preparedGesture,\n gesturesToAttach,\n gestureConfig,\n webEventHandlersRef\n );\n\n const refHandler = useViewRefHandler(state, updateAttachedGestures);\n\n // Reanimated event should be rebuilt only when gestures are reattached, otherwise\n // config update will be enough as all necessary items are stored in shared values anyway\n const needsToRebuildReanimatedEvent =\n state.firstRender ||\n state.forceRebuildReanimatedEvent ||\n needsToReattach(preparedGesture, gesturesToAttach);\n state.forceRebuildReanimatedEvent = false;\n\n useAnimatedGesture(preparedGesture, needsToRebuildReanimatedEvent);\n\n useLayoutEffect(() => {\n const viewTag = findNodeHandle(state.viewRef) as number;\n preparedGesture.isMounted = true;\n\n attachHandlers({\n preparedGesture,\n gestureConfig,\n gesturesToAttach,\n webEventHandlersRef,\n viewTag,\n });\n\n return () => {\n preparedGesture.isMounted = false;\n dropHandlers(preparedGesture);\n };\n }, []);\n\n useEffect(() => {\n if (state.firstRender) {\n state.firstRender = false;\n } else {\n updateAttachedGestures();\n }\n }, [props]);\n\n if (shouldUseReanimated) {\n return (\n \n {props.children}\n \n );\n } else {\n return {props.children};\n }\n};\n","import { Platform } from 'react-native';\n\nimport { isJestEnv, tagMessage } from '../../../utils';\nimport { GestureRef, BaseGesture, GestureType } from '../gesture';\n\nimport { flingGestureHandlerProps } from '../../FlingGestureHandler';\nimport { forceTouchGestureHandlerProps } from '../../ForceTouchGestureHandler';\nimport { longPressGestureHandlerProps } from '../../LongPressGestureHandler';\nimport {\n panGestureHandlerProps,\n panGestureHandlerCustomNativeProps,\n} from '../../PanGestureHandler';\nimport { tapGestureHandlerProps } from '../../TapGestureHandler';\nimport { hoverGestureHandlerProps } from '../hoverGesture';\nimport { nativeViewGestureHandlerProps } from '../../NativeViewGestureHandler';\nimport {\n HandlerStateChangeEvent,\n baseGestureHandlerWithDetectorProps,\n} from '../../gestureHandlerCommon';\nimport { isNewWebImplementationEnabled } from '../../../EnableNewWebImplementation';\nimport { getReactNativeVersion } from '../../../getReactNativeVersion';\nimport { RNRenderer } from '../../../RNRenderer';\nimport { useCallback, useRef, useState } from 'react';\nimport { Reanimated } from '../reanimatedWrapper';\nimport { onGestureHandlerEvent } from '../eventReceiver';\nimport { WebEventHandler } from './types';\n\nexport const ALLOWED_PROPS = [\n ...baseGestureHandlerWithDetectorProps,\n ...tapGestureHandlerProps,\n ...panGestureHandlerProps,\n ...panGestureHandlerCustomNativeProps,\n ...longPressGestureHandlerProps,\n ...forceTouchGestureHandlerProps,\n ...flingGestureHandlerProps,\n ...hoverGestureHandlerProps,\n ...nativeViewGestureHandlerProps,\n];\n\nfunction convertToHandlerTag(ref: GestureRef): number {\n if (typeof ref === 'number') {\n return ref;\n } else if (ref instanceof BaseGesture) {\n return ref.handlerTag;\n } else {\n // @ts-ignore in this case it should be a ref either to gesture object or\n // a gesture handler component, in both cases handlerTag property exists\n return ref.current?.handlerTag ?? -1;\n }\n}\n\nfunction extractValidHandlerTags(interactionGroup: GestureRef[] | undefined) {\n return (\n interactionGroup?.map(convertToHandlerTag)?.filter((tag) => tag > 0) ?? []\n );\n}\n\nexport function extractGestureRelations(gesture: GestureType) {\n const requireToFail = extractValidHandlerTags(gesture.config.requireToFail);\n const simultaneousWith = extractValidHandlerTags(\n gesture.config.simultaneousWith\n );\n const blocksHandlers = extractValidHandlerTags(gesture.config.blocksHandlers);\n\n return {\n waitFor: requireToFail,\n simultaneousHandlers: simultaneousWith,\n blocksHandlers: blocksHandlers,\n };\n}\n\nexport function checkGestureCallbacksForWorklets(gesture: GestureType) {\n if (!__DEV__) {\n return;\n }\n // If a gesture is explicitly marked to run on the JS thread there is no need to check\n // if callbacks are worklets as the user is aware they will be ran on the JS thread\n if (gesture.config.runOnJS) {\n return;\n }\n\n const areSomeNotWorklets = gesture.handlers.isWorklet.includes(false);\n const areSomeWorklets = gesture.handlers.isWorklet.includes(true);\n\n // If some of the callbacks are worklets and some are not, and the gesture is not\n // explicitly marked with `.runOnJS(true)` show an error\n if (areSomeNotWorklets && areSomeWorklets) {\n console.error(\n tagMessage(\n `Some of the callbacks in the gesture are worklets and some are not. Either make sure that all calbacks are marked as 'worklet' if you wish to run them on the UI thread or use '.runOnJS(true)' modifier on the gesture explicitly to run all callbacks on the JS thread.`\n )\n );\n }\n\n if (Reanimated === undefined) {\n // If Reanimated is not available, we can't run worklets, so we shouldn't show the warning\n return;\n }\n\n const areAllNotWorklets = !areSomeWorklets && areSomeNotWorklets;\n // If none of the callbacks are worklets and the gesture is not explicitly marked with\n // `.runOnJS(true)` show a warning\n if (areAllNotWorklets && !isJestEnv()) {\n console.warn(\n tagMessage(\n `None of the callbacks in the gesture are worklets. If you wish to run them on the JS thread use '.runOnJS(true)' modifier on the gesture to make this explicit. Otherwise, mark the callbacks as 'worklet' to run them on the UI thread.`\n )\n );\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function validateDetectorChildren(ref: any) {\n // Finds the first native view under the Wrap component and traverses the fiber tree upwards\n // to check whether there is more than one native view as a pseudo-direct child of GestureDetector\n // i.e. this is not ok:\n // Wrap\n // |\n // / \\\n // / \\\n // / \\\n // / \\\n // NativeView NativeView\n //\n // but this is fine:\n // Wrap\n // |\n // NativeView\n // |\n // / \\\n // / \\\n // / \\\n // / \\\n // NativeView NativeView\n if (__DEV__ && Platform.OS !== 'web') {\n const REACT_NATIVE_VERSION = getReactNativeVersion();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const wrapType =\n REACT_NATIVE_VERSION.minor > 63 || REACT_NATIVE_VERSION.major > 0\n ? // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ref._reactInternals.elementType\n : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ref._reactInternalFiber.elementType;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n let instance =\n RNRenderer.findHostInstance_DEPRECATED(\n ref\n )._internalFiberInstanceHandleDEV;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n while (instance && instance.elementType !== wrapType) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (instance.sibling) {\n throw new Error(\n 'GestureDetector has more than one native view as its children. This can happen if you are using a custom component that renders multiple views, like React.Fragment. You should wrap content of GestureDetector with a or .'\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n instance = instance.return;\n }\n }\n}\n\nexport function useForceRender() {\n const [renderState, setRenderState] = useState(false);\n const forceRender = useCallback(() => {\n setRenderState(!renderState);\n }, [renderState, setRenderState]);\n\n return forceRender;\n}\n\nexport function useWebEventHandlers() {\n return useRef({\n onGestureHandlerEvent: (e: HandlerStateChangeEvent) => {\n onGestureHandlerEvent(e.nativeEvent);\n },\n onGestureHandlerStateChange: isNewWebImplementationEnabled()\n ? (e: HandlerStateChangeEvent) => {\n onGestureHandlerEvent(e.nativeEvent);\n }\n : undefined,\n });\n}\n","import type { TapGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const tapGestureHandlerProps = [\n 'maxDurationMs',\n 'maxDelayMs',\n 'numberOfTaps',\n 'maxDeltaX',\n 'maxDeltaY',\n 'maxDist',\n 'minPointers',\n] as const;\n\nexport interface TapGestureConfig {\n /**\n * Minimum number of pointers (fingers) required to be placed before the\n * handler activates. Should be a positive integer.\n * The default value is 1.\n */\n minPointers?: number;\n\n /**\n * Maximum time, expressed in milliseconds, that defines how fast a finger\n * must be released after a touch. The default value is 500.\n */\n maxDurationMs?: number;\n\n /**\n * Maximum time, expressed in milliseconds, that can pass before the next tap\n * if many taps are required. The default value is 500.\n */\n maxDelayMs?: number;\n\n /**\n * Number of tap gestures required to activate the handler. The default value\n * is 1.\n */\n numberOfTaps?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel along the X axis during a tap gesture. If the finger\n * travels further than the defined distance along the X axis and the handler\n * hasn't yet activated, it will fail to recognize the gesture.\n */\n maxDeltaX?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel along the Y axis during a tap gesture. If the finger\n * travels further than the defined distance along the Y axis and the handler\n * hasn't yet activated, it will fail to recognize the gesture.\n */\n maxDeltaY?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel during a tap gesture. If the finger travels further than\n * the defined distance and the handler hasn't yet\n * activated, it will fail to recognize the gesture.\n */\n maxDist?: number;\n}\n\nexport interface TapGestureHandlerProps\n extends BaseGestureHandlerProps,\n TapGestureConfig {}\n\nexport const tapHandlerName = 'TapGestureHandler';\n\nexport type TapGestureHandler = typeof TapGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const TapGestureHandler = createHandler<\n TapGestureHandlerProps,\n TapGestureHandlerEventPayload\n>({\n name: tapHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...tapGestureHandlerProps,\n ] as const,\n config: {\n shouldCancelWhenOutside: true,\n },\n});\n","import type { PanGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const panGestureHandlerProps = [\n 'activeOffsetY',\n 'activeOffsetX',\n 'failOffsetY',\n 'failOffsetX',\n 'minDist',\n 'minVelocity',\n 'minVelocityX',\n 'minVelocityY',\n 'minPointers',\n 'maxPointers',\n 'avgTouches',\n 'enableTrackpadTwoFingerGesture',\n 'activateAfterLongPress',\n] as const;\n\nexport const panGestureHandlerCustomNativeProps = [\n 'activeOffsetYStart',\n 'activeOffsetYEnd',\n 'activeOffsetXStart',\n 'activeOffsetXEnd',\n 'failOffsetYStart',\n 'failOffsetYEnd',\n 'failOffsetXStart',\n 'failOffsetXEnd',\n] as const;\n\ninterface CommonPanProperties {\n /**\n * Minimum distance the finger (or multiple finger) need to travel before the\n * handler activates. Expressed in points.\n */\n minDist?: number;\n\n /**\n * Android only.\n */\n avgTouches?: boolean;\n\n /**\n * Enables two-finger gestures on supported devices, for example iPads with\n * trackpads. If not enabled the gesture will require click + drag, with\n * enableTrackpadTwoFingerGesture swiping with two fingers will also trigger\n * the gesture.\n */\n enableTrackpadTwoFingerGesture?: boolean;\n\n /**\n * A number of fingers that is required to be placed before handler can\n * activate. Should be a higher or equal to 0 integer.\n */\n minPointers?: number;\n\n /**\n * When the given number of fingers is placed on the screen and handler hasn't\n * yet activated it will fail recognizing the gesture. Should be a higher or\n * equal to 0 integer.\n */\n maxPointers?: number;\n\n minVelocity?: number;\n minVelocityX?: number;\n minVelocityY?: number;\n activateAfterLongPress?: number;\n}\n\nexport interface PanGestureConfig extends CommonPanProperties {\n activeOffsetYStart?: number;\n activeOffsetYEnd?: number;\n activeOffsetXStart?: number;\n activeOffsetXEnd?: number;\n failOffsetYStart?: number;\n failOffsetYEnd?: number;\n failOffsetXStart?: number;\n failOffsetXEnd?: number;\n}\n\nexport interface PanGestureHandlerProps\n extends BaseGestureHandlerProps,\n CommonPanProperties {\n /**\n * Range along X axis (in points) where fingers travels without activation of\n * handler. Moving outside of this range implies activation of handler. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n activeOffsetY?:\n | number\n | [activeOffsetYStart: number, activeOffsetYEnd: number];\n\n /**\n * Range along X axis (in points) where fingers travels without activation of\n * handler. Moving outside of this range implies activation of handler. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n activeOffsetX?:\n | number\n | [activeOffsetXStart: number, activeOffsetXEnd: number];\n\n /**\n * When the finger moves outside this range (in points) along Y axis and\n * handler hasn't yet activated it will fail recognizing the gesture. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n failOffsetY?: number | [failOffsetYStart: number, failOffsetYEnd: number];\n\n /**\n * When the finger moves outside this range (in points) along X axis and\n * handler hasn't yet activated it will fail recognizing the gesture. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n failOffsetX?: number | [failOffsetXStart: number, failOffsetXEnd: number];\n}\n\nexport const panHandlerName = 'PanGestureHandler';\n\nexport type PanGestureHandler = typeof PanGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const PanGestureHandler = createHandler<\n PanGestureHandlerProps,\n PanGestureHandlerEventPayload\n>({\n name: panHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...panGestureHandlerProps,\n ] as const,\n config: {},\n transformProps: managePanProps,\n customNativeProps: panGestureHandlerCustomNativeProps,\n});\n\nfunction validatePanGestureHandlerProps(props: PanGestureHandlerProps) {\n if (\n Array.isArray(props.activeOffsetX) &&\n (props.activeOffsetX[0] > 0 || props.activeOffsetX[1] < 0)\n ) {\n throw new Error(\n `First element of activeOffsetX should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.activeOffsetY) &&\n (props.activeOffsetY[0] > 0 || props.activeOffsetY[1] < 0)\n ) {\n throw new Error(\n `First element of activeOffsetY should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.failOffsetX) &&\n (props.failOffsetX[0] > 0 || props.failOffsetX[1] < 0)\n ) {\n throw new Error(\n `First element of failOffsetX should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.failOffsetY) &&\n (props.failOffsetY[0] > 0 || props.failOffsetY[1] < 0)\n ) {\n throw new Error(\n `First element of failOffsetY should be negative, a the second one should be positive`\n );\n }\n\n if (props.minDist && (props.failOffsetX || props.failOffsetY)) {\n throw new Error(\n `It is not supported to use minDist with failOffsetX or failOffsetY, use activeOffsetX and activeOffsetY instead`\n );\n }\n\n if (props.minDist && (props.activeOffsetX || props.activeOffsetY)) {\n throw new Error(\n `It is not supported to use minDist with activeOffsetX or activeOffsetY`\n );\n }\n}\n\nfunction transformPanGestureHandlerProps(props: PanGestureHandlerProps) {\n type InternalPanGHKeys =\n | 'activeOffsetXStart'\n | 'activeOffsetXEnd'\n | 'failOffsetXStart'\n | 'failOffsetXEnd'\n | 'activeOffsetYStart'\n | 'activeOffsetYEnd'\n | 'failOffsetYStart'\n | 'failOffsetYEnd';\n type PanGestureHandlerInternalProps = PanGestureHandlerProps &\n Partial>;\n\n const res: PanGestureHandlerInternalProps = { ...props };\n\n if (props.activeOffsetX !== undefined) {\n delete res.activeOffsetX;\n if (Array.isArray(props.activeOffsetX)) {\n res.activeOffsetXStart = props.activeOffsetX[0];\n res.activeOffsetXEnd = props.activeOffsetX[1];\n } else if (props.activeOffsetX < 0) {\n res.activeOffsetXStart = props.activeOffsetX;\n } else {\n res.activeOffsetXEnd = props.activeOffsetX;\n }\n }\n\n if (props.activeOffsetY !== undefined) {\n delete res.activeOffsetY;\n if (Array.isArray(props.activeOffsetY)) {\n res.activeOffsetYStart = props.activeOffsetY[0];\n res.activeOffsetYEnd = props.activeOffsetY[1];\n } else if (props.activeOffsetY < 0) {\n res.activeOffsetYStart = props.activeOffsetY;\n } else {\n res.activeOffsetYEnd = props.activeOffsetY;\n }\n }\n\n if (props.failOffsetX !== undefined) {\n delete res.failOffsetX;\n if (Array.isArray(props.failOffsetX)) {\n res.failOffsetXStart = props.failOffsetX[0];\n res.failOffsetXEnd = props.failOffsetX[1];\n } else if (props.failOffsetX < 0) {\n res.failOffsetXStart = props.failOffsetX;\n } else {\n res.failOffsetXEnd = props.failOffsetX;\n }\n }\n\n if (props.failOffsetY !== undefined) {\n delete res.failOffsetY;\n if (Array.isArray(props.failOffsetY)) {\n res.failOffsetYStart = props.failOffsetY[0];\n res.failOffsetYEnd = props.failOffsetY[1];\n } else if (props.failOffsetY < 0) {\n res.failOffsetYStart = props.failOffsetY;\n } else {\n res.failOffsetYEnd = props.failOffsetY;\n }\n }\n\n return res;\n}\n\nexport function managePanProps(props: PanGestureHandlerProps) {\n if (__DEV__) {\n validatePanGestureHandlerProps(props);\n }\n return transformPanGestureHandlerProps(props);\n}\n","import { LongPressGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const longPressGestureHandlerProps = [\n 'minDurationMs',\n 'maxDist',\n 'numberOfPointers',\n] as const;\n\nexport interface LongPressGestureConfig {\n /**\n * Minimum time, expressed in milliseconds, that a finger must remain pressed on\n * the corresponding view. The default value is 500.\n */\n minDurationMs?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel during a long press gesture. If the finger travels\n * further than the defined distance and the handler hasn't yet activated, it\n * will fail to recognize the gesture. The default value is 10.\n */\n maxDist?: number;\n\n /**\n * Determine exact number of points required to handle the long press gesture.\n */\n numberOfPointers?: number;\n}\n\nexport interface LongPressGestureHandlerProps\n extends BaseGestureHandlerProps,\n LongPressGestureConfig {}\n\nexport const longPressHandlerName = 'LongPressGestureHandler';\n\nexport type LongPressGestureHandler = typeof LongPressGestureHandler;\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const LongPressGestureHandler = createHandler<\n LongPressGestureHandlerProps,\n LongPressGestureHandlerEventPayload\n>({\n name: longPressHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...longPressGestureHandlerProps,\n ] as const,\n config: {\n shouldCancelWhenOutside: true,\n },\n});\n","import { ComponentClass } from 'react';\nimport {\n GestureUpdateEvent,\n GestureStateChangeEvent,\n} from '../gestureHandlerCommon';\nimport { tagMessage } from '../../utils';\n\nexport interface SharedValue {\n value: T;\n}\n\nlet Reanimated:\n | {\n default: {\n // Slightly modified definition copied from 'react-native-reanimated'\n // eslint-disable-next-line @typescript-eslint/ban-types\n createAnimatedComponent

(\n component: ComponentClass

,\n options?: unknown\n ): ComponentClass

;\n };\n useEvent: (\n callback: (event: GestureUpdateEvent | GestureStateChangeEvent) => void,\n events: string[],\n rebuild: boolean\n ) => unknown;\n useSharedValue: (value: T) => SharedValue;\n setGestureState: (handlerTag: number, newState: number) => void;\n }\n | undefined;\n\ntry {\n Reanimated = require('react-native-reanimated');\n} catch (e) {\n // When 'react-native-reanimated' is not available we want to quietly continue\n // @ts-ignore TS demands the variable to be initialized\n Reanimated = undefined;\n}\n\nif (!Reanimated?.useSharedValue) {\n // @ts-ignore Make sure the loaded module is actually Reanimated, if it's not\n // reset the module to undefined so we can fallback to the default implementation\n Reanimated = undefined;\n}\n\nif (Reanimated !== undefined && !Reanimated.setGestureState) {\n // The loaded module is Reanimated but it doesn't have the setGestureState defined\n Reanimated.setGestureState = () => {\n 'worklet';\n console.warn(\n tagMessage(\n 'Please use newer version of react-native-reanimated in order to control state of the gestures.'\n )\n );\n };\n}\n\nexport { Reanimated };\n","'use strict';\n\nimport './publicGlobals';\nimport * as Animated from './Animated';\n\nexport default Animated;\n\nexport { configureReanimatedLogger } from './ConfigHelper';\nexport { LogLevel as ReanimatedLogLevel } from './logger';\nexport type { WorkletRuntime } from './core';\nexport {\n runOnJS,\n runOnUI,\n createWorkletRuntime,\n runOnRuntime,\n makeMutable,\n makeShareableCloneRecursive,\n isReanimated3,\n isConfigured,\n enableLayoutAnimations,\n getViewProp,\n executeOnUIRuntimeSync,\n} from './core';\nexport type {\n GestureHandlers,\n AnimatedRef,\n DerivedValue,\n ScrollHandler,\n ScrollHandlers,\n ScrollHandlerProcessed,\n FrameCallback,\n ScrollEvent,\n EventHandler,\n EventHandlerProcessed,\n UseHandlerContext,\n ReanimatedEvent,\n} from './hook';\nexport {\n useAnimatedProps,\n useEvent,\n useHandler,\n useWorkletCallback,\n useSharedValue,\n useReducedMotion,\n useAnimatedStyle,\n useAnimatedGestureHandler,\n useAnimatedReaction,\n useAnimatedRef,\n useAnimatedScrollHandler,\n useDerivedValue,\n useAnimatedSensor,\n useFrameCallback,\n useAnimatedKeyboard,\n useScrollViewOffset,\n useComposedEventHandler,\n} from './hook';\nexport type {\n DelayAnimation,\n RepeatAnimation,\n SequenceAnimation,\n StyleLayoutAnimation,\n WithTimingConfig,\n TimingAnimation,\n WithSpringConfig,\n SpringAnimation,\n WithDecayConfig,\n DecayAnimation,\n} from './animation';\nexport {\n cancelAnimation,\n defineAnimation,\n withClamp,\n withDecay,\n withDelay,\n withRepeat,\n withSequence,\n withSpring,\n withTiming,\n} from './animation';\nexport type { ExtrapolationConfig, ExtrapolationType } from './interpolation';\nexport { Extrapolation, interpolate, clamp } from './interpolation';\nexport type {\n InterpolationOptions,\n InterpolateConfig,\n InterpolateRGB,\n InterpolateHSV,\n} from './interpolateColor';\nexport {\n /** @deprecated Please use {@link Extrapolation} instead. */\n Extrapolate,\n ColorSpace,\n interpolateColor,\n useInterpolateConfig,\n} from './interpolateColor';\nexport type {\n EasingFn,\n EasingFunctionFactory,\n EasingFactoryFn,\n} from './Easing';\nexport { Easing } from './Easing';\nexport type { ComponentCoords } from './platformFunctions';\nexport {\n measure,\n dispatchCommand,\n scrollTo,\n setGestureState,\n setNativeProps,\n getRelativeCoords,\n} from './platformFunctions';\nexport type { ParsedColorArray } from './Colors';\nexport { isColor, processColor, convertToRGBA } from './Colors';\nexport { createAnimatedPropAdapter } from './PropAdapters';\nexport type {\n LayoutAnimation,\n EntryAnimationsValues,\n ExitAnimationsValues,\n EntryExitAnimationFunction,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n LayoutAnimationStartFunction,\n LayoutAnimationType,\n SharedTransitionAnimationsValues,\n ILayoutAnimationBuilder,\n IEntryExitAnimationBuilder,\n BaseLayoutAnimationConfig,\n} from './layoutReanimation';\nexport {\n BaseAnimationBuilder,\n ComplexAnimationBuilder,\n Keyframe,\n // Flip\n FlipInXUp,\n FlipInYLeft,\n FlipInXDown,\n FlipInYRight,\n FlipInEasyX,\n FlipInEasyY,\n FlipOutXUp,\n FlipOutYLeft,\n FlipOutXDown,\n FlipOutYRight,\n FlipOutEasyX,\n FlipOutEasyY,\n // Stretch\n StretchInX,\n StretchInY,\n StretchOutX,\n StretchOutY,\n // Fade\n FadeIn,\n FadeInRight,\n FadeInLeft,\n FadeInUp,\n FadeInDown,\n FadeOut,\n FadeOutRight,\n FadeOutLeft,\n FadeOutUp,\n FadeOutDown,\n // Slide\n SlideInRight,\n SlideInLeft,\n SlideOutRight,\n SlideOutLeft,\n SlideInUp,\n SlideInDown,\n SlideOutUp,\n SlideOutDown,\n // Zoom\n ZoomIn,\n ZoomInRotate,\n ZoomInLeft,\n ZoomInRight,\n ZoomInUp,\n ZoomInDown,\n ZoomInEasyUp,\n ZoomInEasyDown,\n ZoomOut,\n ZoomOutRotate,\n ZoomOutLeft,\n ZoomOutRight,\n ZoomOutUp,\n ZoomOutDown,\n ZoomOutEasyUp,\n ZoomOutEasyDown,\n // Bounce\n BounceIn,\n BounceInDown,\n BounceInUp,\n BounceInLeft,\n BounceInRight,\n BounceOut,\n BounceOutDown,\n BounceOutUp,\n BounceOutLeft,\n BounceOutRight,\n // Lightspeed\n LightSpeedInRight,\n LightSpeedInLeft,\n LightSpeedOutRight,\n LightSpeedOutLeft,\n // Pinwheel\n PinwheelIn,\n PinwheelOut,\n // Rotate\n RotateInDownLeft,\n RotateInDownRight,\n RotateInUpLeft,\n RotateInUpRight,\n RotateOutDownLeft,\n RotateOutDownRight,\n RotateOutUpLeft,\n RotateOutUpRight,\n // Roll\n RollInLeft,\n RollInRight,\n RollOutLeft,\n RollOutRight,\n // Transitions\n Layout,\n LinearTransition,\n FadingTransition,\n SequencedTransition,\n JumpingTransition,\n CurvedTransition,\n EntryExitTransition,\n combineTransition,\n // SET\n SharedTransition,\n SharedTransitionType,\n} from './layoutReanimation';\nexport { isSharedValue } from './isSharedValue';\nexport type {\n StyleProps,\n SharedValue,\n AnimatableValueObject,\n AnimatableValue,\n AnimationObject,\n SensorConfig,\n Animation,\n AnimatedSensor,\n AnimationCallback,\n Value3D,\n ValueRotation,\n AnimatedKeyboardInfo,\n AnimatedKeyboardOptions,\n MeasuredDimensions,\n EasingFunction,\n AnimatedTransform,\n TransformArrayItem,\n AnimateStyle,\n AnimatedStyle,\n StylesOrDefault,\n} from './commonTypes';\nexport {\n SensorType,\n IOSReferenceFrame,\n InterfaceOrientation,\n KeyboardState,\n ReduceMotion,\n isWorkletFunction,\n} from './commonTypes';\nexport type { FrameInfo } from './frameCallback';\nexport { getUseOfValueInStyleWarning } from './pluginUtils';\nexport {\n withReanimatedTimer,\n advanceAnimationByTime,\n advanceAnimationByFrame,\n setUpTests,\n getAnimatedStyle,\n} from './jestUtils';\nexport { LayoutAnimationConfig } from './component/LayoutAnimationConfig';\nexport { PerformanceMonitor } from './component/PerformanceMonitor';\nexport type { PerformanceMonitorProps } from './component/PerformanceMonitor';\nexport { ReducedMotionConfig } from './component/ReducedMotionConfig';\nexport type {\n Adaptable,\n AdaptTransforms,\n AnimateProps,\n AnimatedProps,\n TransformStyleTypes,\n AnimatedStyleProp,\n} from './helperTypes';\nexport type { AnimatedScrollViewProps } from './component/ScrollView';\nexport type { FlatListPropsWithLayout } from './component/FlatList';\nexport { startMapper, stopMapper } from './mappers';\nexport {\n startScreenTransition,\n finishScreenTransition,\n ScreenTransition,\n} from './screenTransition';\nexport type {\n AnimatedScreenTransition,\n GoBackGesture,\n ScreenTransitionConfig,\n} from './screenTransition';\n","'use strict';\nimport './animationsManager';\nexport * from './animationBuilder';\nexport * from './defaultAnimations';\nexport * from './defaultTransitions';\nexport * from './sharedTransitions';\nexport type { KeyframeProps } from './animationBuilder/commonTypes';\n","'use strict';\nimport { withStyleAnimation } from '../animation/styleAnimation';\nimport type { SharedValue } from '../commonTypes';\nimport { makeMutableUI } from '../mutables';\nimport { LayoutAnimationType } from './animationBuilder';\nimport { runOnUIImmediately } from '../threads';\nimport type {\n SharedTransitionAnimationsValues,\n LayoutAnimation,\n LayoutAnimationStartFunction,\n} from './animationBuilder/commonTypes';\n\nconst TAG_OFFSET = 1e9;\n\nfunction startObservingProgress(\n tag: number,\n sharedValue: SharedValue>,\n animationType: LayoutAnimationType\n): void {\n 'worklet';\n const isSharedTransition =\n animationType === LayoutAnimationType.SHARED_ELEMENT_TRANSITION;\n sharedValue.addListener(tag + TAG_OFFSET, () => {\n global._notifyAboutProgress(tag, sharedValue.value, isSharedTransition);\n });\n}\n\nfunction stopObservingProgress(\n tag: number,\n sharedValue: SharedValue,\n removeView = false\n): void {\n 'worklet';\n sharedValue.removeListener(tag + TAG_OFFSET);\n global._notifyAboutEnd(tag, removeView);\n}\n\nfunction createLayoutAnimationManager(): {\n start: LayoutAnimationStartFunction;\n stop: (tag: number) => void;\n} {\n 'worklet';\n const currentAnimationForTag = new Map();\n const mutableValuesForTag = new Map();\n\n return {\n start(\n tag: number,\n type: LayoutAnimationType,\n /**\n * CreateLayoutAnimationManager creates an animation manager for both\n * Layout animations and Shared Transition Elements animations.\n */\n yogaValues: Partial,\n config: (\n arg: Partial\n ) => LayoutAnimation\n ) {\n if (type === LayoutAnimationType.SHARED_ELEMENT_TRANSITION_PROGRESS) {\n global.ProgressTransitionRegister.onTransitionStart(tag, yogaValues);\n return;\n }\n\n const style = config(yogaValues);\n let currentAnimation = style.animations;\n\n // When layout animation is requested, but a previous one is still running, we merge\n // new layout animation targets into the ongoing animation\n const previousAnimation = currentAnimationForTag.get(tag);\n if (previousAnimation) {\n currentAnimation = { ...previousAnimation, ...style.animations };\n }\n currentAnimationForTag.set(tag, currentAnimation);\n\n let value = mutableValuesForTag.get(tag);\n if (value === undefined) {\n value = makeMutableUI(style.initialValues);\n mutableValuesForTag.set(tag, value);\n } else {\n stopObservingProgress(tag, value);\n value._value = style.initialValues;\n }\n\n // @ts-ignore The line below started failing because I added types to the method – don't have time to fix it right now\n const animation = withStyleAnimation(currentAnimation);\n\n animation.callback = (finished?: boolean) => {\n if (finished) {\n currentAnimationForTag.delete(tag);\n mutableValuesForTag.delete(tag);\n const shouldRemoveView = type === LayoutAnimationType.EXITING;\n stopObservingProgress(tag, value, shouldRemoveView);\n }\n style.callback &&\n style.callback(finished === undefined ? false : finished);\n };\n\n startObservingProgress(tag, value, type);\n value.value = animation;\n },\n stop(tag: number) {\n const value = mutableValuesForTag.get(tag);\n if (!value) {\n return;\n }\n stopObservingProgress(tag, value);\n },\n };\n}\n\nrunOnUIImmediately(() => {\n 'worklet';\n global.LayoutAnimationsManager = createLayoutAnimationManager();\n})();\n\nexport type LayoutAnimationsManager = ReturnType<\n typeof createLayoutAnimationManager\n>;\n","'use strict';\nexport { BaseAnimationBuilder } from './BaseAnimationBuilder';\nexport { ComplexAnimationBuilder } from './ComplexAnimationBuilder';\nexport { Keyframe } from './Keyframe';\nexport { LayoutAnimationType, SharedTransitionType } from './commonTypes';\nexport type {\n LayoutAnimation,\n AnimationFunction,\n EntryAnimationsValues,\n ExitAnimationsValues,\n EntryExitAnimationFunction,\n AnimationConfigFunction,\n IEntryAnimationBuilder,\n IExitAnimationBuilder,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n LayoutAnimationStartFunction,\n ILayoutAnimationBuilder,\n BaseLayoutAnimationConfig,\n BaseBuilderAnimationConfig,\n LayoutAnimationAndConfig,\n IEntryExitAnimationBuilder,\n SharedTransitionAnimationsValues,\n} from './commonTypes';\n","'use strict';\nimport { withDelay } from '../../animation';\nimport type {\n EntryExitAnimationFunction,\n AnimationFunction,\n LayoutAnimationFunction,\n} from './commonTypes';\n\nimport { ReduceMotion } from '../../commonTypes';\nimport { getReduceMotionFromConfig } from '../../animation/util';\nimport { ReanimatedError } from '../../errors';\n\nexport class BaseAnimationBuilder {\n durationV?: number;\n delayV?: number;\n reduceMotionV: ReduceMotion = ReduceMotion.System;\n randomizeDelay = false;\n callbackV?: (finished: boolean) => void;\n\n static createInstance: (\n this: T\n ) => InstanceType;\n\n build = (): EntryExitAnimationFunction | LayoutAnimationFunction => {\n throw new ReanimatedError('Unimplemented method in child class.');\n };\n\n /**\n * Lets you adjust the animation duration. Can be chained alongside other\n * [layout animation\n * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).\n *\n * @param durationMs - Length of the animation (in milliseconds).\n */\n static duration(\n this: T,\n durationMs: number\n ): InstanceType {\n const instance = this.createInstance();\n return instance.duration(durationMs);\n }\n\n duration(durationMs: number): this {\n this.durationV = durationMs;\n return this;\n }\n\n /**\n * Lets you adjust the delay before the animation starts (in milliseconds).\n * Can be chained alongside other [layout animation\n * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).\n *\n * @param delayMs - Delay before the animation starts (in milliseconds).\n */\n static delay(\n this: T,\n delayMs: number\n ): InstanceType {\n const instance = this.createInstance();\n return instance.delay(delayMs);\n }\n\n delay(delayMs: number): this {\n this.delayV = delayMs;\n return this;\n }\n\n /**\n * The callback that will fire after the animation ends. Can be chained\n * alongside other [layout animation\n * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).\n *\n * @param callback - Callback that will fire after the animation ends.\n */\n static withCallback(\n this: T,\n callback: (finished: boolean) => void\n ): InstanceType {\n const instance = this.createInstance();\n return instance.withCallback(callback);\n }\n\n withCallback(callback: (finished: boolean) => void): this {\n this.callbackV = callback;\n return this;\n }\n\n /**\n * Lets you adjust the behavior when the device's reduced motion accessibility\n * setting is turned on. Can be chained alongside other [layout animation\n * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).\n *\n * @param reduceMotion - Determines how the animation responds to the device's\n * reduced motion accessibility setting. Default to `ReduceMotion.System` -\n * {@link ReduceMotion}.\n */\n static reduceMotion(\n this: T,\n reduceMotion: ReduceMotion\n ): InstanceType {\n const instance = this.createInstance();\n return instance.reduceMotion(reduceMotion);\n }\n\n reduceMotion(reduceMotionV: ReduceMotion): this {\n this.reduceMotionV = reduceMotionV;\n return this;\n }\n\n // 300ms is the default animation duration. If any animation has different default has to override this method.\n static getDuration(): number {\n return 300;\n }\n\n getDuration(): number {\n return this.durationV ?? 300;\n }\n\n /** @deprecated Use `.delay()` with `Math.random()` instead */\n static randomDelay(\n this: T\n ): InstanceType {\n const instance = this.createInstance();\n return instance.randomDelay();\n }\n\n randomDelay(): this {\n this.randomizeDelay = true;\n return this;\n }\n\n // when randomizeDelay is set to true, randomize delay between 0 and provided value (or 1000ms if delay is not provided)\n getDelay(): number {\n return this.randomizeDelay\n ? Math.random() * (this.delayV ?? 1000)\n : (this.delayV ?? 0);\n }\n\n getReduceMotion(): ReduceMotion {\n return this.reduceMotionV;\n }\n\n getDelayFunction(): AnimationFunction {\n const isDelayProvided = this.randomizeDelay || this.delayV;\n const reduceMotion = this.getReduceMotion();\n return isDelayProvided\n ? (delay, animation) => {\n 'worklet';\n return withDelay(delay, animation, reduceMotion);\n }\n : (_, animation) => {\n 'worklet';\n animation.reduceMotion = getReduceMotionFromConfig(reduceMotion);\n return animation;\n };\n }\n\n static build(\n this: T\n ): EntryExitAnimationFunction | LayoutAnimationFunction {\n const instance = this.createInstance();\n return instance.build();\n }\n}\n","'use strict';\nimport type {\n ViewStyle,\n TextStyle,\n TransformsStyle,\n ImageStyle,\n} from 'react-native';\n\nexport type RequiredKeys = T & Required>;\nexport interface StyleProps extends ViewStyle, TextStyle {\n originX?: number;\n originY?: number;\n [key: string]: any;\n}\n\n/**\n * A value that can be used both on the [JavaScript\n * thread](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#javascript-thread)\n * and the [UI\n * thread](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#ui-thread).\n *\n * Shared values are defined using\n * [useSharedValue](https://docs.swmansion.com/react-native-reanimated/docs/core/useSharedValue)\n * hook. You access and modify shared values by their `.value` property.\n */\nexport interface SharedValue {\n value: Value;\n get(): Value;\n set(value: Value | ((value: Value) => Value)): void;\n addListener: (listenerID: number, listener: (value: Value) => void) => void;\n removeListener: (listenerID: number) => void;\n modify: (\n modifier?: (value: T) => T,\n forceUpdate?: boolean\n ) => void;\n}\n\n/**\n * Due to pattern of `MaybeSharedValue` type present in `AnimatedProps`\n * (`AnimatedStyle`), contravariance breaks types for animated styles etc.\n * Instead of refactoring the code with small chances of success, we just\n * disable contravariance for `SharedValue` in this problematic case.\n */\ntype SharedValueDisableContravariance = Omit<\n SharedValue,\n 'set'\n>;\n\nexport interface Mutable extends SharedValue {\n _isReanimatedSharedValue: true;\n _animation?: AnimationObject | null; // only in Native\n /**\n * `_value` prop should only be accessed by the `valueSetter` implementation\n * which may make the decision about updating the mutable value depending on\n * the provided new value. All other places should only attempt to modify the\n * mutable by assigning to `value` prop directly or by calling the `set`\n * method.\n */\n _value: Value;\n}\n\n// The below type is used for HostObjects returned by the JSI API that don't have\n// any accessible fields or methods but can carry data that is accessed from the\n// c++ side. We add a field to the type to make it possible for typescript to recognize\n// which JSI methods accept those types as arguments and to be able to correctly type\n// check other methods that may use them. However, this field is not actually defined\n// nor should be used for anything else as assigning any data to those objects will\n// throw an error.\nexport type ShareableRef = {\n __hostObjectShareableJSRef: T;\n};\n\n// In case of objects with depth or arrays of objects or arrays of arrays etc.\n// we add this utility type that makes it a `SharaebleRef` of the outermost type.\nexport type FlatShareableRef =\n T extends ShareableRef ? ShareableRef : ShareableRef;\n\nexport type MapperRawInputs = unknown[];\n\nexport type MapperOutputs = SharedValue[];\n\nexport type MapperRegistry = {\n start: (\n mapperID: number,\n worklet: () => void,\n inputs: MapperRawInputs,\n outputs?: MapperOutputs\n ) => void;\n stop: (mapperID: number) => void;\n};\n\nexport type WorkletStackDetails = [\n error: Error,\n lineOffset: number,\n columnOffset: number,\n];\n\ntype WorkletClosure = Record;\n\ninterface WorkletInitDataCommon {\n code: string;\n}\n\ntype WorkletInitDataRelease = WorkletInitDataCommon;\n\ninterface WorkletInitDataDev extends WorkletInitDataCommon {\n location: string;\n sourceMap: string;\n version: string;\n}\n\ninterface WorkletBaseCommon {\n __closure: WorkletClosure;\n __workletHash: number;\n}\n\ninterface WorkletBaseRelease extends WorkletBaseCommon {\n __initData: WorkletInitDataRelease;\n}\n\ninterface WorkletBaseDev extends WorkletBaseCommon {\n __initData: WorkletInitDataDev;\n /** `__stackDetails` is removed after parsing. */\n __stackDetails?: WorkletStackDetails;\n}\n\nexport type WorkletFunction<\n Args extends unknown[] = unknown[],\n ReturnValue = unknown,\n> = ((...args: Args) => ReturnValue) & (WorkletBaseRelease | WorkletBaseDev);\n\n/**\n * This function allows you to determine if a given function is a worklet. It\n * only works with Reanimated Babel plugin enabled. Unless you are doing\n * something with internals of Reanimated you shouldn't need to use this\n * function.\n *\n * ### Note\n *\n * Do not call it before the worklet is declared, as it will always return false\n * then. E.g.:\n *\n * ```ts\n * isWorkletFunction(myWorklet); // Will always return false.\n *\n * function myWorklet() {\n * 'worklet';\n * }\n * ```\n *\n * ### Maintainer note\n *\n * This function works well on the JS thread performance-wise, since the JIT can\n * inline it. However, on other threads it will not get optimized and we will\n * get a function call overhead. We want to change it in the future, but it's\n * not feasible at the moment.\n */\nexport function isWorkletFunction<\n Args extends unknown[] = unknown[],\n ReturnValue = unknown,\n BuildType extends WorkletBaseDev | WorkletBaseRelease = WorkletBaseDev,\n>(value: unknown): value is WorkletFunction & BuildType {\n 'worklet';\n // Since host objects always return true for `in` operator, we have to use dot notation to check if the property exists.\n // See https://github.com/facebook/hermes/blob/340726ef8cf666a7cce75bc60b02fa56b3e54560/lib/VM/JSObject.cpp#L1276.\n return (\n typeof value === 'function' &&\n !!(value as unknown as Record).__workletHash\n );\n}\n\nexport type AnimatedPropsAdapterFunction = (\n props: Record\n) => void;\n\nexport type AnimatedPropsAdapterWorklet = WorkletFunction<\n [props: Record],\n void\n>;\n\nexport interface NestedObject {\n [key: string]: NestedObjectValues;\n}\n\nexport type NestedObjectValues =\n | T\n | Array>\n | NestedObject;\n\ntype Animatable = number | string | Array;\n\nexport type AnimatableValueObject = { [key: string]: Animatable };\n\nexport type AnimatableValue = Animatable | AnimatableValueObject;\n\nexport interface AnimationObject {\n [key: string]: any;\n callback?: AnimationCallback;\n current?: T;\n toValue?: AnimationObject['current'];\n startValue?: AnimationObject['current'];\n finished?: boolean;\n strippedCurrent?: number;\n cancelled?: boolean;\n reduceMotion?: boolean;\n\n __prefix?: string;\n __suffix?: string;\n onFrame: (animation: any, timestamp: Timestamp) => boolean;\n onStart: (\n nextAnimation: any,\n current: any,\n timestamp: Timestamp,\n previousAnimation: any\n ) => void;\n}\n\nexport interface Animation extends AnimationObject {\n onFrame: (animation: T, timestamp: Timestamp) => boolean;\n onStart: (\n nextAnimation: T,\n current: AnimatableValue,\n timestamp: Timestamp,\n previousAnimation: Animation | null | T\n ) => void;\n}\n\nexport enum SensorType {\n ACCELEROMETER = 1,\n GYROSCOPE = 2,\n GRAVITY = 3,\n MAGNETIC_FIELD = 4,\n ROTATION = 5,\n}\nexport enum IOSReferenceFrame {\n XArbitraryZVertical,\n XArbitraryCorrectedZVertical,\n XMagneticNorthZVertical,\n XTrueNorthZVertical,\n Auto,\n}\n\nexport type SensorConfig = {\n interval: number | 'auto';\n adjustToInterfaceOrientation: boolean;\n iosReferenceFrame: IOSReferenceFrame;\n};\n\nexport type AnimatedSensor = {\n sensor: SharedValue;\n unregister: () => void;\n isAvailable: boolean;\n config: SensorConfig;\n};\n\n/**\n * A function called upon animation completion. If the animation is cancelled,\n * the callback will receive `false` as the argument; otherwise, it will receive\n * `true`.\n */\nexport type AnimationCallback = (\n finished?: boolean,\n current?: AnimatableValue\n) => void;\n\nexport type Timestamp = number;\n\nexport type Value3D = {\n x: number;\n y: number;\n z: number;\n interfaceOrientation: InterfaceOrientation;\n};\n\nexport type ValueRotation = {\n qw: number;\n qx: number;\n qy: number;\n qz: number;\n yaw: number;\n pitch: number;\n roll: number;\n interfaceOrientation: InterfaceOrientation;\n};\n\nexport enum InterfaceOrientation {\n ROTATION_0 = 0,\n ROTATION_90 = 90,\n ROTATION_180 = 180,\n ROTATION_270 = 270,\n}\n\nexport type ShadowNodeWrapper = {\n __hostObjectShadowNodeWrapper: never;\n};\n\nexport enum KeyboardState {\n UNKNOWN = 0,\n OPENING = 1,\n OPEN = 2,\n CLOSING = 3,\n CLOSED = 4,\n}\n\nexport type AnimatedKeyboardInfo = {\n height: SharedValue;\n state: SharedValue;\n};\n\n/**\n * @param x - A number representing X coordinate relative to the parent\n * component.\n * @param y - A number representing Y coordinate relative to the parent\n * component.\n * @param width - A number representing the width of the component.\n * @param height - A number representing the height of the component.\n * @param pageX - A number representing X coordinate relative to the screen.\n * @param pageY - A number representing Y coordinate relative to the screen.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/measure#returns\n */\nexport interface MeasuredDimensions {\n x: number;\n y: number;\n width: number;\n height: number;\n pageX: number;\n pageY: number;\n}\n\nexport interface AnimatedKeyboardOptions {\n isStatusBarTranslucentAndroid?: boolean;\n isNavigationBarTranslucentAndroid?: boolean;\n}\n\n/**\n * @param System - If the `Reduce motion` accessibility setting is enabled on\n * the device, disable the animation. Otherwise, enable the animation.\n * @param Always - Disable the animation.\n * @param Never - Enable the animation.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/guides/accessibility\n */\nexport enum ReduceMotion {\n System = 'system',\n Always = 'always',\n Never = 'never',\n}\n\nexport type EasingFunction = (t: number) => number;\n\nexport type TransformArrayItem = Extract<\n TransformsStyle['transform'],\n Array\n>[number];\n\ntype MaybeSharedValue =\n | Value\n | (Value extends AnimatableValue\n ? SharedValueDisableContravariance\n : never);\n\ntype MaybeSharedValueRecursive = Value extends (infer Item)[]\n ?\n | SharedValueDisableContravariance\n | (MaybeSharedValueRecursive | Item)[]\n : Value extends object\n ?\n | SharedValueDisableContravariance\n | {\n [Key in keyof Value]:\n | MaybeSharedValueRecursive\n | Value[Key];\n }\n : MaybeSharedValue;\n\ntype DefaultStyle = ViewStyle & ImageStyle & TextStyle;\n\n// Ideally we want AnimatedStyle to not be generic, but there are\n// so many dependencies on it being generic that it's not feasible at the moment.\nexport type AnimatedStyle