mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
114 lines
7.3 KiB
Java
114 lines
7.3 KiB
Java
package androidx.compose.animation;
|
|
|
|
import androidx.compose.animation.core.AnimationSpecKt;
|
|
import androidx.compose.animation.core.FiniteAnimationSpec;
|
|
import androidx.compose.runtime.Composer;
|
|
import androidx.compose.runtime.ComposerKt;
|
|
import androidx.compose.runtime.CompositionScopedCoroutineScopeCanceller;
|
|
import androidx.compose.runtime.EffectsKt;
|
|
import androidx.compose.ui.ComposedModifierKt;
|
|
import androidx.compose.ui.Modifier;
|
|
import androidx.compose.ui.draw.ClipKt;
|
|
import androidx.compose.ui.platform.InspectableValueKt;
|
|
import androidx.compose.ui.platform.InspectorInfo;
|
|
import androidx.compose.ui.unit.IntSize;
|
|
import kotlin.Metadata;
|
|
import kotlin.Unit;
|
|
import kotlin.coroutines.EmptyCoroutineContext;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.functions.Function3;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlinx.coroutines.CoroutineScope;
|
|
|
|
/* compiled from: AnimationModifier.kt */
|
|
@Metadata(d1 = {"\u0000$\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\u001aY\u0010\u0000\u001a\u00020\u0001*\u00020\u00012\u000e\b\u0002\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u00032:\b\u0002\u0010\u0005\u001a4\u0012\u0013\u0012\u00110\u0004¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\t\u0012\u0013\u0012\u00110\u0004¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\u0006ø\u0001\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\f"}, d2 = {"animateContentSize", "Landroidx/compose/ui/Modifier;", "animationSpec", "Landroidx/compose/animation/core/FiniteAnimationSpec;", "Landroidx/compose/ui/unit/IntSize;", "finishedListener", "Lkotlin/Function2;", "Lkotlin/ParameterName;", "name", "initialValue", "targetValue", "", "animation_release"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
public final class AnimationModifierKt {
|
|
public static /* synthetic */ Modifier animateContentSize$default(Modifier modifier, FiniteAnimationSpec finiteAnimationSpec, Function2 function2, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
finiteAnimationSpec = AnimationSpecKt.spring$default(0.0f, 0.0f, null, 7, null);
|
|
}
|
|
if ((i & 2) != 0) {
|
|
function2 = null;
|
|
}
|
|
return animateContentSize(modifier, finiteAnimationSpec, function2);
|
|
}
|
|
|
|
public static final Modifier animateContentSize(Modifier modifier, final FiniteAnimationSpec<IntSize> animationSpec, final Function2<? super IntSize, ? super IntSize, Unit> function2) {
|
|
Intrinsics.checkNotNullParameter(modifier, "<this>");
|
|
Intrinsics.checkNotNullParameter(animationSpec, "animationSpec");
|
|
return ComposedModifierKt.composed(modifier, InspectableValueKt.isDebugInspectorInfoEnabled() ? new Function1<InspectorInfo, Unit>() { // from class: androidx.compose.animation.AnimationModifierKt$animateContentSize$$inlined$debugInspectorInfo$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(InspectorInfo inspectorInfo) {
|
|
invoke2(inspectorInfo);
|
|
return Unit.INSTANCE;
|
|
}
|
|
|
|
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
|
public final void invoke2(InspectorInfo inspectorInfo) {
|
|
Intrinsics.checkNotNullParameter(inspectorInfo, "$this$null");
|
|
inspectorInfo.setName("animateContentSize");
|
|
inspectorInfo.getProperties().set("animationSpec", FiniteAnimationSpec.this);
|
|
inspectorInfo.getProperties().set("finishedListener", function2);
|
|
}
|
|
} : InspectableValueKt.getNoInspectorInfo(), new Function3<Modifier, Composer, Integer, Modifier>() { // from class: androidx.compose.animation.AnimationModifierKt$animateContentSize$2
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
{
|
|
super(3);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function3
|
|
public /* bridge */ /* synthetic */ Modifier invoke(Modifier modifier2, Composer composer, Integer num) {
|
|
return invoke(modifier2, composer, num.intValue());
|
|
}
|
|
|
|
public final Modifier invoke(Modifier composed, Composer composer, int i) {
|
|
Intrinsics.checkNotNullParameter(composed, "$this$composed");
|
|
composer.startReplaceableGroup(-843180607);
|
|
ComposerKt.sourceInformation(composer, "C78@3601L24,79@3649L75:AnimationModifier.kt#xbi5r1");
|
|
if (ComposerKt.isTraceInProgress()) {
|
|
ComposerKt.traceEventStart(-843180607, i, -1, "androidx.compose.animation.animateContentSize.<anonymous> (AnimationModifier.kt:76)");
|
|
}
|
|
composer.startReplaceableGroup(773894976);
|
|
ComposerKt.sourceInformation(composer, "CC(rememberCoroutineScope)488@20446L144:Effects.kt#9igjgp");
|
|
composer.startReplaceableGroup(-492369756);
|
|
ComposerKt.sourceInformation(composer, "CC(remember):Composables.kt#9igjgp");
|
|
Object rememberedValue = composer.rememberedValue();
|
|
if (rememberedValue == Composer.INSTANCE.getEmpty()) {
|
|
Object compositionScopedCoroutineScopeCanceller = new CompositionScopedCoroutineScopeCanceller(EffectsKt.createCompositionCoroutineScope(EmptyCoroutineContext.INSTANCE, composer));
|
|
composer.updateRememberedValue(compositionScopedCoroutineScopeCanceller);
|
|
rememberedValue = compositionScopedCoroutineScopeCanceller;
|
|
}
|
|
composer.endReplaceableGroup();
|
|
CoroutineScope coroutineScope = ((CompositionScopedCoroutineScopeCanceller) rememberedValue).getCoroutineScope();
|
|
composer.endReplaceableGroup();
|
|
FiniteAnimationSpec<IntSize> finiteAnimationSpec = animationSpec;
|
|
composer.startReplaceableGroup(1157296644);
|
|
ComposerKt.sourceInformation(composer, "CC(remember)P(1):Composables.kt#9igjgp");
|
|
boolean changed = composer.changed(coroutineScope);
|
|
Object rememberedValue2 = composer.rememberedValue();
|
|
if (changed || rememberedValue2 == Composer.INSTANCE.getEmpty()) {
|
|
rememberedValue2 = new SizeAnimationModifier(finiteAnimationSpec, coroutineScope);
|
|
composer.updateRememberedValue(rememberedValue2);
|
|
}
|
|
composer.endReplaceableGroup();
|
|
SizeAnimationModifier sizeAnimationModifier = (SizeAnimationModifier) rememberedValue2;
|
|
sizeAnimationModifier.setListener(function2);
|
|
Modifier then = ClipKt.clipToBounds(composed).then(sizeAnimationModifier);
|
|
if (ComposerKt.isTraceInProgress()) {
|
|
ComposerKt.traceEventEnd();
|
|
}
|
|
composer.endReplaceableGroup();
|
|
return then;
|
|
}
|
|
});
|
|
}
|
|
}
|