Rabbit-R1/android (non root)/java/sources/androidx/compose/foundation/gestures/TransformableStateKt$animatePanBy$2.java
2024-05-21 17:08:36 -04:00

95 lines
5.3 KiB
Java

package androidx.compose.foundation.gestures;
import androidx.compose.animation.core.AnimationScope;
import androidx.compose.animation.core.AnimationSpec;
import androidx.compose.animation.core.AnimationState;
import androidx.compose.animation.core.AnimationVector2D;
import androidx.compose.animation.core.SuspendAnimationKt;
import androidx.compose.animation.core.VectorConvertersKt;
import androidx.compose.ui.geometry.Offset;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
/* compiled from: TransformableState.kt */
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Landroidx/compose/foundation/gestures/TransformScope;"}, k = 3, mv = {1, 8, 0}, xi = 48)
@DebugMetadata(c = "androidx.compose.foundation.gestures.TransformableStateKt$animatePanBy$2", f = "TransformableState.kt", i = {}, l = {182}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes.dex */
final class TransformableStateKt$animatePanBy$2 extends SuspendLambda implements Function2<TransformScope, Continuation<? super Unit>, Object> {
final /* synthetic */ AnimationSpec<Offset> $animationSpec;
final /* synthetic */ long $offset;
final /* synthetic */ Ref.LongRef $previous;
private /* synthetic */ Object L$0;
int label;
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public TransformableStateKt$animatePanBy$2(Ref.LongRef longRef, long j, AnimationSpec<Offset> animationSpec, Continuation<? super TransformableStateKt$animatePanBy$2> continuation) {
super(2, continuation);
this.$previous = longRef;
this.$offset = j;
this.$animationSpec = animationSpec;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
TransformableStateKt$animatePanBy$2 transformableStateKt$animatePanBy$2 = new TransformableStateKt$animatePanBy$2(this.$previous, this.$offset, this.$animationSpec, continuation);
transformableStateKt$animatePanBy$2.L$0 = obj;
return transformableStateKt$animatePanBy$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(TransformScope transformScope, Continuation<? super Unit> continuation) {
return ((TransformableStateKt$animatePanBy$2) create(transformScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
final TransformScope transformScope = (TransformScope) this.L$0;
AnimationState animationState = new AnimationState(VectorConvertersKt.getVectorConverter(Offset.INSTANCE), Offset.m2389boximpl(this.$previous.element), null, 0L, 0L, false, 60, null);
Offset m2389boximpl = Offset.m2389boximpl(this.$offset);
AnimationSpec<Offset> animationSpec = this.$animationSpec;
final Ref.LongRef longRef = this.$previous;
this.label = 1;
if (SuspendAnimationKt.animateTo$default(animationState, m2389boximpl, animationSpec, false, new Function1<AnimationScope<Offset, AnimationVector2D>, Unit>() { // from class: androidx.compose.foundation.gestures.TransformableStateKt$animatePanBy$2.1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(AnimationScope<Offset, AnimationVector2D> animationScope) {
invoke2(animationScope);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(AnimationScope<Offset, AnimationVector2D> animateTo) {
Intrinsics.checkNotNullParameter(animateTo, "$this$animateTo");
TransformScope.m362transformByd4ec7I$default(transformScope, 0.0f, Offset.m2404minusMKHz9U(animateTo.getValue().getPackedValue(), Ref.LongRef.this.element), 0.0f, 5, null);
Ref.LongRef.this.element = animateTo.getValue().getPackedValue();
}
}, this, 4, null) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}