package androidx.compose.foundation; import android.os.Build; import androidx.compose.ui.ComposedModifierKt; import androidx.compose.ui.Modifier; import androidx.compose.ui.geometry.Offset; import androidx.compose.ui.platform.InspectableValueKt; import androidx.compose.ui.platform.InspectorInfo; import androidx.compose.ui.semantics.SemanticsPropertyKey; import androidx.compose.ui.unit.Density; import androidx.compose.ui.unit.DpSize; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; /* compiled from: Magnifier.kt */ @Metadata(d1 = {"\u0000R\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0007\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\u001a\u0012\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\tH\u0001\u001ao\u0010\n\u001a\u00020\u000b*\u00020\u000b2\u0017\u0010\f\u001a\u0013\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u00030\r¢\u0006\u0002\b\u000f2\u0019\b\u0002\u0010\u0010\u001a\u0013\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u00030\r¢\u0006\u0002\b\u000f2\b\b\u0002\u0010\u0011\u001a\u00020\u00122\b\b\u0002\u0010\u0013\u001a\u00020\u00142\u0016\b\u0002\u0010\u0015\u001a\u0010\u0012\u0004\u0012\u00020\u0016\u0012\u0004\u0012\u00020\u0017\u0018\u00010\rH\u0007ø\u0001\u0000\u001ao\u0010\n\u001a\u00020\u000b*\u00020\u000b2\u0017\u0010\f\u001a\u0013\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u00030\r¢\u0006\u0002\b\u000f2\u0017\u0010\u0010\u001a\u0013\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u00030\r¢\u0006\u0002\b\u000f2\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00142\u0014\u0010\u0015\u001a\u0010\u0012\u0004\u0012\u00020\u0016\u0012\u0004\u0012\u00020\u0017\u0018\u00010\r2\u0006\u0010\u0018\u001a\u00020\u0019H\u0001ø\u0001\u0000\"#\u0010\u0000\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00030\u00020\u0001X\u0080\u0004ø\u0001\u0000¢\u0006\b\n\u0000\u001a\u0004\b\u0004\u0010\u0005\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001a²\u0006\n\u0010\u001b\u001a\u00020\u0003X\u008a\u008e\u0002²\u0006\u001b\u0010\u001c\u001a\u0013\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u00030\r¢\u0006\u0002\b\u000fX\u008a\u0084\u0002²\u0006\u001b\u0010\u001d\u001a\u0013\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u00030\r¢\u0006\u0002\b\u000fX\u008a\u0084\u0002²\u0006\n\u0010\u001e\u001a\u00020\u0012X\u008a\u0084\u0002²\u0006\u0018\u0010\u001f\u001a\u0010\u0012\u0004\u0012\u00020\u0016\u0012\u0004\u0012\u00020\u0017\u0018\u00010\rX\u008a\u0084\u0002²\u0006\n\u0010 \u001a\u00020\u0003X\u008a\u0084\u0002²\u0006\n\u0010!\u001a\u00020\u0007X\u008a\u0084\u0002"}, d2 = {"MagnifierPositionInRoot", "Landroidx/compose/ui/semantics/SemanticsPropertyKey;", "Lkotlin/Function0;", "Landroidx/compose/ui/geometry/Offset;", "getMagnifierPositionInRoot", "()Landroidx/compose/ui/semantics/SemanticsPropertyKey;", "isPlatformMagnifierSupported", "", "sdkVersion", "", "magnifier", "Landroidx/compose/ui/Modifier;", "sourceCenter", "Lkotlin/Function1;", "Landroidx/compose/ui/unit/Density;", "Lkotlin/ExtensionFunctionType;", "magnifierCenter", "zoom", "", "style", "Landroidx/compose/foundation/MagnifierStyle;", "onSizeChanged", "Landroidx/compose/ui/unit/DpSize;", "", "platformMagnifierFactory", "Landroidx/compose/foundation/PlatformMagnifierFactory;", "foundation_release", "anchorPositionInRoot", "updatedSourceCenter", "updatedMagnifierCenter", "updatedZoom", "updatedOnSizeChanged", "sourceCenterInRoot", "isMagnifierShown"}, k = 2, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class MagnifierKt { private static final SemanticsPropertyKey> MagnifierPositionInRoot = new SemanticsPropertyKey<>("MagnifierPositionInRoot", null, 2, null); public static final SemanticsPropertyKey> getMagnifierPositionInRoot() { return MagnifierPositionInRoot; } public static final boolean isPlatformMagnifierSupported(int i) { return i >= 28; } public static /* synthetic */ Modifier magnifier$default(Modifier modifier, Function1 function1, Function1 function12, float f, MagnifierStyle magnifierStyle, Function1 function13, int i, Object obj) { if ((i & 2) != 0) { function12 = new Function1() { // from class: androidx.compose.foundation.MagnifierKt$magnifier$1 @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Offset invoke(Density density) { return Offset.m2389boximpl(m225invoketuRUvjQ(density)); } /* renamed from: invoke-tuRUvjQ, reason: not valid java name */ public final long m225invoketuRUvjQ(Density density) { Intrinsics.checkNotNullParameter(density, "$this$null"); return Offset.INSTANCE.m2415getUnspecifiedF1C5BW0(); } }; } Function1 function14 = function12; if ((i & 4) != 0) { f = Float.NaN; } float f2 = f; if ((i & 8) != 0) { magnifierStyle = MagnifierStyle.INSTANCE.getDefault(); } MagnifierStyle magnifierStyle2 = magnifierStyle; if ((i & 16) != 0) { function13 = null; } return magnifier(modifier, function1, function14, f2, magnifierStyle2, function13); } public static final Modifier magnifier(Modifier modifier, Function1 sourceCenter, Function1 magnifierCenter, float f, MagnifierStyle style, Function1 function1, PlatformMagnifierFactory platformMagnifierFactory) { Intrinsics.checkNotNullParameter(modifier, ""); Intrinsics.checkNotNullParameter(sourceCenter, "sourceCenter"); Intrinsics.checkNotNullParameter(magnifierCenter, "magnifierCenter"); Intrinsics.checkNotNullParameter(style, "style"); Intrinsics.checkNotNullParameter(platformMagnifierFactory, "platformMagnifierFactory"); return ComposedModifierKt.composed$default(modifier, null, new MagnifierKt$magnifier$4(sourceCenter, magnifierCenter, f, function1, platformMagnifierFactory, style), 1, null); } public static /* synthetic */ boolean isPlatformMagnifierSupported$default(int i, int i2, Object obj) { if ((i2 & 1) != 0) { i = Build.VERSION.SDK_INT; } return isPlatformMagnifierSupported(i); } public static final Modifier magnifier(Modifier modifier, final Function1 sourceCenter, final Function1 magnifierCenter, final float f, final MagnifierStyle style, Function1 function1) { Modifier.Companion companion; Intrinsics.checkNotNullParameter(modifier, ""); Intrinsics.checkNotNullParameter(sourceCenter, "sourceCenter"); Intrinsics.checkNotNullParameter(magnifierCenter, "magnifierCenter"); Intrinsics.checkNotNullParameter(style, "style"); Function1 noInspectorInfo = InspectableValueKt.isDebugInspectorInfoEnabled() ? new Function1() { // from class: androidx.compose.foundation.MagnifierKt$magnifier$$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(MagnifierKt.isPlatformMagnifierSupported$default(0, 1, null) ? "magnifier" : "magnifier (not supported)"); inspectorInfo.getProperties().set("sourceCenter", Function1.this); inspectorInfo.getProperties().set("magnifierCenter", magnifierCenter); inspectorInfo.getProperties().set("zoom", Float.valueOf(f)); inspectorInfo.getProperties().set("style", style); } } : InspectableValueKt.getNoInspectorInfo(); Modifier.Companion companion2 = Modifier.INSTANCE; if (isPlatformMagnifierSupported$default(0, 1, null)) { companion = magnifier(companion2, sourceCenter, magnifierCenter, f, style, function1, PlatformMagnifierFactory.Companion.getForCurrentPlatform()); } else { companion = Modifier.INSTANCE; } return InspectableValueKt.inspectableWrapper(modifier, noInspectorInfo, companion); } }