mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-28 18:12:31 -06:00
97 lines
4.8 KiB
Java
97 lines
4.8 KiB
Java
package androidx.compose.material3;
|
|
|
|
import androidx.compose.animation.core.Animatable;
|
|
import androidx.compose.animation.core.AnimatableKt;
|
|
import androidx.compose.animation.core.AnimationVector1D;
|
|
import androidx.compose.animation.core.TweenSpec;
|
|
import androidx.compose.foundation.gestures.DragScope;
|
|
import kotlin.Metadata;
|
|
import kotlin.ResultKt;
|
|
import kotlin.Unit;
|
|
import kotlin.coroutines.Continuation;
|
|
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
|
import kotlin.coroutines.jvm.internal.Boxing;
|
|
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;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* compiled from: Slider.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/DragScope;"}, k = 3, mv = {1, 8, 0}, xi = 48)
|
|
@DebugMetadata(c = "androidx.compose.material3.SliderKt$animateToTarget$2", f = "Slider.kt", i = {}, l = {1221}, m = "invokeSuspend", n = {}, s = {})
|
|
/* loaded from: classes.dex */
|
|
public final class SliderKt$animateToTarget$2 extends SuspendLambda implements Function2<DragScope, Continuation<? super Unit>, Object> {
|
|
final /* synthetic */ float $current;
|
|
final /* synthetic */ float $target;
|
|
final /* synthetic */ float $velocity;
|
|
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 SliderKt$animateToTarget$2(float f, float f2, float f3, Continuation<? super SliderKt$animateToTarget$2> continuation) {
|
|
super(2, continuation);
|
|
this.$current = f;
|
|
this.$target = f2;
|
|
this.$velocity = f3;
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
|
SliderKt$animateToTarget$2 sliderKt$animateToTarget$2 = new SliderKt$animateToTarget$2(this.$current, this.$target, this.$velocity, continuation);
|
|
sliderKt$animateToTarget$2.L$0 = obj;
|
|
return sliderKt$animateToTarget$2;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
public final Object invoke(DragScope dragScope, Continuation<? super Unit> continuation) {
|
|
return ((SliderKt$animateToTarget$2) create(dragScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
public final Object invokeSuspend(Object obj) {
|
|
TweenSpec tweenSpec;
|
|
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
|
int i = this.label;
|
|
if (i == 0) {
|
|
ResultKt.throwOnFailure(obj);
|
|
final DragScope dragScope = (DragScope) this.L$0;
|
|
final Ref.FloatRef floatRef = new Ref.FloatRef();
|
|
floatRef.element = this.$current;
|
|
Animatable Animatable$default = AnimatableKt.Animatable$default(this.$current, 0.0f, 2, null);
|
|
Float boxFloat = Boxing.boxFloat(this.$target);
|
|
tweenSpec = SliderKt.SliderToTickAnimation;
|
|
this.label = 1;
|
|
if (Animatable$default.animateTo(boxFloat, tweenSpec, Boxing.boxFloat(this.$velocity), new Function1<Animatable<Float, AnimationVector1D>, Unit>() { // from class: androidx.compose.material3.SliderKt$animateToTarget$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(Animatable<Float, AnimationVector1D> animatable) {
|
|
invoke2(animatable);
|
|
return Unit.INSTANCE;
|
|
}
|
|
|
|
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
|
public final void invoke2(Animatable<Float, AnimationVector1D> animateTo) {
|
|
Intrinsics.checkNotNullParameter(animateTo, "$this$animateTo");
|
|
DragScope.this.dragBy(animateTo.getValue().floatValue() - floatRef.element);
|
|
floatRef.element = animateTo.getValue().floatValue();
|
|
}
|
|
}, this) == 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;
|
|
}
|
|
}
|