package androidx.compose.material3; import androidx.compose.foundation.layout.Arrangement; import androidx.compose.foundation.layout.PaddingKt; import androidx.compose.foundation.layout.PaddingValues; import androidx.compose.runtime.Applier; import androidx.compose.runtime.ComposablesKt; import androidx.compose.runtime.Composer; import androidx.compose.runtime.ComposerKt; import androidx.compose.runtime.ProvidableCompositionLocal; import androidx.compose.runtime.RecomposeScopeImplKt; import androidx.compose.runtime.ScopeUpdateScope; import androidx.compose.runtime.SkippableUpdater; import androidx.compose.runtime.Updater; import androidx.compose.ui.Modifier; import androidx.compose.ui.layout.LayoutKt; import androidx.compose.ui.layout.Measurable; import androidx.compose.ui.layout.MeasurePolicy; import androidx.compose.ui.layout.MeasureResult; import androidx.compose.ui.layout.MeasureScope; import androidx.compose.ui.layout.Placeable; import androidx.compose.ui.node.ComposeUiNode; import androidx.compose.ui.platform.CompositionLocalsKt; import androidx.compose.ui.platform.ViewConfiguration; import androidx.compose.ui.unit.Constraints; import androidx.compose.ui.unit.Density; import androidx.compose.ui.unit.Dp; import androidx.compose.ui.unit.LayoutDirection; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import kotlin.Metadata; import kotlin.Unit; import kotlin.collections.CollectionsKt; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function2; import kotlin.jvm.functions.Function3; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Ref; /* compiled from: AlertDialog.kt */ @Metadata(d1 = {"\u00008\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000e\u001a©\u0001\u0010\f\u001a\u00020\r2\u0011\u0010\u000e\u001a\r\u0012\u0004\u0012\u00020\r0\u000f¢\u0006\u0002\b\u00102\b\b\u0002\u0010\u0011\u001a\u00020\u00122\u0013\u0010\u0013\u001a\u000f\u0012\u0004\u0012\u00020\r\u0018\u00010\u000f¢\u0006\u0002\b\u00102\u0013\u0010\u0014\u001a\u000f\u0012\u0004\u0012\u00020\r\u0018\u00010\u000f¢\u0006\u0002\b\u00102\u0013\u0010\u0015\u001a\u000f\u0012\u0004\u0012\u00020\r\u0018\u00010\u000f¢\u0006\u0002\b\u00102\u0006\u0010\u0016\u001a\u00020\u00172\u0006\u0010\u0018\u001a\u00020\u00192\u0006\u0010\u001a\u001a\u00020\u00012\u0006\u0010\u001b\u001a\u00020\u00192\u0006\u0010\u001c\u001a\u00020\u00192\u0006\u0010\u001d\u001a\u00020\u00192\u0006\u0010\u001e\u001a\u00020\u0019H\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u001f\u0010 \u001a8\u0010!\u001a\u00020\r2\u0006\u0010\"\u001a\u00020\u00012\u0006\u0010#\u001a\u00020\u00012\u0011\u0010$\u001a\r\u0012\u0004\u0012\u00020\r0\u000f¢\u0006\u0002\b\u0010H\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b%\u0010&\"\u0019\u0010\u0000\u001a\u00020\u0001X\u0080\u0004ø\u0001\u0000¢\u0006\n\n\u0002\u0010\u0004\u001a\u0004\b\u0002\u0010\u0003\"\u0019\u0010\u0005\u001a\u00020\u0001X\u0080\u0004ø\u0001\u0000¢\u0006\n\n\u0002\u0010\u0004\u001a\u0004\b\u0006\u0010\u0003\"\u000e\u0010\u0007\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000\"\u000e\u0010\t\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000\"\u000e\u0010\n\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000\"\u000e\u0010\u000b\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u000b\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001¨\u0006'"}, d2 = {"DialogMaxWidth", "Landroidx/compose/ui/unit/Dp;", "getDialogMaxWidth", "()F", "F", "DialogMinWidth", "getDialogMinWidth", "DialogPadding", "Landroidx/compose/foundation/layout/PaddingValues;", "IconPadding", "TextPadding", "TitlePadding", "AlertDialogContent", "", "buttons", "Lkotlin/Function0;", "Landroidx/compose/runtime/Composable;", "modifier", "Landroidx/compose/ui/Modifier;", "icon", "title", "text", "shape", "Landroidx/compose/ui/graphics/Shape;", "containerColor", "Landroidx/compose/ui/graphics/Color;", "tonalElevation", "buttonContentColor", "iconContentColor", "titleContentColor", "textContentColor", "AlertDialogContent-4hvqGtA", "(Lkotlin/jvm/functions/Function2;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Landroidx/compose/ui/graphics/Shape;JFJJJJLandroidx/compose/runtime/Composer;III)V", "AlertDialogFlowRow", "mainAxisSpacing", "crossAxisSpacing", "content", "AlertDialogFlowRow-ixp7dh8", "(FFLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V", "material3_release"}, k = 2, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class AlertDialogKt { private static final PaddingValues DialogPadding; private static final PaddingValues IconPadding; private static final PaddingValues TextPadding; private static final PaddingValues TitlePadding; private static final float DialogMinWidth = Dp.m4883constructorimpl(280); private static final float DialogMaxWidth = Dp.m4883constructorimpl(560); public static final float getDialogMaxWidth() { return DialogMaxWidth; } public static final float getDialogMinWidth() { return DialogMinWidth; } /* JADX WARN: Removed duplicated region for block: B:100:0x00d2 */ /* JADX WARN: Removed duplicated region for block: B:108:0x00b3 */ /* JADX WARN: Removed duplicated region for block: B:10:0x0058 */ /* JADX WARN: Removed duplicated region for block: B:114:0x0094 */ /* JADX WARN: Removed duplicated region for block: B:121:0x0078 */ /* JADX WARN: Removed duplicated region for block: B:128:0x005d */ /* JADX WARN: Removed duplicated region for block: B:13:0x0073 */ /* JADX WARN: Removed duplicated region for block: B:16:0x0091 */ /* JADX WARN: Removed duplicated region for block: B:20:0x00ae */ /* JADX WARN: Removed duplicated region for block: B:24:0x00c9 */ /* JADX WARN: Removed duplicated region for block: B:27:0x00f2 */ /* JADX WARN: Removed duplicated region for block: B:31:0x0110 */ /* JADX WARN: Removed duplicated region for block: B:34:0x012f */ /* JADX WARN: Removed duplicated region for block: B:37:0x0150 */ /* JADX WARN: Removed duplicated region for block: B:40:0x016f */ /* JADX WARN: Removed duplicated region for block: B:43:0x0190 */ /* JADX WARN: Removed duplicated region for block: B:50:0x0224 */ /* JADX WARN: Removed duplicated region for block: B:53:? A[RETURN, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:55:0x01a6 */ /* JADX WARN: Removed duplicated region for block: B:58:0x01b5 */ /* JADX WARN: Removed duplicated region for block: B:61:0x0218 */ /* JADX WARN: Removed duplicated region for block: B:63:0x01ad */ /* JADX WARN: Removed duplicated region for block: B:64:0x0174 */ /* JADX WARN: Removed duplicated region for block: B:71:0x0155 */ /* JADX WARN: Removed duplicated region for block: B:79:0x0136 */ /* JADX WARN: Removed duplicated region for block: B:86:0x0117 */ /* JADX WARN: Removed duplicated region for block: B:93:0x00f5 */ /* renamed from: AlertDialogContent-4hvqGtA, reason: not valid java name */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static final void m983AlertDialogContent4hvqGtA(final kotlin.jvm.functions.Function2 r25, androidx.compose.ui.Modifier r26, final kotlin.jvm.functions.Function2 r27, final kotlin.jvm.functions.Function2 r28, final kotlin.jvm.functions.Function2 r29, final androidx.compose.ui.graphics.Shape r30, final long r31, final float r33, final long r34, final long r36, final long r38, final long r40, androidx.compose.runtime.Composer r42, final int r43, final int r44, final int r45) { /* Method dump skipped, instructions count: 595 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.compose.material3.AlertDialogKt.m983AlertDialogContent4hvqGtA(kotlin.jvm.functions.Function2, androidx.compose.ui.Modifier, kotlin.jvm.functions.Function2, kotlin.jvm.functions.Function2, kotlin.jvm.functions.Function2, androidx.compose.ui.graphics.Shape, long, float, long, long, long, long, androidx.compose.runtime.Composer, int, int, int):void"); } /* renamed from: AlertDialogFlowRow-ixp7dh8, reason: not valid java name */ public static final void m984AlertDialogFlowRowixp7dh8(final float f, final float f2, final Function2 content, Composer composer, final int i) { int i2; Intrinsics.checkNotNullParameter(content, "content"); Composer startRestartGroup = composer.startRestartGroup(586821353); ComposerKt.sourceInformation(startRestartGroup, "C(AlertDialogFlowRow)P(2:c#ui.unit.Dp,1:c#ui.unit.Dp)129@4728L3185:AlertDialog.kt#uh7d8r"); if ((i & 14) == 0) { i2 = (startRestartGroup.changed(f) ? 4 : 2) | i; } else { i2 = i; } if ((i & 112) == 0) { i2 |= startRestartGroup.changed(f2) ? 32 : 16; } if ((i & 896) == 0) { i2 |= startRestartGroup.changedInstance(content) ? 256 : 128; } if ((i2 & 731) != 146 || !startRestartGroup.getSkipping()) { if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventStart(586821353, i2, -1, "androidx.compose.material3.AlertDialogFlowRow (AlertDialog.kt:124)"); } MeasurePolicy measurePolicy = new MeasurePolicy() { // from class: androidx.compose.material3.AlertDialogKt$AlertDialogFlowRow$1 @Override // androidx.compose.ui.layout.MeasurePolicy /* renamed from: measure-3p2s80s */ public final MeasureResult mo21measure3p2s80s(final MeasureScope Layout, List measurables, long j) { Ref.IntRef intRef; Ref.IntRef intRef2; ArrayList arrayList; ArrayList arrayList2; Intrinsics.checkNotNullParameter(Layout, "$this$Layout"); Intrinsics.checkNotNullParameter(measurables, "measurables"); final ArrayList arrayList3 = new ArrayList(); ArrayList arrayList4 = new ArrayList(); ArrayList arrayList5 = new ArrayList(); Ref.IntRef intRef3 = new Ref.IntRef(); Ref.IntRef intRef4 = new Ref.IntRef(); ArrayList arrayList6 = new ArrayList(); Ref.IntRef intRef5 = new Ref.IntRef(); Ref.IntRef intRef6 = new Ref.IntRef(); Iterator it = measurables.iterator(); while (it.hasNext()) { Placeable mo3876measureBRTryo0 = it.next().mo3876measureBRTryo0(j); Ref.IntRef intRef7 = intRef6; if (measure_3p2s80s$canAddToCurrentSequence(arrayList6, intRef5, Layout, f, j, mo3876measureBRTryo0)) { intRef = intRef5; intRef2 = intRef4; arrayList = arrayList5; arrayList2 = arrayList6; } else { intRef = intRef5; ArrayList arrayList7 = arrayList5; arrayList = arrayList5; arrayList2 = arrayList6; intRef2 = intRef4; measure_3p2s80s$startNewSequence(arrayList3, intRef4, Layout, f2, arrayList6, arrayList4, intRef7, arrayList7, intRef3, intRef); } Ref.IntRef intRef8 = intRef; if (!arrayList2.isEmpty()) { intRef8.element += Layout.mo329roundToPx0680j_4(f); } arrayList2.add(mo3876measureBRTryo0); intRef8.element += mo3876measureBRTryo0.getWidth(); intRef6 = intRef7; intRef6.element = Math.max(intRef6.element, mo3876measureBRTryo0.getHeight()); intRef5 = intRef8; arrayList6 = arrayList2; arrayList5 = arrayList; intRef4 = intRef2; } Ref.IntRef intRef9 = intRef4; final ArrayList arrayList8 = arrayList5; Ref.IntRef intRef10 = intRef5; ArrayList arrayList9 = arrayList6; if (!arrayList9.isEmpty()) { measure_3p2s80s$startNewSequence(arrayList3, intRef9, Layout, f2, arrayList9, arrayList4, intRef6, arrayList8, intRef3, intRef10); } final int max = Math.max(intRef3.element, Constraints.m4841getMinWidthimpl(j)); int max2 = Math.max(intRef9.element, Constraints.m4840getMinHeightimpl(j)); final float f3 = f; return MeasureScope.layout$default(Layout, max, max2, null, new Function1() { // from class: androidx.compose.material3.AlertDialogKt$AlertDialogFlowRow$1$measure$1 /* JADX INFO: Access modifiers changed from: package-private */ /* 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(Placeable.PlacementScope placementScope) { invoke2(placementScope); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(Placeable.PlacementScope layout) { Intrinsics.checkNotNullParameter(layout, "$this$layout"); List> list = arrayList3; MeasureScope measureScope = Layout; float f4 = f3; int i3 = max; List list2 = arrayList8; int i4 = 0; for (Object obj : list) { int i5 = i4 + 1; if (i4 < 0) { CollectionsKt.throwIndexOverflow(); } List list3 = (List) obj; int size = list3.size(); int[] iArr = new int[size]; int i6 = 0; while (i6 < size) { iArr[i6] = ((Placeable) list3.get(i6)).getWidth() + (i6 < CollectionsKt.getLastIndex(list3) ? measureScope.mo329roundToPx0680j_4(f4) : 0); i6++; } Arrangement.Horizontal end = Arrangement.INSTANCE.getEnd(); int[] iArr2 = new int[size]; for (int i7 = 0; i7 < size; i7++) { iArr2[i7] = 0; } end.arrange(measureScope, i3, iArr, measureScope.getLayoutDirection(), iArr2); int i8 = 0; for (Object obj2 : list3) { int i9 = i8 + 1; if (i8 < 0) { CollectionsKt.throwIndexOverflow(); } Placeable.PlacementScope.place$default(layout, (Placeable) obj2, iArr2[i8], list2.get(i4).intValue(), 0.0f, 4, null); i8 = i9; } i4 = i5; } } }, 4, null); } private static final boolean measure_3p2s80s$canAddToCurrentSequence(List list, Ref.IntRef intRef, MeasureScope measureScope, float f3, long j, Placeable placeable) { return list.isEmpty() || (intRef.element + measureScope.mo329roundToPx0680j_4(f3)) + placeable.getWidth() <= Constraints.m4839getMaxWidthimpl(j); } private static final void measure_3p2s80s$startNewSequence(List> list, Ref.IntRef intRef, MeasureScope measureScope, float f3, List list2, List list3, Ref.IntRef intRef2, List list4, Ref.IntRef intRef3, Ref.IntRef intRef4) { List> list5 = list; if (!list5.isEmpty()) { intRef.element += measureScope.mo329roundToPx0680j_4(f3); } list5.add(CollectionsKt.toList(list2)); list3.add(Integer.valueOf(intRef2.element)); list4.add(Integer.valueOf(intRef.element)); intRef.element += intRef2.element; intRef3.element = Math.max(intRef3.element, intRef4.element); list2.clear(); intRef4.element = 0; intRef2.element = 0; } }; startRestartGroup.startReplaceableGroup(-1323940314); ComposerKt.sourceInformation(startRestartGroup, "CC(Layout)P(!1,2)73@2855L7,74@2910L7,75@2969L7,76@2981L460:Layout.kt#80mrfh"); Modifier.Companion companion = Modifier.INSTANCE; ProvidableCompositionLocal localDensity = CompositionLocalsKt.getLocalDensity(); ComposerKt.sourceInformationMarkerStart(startRestartGroup, 2023513938, "CC:CompositionLocal.kt#9igjgp"); Object consume = startRestartGroup.consume(localDensity); ComposerKt.sourceInformationMarkerEnd(startRestartGroup); Density density = (Density) consume; ProvidableCompositionLocal localLayoutDirection = CompositionLocalsKt.getLocalLayoutDirection(); ComposerKt.sourceInformationMarkerStart(startRestartGroup, 2023513938, "CC:CompositionLocal.kt#9igjgp"); Object consume2 = startRestartGroup.consume(localLayoutDirection); ComposerKt.sourceInformationMarkerEnd(startRestartGroup); LayoutDirection layoutDirection = (LayoutDirection) consume2; ProvidableCompositionLocal localViewConfiguration = CompositionLocalsKt.getLocalViewConfiguration(); ComposerKt.sourceInformationMarkerStart(startRestartGroup, 2023513938, "CC:CompositionLocal.kt#9igjgp"); Object consume3 = startRestartGroup.consume(localViewConfiguration); ComposerKt.sourceInformationMarkerEnd(startRestartGroup); ViewConfiguration viewConfiguration = (ViewConfiguration) consume3; Function0 constructor = ComposeUiNode.INSTANCE.getConstructor(); Function3, Composer, Integer, Unit> materializerOf = LayoutKt.materializerOf(companion); int i3 = ((((i2 >> 6) & 14) << 9) & 7168) | 6; if (!(startRestartGroup.getApplier() instanceof Applier)) { ComposablesKt.invalidApplier(); } startRestartGroup.startReusableNode(); if (startRestartGroup.getInserting()) { startRestartGroup.createNode(constructor); } else { startRestartGroup.useNode(); } Composer m2273constructorimpl = Updater.m2273constructorimpl(startRestartGroup); Updater.m2280setimpl(m2273constructorimpl, measurePolicy, ComposeUiNode.INSTANCE.getSetMeasurePolicy()); Updater.m2280setimpl(m2273constructorimpl, density, ComposeUiNode.INSTANCE.getSetDensity()); Updater.m2280setimpl(m2273constructorimpl, layoutDirection, ComposeUiNode.INSTANCE.getSetLayoutDirection()); Updater.m2280setimpl(m2273constructorimpl, viewConfiguration, ComposeUiNode.INSTANCE.getSetViewConfiguration()); materializerOf.invoke(SkippableUpdater.m2264boximpl(SkippableUpdater.m2265constructorimpl(startRestartGroup)), startRestartGroup, Integer.valueOf((i3 >> 3) & 112)); startRestartGroup.startReplaceableGroup(2058660585); content.invoke(startRestartGroup, Integer.valueOf((i3 >> 9) & 14)); startRestartGroup.endReplaceableGroup(); startRestartGroup.endNode(); startRestartGroup.endReplaceableGroup(); if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventEnd(); } } else { startRestartGroup.skipToGroupEnd(); } ScopeUpdateScope endRestartGroup = startRestartGroup.endRestartGroup(); if (endRestartGroup == null) { return; } endRestartGroup.updateScope(new Function2() { // from class: androidx.compose.material3.AlertDialogKt$AlertDialogFlowRow$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(2); } @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(Composer composer2, Integer num) { invoke(composer2, num.intValue()); return Unit.INSTANCE; } public final void invoke(Composer composer2, int i4) { AlertDialogKt.m984AlertDialogFlowRowixp7dh8(f, f2, content, composer2, RecomposeScopeImplKt.updateChangedFlags(i | 1)); } }); } static { float f = 24; DialogPadding = PaddingKt.m483PaddingValues0680j_4(Dp.m4883constructorimpl(f)); float f2 = 16; IconPadding = PaddingKt.m487PaddingValuesa9UjIt4$default(0.0f, 0.0f, 0.0f, Dp.m4883constructorimpl(f2), 7, null); TitlePadding = PaddingKt.m487PaddingValuesa9UjIt4$default(0.0f, 0.0f, 0.0f, Dp.m4883constructorimpl(f2), 7, null); TextPadding = PaddingKt.m487PaddingValuesa9UjIt4$default(0.0f, 0.0f, 0.0f, Dp.m4883constructorimpl(f), 7, null); } }