2026-07-20 16:05:17 +00:00
// Module ID: 1719
2026-07-25 08:10:48 +00:00
// Function ID: 19334
2026-07-20 16:05:17 +00:00
// Name: SharedTransition
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 1607, 1622, 1696, 1593, 1654, 1718]
2026-07-20 16:05:17 +00:00
// Module 1719 (SharedTransition)
2026-07-23 10:11:24 +00:00
import withClamp from "withClamp" ;
import ProgressTransitionManager from "ProgressTransitionManager" ;
const require = arg1 ;
let closure _5 = [ "width" , "height" , "originX" , "originY" , "transform" , "borderRadius" , "borderTopLeftRadius" , "borderTopRightRadius" , "borderBottomLeftRadius" , "borderBottomRightRadius" ] ;
2026-07-20 16:05:17 +00:00
let closure _6 = { code : "function pnpm_SharedTransitionTs1(viewTag,values,progress){const{progressAnimationCallback}=this.__closure;const newStyles=progressAnimationCallback(values,progress);global._notifyAboutProgress(viewTag,newStyles,true);}" } ;
let closure _7 = { code : "function pnpm_SharedTransitionTs2(values){const{animationFactory,SUPPORTED_PROPS,withTiming,reduceMotion,transitionDuration}=this.__closure;let animations={};const initialValues={};if(animationFactory){animations=animationFactory(values);for(const key in animations){if(!SUPPORTED_PROPS.includes(key)){throw new ReanimatedError(\"The prop '\"+key+\"' is not supported yet.\");}}}else{for(const propName of SUPPORTED_PROPS){if(propName==='transform'){const matrix=values.targetTransformMatrix;animations.transformMatrix=withTiming(matrix,{reduceMotion:reduceMotion,duration:transitionDuration});}else{const capitalizedPropName=\"\"+propName.charAt(0).toUpperCase()+propName.slice(1);const keyToTargetValue=\"target\"+capitalizedPropName;animations[propName]=withTiming(values[keyToTargetValue],{reduceMotion:reduceMotion,duration:transitionDuration});}}}for(const propName in animations){if(propName==='transform'){initialValues.transformMatrix=values.currentTransformMatrix;}else{const capitalizedPropName=propName.charAt(0).toUpperCase()+propName.slice(1);const keyToCurrentValue=\"current\"+capitalizedPropName;initialValues[propName]=values[keyToCurrentValue];}}return{initialValues:initialValues,animations:animations};}" } ;
let closure _8 = { code : "function pnpm_SharedTransitionTs3(viewTag,values,progress){const{SUPPORTED_PROPS}=this.__closure;const newStyles={};for(const propertyName of SUPPORTED_PROPS){if(propertyName==='transform'){const currentMatrix=values.currentTransformMatrix;const targetMatrix=values.targetTransformMatrix;const newMatrix=new Array(9);for(let i=0;i<9;i++){newMatrix[i]=progress*(targetMatrix[i]-currentMatrix[i])+currentMatrix[i];}newStyles.transformMatrix=newMatrix;}else{const PropertyName=propertyName.charAt(0).toUpperCase()+propertyName.slice(1);const currentPropertyName=\"current\"+PropertyName;const targetPropertyName=\"target\"+PropertyName;const currentValue=values[currentPropertyName];const targetValue=values[targetPropertyName];newStyles[propertyName]=progress*(targetValue-currentValue)+currentValue;}}global._notifyAboutProgress(viewTag,newStyles,true);}" } ;
2026-07-23 10:11:24 +00:00
let tmp2 = ( ( ) => {
2026-07-20 16:05:17 +00:00
class SharedTransition {
constructor ( ) {
2026-07-23 10:11:24 +00:00
tmp = outer1 _3 ( this , SharedTransition ) ;
2026-07-20 16:05:17 +00:00
this . _customAnimationFactory = null ;
this . _animation = null ;
this . _transitionDuration = 500 ;
2026-07-23 10:11:24 +00:00
this . _reduceMotion = outer1 _1 ( outer1 _2 [ 2 ] ) . ReduceMotion . System ;
2026-07-20 16:05:17 +00:00
this . _customProgressAnimation = undefined ;
this . _progressAnimation = undefined ;
this . _defaultTransitionType = undefined ;
return ;
}
}
let obj = {
key : "custom" ,
value : function custom ( _customAnimationFactory ) {
this . _customAnimationFactory = _customAnimationFactory ;
return this ;
}
} ;
const items = [ obj , , , , , , , , , , , ] ;
obj = {
key : "progressAnimation" ,
value : function progressAnimation ( progressAnimationCallback ) {
2026-07-23 10:11:24 +00:00
let closure _0 = progressAnimationCallback ;
2026-07-20 16:05:17 +00:00
/* worklet (recovered source) */ function pnpm _SharedTransitionTs1 ( viewTag , values , progress ) { const { progressAnimationCallback } = this . _ _closure ; const newStyles = progressAnimationCallback ( values , progress ) ; global . _notifyAboutProgress ( viewTag , newStyles , true ) ; }
pnpm _SharedTransitionTs1 . _ _closure = { progressAnimationCallback } ;
pnpm _SharedTransitionTs1 . _ _workletHash = 10649853891033 ;
2026-07-23 10:11:24 +00:00
pnpm _SharedTransitionTs1 . _ _initData = outer1 _6 ;
2026-07-20 16:05:17 +00:00
this . _customProgressAnimation = pnpm _SharedTransitionTs1 ;
return this ;
}
} ;
items [ 1 ] = obj ;
obj = {
key : "duration" ,
value : function duration ( _transitionDuration ) {
this . _transitionDuration = _transitionDuration ;
return this ;
}
} ;
items [ 2 ] = obj ;
items [ 3 ] = {
key : "reduceMotion" ,
value : function reduceMotion ( _reduceMotion ) {
this . _reduceMotion = _reduceMotion ;
return this ;
}
} ;
items [ 4 ] = {
key : "defaultTransitionType" ,
value : function defaultTransitionType ( _defaultTransitionType ) {
this . _defaultTransitionType = _defaultTransitionType ;
return this ;
}
} ;
items [ 5 ] = {
key : "registerTransition" ,
value : function registerTransition ( componentViewTag , sharedTransitionTag , arg2 ) {
const self = this ;
const tmp = arguments . length > 2 && undefined !== arguments [ 2 ] && arguments [ 2 ] ;
if ( ! obj . getReduceMotionFromConfig ( self . getReduceMotion ( ) ) ) {
const transitionAnimation = self . getTransitionAnimation ( ) ;
const progressAnimation = self . getProgressAnimation ( ) ;
if ( ! self . _defaultTransitionType ) {
if ( self . _customAnimationFactory ) {
if ( ! self . _customProgressAnimation ) {
2026-07-23 10:11:24 +00:00
self . _defaultTransitionType = outer1 _1 ( outer1 _2 [ 2 ] ) . SharedTransitionType . ANIMATION ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
self . _defaultTransitionType = outer1 _1 ( outer1 _2 [ 2 ] ) . SharedTransitionType . PROGRESS _ANIMATION ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( self . _defaultTransitionType === outer1 _1 ( outer1 _2 [ 2 ] ) . SharedTransitionType . ANIMATION ) {
let SHARED _ELEMENT _TRANSITION _PROGRESS = outer1 _1 ( outer1 _2 [ 2 ] ) . LayoutAnimationType . SHARED _ELEMENT _TRANSITION ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
SHARED _ELEMENT _TRANSITION _PROGRESS = outer1 _1 ( outer1 _2 [ 2 ] ) . LayoutAnimationType . SHARED _ELEMENT _TRANSITION _PROGRESS ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const obj2 = outer1 _1 ( outer1 _2 [ 4 ] ) ;
2026-07-20 16:05:17 +00:00
const result = obj2 . updateLayoutAnimations ( componentViewTag , SHARED _ELEMENT _TRANSITION _PROGRESS , transitionAnimation , sharedTransitionTag , tmp ) ;
const _progressTransitionManager = SharedTransition . _progressTransitionManager ;
_progressTransitionManager . addProgressAnimation ( componentViewTag , progressAnimation ) ;
}
}
} ;
items [ 6 ] = {
key : "unregisterTransition" ,
value : function unregisterTransition ( componentViewTag , arg1 ) {
const tmp = arguments . length > 1 && undefined !== arguments [ 1 ] && arguments [ 1 ] ;
2026-07-23 10:11:24 +00:00
if ( this . _defaultTransitionType === outer1 _1 ( outer1 _2 [ 2 ] ) . SharedTransitionType . ANIMATION ) {
let SHARED _ELEMENT _TRANSITION _PROGRESS = outer1 _1 ( outer1 _2 [ 2 ] ) . LayoutAnimationType . SHARED _ELEMENT _TRANSITION ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
SHARED _ELEMENT _TRANSITION _PROGRESS = outer1 _1 ( outer1 _2 [ 2 ] ) . LayoutAnimationType . SHARED _ELEMENT _TRANSITION _PROGRESS ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = outer1 _1 ( outer1 _2 [ 4 ] ) . updateLayoutAnimations ( componentViewTag , SHARED _ELEMENT _TRANSITION _PROGRESS , undefined , undefined , tmp ) ;
2026-07-20 16:05:17 +00:00
const _progressTransitionManager = SharedTransition . _progressTransitionManager ;
const result1 = _progressTransitionManager . removeProgressAnimation ( componentViewTag , tmp ) ;
}
} ;
items [ 7 ] = {
key : "getReduceMotion" ,
value : function getReduceMotion ( ) {
return this . _reduceMotion ;
}
} ;
items [ 8 ] = {
key : "getTransitionAnimation" ,
value : function getTransitionAnimation ( ) {
const self = this ;
if ( ! this . _animation ) {
const animation = self . buildAnimation ( ) ;
}
return self . _animation ;
}
} ;
items [ 9 ] = {
key : "getProgressAnimation" ,
value : function getProgressAnimation ( ) {
const self = this ;
if ( ! this . _progressAnimation ) {
const progressAnimation = self . buildProgressAnimation ( ) ;
}
return self . _progressAnimation ;
}
} ;
items [ 10 ] = {
key : "buildAnimation" ,
value : function buildAnimation ( ) {
const _customAnimationFactory = this . _customAnimationFactory ;
const _transitionDuration = this . _transitionDuration ;
const _reduceMotion = this . _reduceMotion ;
/* worklet (recovered source) */ function pnpm _SharedTransitionTs2 ( values ) { const { animationFactory , SUPPORTED _PROPS , withTiming , reduceMotion , transitionDuration } = this . _ _closure ; let animations = { } ; const initialValues = { } ; if ( animationFactory ) { animations = animationFactory ( values ) ; for ( const key in animations ) { if ( ! SUPPORTED _PROPS . includes ( key ) ) { throw new ReanimatedError ( "The prop '" + key + "' is not supported yet." ) ; } } } else { for ( const propName of SUPPORTED _PROPS ) { if ( propName === 'transform' ) { const matrix = values . targetTransformMatrix ; animations . transformMatrix = withTiming ( matrix , { reduceMotion : reduceMotion , duration : transitionDuration } ) ; } else { const capitalizedPropName = "" + propName . charAt ( 0 ) . toUpperCase ( ) + propName . slice ( 1 ) ; const keyToTargetValue = "target" + capitalizedPropName ; animations [ propName ] = withTiming ( values [ keyToTargetValue ] , { reduceMotion : reduceMotion , duration : transitionDuration } ) ; } } } for ( const propName in animations ) { if ( propName === 'transform' ) { initialValues . transformMatrix = values . currentTransformMatrix ; } else { const capitalizedPropName = propName . charAt ( 0 ) . toUpperCase ( ) + propName . slice ( 1 ) ; const keyToCurrentValue = "current" + capitalizedPropName ; initialValues [ propName ] = values [ keyToCurrentValue ] ; } } return { initialValues : initialValues , animations : animations } ; }
2026-07-23 10:11:24 +00:00
pnpm _SharedTransitionTs2 . _ _closure = { animationFactory : _customAnimationFactory , SUPPORTED _PROPS : outer1 _5 , withTiming : outer1 _1 ( outer1 _2 [ 6 ] ) . withTiming , reduceMotion : _reduceMotion , transitionDuration : _transitionDuration } ;
2026-07-20 16:05:17 +00:00
pnpm _SharedTransitionTs2 . _ _workletHash = 5349002490567 ;
2026-07-23 10:11:24 +00:00
pnpm _SharedTransitionTs2 . _ _initData = outer1 _7 ;
2026-07-20 16:05:17 +00:00
this . _animation = pnpm _SharedTransitionTs2 ;
}
} ;
items [ 11 ] = {
key : "buildProgressAnimation" ,
value : function buildProgressAnimation ( ) {
const self = this ;
if ( this . _customProgressAnimation ) {
self . _progressAnimation = self . _customProgressAnimation ;
} else {
/* worklet (recovered source) */ function pnpm _SharedTransitionTs3 ( viewTag , values , progress ) { const { SUPPORTED _PROPS } = this . _ _closure ; const newStyles = { } ; for ( const propertyName of SUPPORTED _PROPS ) { if ( propertyName === 'transform' ) { const currentMatrix = values . currentTransformMatrix ; const targetMatrix = values . targetTransformMatrix ; const newMatrix = new Array ( 9 ) ; for ( let i = 0 ; i < 9 ; i ++ ) { newMatrix [ i ] = progress * ( targetMatrix [ i ] - currentMatrix [ i ] ) + currentMatrix [ i ] ; } newStyles . transformMatrix = newMatrix ; } else { const PropertyName = propertyName . charAt ( 0 ) . toUpperCase ( ) + propertyName . slice ( 1 ) ; const currentPropertyName = "current" + PropertyName ; const targetPropertyName = "target" + PropertyName ; const currentValue = values [ currentPropertyName ] ; const targetValue = values [ targetPropertyName ] ; newStyles [ propertyName ] = progress * ( targetValue - currentValue ) + currentValue ; } } global . _notifyAboutProgress ( viewTag , newStyles , true ) ; }
2026-07-23 10:11:24 +00:00
let obj = { SUPPORTED _PROPS : outer1 _5 } ;
2026-07-20 16:05:17 +00:00
pnpm _SharedTransitionTs3 . _ _closure = obj ;
pnpm _SharedTransitionTs3 . _ _workletHash = 11460342543363 ;
2026-07-23 10:11:24 +00:00
pnpm _SharedTransitionTs3 . _ _initData = outer1 _8 ;
2026-07-20 16:05:17 +00:00
self . _progressAnimation = pnpm _SharedTransitionTs3 ;
}
}
} ;
const items1 = [
{
key : "custom" ,
value : function custom ( arg0 ) {
return new SharedTransition ( ) . custom ( arg0 ) ;
}
} ,
{
key : "duration" ,
value : function duration ( arg0 ) {
return new SharedTransition ( ) . duration ( arg0 ) ;
}
} ,
{
key : "progressAnimation" ,
value : function progressAnimation ( arg0 ) {
return new SharedTransition ( ) . progressAnimation ( arg0 ) ;
}
} ,
{
key : "defaultTransitionType" ,
value : function defaultTransitionType ( arg0 ) {
return new SharedTransition ( ) . defaultTransitionType ( arg0 ) ;
}
} ,
{
key : "reduceMotion" ,
value : function reduceMotion ( arg0 ) {
return new SharedTransition ( ) . reduceMotion ( arg0 ) ;
}
}
] ;
return callback ( SharedTransition , items , items1 ) ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
const progressTransitionManager = new require ( "ProgressTransitionManager" ) . ProgressTransitionManager ( ) ;
2026-07-20 16:05:17 +00:00
tmp2 . _progressTransitionManager = progressTransitionManager ;
export const SharedTransition = tmp2 ;