{"version":3,"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","React","forwardRef","ScrollView","createAnimatedComponent","useAnimatedRef","useScrollViewOffset","AnimatedScrollViewComponent","AnimatedScrollView","props","ref","scrollViewOffset","restProps","animatedRef","scrollEventThrottle","createElement"],"sources":["ScrollView.tsx"],"sourcesContent":["'use strict';\nimport type { ForwardedRef } from 'react';\nimport React, { forwardRef } from 'react';\nimport type { ScrollViewProps } from 'react-native';\nimport { ScrollView } from 'react-native';\nimport { createAnimatedComponent } from '../../createAnimatedComponent';\nimport type { SharedValue } from '../commonTypes';\nimport type { AnimatedRef } from '../hook';\nimport { useAnimatedRef, useScrollViewOffset } from '../hook';\nimport type { AnimatedProps } from '../helperTypes';\n\nexport interface AnimatedScrollViewProps\n extends AnimatedProps {\n scrollViewOffset?: SharedValue;\n}\n\n// Since createAnimatedComponent return type is ComponentClass that has the props of the argument,\n// but not things like NativeMethods, etc. we need to add them manually by extending the type.\ninterface AnimatedScrollViewComplement extends ScrollView {\n getNode(): ScrollView;\n}\n\nconst AnimatedScrollViewComponent = createAnimatedComponent(ScrollView);\n\nexport const AnimatedScrollView = forwardRef(\n (props: AnimatedScrollViewProps, ref: ForwardedRef) => {\n const { scrollViewOffset, ...restProps } = props;\n const animatedRef = (\n ref === null\n ? // eslint-disable-next-line react-hooks/rules-of-hooks\n useAnimatedRef()\n : ref\n ) as AnimatedRef;\n\n if (scrollViewOffset) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useScrollViewOffset(animatedRef, scrollViewOffset);\n }\n\n // Set default scrollEventThrottle, because user expects\n // to have continuous scroll events.\n // We set it to 1 so we have peace until\n // there are 960 fps screens.\n if (!('scrollEventThrottle' in restProps)) {\n restProps.scrollEventThrottle = 1;\n }\n\n return ;\n }\n);\n\nexport type AnimatedScrollView = AnimatedScrollViewComplement &\n typeof AnimatedScrollViewComponent;\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,SAAA,IAAAA,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