2026-08-24 06:08:38 +00:00
// Module ID: 6487
// Function ID: 6488
2026-08-08 06:10:11 +00:00
// Name: VirtualDetector
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 21, 6486, 6413, 6488, 6475, 6484, 6483, 6462]
2026-08-08 06:10:11 +00:00
// Exports: VirtualDetector
2026-08-24 06:08:38 +00:00
// Module 6487 (VirtualDetector)
import closure _2 from "_slicedToArray" /* 32 */ ;
import noop from "noop" /* 19 */ ;
import get _ActivityIndicator from "get ActivityIndicator" /* 17 */ ;
import { jsx } from "jsxProd" /* 21 */ ;
2026-08-08 06:10:11 +00:00
const require = arg1 ;
( { useCallback : c3 , useEffect : c4 , useMemo : c5 , useRef : closure _6 , useState : error } = noop ) ;
2026-08-24 06:08:38 +00:00
( { findNodeHandle : closure _8 , Platform } = get _ActivityIndicator ) ;
2026-08-08 06:10:11 +00:00
export const VirtualDetector = function VirtualDetector ( children ) {
const _require = children ;
let obj = _require ( register [ 4 ] ) ;
const interceptingDetectorContext = obj . useInterceptingDetectorContext ( ) ;
if ( interceptingDetectorContext ) {
register = interceptingDetectorContext . register ;
const unregister = interceptingDetectorContext . unregister ;
const setMode = interceptingDetectorContext . setMode ;
const tmp11 = callback2 ( null ) ;
const callback = tmp11 ;
const tmp14 = unregister ( callback3 ( - 1 ) , 2 ) ;
const first = tmp14 [ 0 ] ;
callback2 = tmp14 [ 1 ] ;
const items = [ children . children ] ;
let tmpResult = tmp ( tmp2 [ 6 ] ) ;
const nativeGestureRole = tmpResult . useNativeGestureRole ( tmp11 , children . children ) ;
const items1 = [ children . gesture ] ;
const tmp20 = first ( ( ) => {
const gesture = children . gesture ;
if ( obj . isComposedGesture ( children . gesture ) ) {
let handlerTags = gesture . handlerTags ;
} else {
handlerTags = [ gesture . handlerTag ] ;
}
return handlerTags ;
} , items1 ) ;
callback3 = tmp20 ;
tmpResult = tmp ( tmp2 [ 8 ] ) ;
const detectorAttachmentGuard = tmpResult . useDetectorAttachmentGuard ( tmp20 ) ;
const items2 = [ first , children . gesture , tmp20 , , , , , , ] ;
( { userSelect : arr3 [ 3 ] , touchAction : arr3 [ 4 ] , enableContextMenu : arr3 [ 5 ] } = children ) ;
items2 [ 6 ] = register ;
items2 [ 7 ] = unregister ;
items2 [ 8 ] = setMode ;
callback ( ( ) => {
if ( - 1 !== first ) {
if ( obj . gesture . config . dispatchesAnimatedEvents ) {
const _Error = Error ;
2026-08-24 06:08:38 +00:00
error = new Error ( children ( register [ 5 ] ) . tagMessage ( "VirtualGestureDetector cannot handle Animated events with native driver when used inside InterceptingGestureDetector. Use Reanimated or Animated events without native driver instead." ) ) ;
2026-08-08 06:10:11 +00:00
throw error ;
} else {
if ( tmp2 . gesture . config . shouldUseReanimatedDetector ) {
setMode ( children ( register [ 4 ] ) . InterceptingDetectorMode . REANIMATED ) ;
}
2026-08-24 06:08:38 +00:00
obj = { viewTag : null , handlerTags : null , methods : null , viewRef : "a" , userSelect : "a" , touchAction : "isArray" , enableContextMenu : "memo" } ;
2026-08-08 06:10:11 +00:00
obj [ 0 ] = tmp ;
obj [ 1 ] = closure _7 ;
obj [ 2 ] = tmp2 . gesture . detectorCallbacks ;
( { userSelect : obj [ 4 ] , touchAction : obj [ 5 ] , enableContextMenu : obj [ 6 ] } = tmp2 ) ;
register ( obj ) ;
return ( ) => {
2026-08-24 06:08:38 +00:00
closure _1 _2 ( obj ) ;
2026-08-08 06:10:11 +00:00
} ;
}
}
} , items2 ) ;
const tmp17 = setMode ( ( current ) => {
closure _4 . current = current ;
if ( current ) {
2026-08-24 06:08:38 +00:00
let num2 = closure _1 _8 ( current ) ;
2026-08-08 06:10:11 +00:00
if ( num2 == null ) {
num2 = - 1 ;
}
callback ( num2 ) ;
const tmp4 = callback ;
} else {
callback ( - 1 ) ;
}
} , items ) ;
const gestureRelationsUpdater = tmp ( tmp2 [ 9 ] ) . useGestureRelationsUpdater ( children . gesture ) ;
obj = { ref : null , children : null } ;
obj [ 0 ] = tmp17 ;
obj [ 1 ] = children . children ;
return jsx ( tmp ( tmp2 [ 10 ] ) . Wrap , { ref : null , children : null } ) ;
} else {
let _Error = Error ;
2026-08-24 06:08:38 +00:00
error = new Error ( tmp ( tmp2 [ 5 ] ) . tagMessage ( "VirtualGestureDetector must be a descendant of an InterceptingGestureDetector" ) ) ;
2026-08-08 06:10:11 +00:00
throw error ;
}
} ;