package androidx.compose.ui.node; import androidx.compose.runtime.collection.MutableVector; import androidx.compose.ui.graphics.GraphicsLayerScope; import androidx.compose.ui.layout.AlignmentLine; import androidx.compose.ui.layout.Measurable; import androidx.compose.ui.layout.Placeable; import androidx.compose.ui.node.LayoutNode; import androidx.compose.ui.node.LayoutNodeLayoutDelegate; import androidx.compose.ui.unit.Constraints; import androidx.compose.ui.unit.IntOffset; import androidx.compose.ui.unit.IntSize; import androidx.compose.ui.unit.IntSizeKt; import io.sentry.protocol.ViewHierarchyNode; import java.util.List; import java.util.Map; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; /* compiled from: LayoutNodeLayoutDelegate.kt */ @Metadata(d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0002\b\u0018\b\u0000\u0018\u00002\u00020\u0001:\u0002YZB\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\r\u0010B\u001a\u00020CH\u0000¢\u0006\u0002\bDJ\u0006\u0010E\u001a\u00020CJ\u0006\u0010F\u001a\u00020CJ\r\u0010G\u001a\u00020CH\u0000¢\u0006\u0002\bHJ\r\u0010I\u001a\u00020CH\u0000¢\u0006\u0002\bJJ\r\u0010K\u001a\u00020CH\u0000¢\u0006\u0002\bLJ\r\u0010M\u001a\u00020CH\u0000¢\u0006\u0002\bNJ\u0006\u0010O\u001a\u00020CJ\u001d\u0010P\u001a\u00020C2\u0006\u0010Q\u001a\u00020\u001cH\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\bR\u0010SJ\u001d\u0010T\u001a\u00020C2\u0006\u0010Q\u001a\u00020\u001cH\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\bU\u0010SJ\u0006\u0010V\u001a\u00020CJ\u0006\u0010W\u001a\u00020CJ\f\u0010X\u001a\u00020\u0010*\u00020\u0003H\u0002R\u0014\u0010\u0005\u001a\u00020\u00068@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b\u0007\u0010\bR$\u0010\u000b\u001a\u00020\n2\u0006\u0010\t\u001a\u00020\n@FX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\f\u0010\r\"\u0004\b\u000e\u0010\u000fR$\u0010\u0011\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\u0010@FX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0012\u0010\u0013\"\u0004\b\u0014\u0010\u0015R$\u0010\u0016\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\u0010@FX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0017\u0010\u0013\"\u0004\b\u0018\u0010\u0015R\u0014\u0010\u0019\u001a\u00020\n8@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b\u001a\u0010\rR\u001c\u0010\u001b\u001a\u0004\u0018\u00010\u001c8Fø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b\u001d\u0010\u001eR\u001c\u0010\u001f\u001a\u0004\u0018\u00010\u001c8Fø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b \u0010\u001eR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u001e\u0010\"\u001a\u00020\u00102\u0006\u0010!\u001a\u00020\u0010@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\b#\u0010\u0013R\u000e\u0010$\u001a\u00020\u0010X\u0082\u000e¢\u0006\u0002\n\u0000R\u001e\u0010&\u001a\u00020%2\u0006\u0010!\u001a\u00020%@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\b'\u0010(R\u0016\u0010)\u001a\u0004\u0018\u00010\u00068@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b*\u0010\bR\u001e\u0010+\u001a\u00020\u00102\u0006\u0010!\u001a\u00020\u0010@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\b,\u0010\u0013R\u000e\u0010-\u001a\u00020\u0010X\u0082\u000e¢\u0006\u0002\n\u0000R\u001e\u0010.\u001a\u00020\u00102\u0006\u0010!\u001a\u00020\u0010@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\b/\u0010\u0013R*\u00101\u001a\b\u0018\u000100R\u00020\u00002\f\u0010!\u001a\b\u0018\u000100R\u00020\u0000@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\b2\u00103R\u0018\u00104\u001a\u000605R\u00020\u0000X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b6\u00107R\u001e\u00108\u001a\u00020\u00102\u0006\u0010!\u001a\u00020\u0010@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\b9\u0010\u0013R\u000e\u0010:\u001a\u00020\nX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010;\u001a\u00020\nX\u0082\u000e¢\u0006\u0002\n\u0000R\u0011\u0010<\u001a\u00020=8F¢\u0006\u0006\u001a\u0004\b>\u0010?R\u0014\u0010@\u001a\u00020\n8@X\u0080\u0004¢\u0006\u0006\u001a\u0004\bA\u0010\r\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u0006["}, d2 = {"Landroidx/compose/ui/node/LayoutNodeLayoutDelegate;", "", "layoutNode", "Landroidx/compose/ui/node/LayoutNode;", "(Landroidx/compose/ui/node/LayoutNode;)V", "alignmentLinesOwner", "Landroidx/compose/ui/node/AlignmentLinesOwner;", "getAlignmentLinesOwner$ui_release", "()Landroidx/compose/ui/node/AlignmentLinesOwner;", "value", "", "childrenAccessingCoordinatesDuringPlacement", "getChildrenAccessingCoordinatesDuringPlacement", "()I", "setChildrenAccessingCoordinatesDuringPlacement", "(I)V", "", "coordinatesAccessedDuringModifierPlacement", "getCoordinatesAccessedDuringModifierPlacement", "()Z", "setCoordinatesAccessedDuringModifierPlacement", "(Z)V", "coordinatesAccessedDuringPlacement", "getCoordinatesAccessedDuringPlacement", "setCoordinatesAccessedDuringPlacement", ViewHierarchyNode.JsonKeys.HEIGHT, "getHeight$ui_release", "lastConstraints", "Landroidx/compose/ui/unit/Constraints;", "getLastConstraints-DWUhwKw", "()Landroidx/compose/ui/unit/Constraints;", "lastLookaheadConstraints", "getLastLookaheadConstraints-DWUhwKw", "", "layoutPending", "getLayoutPending$ui_release", "layoutPendingForAlignment", "Landroidx/compose/ui/node/LayoutNode$LayoutState;", "layoutState", "getLayoutState$ui_release", "()Landroidx/compose/ui/node/LayoutNode$LayoutState;", "lookaheadAlignmentLinesOwner", "getLookaheadAlignmentLinesOwner$ui_release", "lookaheadLayoutPending", "getLookaheadLayoutPending$ui_release", "lookaheadLayoutPendingForAlignment", "lookaheadMeasurePending", "getLookaheadMeasurePending$ui_release", "Landroidx/compose/ui/node/LayoutNodeLayoutDelegate$LookaheadPassDelegate;", "lookaheadPassDelegate", "getLookaheadPassDelegate$ui_release", "()Landroidx/compose/ui/node/LayoutNodeLayoutDelegate$LookaheadPassDelegate;", "measurePassDelegate", "Landroidx/compose/ui/node/LayoutNodeLayoutDelegate$MeasurePassDelegate;", "getMeasurePassDelegate$ui_release", "()Landroidx/compose/ui/node/LayoutNodeLayoutDelegate$MeasurePassDelegate;", "measurePending", "getMeasurePending$ui_release", "nextChildLookaheadPlaceOrder", "nextChildPlaceOrder", "outerCoordinator", "Landroidx/compose/ui/node/NodeCoordinator;", "getOuterCoordinator", "()Landroidx/compose/ui/node/NodeCoordinator;", ViewHierarchyNode.JsonKeys.WIDTH, "getWidth$ui_release", "ensureLookaheadDelegateCreated", "", "ensureLookaheadDelegateCreated$ui_release", "invalidateParentData", "markChildrenDirty", "markLayoutPending", "markLayoutPending$ui_release", "markLookaheadLayoutPending", "markLookaheadLayoutPending$ui_release", "markLookaheadMeasurePending", "markLookaheadMeasurePending$ui_release", "markMeasurePending", "markMeasurePending$ui_release", "onCoordinatesUsed", "performLookaheadMeasure", "constraints", "performLookaheadMeasure-BRTryo0", "(J)V", "performMeasure", "performMeasure-BRTryo0", "resetAlignmentLines", "updateParentData", "isOutMostLookaheadRoot", "LookaheadPassDelegate", "MeasurePassDelegate", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class LayoutNodeLayoutDelegate { private int childrenAccessingCoordinatesDuringPlacement; private boolean coordinatesAccessedDuringModifierPlacement; private boolean coordinatesAccessedDuringPlacement; private final LayoutNode layoutNode; private boolean layoutPending; private boolean layoutPendingForAlignment; private LayoutNode.LayoutState layoutState; private boolean lookaheadLayoutPending; private boolean lookaheadLayoutPendingForAlignment; private boolean lookaheadMeasurePending; private LookaheadPassDelegate lookaheadPassDelegate; private final MeasurePassDelegate measurePassDelegate; private boolean measurePending; private int nextChildLookaheadPlaceOrder; private int nextChildPlaceOrder; public final int getChildrenAccessingCoordinatesDuringPlacement() { return this.childrenAccessingCoordinatesDuringPlacement; } public final boolean getCoordinatesAccessedDuringModifierPlacement() { return this.coordinatesAccessedDuringModifierPlacement; } public final boolean getCoordinatesAccessedDuringPlacement() { return this.coordinatesAccessedDuringPlacement; } /* renamed from: getLayoutPending$ui_release, reason: from getter */ public final boolean getLayoutPending() { return this.layoutPending; } /* renamed from: getLayoutState$ui_release, reason: from getter */ public final LayoutNode.LayoutState getLayoutState() { return this.layoutState; } /* renamed from: getLookaheadLayoutPending$ui_release, reason: from getter */ public final boolean getLookaheadLayoutPending() { return this.lookaheadLayoutPending; } /* renamed from: getLookaheadMeasurePending$ui_release, reason: from getter */ public final boolean getLookaheadMeasurePending() { return this.lookaheadMeasurePending; } /* renamed from: getLookaheadPassDelegate$ui_release, reason: from getter */ public final LookaheadPassDelegate getLookaheadPassDelegate() { return this.lookaheadPassDelegate; } /* renamed from: getMeasurePassDelegate$ui_release, reason: from getter */ public final MeasurePassDelegate getMeasurePassDelegate() { return this.measurePassDelegate; } /* renamed from: getMeasurePending$ui_release, reason: from getter */ public final boolean getMeasurePending() { return this.measurePending; } public final void markLayoutPending$ui_release() { this.layoutPending = true; this.layoutPendingForAlignment = true; } public final void markLookaheadLayoutPending$ui_release() { this.lookaheadLayoutPending = true; this.lookaheadLayoutPendingForAlignment = true; } public final void markLookaheadMeasurePending$ui_release() { this.lookaheadMeasurePending = true; } public final void markMeasurePending$ui_release() { this.measurePending = true; } public LayoutNodeLayoutDelegate(LayoutNode layoutNode) { Intrinsics.checkNotNullParameter(layoutNode, "layoutNode"); this.layoutNode = layoutNode; this.layoutState = LayoutNode.LayoutState.Idle; this.measurePassDelegate = new MeasurePassDelegate(); } public final NodeCoordinator getOuterCoordinator() { return this.layoutNode.getNodes().getOuterCoordinator(); } /* renamed from: getLastConstraints-DWUhwKw, reason: not valid java name */ public final Constraints m4032getLastConstraintsDWUhwKw() { return this.measurePassDelegate.m4038getLastConstraintsDWUhwKw(); } /* renamed from: getLastLookaheadConstraints-DWUhwKw, reason: not valid java name */ public final Constraints m4033getLastLookaheadConstraintsDWUhwKw() { LookaheadPassDelegate lookaheadPassDelegate = this.lookaheadPassDelegate; if (lookaheadPassDelegate != null) { return lookaheadPassDelegate.getLookaheadConstraints(); } return null; } public final int getHeight$ui_release() { return this.measurePassDelegate.getHeight(); } public final int getWidth$ui_release() { return this.measurePassDelegate.getWidth(); } public final AlignmentLinesOwner getAlignmentLinesOwner$ui_release() { return this.measurePassDelegate; } public final AlignmentLinesOwner getLookaheadAlignmentLinesOwner$ui_release() { return this.lookaheadPassDelegate; } public final void setCoordinatesAccessedDuringPlacement(boolean z) { if (this.coordinatesAccessedDuringPlacement != z) { this.coordinatesAccessedDuringPlacement = z; if (z && !this.coordinatesAccessedDuringModifierPlacement) { setChildrenAccessingCoordinatesDuringPlacement(this.childrenAccessingCoordinatesDuringPlacement + 1); } else { if (z || this.coordinatesAccessedDuringModifierPlacement) { return; } setChildrenAccessingCoordinatesDuringPlacement(this.childrenAccessingCoordinatesDuringPlacement - 1); } } } public final void setCoordinatesAccessedDuringModifierPlacement(boolean z) { if (this.coordinatesAccessedDuringModifierPlacement != z) { this.coordinatesAccessedDuringModifierPlacement = z; if (z && !this.coordinatesAccessedDuringPlacement) { setChildrenAccessingCoordinatesDuringPlacement(this.childrenAccessingCoordinatesDuringPlacement + 1); } else { if (z || this.coordinatesAccessedDuringPlacement) { return; } setChildrenAccessingCoordinatesDuringPlacement(this.childrenAccessingCoordinatesDuringPlacement - 1); } } } public final void setChildrenAccessingCoordinatesDuringPlacement(int i) { int i2 = this.childrenAccessingCoordinatesDuringPlacement; this.childrenAccessingCoordinatesDuringPlacement = i; if ((i2 == 0) != (i == 0)) { LayoutNode parent$ui_release = this.layoutNode.getParent$ui_release(); LayoutNodeLayoutDelegate layoutDelegate = parent$ui_release != null ? parent$ui_release.getLayoutDelegate() : null; if (layoutDelegate != null) { if (i == 0) { layoutDelegate.setChildrenAccessingCoordinatesDuringPlacement(layoutDelegate.childrenAccessingCoordinatesDuringPlacement - 1); } else { layoutDelegate.setChildrenAccessingCoordinatesDuringPlacement(layoutDelegate.childrenAccessingCoordinatesDuringPlacement + 1); } } } } public final void onCoordinatesUsed() { LayoutNode.LayoutState layoutState$ui_release = this.layoutNode.getLayoutState$ui_release(); if (layoutState$ui_release == LayoutNode.LayoutState.LayingOut || layoutState$ui_release == LayoutNode.LayoutState.LookaheadLayingOut) { if (this.measurePassDelegate.getLayingOutChildren()) { setCoordinatesAccessedDuringPlacement(true); } else { setCoordinatesAccessedDuringModifierPlacement(true); } } if (layoutState$ui_release == LayoutNode.LayoutState.LookaheadLayingOut) { LookaheadPassDelegate lookaheadPassDelegate = this.lookaheadPassDelegate; if (lookaheadPassDelegate != null && lookaheadPassDelegate.getLayingOutChildren()) { setCoordinatesAccessedDuringPlacement(true); } else { setCoordinatesAccessedDuringModifierPlacement(true); } } } /* compiled from: LayoutNodeLayoutDelegate.kt */ @Metadata(d1 = {"\u0000\u0094\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0007\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\b\n\u0002\u0010\u0000\n\u0002\b\u000e\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\b.\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0004\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u0003B\u0005¢\u0006\u0002\u0010\u0004J\u0014\u0010N\u001a\u000e\u0012\u0004\u0012\u00020P\u0012\u0004\u0012\u0002070OH\u0016J\b\u0010Q\u001a\u00020'H\u0002J\b\u0010R\u001a\u00020'H\u0002J\u001c\u0010S\u001a\u00020'2\u0012\u0010T\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020'0%H\u0016J!\u0010U\u001a\u00020'2\u0016\u0010T\u001a\u0012\u0012\b\u0012\u00060\u0000R\u00020\u0007\u0012\u0004\u0012\u00020'0%H\u0082\bJ\u0011\u0010V\u001a\u0002072\u0006\u0010W\u001a\u00020PH\u0096\u0002J\u000e\u0010X\u001a\u00020'2\u0006\u0010Y\u001a\u00020\u0011J\u0006\u0010Z\u001a\u00020'J\b\u0010[\u001a\u00020'H\u0016J\b\u0010\\\u001a\u00020'H\u0002J\b\u0010]\u001a\u00020'H\u0002J\u0010\u0010^\u001a\u0002072\u0006\u0010_\u001a\u000207H\u0016J\u0010\u0010`\u001a\u0002072\u0006\u0010a\u001a\u000207H\u0016J\u001d\u0010b\u001a\u00020\u00022\u0006\u0010c\u001a\u00020!H\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\bd\u0010eJ\u0006\u0010f\u001a\u00020'J\u0010\u0010g\u001a\u0002072\u0006\u0010_\u001a\u000207H\u0016J\u0010\u0010h\u001a\u0002072\u0006\u0010a\u001a\u000207H\u0016J\u0006\u0010i\u001a\u00020'J\b\u0010j\u001a\u00020'H\u0002J\b\u0010k\u001a\u00020'H\u0002J\u0006\u0010l\u001a\u00020'J\r\u0010m\u001a\u00020'H\u0000¢\u0006\u0002\bnJ@\u0010o\u001a\u00020'2\u0006\u0010p\u001a\u00020*2\u0006\u0010K\u001a\u00020-2\u0019\u0010q\u001a\u0015\u0012\u0004\u0012\u00020&\u0012\u0004\u0012\u00020'\u0018\u00010%¢\u0006\u0002\b(H\u0014ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\br\u0010sJ\u0006\u0010t\u001a\u00020'J@\u0010u\u001a\u00020'2\u0006\u0010p\u001a\u00020*2\u0006\u0010K\u001a\u00020-2\u0019\u0010q\u001a\u0015\u0012\u0004\u0012\u00020&\u0012\u0004\u0012\u00020'\u0018\u00010%¢\u0006\u0002\b(H\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\bv\u0010sJ\u001b\u0010w\u001a\u00020\u00112\u0006\u0010c\u001a\u00020!ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\bx\u0010yJ\u0006\u0010z\u001a\u00020'J\b\u0010{\u001a\u00020'H\u0016J\b\u0010|\u001a\u00020'H\u0016J\u0010\u0010}\u001a\u00020'2\u0006\u0010~\u001a\u00020\u007fH\u0002J\u0007\u0010\u0080\u0001\u001a\u00020\u0011R\u0018\u0010\u0005\u001a\f\u0012\b\u0012\u00060\u0000R\u00020\u00070\u0006X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\b\u001a\u00020\tX\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u001e\u0010\f\u001a\f\u0012\b\u0012\u00060\u0000R\u00020\u00070\r8@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b\u000e\u0010\u000fR\u001a\u0010\u0010\u001a\u00020\u0011X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0012\u0010\u0013\"\u0004\b\u0014\u0010\u0015R\u001a\u0010\u0016\u001a\u00020\u0011X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0017\u0010\u0013\"\u0004\b\u0018\u0010\u0015R\u0014\u0010\u0019\u001a\u00020\u001a8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u001b\u0010\u001cR$\u0010\u001e\u001a\u00020\u00112\u0006\u0010\u001d\u001a\u00020\u0011@PX\u0096\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001e\u0010\u0013\"\u0004\b\u001f\u0010\u0015R\u001c\u0010 \u001a\u0004\u0018\u00010!8Fø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b\"\u0010#R!\u0010$\u001a\u0015\u0012\u0004\u0012\u00020&\u0012\u0004\u0012\u00020'\u0018\u00010%¢\u0006\u0002\b(X\u0082\u000e¢\u0006\u0002\n\u0000R\u0019\u0010)\u001a\u00020*X\u0082\u000eø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0004\n\u0002\u0010+R\u000e\u0010,\u001a\u00020-X\u0082\u000e¢\u0006\u0002\n\u0000R\u001e\u0010.\u001a\u00020\u00112\u0006\u0010\u001d\u001a\u00020\u0011@BX\u0086\u000e¢\u0006\b\n\u0000\u001a\u0004\b/\u0010\u0013R\u001a\u00100\u001a\u000201X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b2\u00103\"\u0004\b4\u00105R\u0014\u00106\u001a\u0002078VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b8\u00109R\u000e\u0010:\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u0014\u0010;\u001a\u0002078VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b<\u00109R\u0016\u0010=\u001a\u0004\u0018\u00010\u00038VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b>\u0010?R\"\u0010A\u001a\u0004\u0018\u00010@2\b\u0010\u001d\u001a\u0004\u0018\u00010@@RX\u0096\u000e¢\u0006\b\n\u0000\u001a\u0004\bB\u0010CR\u000e\u0010D\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u001e\u0010E\u001a\u0002072\u0006\u0010\u001d\u001a\u000207@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\bF\u00109R\u000e\u0010G\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u001e\u0010H\u001a\u0002072\u0006\u0010\u001d\u001a\u000207@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\bI\u00109R\u000e\u0010J\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u001e\u0010K\u001a\u00020-2\u0006\u0010\u001d\u001a\u00020-@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\bL\u0010M\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u0006\u0081\u0001"}, d2 = {"Landroidx/compose/ui/node/LayoutNodeLayoutDelegate$MeasurePassDelegate;", "Landroidx/compose/ui/layout/Measurable;", "Landroidx/compose/ui/layout/Placeable;", "Landroidx/compose/ui/node/AlignmentLinesOwner;", "(Landroidx/compose/ui/node/LayoutNodeLayoutDelegate;)V", "_childDelegates", "Landroidx/compose/runtime/collection/MutableVector;", "Landroidx/compose/ui/node/LayoutNodeLayoutDelegate;", "alignmentLines", "Landroidx/compose/ui/node/AlignmentLines;", "getAlignmentLines", "()Landroidx/compose/ui/node/AlignmentLines;", "childDelegates", "", "getChildDelegates$ui_release", "()Ljava/util/List;", "childDelegatesDirty", "", "getChildDelegatesDirty$ui_release", "()Z", "setChildDelegatesDirty$ui_release", "(Z)V", "duringAlignmentLinesQuery", "getDuringAlignmentLinesQuery$ui_release", "setDuringAlignmentLinesQuery$ui_release", "innerCoordinator", "Landroidx/compose/ui/node/NodeCoordinator;", "getInnerCoordinator", "()Landroidx/compose/ui/node/NodeCoordinator;", "", "isPlaced", "setPlaced$ui_release", "lastConstraints", "Landroidx/compose/ui/unit/Constraints;", "getLastConstraints-DWUhwKw", "()Landroidx/compose/ui/unit/Constraints;", "lastLayerBlock", "Lkotlin/Function1;", "Landroidx/compose/ui/graphics/GraphicsLayerScope;", "", "Lkotlin/ExtensionFunctionType;", "lastPosition", "Landroidx/compose/ui/unit/IntOffset;", "J", "lastZIndex", "", "layingOutChildren", "getLayingOutChildren", "measuredByParent", "Landroidx/compose/ui/node/LayoutNode$UsageByParent;", "getMeasuredByParent$ui_release", "()Landroidx/compose/ui/node/LayoutNode$UsageByParent;", "setMeasuredByParent$ui_release", "(Landroidx/compose/ui/node/LayoutNode$UsageByParent;)V", "measuredHeight", "", "getMeasuredHeight", "()I", "measuredOnce", "measuredWidth", "getMeasuredWidth", "parentAlignmentLinesOwner", "getParentAlignmentLinesOwner", "()Landroidx/compose/ui/node/AlignmentLinesOwner;", "", "parentData", "getParentData", "()Ljava/lang/Object;", "parentDataDirty", "placeOrder", "getPlaceOrder$ui_release", "placedOnce", "previousPlaceOrder", "getPreviousPlaceOrder$ui_release", "relayoutWithoutParentInProgress", "zIndex", "getZIndex$ui_release", "()F", "calculateAlignmentLines", "", "Landroidx/compose/ui/layout/AlignmentLine;", "checkChildrenPlaceOrderForUpdates", "clearPlaceOrder", "forEachChildAlignmentLinesOwner", "block", "forEachChildDelegate", "get", "alignmentLine", "invalidateIntrinsicsParent", "forceRequest", "invalidateParentData", "layoutChildren", "markNodeAndSubtreeAsPlaced", "markSubtreeAsNotPlaced", "maxIntrinsicHeight", ViewHierarchyNode.JsonKeys.WIDTH, "maxIntrinsicWidth", ViewHierarchyNode.JsonKeys.HEIGHT, "measure", "constraints", "measure-BRTryo0", "(J)Landroidx/compose/ui/layout/Placeable;", "measureBasedOnLookahead", "minIntrinsicHeight", "minIntrinsicWidth", "notifyChildrenUsingCoordinatesWhilePlacing", "onBeforeLayoutChildren", "onIntrinsicsQueried", "onNodeDetached", "onNodePlaced", "onNodePlaced$ui_release", "placeAt", "position", "layerBlock", "placeAt-f8xVGno", "(JFLkotlin/jvm/functions/Function1;)V", "placeBasedOnLookahead", "placeOuterCoordinator", "placeOuterCoordinator-f8xVGno", "remeasure", "remeasure-BRTryo0", "(J)Z", "replace", "requestLayout", "requestMeasure", "trackMeasurementByParent", "node", "Landroidx/compose/ui/node/LayoutNode;", "updateParentData", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class MeasurePassDelegate extends Placeable implements Measurable, AlignmentLinesOwner { private boolean duringAlignmentLinesQuery; private boolean isPlaced; private Function1 lastLayerBlock; private float lastZIndex; private boolean layingOutChildren; private boolean measuredOnce; private Object parentData; private boolean placedOnce; private boolean relayoutWithoutParentInProgress; private float zIndex; private int previousPlaceOrder = Integer.MAX_VALUE; private int placeOrder = Integer.MAX_VALUE; private LayoutNode.UsageByParent measuredByParent = LayoutNode.UsageByParent.NotUsed; private long lastPosition = IntOffset.INSTANCE.m5011getZeronOccac(); private boolean parentDataDirty = true; private final AlignmentLines alignmentLines = new LayoutNodeAlignmentLines(this); private final MutableVector _childDelegates = new MutableVector<>(new MeasurePassDelegate[16], 0); private boolean childDelegatesDirty = true; /* compiled from: LayoutNodeLayoutDelegate.kt */ @Metadata(k = 3, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public /* synthetic */ class WhenMappings { public static final /* synthetic */ int[] $EnumSwitchMapping$0; public static final /* synthetic */ int[] $EnumSwitchMapping$1; static { int[] iArr = new int[LayoutNode.LayoutState.values().length]; try { iArr[LayoutNode.LayoutState.Measuring.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { iArr[LayoutNode.LayoutState.LayingOut.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } $EnumSwitchMapping$0 = iArr; int[] iArr2 = new int[LayoutNode.UsageByParent.values().length]; try { iArr2[LayoutNode.UsageByParent.InMeasureBlock.ordinal()] = 1; } catch (NoSuchFieldError unused3) { } try { iArr2[LayoutNode.UsageByParent.InLayoutBlock.ordinal()] = 2; } catch (NoSuchFieldError unused4) { } $EnumSwitchMapping$1 = iArr2; } } @Override // androidx.compose.ui.node.AlignmentLinesOwner public AlignmentLines getAlignmentLines() { return this.alignmentLines; } /* renamed from: getChildDelegatesDirty$ui_release, reason: from getter */ public final boolean getChildDelegatesDirty() { return this.childDelegatesDirty; } /* renamed from: getDuringAlignmentLinesQuery$ui_release, reason: from getter */ public final boolean getDuringAlignmentLinesQuery() { return this.duringAlignmentLinesQuery; } public final boolean getLayingOutChildren() { return this.layingOutChildren; } /* renamed from: getMeasuredByParent$ui_release, reason: from getter */ public final LayoutNode.UsageByParent getMeasuredByParent() { return this.measuredByParent; } @Override // androidx.compose.ui.layout.Measured, androidx.compose.ui.layout.IntrinsicMeasurable public Object getParentData() { return this.parentData; } /* renamed from: getPlaceOrder$ui_release, reason: from getter */ public final int getPlaceOrder() { return this.placeOrder; } /* renamed from: getPreviousPlaceOrder$ui_release, reason: from getter */ public final int getPreviousPlaceOrder() { return this.previousPlaceOrder; } /* renamed from: getZIndex$ui_release, reason: from getter */ public final float getZIndex() { return this.zIndex; } public final void invalidateParentData() { this.parentDataDirty = true; } @Override // androidx.compose.ui.node.AlignmentLinesOwner /* renamed from: isPlaced, reason: from getter */ public boolean getIsPlaced() { return this.isPlaced; } public final void setChildDelegatesDirty$ui_release(boolean z) { this.childDelegatesDirty = z; } public final void setDuringAlignmentLinesQuery$ui_release(boolean z) { this.duringAlignmentLinesQuery = z; } public final void setMeasuredByParent$ui_release(LayoutNode.UsageByParent usageByParent) { Intrinsics.checkNotNullParameter(usageByParent, ""); this.measuredByParent = usageByParent; } public void setPlaced$ui_release(boolean z) { this.isPlaced = z; } public MeasurePassDelegate() { } /* renamed from: getLastConstraints-DWUhwKw, reason: not valid java name */ public final Constraints m4038getLastConstraintsDWUhwKw() { if (this.measuredOnce) { return Constraints.m4827boximpl(getMeasurementConstraints()); } return null; } @Override // androidx.compose.ui.node.AlignmentLinesOwner public NodeCoordinator getInnerCoordinator() { return LayoutNodeLayoutDelegate.this.layoutNode.getInnerCoordinator$ui_release(); } public final List getChildDelegates$ui_release() { LayoutNodeLayoutDelegate.this.layoutNode.updateChildrenIfDirty$ui_release(); if (this.childDelegatesDirty) { LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; MutableVector mutableVector = this._childDelegates; MutableVector mutableVector2 = layoutNode.get_children$ui_release(); int size = mutableVector2.getSize(); if (size > 0) { LayoutNode[] content = mutableVector2.getContent(); int i = 0; do { LayoutNode layoutNode2 = content[i]; if (mutableVector.getSize() <= i) { mutableVector.add(layoutNode2.getLayoutDelegate().getMeasurePassDelegate()); } else { mutableVector.set(i, layoutNode2.getLayoutDelegate().getMeasurePassDelegate()); } i++; } while (i < size); } mutableVector.removeRange(layoutNode.getChildren$ui_release().size(), mutableVector.getSize()); this.childDelegatesDirty = false; return this._childDelegates.asMutableList(); } return this._childDelegates.asMutableList(); } @Override // androidx.compose.ui.node.AlignmentLinesOwner public void layoutChildren() { this.layingOutChildren = true; getAlignmentLines().recalculateQueryOwner(); if (LayoutNodeLayoutDelegate.this.getLayoutPending()) { onBeforeLayoutChildren(); } if (LayoutNodeLayoutDelegate.this.layoutPendingForAlignment || (!this.duringAlignmentLinesQuery && !getInnerCoordinator().getIsPlacingForAlignment() && LayoutNodeLayoutDelegate.this.getLayoutPending())) { LayoutNodeLayoutDelegate.this.layoutPending = false; LayoutNode.LayoutState layoutState = LayoutNodeLayoutDelegate.this.getLayoutState(); LayoutNodeLayoutDelegate.this.layoutState = LayoutNode.LayoutState.LayingOut; LayoutNodeLayoutDelegate.this.setCoordinatesAccessedDuringPlacement(false); final LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; LayoutNodeKt.requireOwner(layoutNode).getSnapshotObserver().observeLayoutSnapshotReads$ui_release(layoutNode, false, new Function0() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$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(0); } @Override // kotlin.jvm.functions.Function0 public /* bridge */ /* synthetic */ Unit invoke() { invoke2(); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2() { LayoutNodeLayoutDelegate.MeasurePassDelegate.this.clearPlaceOrder(); LayoutNodeLayoutDelegate.MeasurePassDelegate.this.forEachChildAlignmentLinesOwner(new Function1() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.1 @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(AlignmentLinesOwner alignmentLinesOwner) { invoke2(alignmentLinesOwner); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(AlignmentLinesOwner it) { Intrinsics.checkNotNullParameter(it, "it"); it.getAlignmentLines().setUsedDuringParentLayout$ui_release(false); } }); layoutNode.getInnerCoordinator$ui_release().getMeasureResult$ui_release().placeChildren(); LayoutNodeLayoutDelegate.MeasurePassDelegate.this.checkChildrenPlaceOrderForUpdates(); LayoutNodeLayoutDelegate.MeasurePassDelegate.this.forEachChildAlignmentLinesOwner(new Function1() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.2 @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(AlignmentLinesOwner alignmentLinesOwner) { invoke2(alignmentLinesOwner); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(AlignmentLinesOwner it) { Intrinsics.checkNotNullParameter(it, "it"); it.getAlignmentLines().setPreviousUsedDuringParentLayout$ui_release(it.getAlignmentLines().getUsedDuringParentLayout()); } }); } }); LayoutNodeLayoutDelegate.this.layoutState = layoutState; if (getInnerCoordinator().getIsPlacingForAlignment() && LayoutNodeLayoutDelegate.this.getCoordinatesAccessedDuringPlacement()) { requestLayout(); } LayoutNodeLayoutDelegate.this.layoutPendingForAlignment = false; } if (getAlignmentLines().getUsedDuringParentLayout()) { getAlignmentLines().setPreviousUsedDuringParentLayout$ui_release(true); } if (getAlignmentLines().getDirty() && getAlignmentLines().getRequired$ui_release()) { getAlignmentLines().recalculate(); } this.layingOutChildren = false; } /* JADX INFO: Access modifiers changed from: private */ public final void checkChildrenPlaceOrderForUpdates() { LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; MutableVector mutableVector = layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); int i = 0; do { LayoutNode layoutNode2 = content[i]; if (layoutNode2.getMeasurePassDelegate$ui_release().previousPlaceOrder != layoutNode2.getPlaceOrder$ui_release()) { layoutNode.onZSortedChildrenInvalidated$ui_release(); layoutNode.invalidateLayer$ui_release(); if (layoutNode2.getPlaceOrder$ui_release() == Integer.MAX_VALUE) { layoutNode2.getMeasurePassDelegate$ui_release().markSubtreeAsNotPlaced(); } } i++; } while (i < size); } } private final void markSubtreeAsNotPlaced() { if (getIsPlaced()) { int i = 0; setPlaced$ui_release(false); MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); do { content[i].getMeasurePassDelegate$ui_release().markSubtreeAsNotPlaced(); i++; } while (i < size); } } } private final void markNodeAndSubtreeAsPlaced() { boolean isPlaced = getIsPlaced(); setPlaced$ui_release(true); LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; int i = 0; if (!isPlaced) { if (layoutNode.getMeasurePending$ui_release()) { LayoutNode.requestRemeasure$ui_release$default(layoutNode, true, false, 2, null); } else if (layoutNode.getLookaheadMeasurePending$ui_release()) { LayoutNode.requestLookaheadRemeasure$ui_release$default(layoutNode, true, false, 2, null); } } NodeCoordinator wrapped = layoutNode.getInnerCoordinator$ui_release().getWrapped(); for (NodeCoordinator outerCoordinator$ui_release = layoutNode.getOuterCoordinator$ui_release(); !Intrinsics.areEqual(outerCoordinator$ui_release, wrapped) && outerCoordinator$ui_release != null; outerCoordinator$ui_release = outerCoordinator$ui_release.getWrapped()) { if (outerCoordinator$ui_release.getLastLayerDrawingWasSkipped()) { outerCoordinator$ui_release.invalidateLayer(); } } MutableVector mutableVector = layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); do { LayoutNode layoutNode2 = content[i]; if (layoutNode2.getPlaceOrder$ui_release() != Integer.MAX_VALUE) { layoutNode2.getMeasurePassDelegate$ui_release().markNodeAndSubtreeAsPlaced(); layoutNode.rescheduleRemeasureOrRelayout$ui_release(layoutNode2); } i++; } while (i < size); } } public final void onNodePlaced$ui_release() { LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); float zIndex = getInnerCoordinator().getZIndex(); LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; NodeCoordinator outerCoordinator$ui_release = layoutNode.getOuterCoordinator$ui_release(); NodeCoordinator innerCoordinator$ui_release = layoutNode.getInnerCoordinator$ui_release(); while (outerCoordinator$ui_release != innerCoordinator$ui_release) { Intrinsics.checkNotNull(outerCoordinator$ui_release, "null cannot be cast to non-null type androidx.compose.ui.node.LayoutModifierNodeCoordinator"); LayoutModifierNodeCoordinator layoutModifierNodeCoordinator = (LayoutModifierNodeCoordinator) outerCoordinator$ui_release; zIndex += layoutModifierNodeCoordinator.getZIndex(); outerCoordinator$ui_release = layoutModifierNodeCoordinator.getWrapped(); } if (zIndex != this.zIndex) { this.zIndex = zIndex; if (parent$ui_release != null) { parent$ui_release.onZSortedChildrenInvalidated$ui_release(); } if (parent$ui_release != null) { parent$ui_release.invalidateLayer$ui_release(); } } if (!getIsPlaced()) { if (parent$ui_release != null) { parent$ui_release.invalidateLayer$ui_release(); } markNodeAndSubtreeAsPlaced(); } if (parent$ui_release == null) { this.placeOrder = 0; } else if (!this.relayoutWithoutParentInProgress && parent$ui_release.getLayoutState$ui_release() == LayoutNode.LayoutState.LayingOut) { if (this.placeOrder == Integer.MAX_VALUE) { this.placeOrder = parent$ui_release.getLayoutDelegate().nextChildPlaceOrder; parent$ui_release.getLayoutDelegate().nextChildPlaceOrder++; } else { throw new IllegalStateException("Place was called on a node which was placed already".toString()); } } layoutChildren(); } /* JADX INFO: Access modifiers changed from: private */ public final void clearPlaceOrder() { int i = 0; LayoutNodeLayoutDelegate.this.nextChildPlaceOrder = 0; MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); do { MeasurePassDelegate measurePassDelegate$ui_release = content[i].getMeasurePassDelegate$ui_release(); measurePassDelegate$ui_release.previousPlaceOrder = measurePassDelegate$ui_release.placeOrder; measurePassDelegate$ui_release.placeOrder = Integer.MAX_VALUE; if (measurePassDelegate$ui_release.measuredByParent == LayoutNode.UsageByParent.InLayoutBlock) { measurePassDelegate$ui_release.measuredByParent = LayoutNode.UsageByParent.NotUsed; } i++; } while (i < size); } } private final void forEachChildDelegate(Function1 block) { MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); int i = 0; do { block.invoke(content[i].getMeasurePassDelegate$ui_release()); i++; } while (i < size); } } @Override // androidx.compose.ui.layout.Measurable /* renamed from: measure-BRTryo0 */ public Placeable mo3876measureBRTryo0(long constraints) { if (LayoutNodeLayoutDelegate.this.layoutNode.getIntrinsicsUsageByParent() == LayoutNode.UsageByParent.NotUsed) { LayoutNodeLayoutDelegate.this.layoutNode.clearSubtreeIntrinsicsUsage$ui_release(); } LayoutNodeLayoutDelegate layoutNodeLayoutDelegate = LayoutNodeLayoutDelegate.this; if (layoutNodeLayoutDelegate.isOutMostLookaheadRoot(layoutNodeLayoutDelegate.layoutNode)) { this.measuredOnce = true; m3932setMeasurementConstraintsBRTryo0(constraints); LookaheadPassDelegate lookaheadPassDelegate = LayoutNodeLayoutDelegate.this.getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate); lookaheadPassDelegate.setMeasuredByParent$ui_release(LayoutNode.UsageByParent.NotUsed); lookaheadPassDelegate.mo3876measureBRTryo0(constraints); } trackMeasurementByParent(LayoutNodeLayoutDelegate.this.layoutNode); m4039remeasureBRTryo0(constraints); return this; } /* renamed from: remeasure-BRTryo0, reason: not valid java name */ public final boolean m4039remeasureBRTryo0(long constraints) { Owner requireOwner = LayoutNodeKt.requireOwner(LayoutNodeLayoutDelegate.this.layoutNode); LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); boolean z = true; LayoutNodeLayoutDelegate.this.layoutNode.setCanMultiMeasure$ui_release(LayoutNodeLayoutDelegate.this.layoutNode.getCanMultiMeasure() || (parent$ui_release != null && parent$ui_release.getCanMultiMeasure())); if (!LayoutNodeLayoutDelegate.this.layoutNode.getMeasurePending$ui_release() && Constraints.m4832equalsimpl0(getMeasurementConstraints(), constraints)) { Owner.forceMeasureTheSubtree$default(requireOwner, LayoutNodeLayoutDelegate.this.layoutNode, false, 2, null); LayoutNodeLayoutDelegate.this.layoutNode.resetSubtreeIntrinsicsUsage$ui_release(); return false; } getAlignmentLines().setUsedByModifierMeasurement$ui_release(false); forEachChildAlignmentLinesOwner(new Function1() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$remeasure$1 @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(AlignmentLinesOwner alignmentLinesOwner) { invoke2(alignmentLinesOwner); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(AlignmentLinesOwner it) { Intrinsics.checkNotNullParameter(it, "it"); it.getAlignmentLines().setUsedDuringParentMeasurement$ui_release(false); } }); this.measuredOnce = true; long mo3883getSizeYbymL2g = LayoutNodeLayoutDelegate.this.getOuterCoordinator().mo3883getSizeYbymL2g(); m3932setMeasurementConstraintsBRTryo0(constraints); LayoutNodeLayoutDelegate.this.m4031performMeasureBRTryo0(constraints); if (IntSize.m5041equalsimpl0(LayoutNodeLayoutDelegate.this.getOuterCoordinator().mo3883getSizeYbymL2g(), mo3883getSizeYbymL2g) && LayoutNodeLayoutDelegate.this.getOuterCoordinator().getWidth() == getWidth() && LayoutNodeLayoutDelegate.this.getOuterCoordinator().getHeight() == getHeight()) { z = false; } m3931setMeasuredSizeozmzZPI(IntSizeKt.IntSize(LayoutNodeLayoutDelegate.this.getOuterCoordinator().getWidth(), LayoutNodeLayoutDelegate.this.getOuterCoordinator().getHeight())); return z; } private final void trackMeasurementByParent(LayoutNode node) { LayoutNode.UsageByParent usageByParent; LayoutNode parent$ui_release = node.getParent$ui_release(); if (parent$ui_release != null) { if (this.measuredByParent != LayoutNode.UsageByParent.NotUsed && !node.getCanMultiMeasure()) { throw new IllegalStateException("measure() may not be called multiple times on the same Measurable. If you want to get the content size of the Measurable before calculating the final constraints, please use methods like minIntrinsicWidth()/maxIntrinsicWidth() and minIntrinsicHeight()/maxIntrinsicHeight()".toString()); } int i = WhenMappings.$EnumSwitchMapping$0[parent$ui_release.getLayoutState$ui_release().ordinal()]; if (i == 1) { usageByParent = LayoutNode.UsageByParent.InMeasureBlock; } else if (i == 2) { usageByParent = LayoutNode.UsageByParent.InLayoutBlock; } else { throw new IllegalStateException("Measurable could be only measured from the parent's measure or layout block. Parents state is " + parent$ui_release.getLayoutState$ui_release()); } this.measuredByParent = usageByParent; return; } this.measuredByParent = LayoutNode.UsageByParent.NotUsed; } @Override // androidx.compose.ui.layout.Placeable, androidx.compose.ui.layout.Measured public int getMeasuredWidth() { return LayoutNodeLayoutDelegate.this.getOuterCoordinator().getMeasuredWidth(); } @Override // androidx.compose.ui.layout.Placeable, androidx.compose.ui.layout.Measured public int getMeasuredHeight() { return LayoutNodeLayoutDelegate.this.getOuterCoordinator().getMeasuredHeight(); } @Override // androidx.compose.ui.layout.Measured public int get(AlignmentLine alignmentLine) { Intrinsics.checkNotNullParameter(alignmentLine, "alignmentLine"); LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if ((parent$ui_release != null ? parent$ui_release.getLayoutState$ui_release() : null) != LayoutNode.LayoutState.Measuring) { LayoutNode parent$ui_release2 = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if ((parent$ui_release2 != null ? parent$ui_release2.getLayoutState$ui_release() : null) == LayoutNode.LayoutState.LayingOut) { getAlignmentLines().setUsedDuringParentLayout$ui_release(true); } } else { getAlignmentLines().setUsedDuringParentMeasurement$ui_release(true); } this.duringAlignmentLinesQuery = true; int i = LayoutNodeLayoutDelegate.this.getOuterCoordinator().get(alignmentLine); this.duringAlignmentLinesQuery = false; return i; } /* JADX INFO: Access modifiers changed from: protected */ @Override // androidx.compose.ui.layout.Placeable /* renamed from: placeAt-f8xVGno */ public void mo3877placeAtf8xVGno(long position, float zIndex, Function1 layerBlock) { if (!IntOffset.m5000equalsimpl0(position, this.lastPosition)) { if (LayoutNodeLayoutDelegate.this.getCoordinatesAccessedDuringModifierPlacement() || LayoutNodeLayoutDelegate.this.getCoordinatesAccessedDuringPlacement()) { LayoutNodeLayoutDelegate.this.layoutPending = true; } notifyChildrenUsingCoordinatesWhilePlacing(); } LayoutNodeLayoutDelegate layoutNodeLayoutDelegate = LayoutNodeLayoutDelegate.this; if (layoutNodeLayoutDelegate.isOutMostLookaheadRoot(layoutNodeLayoutDelegate.layoutNode)) { Placeable.PlacementScope.Companion companion = Placeable.PlacementScope.INSTANCE; LayoutNodeLayoutDelegate layoutNodeLayoutDelegate2 = LayoutNodeLayoutDelegate.this; LookaheadPassDelegate lookaheadPassDelegate = layoutNodeLayoutDelegate2.getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate); LayoutNode parent$ui_release = layoutNodeLayoutDelegate2.layoutNode.getParent$ui_release(); if (parent$ui_release != null) { parent$ui_release.getLayoutDelegate().nextChildLookaheadPlaceOrder = 0; } lookaheadPassDelegate.setPlaceOrder$ui_release(Integer.MAX_VALUE); Placeable.PlacementScope.place$default(companion, lookaheadPassDelegate, IntOffset.m5001getXimpl(position), IntOffset.m5002getYimpl(position), 0.0f, 4, null); } m4037placeOuterCoordinatorf8xVGno(position, zIndex, layerBlock); } /* renamed from: placeOuterCoordinator-f8xVGno, reason: not valid java name */ private final void m4037placeOuterCoordinatorf8xVGno(final long position, final float zIndex, final Function1 layerBlock) { LayoutNodeLayoutDelegate.this.layoutState = LayoutNode.LayoutState.LayingOut; this.lastPosition = position; this.lastZIndex = zIndex; this.lastLayerBlock = layerBlock; this.placedOnce = true; Owner requireOwner = LayoutNodeKt.requireOwner(LayoutNodeLayoutDelegate.this.layoutNode); if (!LayoutNodeLayoutDelegate.this.getLayoutPending() && getIsPlaced()) { LayoutNodeLayoutDelegate.this.getOuterCoordinator().m4081placeSelfApparentToRealOffsetf8xVGno(position, zIndex, layerBlock); onNodePlaced$ui_release(); } else { getAlignmentLines().setUsedByModifierLayout$ui_release(false); LayoutNodeLayoutDelegate.this.setCoordinatesAccessedDuringModifierPlacement(false); OwnerSnapshotObserver snapshotObserver = requireOwner.getSnapshotObserver(); LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; final LayoutNodeLayoutDelegate layoutNodeLayoutDelegate = LayoutNodeLayoutDelegate.this; snapshotObserver.observeLayoutModifierSnapshotReads$ui_release(layoutNode, false, new Function0() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$placeOuterCoordinator$1 /* 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(0); } @Override // kotlin.jvm.functions.Function0 public /* bridge */ /* synthetic */ Unit invoke() { invoke2(); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2() { Placeable.PlacementScope.Companion companion = Placeable.PlacementScope.INSTANCE; Function1 function1 = layerBlock; LayoutNodeLayoutDelegate layoutNodeLayoutDelegate2 = layoutNodeLayoutDelegate; long j = position; float f = zIndex; if (function1 == null) { companion.m3937place70tqf50(layoutNodeLayoutDelegate2.getOuterCoordinator(), j, f); } else { companion.m3942placeWithLayeraW9wM(layoutNodeLayoutDelegate2.getOuterCoordinator(), j, f, function1); } } }); } LayoutNodeLayoutDelegate.this.layoutState = LayoutNode.LayoutState.Idle; } public final void replace() { try { this.relayoutWithoutParentInProgress = true; if (!this.placedOnce) { throw new IllegalStateException("Check failed.".toString()); } m4037placeOuterCoordinatorf8xVGno(this.lastPosition, this.lastZIndex, this.lastLayerBlock); } finally { this.relayoutWithoutParentInProgress = false; } } @Override // androidx.compose.ui.layout.IntrinsicMeasurable public int minIntrinsicWidth(int height) { onIntrinsicsQueried(); return LayoutNodeLayoutDelegate.this.getOuterCoordinator().minIntrinsicWidth(height); } @Override // androidx.compose.ui.layout.IntrinsicMeasurable public int maxIntrinsicWidth(int height) { onIntrinsicsQueried(); return LayoutNodeLayoutDelegate.this.getOuterCoordinator().maxIntrinsicWidth(height); } @Override // androidx.compose.ui.layout.IntrinsicMeasurable public int minIntrinsicHeight(int width) { onIntrinsicsQueried(); return LayoutNodeLayoutDelegate.this.getOuterCoordinator().minIntrinsicHeight(width); } @Override // androidx.compose.ui.layout.IntrinsicMeasurable public int maxIntrinsicHeight(int width) { onIntrinsicsQueried(); return LayoutNodeLayoutDelegate.this.getOuterCoordinator().maxIntrinsicHeight(width); } private final void onIntrinsicsQueried() { LayoutNode.UsageByParent usageByParent; LayoutNode.requestRemeasure$ui_release$default(LayoutNodeLayoutDelegate.this.layoutNode, false, false, 3, null); LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if (parent$ui_release == null || LayoutNodeLayoutDelegate.this.layoutNode.getIntrinsicsUsageByParent() != LayoutNode.UsageByParent.NotUsed) { return; } LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; int i = WhenMappings.$EnumSwitchMapping$0[parent$ui_release.getLayoutState$ui_release().ordinal()]; if (i == 1) { usageByParent = LayoutNode.UsageByParent.InMeasureBlock; } else if (i == 2) { usageByParent = LayoutNode.UsageByParent.InLayoutBlock; } else { usageByParent = parent$ui_release.getIntrinsicsUsageByParent(); } layoutNode.setIntrinsicsUsageByParent$ui_release(usageByParent); } public final boolean updateParentData() { if ((getParentData() == null && LayoutNodeLayoutDelegate.this.getOuterCoordinator().getParentData() == null) || !this.parentDataDirty) { return false; } this.parentDataDirty = false; this.parentData = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getParentData(); return true; } @Override // androidx.compose.ui.node.AlignmentLinesOwner public Map calculateAlignmentLines() { if (!this.duringAlignmentLinesQuery) { if (LayoutNodeLayoutDelegate.this.getLayoutState() == LayoutNode.LayoutState.Measuring) { getAlignmentLines().setUsedByModifierMeasurement$ui_release(true); if (getAlignmentLines().getDirty()) { LayoutNodeLayoutDelegate.this.markLayoutPending$ui_release(); } } else { getAlignmentLines().setUsedByModifierLayout$ui_release(true); } } getInnerCoordinator().setPlacingForAlignment$ui_release(true); layoutChildren(); getInnerCoordinator().setPlacingForAlignment$ui_release(false); return getAlignmentLines().getLastCalculation(); } @Override // androidx.compose.ui.node.AlignmentLinesOwner public AlignmentLinesOwner getParentAlignmentLinesOwner() { LayoutNodeLayoutDelegate layoutDelegate; LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if (parent$ui_release == null || (layoutDelegate = parent$ui_release.getLayoutDelegate()) == null) { return null; } return layoutDelegate.getAlignmentLinesOwner$ui_release(); } @Override // androidx.compose.ui.node.AlignmentLinesOwner public void forEachChildAlignmentLinesOwner(Function1 block) { Intrinsics.checkNotNullParameter(block, "block"); MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); int i = 0; do { block.invoke(content[i].getLayoutDelegate().getAlignmentLinesOwner$ui_release()); i++; } while (i < size); } } @Override // androidx.compose.ui.node.AlignmentLinesOwner public void requestLayout() { LayoutNode.requestRelayout$ui_release$default(LayoutNodeLayoutDelegate.this.layoutNode, false, 1, null); } @Override // androidx.compose.ui.node.AlignmentLinesOwner public void requestMeasure() { LayoutNode.requestRemeasure$ui_release$default(LayoutNodeLayoutDelegate.this.layoutNode, false, false, 3, null); } public final void notifyChildrenUsingCoordinatesWhilePlacing() { MutableVector mutableVector; int size; if (LayoutNodeLayoutDelegate.this.getChildrenAccessingCoordinatesDuringPlacement() <= 0 || (size = (mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release()).getSize()) <= 0) { return; } LayoutNode[] content = mutableVector.getContent(); int i = 0; do { LayoutNode layoutNode = content[i]; LayoutNodeLayoutDelegate layoutDelegate = layoutNode.getLayoutDelegate(); if ((layoutDelegate.getCoordinatesAccessedDuringPlacement() || layoutDelegate.getCoordinatesAccessedDuringModifierPlacement()) && !layoutDelegate.getLayoutPending()) { LayoutNode.requestRelayout$ui_release$default(layoutNode, false, 1, null); } layoutDelegate.getMeasurePassDelegate().notifyChildrenUsingCoordinatesWhilePlacing(); i++; } while (i < size); } private final void onBeforeLayoutChildren() { LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; LayoutNodeLayoutDelegate layoutNodeLayoutDelegate = LayoutNodeLayoutDelegate.this; MutableVector mutableVector = layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); int i = 0; do { LayoutNode layoutNode2 = content[i]; if (layoutNode2.getMeasurePending$ui_release() && layoutNode2.getMeasuredByParent$ui_release() == LayoutNode.UsageByParent.InMeasureBlock && LayoutNode.m4015remeasure_Sx5XlM$ui_release$default(layoutNode2, null, 1, null)) { LayoutNode.requestRemeasure$ui_release$default(layoutNodeLayoutDelegate.layoutNode, false, false, 3, null); } i++; } while (i < size); } } public final void invalidateIntrinsicsParent(boolean forceRequest) { LayoutNode parent$ui_release; LayoutNode parent$ui_release2 = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); LayoutNode.UsageByParent intrinsicsUsageByParent = LayoutNodeLayoutDelegate.this.layoutNode.getIntrinsicsUsageByParent(); if (parent$ui_release2 == null || intrinsicsUsageByParent == LayoutNode.UsageByParent.NotUsed) { return; } while (parent$ui_release2.getIntrinsicsUsageByParent() == intrinsicsUsageByParent && (parent$ui_release = parent$ui_release2.getParent$ui_release()) != null) { parent$ui_release2 = parent$ui_release; } int i = WhenMappings.$EnumSwitchMapping$1[intrinsicsUsageByParent.ordinal()]; if (i == 1) { LayoutNode.requestRemeasure$ui_release$default(parent$ui_release2, forceRequest, false, 2, null); } else { if (i == 2) { parent$ui_release2.requestRelayout$ui_release(forceRequest); return; } throw new IllegalStateException("Intrinsics isn't used by the parent".toString()); } } public final void onNodeDetached() { this.placeOrder = Integer.MAX_VALUE; this.previousPlaceOrder = Integer.MAX_VALUE; setPlaced$ui_release(false); } public final void measureBasedOnLookahead() { LookaheadPassDelegate lookaheadPassDelegate = LayoutNodeLayoutDelegate.this.getLookaheadPassDelegate(); LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); Intrinsics.checkNotNull(parent$ui_release); if (lookaheadPassDelegate == null) { throw new IllegalArgumentException("Required value was null.".toString()); } if (lookaheadPassDelegate.getMeasuredByParent() == LayoutNode.UsageByParent.InMeasureBlock && parent$ui_release.getLayoutState$ui_release() == LayoutNode.LayoutState.Measuring) { Constraints lookaheadConstraints = lookaheadPassDelegate.getLookaheadConstraints(); Intrinsics.checkNotNull(lookaheadConstraints); mo3876measureBRTryo0(lookaheadConstraints.getValue()); } else if (lookaheadPassDelegate.getMeasuredByParent() == LayoutNode.UsageByParent.InLayoutBlock && parent$ui_release.getLayoutState$ui_release() == LayoutNode.LayoutState.LayingOut) { Constraints lookaheadConstraints2 = lookaheadPassDelegate.getLookaheadConstraints(); Intrinsics.checkNotNull(lookaheadConstraints2); mo3876measureBRTryo0(lookaheadConstraints2.getValue()); } } public final void placeBasedOnLookahead() { LookaheadPassDelegate lookaheadPassDelegate = LayoutNodeLayoutDelegate.this.getLookaheadPassDelegate(); if (lookaheadPassDelegate == null) { throw new IllegalArgumentException("Required value was null.".toString()); } mo3877placeAtf8xVGno(lookaheadPassDelegate.getLastPosition(), lookaheadPassDelegate.getLastZIndex(), lookaheadPassDelegate.getLastLayerBlock$ui_release()); } } /* compiled from: LayoutNodeLayoutDelegate.kt */ @Metadata(d1 = {"\u0000\u009e\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0007\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\b\n\u0002\u0010\u0000\n\u0002\b\f\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\b+\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0004\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u0003B\u0005¢\u0006\u0002\u0010\u0004J\u0014\u0010W\u001a\u000e\u0012\u0004\u0012\u00020Y\u0012\u0004\u0012\u00020B0XH\u0016J\b\u0010Z\u001a\u00020&H\u0002J\b\u0010[\u001a\u00020&H\u0002J\u001c\u0010\\\u001a\u00020&2\u0012\u0010]\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020&0$H\u0016J!\u0010^\u001a\u00020&2\u0016\u0010]\u001a\u0012\u0012\b\u0012\u00060\u0000R\u00020\u0007\u0012\u0004\u0012\u00020&0$H\u0082\bJ\u0011\u0010_\u001a\u00020B2\u0006\u0010`\u001a\u00020YH\u0096\u0002J\u000e\u0010a\u001a\u00020&2\u0006\u0010b\u001a\u00020\u0011J\u0006\u0010c\u001a\u00020&J\b\u0010d\u001a\u00020&H\u0016J\b\u0010e\u001a\u00020&H\u0002J\b\u0010f\u001a\u00020&H\u0002J\u0010\u0010g\u001a\u00020B2\u0006\u0010h\u001a\u00020BH\u0016J\u0010\u0010i\u001a\u00020B2\u0006\u0010j\u001a\u00020BH\u0016J\u001d\u0010k\u001a\u00020\u00012\u0006\u0010l\u001a\u00020 H\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\bm\u0010nJ\u0010\u0010o\u001a\u00020B2\u0006\u0010h\u001a\u00020BH\u0016J\u0010\u0010p\u001a\u00020B2\u0006\u0010j\u001a\u00020BH\u0016J\u0006\u0010q\u001a\u00020&J\b\u0010r\u001a\u00020&H\u0002J\b\u0010s\u001a\u00020&H\u0002J\u0006\u0010t\u001a\u00020&J\r\u0010u\u001a\u00020&H\u0000¢\u0006\u0002\bvJ@\u0010w\u001a\u00020&2\u0006\u0010x\u001a\u00020+2\u0006\u0010y\u001a\u0002002\u0019\u0010z\u001a\u0015\u0012\u0004\u0012\u00020%\u0012\u0004\u0012\u00020&\u0018\u00010$¢\u0006\u0002\b'H\u0014ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b{\u0010|J\u001b\u0010}\u001a\u00020\u00112\u0006\u0010l\u001a\u00020 ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b~\u0010\u007fJ\u0007\u0010\u0080\u0001\u001a\u00020&J\t\u0010\u0081\u0001\u001a\u00020&H\u0016J\t\u0010\u0082\u0001\u001a\u00020&H\u0016J\u0013\u0010\u0083\u0001\u001a\u00020&2\b\u0010\u0084\u0001\u001a\u00030\u0085\u0001H\u0002J\u0007\u0010\u0086\u0001\u001a\u00020\u0011R\u0018\u0010\u0005\u001a\f\u0012\b\u0012\u00060\u0000R\u00020\u00070\u0006X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\b\u001a\u00020\tX\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u001e\u0010\f\u001a\f\u0012\b\u0012\u00060\u0000R\u00020\u00070\r8@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b\u000e\u0010\u000fR\u001a\u0010\u0010\u001a\u00020\u0011X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0012\u0010\u0013\"\u0004\b\u0014\u0010\u0015R\u001a\u0010\u0016\u001a\u00020\u0011X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0017\u0010\u0013\"\u0004\b\u0018\u0010\u0015R\u0014\u0010\u0019\u001a\u00020\u001a8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u001b\u0010\u001cR\u001a\u0010\u001d\u001a\u00020\u0011X\u0096\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001d\u0010\u0013\"\u0004\b\u001e\u0010\u0015R\u001c\u0010\u001f\u001a\u0004\u0018\u00010 8Fø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b!\u0010\"RD\u0010(\u001a\u0015\u0012\u0004\u0012\u00020%\u0012\u0004\u0012\u00020&\u0018\u00010$¢\u0006\u0002\b'2\u0019\u0010#\u001a\u0015\u0012\u0004\u0012\u00020%\u0012\u0004\u0012\u00020&\u0018\u00010$¢\u0006\u0002\b'@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\b)\u0010*R)\u0010,\u001a\u00020+2\u0006\u0010#\u001a\u00020+@BX\u0080\u000eø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\n\n\u0002\u0010/\u001a\u0004\b-\u0010.R\u001e\u00101\u001a\u0002002\u0006\u0010#\u001a\u000200@BX\u0080\u000e¢\u0006\b\n\u0000\u001a\u0004\b2\u00103R\u001e\u00104\u001a\u00020\u00112\u0006\u0010#\u001a\u00020\u0011@BX\u0086\u000e¢\u0006\b\n\u0000\u001a\u0004\b5\u0010\u0013R\u0019\u00106\u001a\u0004\u0018\u00010 X\u0082\u000eø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0002\n\u0000R\u0018\u00107\u001a\u000608R\u00020\u00078@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b9\u0010:R\u001a\u0010;\u001a\u00020\"\u0004\b?\u0010@R\u0014\u0010A\u001a\u00020B8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\bC\u0010DR\u000e\u0010E\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u0014\u0010F\u001a\u00020B8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\bG\u0010DR\u0016\u0010H\u001a\u0004\u0018\u00010\u00038VX\u0096\u0004¢\u0006\u0006\u001a\u0004\bI\u0010JR\"\u0010L\u001a\u0004\u0018\u00010K2\b\u0010#\u001a\u0004\u0018\u00010K@RX\u0096\u000e¢\u0006\b\n\u0000\u001a\u0004\bM\u0010NR\u000e\u0010O\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u001a\u0010P\u001a\u00020BX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bQ\u0010D\"\u0004\bR\u0010SR\u000e\u0010T\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u0018\u0010U\u001a\u00020B2\u0006\u0010#\u001a\u00020B@BX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010V\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u0006\u0087\u0001"}, d2 = {"Landroidx/compose/ui/node/LayoutNodeLayoutDelegate$LookaheadPassDelegate;", "Landroidx/compose/ui/layout/Placeable;", "Landroidx/compose/ui/layout/Measurable;", "Landroidx/compose/ui/node/AlignmentLinesOwner;", "(Landroidx/compose/ui/node/LayoutNodeLayoutDelegate;)V", "_childDelegates", "Landroidx/compose/runtime/collection/MutableVector;", "Landroidx/compose/ui/node/LayoutNodeLayoutDelegate;", "alignmentLines", "Landroidx/compose/ui/node/AlignmentLines;", "getAlignmentLines", "()Landroidx/compose/ui/node/AlignmentLines;", "childDelegates", "", "getChildDelegates$ui_release", "()Ljava/util/List;", "childDelegatesDirty", "", "getChildDelegatesDirty$ui_release", "()Z", "setChildDelegatesDirty$ui_release", "(Z)V", "duringAlignmentLinesQuery", "getDuringAlignmentLinesQuery$ui_release", "setDuringAlignmentLinesQuery$ui_release", "innerCoordinator", "Landroidx/compose/ui/node/NodeCoordinator;", "getInnerCoordinator", "()Landroidx/compose/ui/node/NodeCoordinator;", "isPlaced", "setPlaced", "lastConstraints", "Landroidx/compose/ui/unit/Constraints;", "getLastConstraints-DWUhwKw", "()Landroidx/compose/ui/unit/Constraints;", "", "Lkotlin/Function1;", "Landroidx/compose/ui/graphics/GraphicsLayerScope;", "", "Lkotlin/ExtensionFunctionType;", "lastLayerBlock", "getLastLayerBlock$ui_release", "()Lkotlin/jvm/functions/Function1;", "Landroidx/compose/ui/unit/IntOffset;", "lastPosition", "getLastPosition-nOcc-ac$ui_release", "()J", "J", "", "lastZIndex", "getLastZIndex$ui_release", "()F", "layingOutChildren", "getLayingOutChildren", "lookaheadConstraints", "measurePassDelegate", "Landroidx/compose/ui/node/LayoutNodeLayoutDelegate$MeasurePassDelegate;", "getMeasurePassDelegate$ui_release", "()Landroidx/compose/ui/node/LayoutNodeLayoutDelegate$MeasurePassDelegate;", "measuredByParent", "Landroidx/compose/ui/node/LayoutNode$UsageByParent;", "getMeasuredByParent$ui_release", "()Landroidx/compose/ui/node/LayoutNode$UsageByParent;", "setMeasuredByParent$ui_release", "(Landroidx/compose/ui/node/LayoutNode$UsageByParent;)V", "measuredHeight", "", "getMeasuredHeight", "()I", "measuredOnce", "measuredWidth", "getMeasuredWidth", "parentAlignmentLinesOwner", "getParentAlignmentLinesOwner", "()Landroidx/compose/ui/node/AlignmentLinesOwner;", "", "parentData", "getParentData", "()Ljava/lang/Object;", "parentDataDirty", "placeOrder", "getPlaceOrder$ui_release", "setPlaceOrder$ui_release", "(I)V", "placedOnce", "previousPlaceOrder", "relayoutWithoutParentInProgress", "calculateAlignmentLines", "", "Landroidx/compose/ui/layout/AlignmentLine;", "checkChildrenPlaceOrderForUpdates", "clearPlaceOrder", "forEachChildAlignmentLinesOwner", "block", "forEachChildDelegate", "get", "alignmentLine", "invalidateIntrinsicsParent", "forceRequest", "invalidateParentData", "layoutChildren", "markNodeAndSubtreeAsPlaced", "markSubtreeAsNotPlaced", "maxIntrinsicHeight", ViewHierarchyNode.JsonKeys.WIDTH, "maxIntrinsicWidth", ViewHierarchyNode.JsonKeys.HEIGHT, "measure", "constraints", "measure-BRTryo0", "(J)Landroidx/compose/ui/layout/Placeable;", "minIntrinsicHeight", "minIntrinsicWidth", "notifyChildrenUsingCoordinatesWhilePlacing", "onBeforeLayoutChildren", "onIntrinsicsQueried", "onNodeDetached", "onNodePlaced", "onNodePlaced$ui_release", "placeAt", "position", "zIndex", "layerBlock", "placeAt-f8xVGno", "(JFLkotlin/jvm/functions/Function1;)V", "remeasure", "remeasure-BRTryo0", "(J)Z", "replace", "requestLayout", "requestMeasure", "trackLookaheadMeasurementByParent", "node", "Landroidx/compose/ui/node/LayoutNode;", "updateParentData", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class LookaheadPassDelegate extends Placeable implements Measurable, AlignmentLinesOwner { private boolean duringAlignmentLinesQuery; private boolean isPlaced; private Function1 lastLayerBlock; private float lastZIndex; private boolean layingOutChildren; private Constraints lookaheadConstraints; private boolean measuredOnce; private boolean placedOnce; private boolean relayoutWithoutParentInProgress; private int previousPlaceOrder = Integer.MAX_VALUE; private int placeOrder = Integer.MAX_VALUE; private LayoutNode.UsageByParent measuredByParent = LayoutNode.UsageByParent.NotUsed; private long lastPosition = IntOffset.INSTANCE.m5011getZeronOccac(); private final AlignmentLines alignmentLines = new LookaheadAlignmentLines(this); private final MutableVector _childDelegates = new MutableVector<>(new LookaheadPassDelegate[16], 0); private boolean childDelegatesDirty = true; private boolean parentDataDirty = true; private Object parentData = getMeasurePassDelegate$ui_release().getParentData(); /* compiled from: LayoutNodeLayoutDelegate.kt */ @Metadata(k = 3, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public /* synthetic */ class WhenMappings { public static final /* synthetic */ int[] $EnumSwitchMapping$0; public static final /* synthetic */ int[] $EnumSwitchMapping$1; static { int[] iArr = new int[LayoutNode.LayoutState.values().length]; try { iArr[LayoutNode.LayoutState.LookaheadMeasuring.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { iArr[LayoutNode.LayoutState.Measuring.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { iArr[LayoutNode.LayoutState.LayingOut.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { iArr[LayoutNode.LayoutState.LookaheadLayingOut.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } $EnumSwitchMapping$0 = iArr; int[] iArr2 = new int[LayoutNode.UsageByParent.values().length]; try { iArr2[LayoutNode.UsageByParent.InMeasureBlock.ordinal()] = 1; } catch (NoSuchFieldError unused5) { } try { iArr2[LayoutNode.UsageByParent.InLayoutBlock.ordinal()] = 2; } catch (NoSuchFieldError unused6) { } $EnumSwitchMapping$1 = iArr2; } } @Override // androidx.compose.ui.node.AlignmentLinesOwner public AlignmentLines getAlignmentLines() { return this.alignmentLines; } /* renamed from: getChildDelegatesDirty$ui_release, reason: from getter */ public final boolean getChildDelegatesDirty() { return this.childDelegatesDirty; } /* renamed from: getDuringAlignmentLinesQuery$ui_release, reason: from getter */ public final boolean getDuringAlignmentLinesQuery() { return this.duringAlignmentLinesQuery; } /* renamed from: getLastConstraints-DWUhwKw, reason: not valid java name and from getter */ public final Constraints getLookaheadConstraints() { return this.lookaheadConstraints; } public final Function1 getLastLayerBlock$ui_release() { return this.lastLayerBlock; } /* renamed from: getLastPosition-nOcc-ac$ui_release, reason: not valid java name and from getter */ public final long getLastPosition() { return this.lastPosition; } /* renamed from: getLastZIndex$ui_release, reason: from getter */ public final float getLastZIndex() { return this.lastZIndex; } public final boolean getLayingOutChildren() { return this.layingOutChildren; } /* renamed from: getMeasuredByParent$ui_release, reason: from getter */ public final LayoutNode.UsageByParent getMeasuredByParent() { return this.measuredByParent; } @Override // androidx.compose.ui.layout.Measured, androidx.compose.ui.layout.IntrinsicMeasurable public Object getParentData() { return this.parentData; } /* renamed from: getPlaceOrder$ui_release, reason: from getter */ public final int getPlaceOrder() { return this.placeOrder; } public final void invalidateParentData() { this.parentDataDirty = true; } @Override // androidx.compose.ui.node.AlignmentLinesOwner /* renamed from: isPlaced, reason: from getter */ public boolean getIsPlaced() { return this.isPlaced; } public final void setChildDelegatesDirty$ui_release(boolean z) { this.childDelegatesDirty = z; } public final void setDuringAlignmentLinesQuery$ui_release(boolean z) { this.duringAlignmentLinesQuery = z; } public final void setMeasuredByParent$ui_release(LayoutNode.UsageByParent usageByParent) { Intrinsics.checkNotNullParameter(usageByParent, ""); this.measuredByParent = usageByParent; } public final void setPlaceOrder$ui_release(int i) { this.placeOrder = i; } public void setPlaced(boolean z) { this.isPlaced = z; } public LookaheadPassDelegate() { } public final MeasurePassDelegate getMeasurePassDelegate$ui_release() { return LayoutNodeLayoutDelegate.this.getMeasurePassDelegate(); } @Override // androidx.compose.ui.node.AlignmentLinesOwner public NodeCoordinator getInnerCoordinator() { return LayoutNodeLayoutDelegate.this.layoutNode.getInnerCoordinator$ui_release(); } public final List getChildDelegates$ui_release() { LayoutNodeLayoutDelegate.this.layoutNode.getChildren$ui_release(); if (this.childDelegatesDirty) { LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; MutableVector mutableVector = this._childDelegates; MutableVector mutableVector2 = layoutNode.get_children$ui_release(); int size = mutableVector2.getSize(); if (size > 0) { LayoutNode[] content = mutableVector2.getContent(); int i = 0; do { LayoutNode layoutNode2 = content[i]; if (mutableVector.getSize() <= i) { LookaheadPassDelegate lookaheadPassDelegate = layoutNode2.getLayoutDelegate().getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate); mutableVector.add(lookaheadPassDelegate); } else { LookaheadPassDelegate lookaheadPassDelegate2 = layoutNode2.getLayoutDelegate().getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate2); mutableVector.set(i, lookaheadPassDelegate2); } i++; } while (i < size); } mutableVector.removeRange(layoutNode.getChildren$ui_release().size(), mutableVector.getSize()); this.childDelegatesDirty = false; return this._childDelegates.asMutableList(); } return this._childDelegates.asMutableList(); } private final void forEachChildDelegate(Function1 block) { MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); int i = 0; do { LookaheadPassDelegate lookaheadPassDelegate = content[i].getLayoutDelegate().getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate); block.invoke(lookaheadPassDelegate); i++; } while (i < size); } } @Override // androidx.compose.ui.node.AlignmentLinesOwner public void layoutChildren() { this.layingOutChildren = true; getAlignmentLines().recalculateQueryOwner(); if (LayoutNodeLayoutDelegate.this.getLookaheadLayoutPending()) { onBeforeLayoutChildren(); } final LookaheadDelegate lookaheadDelegate = getInnerCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); if (LayoutNodeLayoutDelegate.this.lookaheadLayoutPendingForAlignment || (!this.duringAlignmentLinesQuery && !lookaheadDelegate.getIsPlacingForAlignment() && LayoutNodeLayoutDelegate.this.getLookaheadLayoutPending())) { LayoutNodeLayoutDelegate.this.lookaheadLayoutPending = false; LayoutNode.LayoutState layoutState = LayoutNodeLayoutDelegate.this.getLayoutState(); LayoutNodeLayoutDelegate.this.layoutState = LayoutNode.LayoutState.LookaheadLayingOut; Owner requireOwner = LayoutNodeKt.requireOwner(LayoutNodeLayoutDelegate.this.layoutNode); LayoutNodeLayoutDelegate.this.setCoordinatesAccessedDuringPlacement(false); OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release$default(requireOwner.getSnapshotObserver(), LayoutNodeLayoutDelegate.this.layoutNode, false, new Function0() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$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(0); } @Override // kotlin.jvm.functions.Function0 public /* bridge */ /* synthetic */ Unit invoke() { invoke2(); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2() { LayoutNodeLayoutDelegate.LookaheadPassDelegate.this.clearPlaceOrder(); LayoutNodeLayoutDelegate.LookaheadPassDelegate.this.forEachChildAlignmentLinesOwner(new Function1() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.1 @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(AlignmentLinesOwner alignmentLinesOwner) { invoke2(alignmentLinesOwner); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(AlignmentLinesOwner child) { Intrinsics.checkNotNullParameter(child, "child"); child.getAlignmentLines().setUsedDuringParentLayout$ui_release(false); } }); lookaheadDelegate.getMeasureResult$ui_release().placeChildren(); LayoutNodeLayoutDelegate.LookaheadPassDelegate.this.checkChildrenPlaceOrderForUpdates(); LayoutNodeLayoutDelegate.LookaheadPassDelegate.this.forEachChildAlignmentLinesOwner(new Function1() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.2 @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(AlignmentLinesOwner alignmentLinesOwner) { invoke2(alignmentLinesOwner); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(AlignmentLinesOwner child) { Intrinsics.checkNotNullParameter(child, "child"); child.getAlignmentLines().setPreviousUsedDuringParentLayout$ui_release(child.getAlignmentLines().getUsedDuringParentLayout()); } }); } }, 2, null); LayoutNodeLayoutDelegate.this.layoutState = layoutState; if (LayoutNodeLayoutDelegate.this.getCoordinatesAccessedDuringPlacement() && lookaheadDelegate.getIsPlacingForAlignment()) { requestLayout(); } LayoutNodeLayoutDelegate.this.lookaheadLayoutPendingForAlignment = false; } if (getAlignmentLines().getUsedDuringParentLayout()) { getAlignmentLines().setPreviousUsedDuringParentLayout$ui_release(true); } if (getAlignmentLines().getDirty() && getAlignmentLines().getRequired$ui_release()) { getAlignmentLines().recalculate(); } this.layingOutChildren = false; } private final void markSubtreeAsNotPlaced() { if (getIsPlaced()) { int i = 0; setPlaced(false); MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); do { LookaheadPassDelegate lookaheadPassDelegate = content[i].getLayoutDelegate().getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate); lookaheadPassDelegate.markSubtreeAsNotPlaced(); i++; } while (i < size); } } } @Override // androidx.compose.ui.node.AlignmentLinesOwner public Map calculateAlignmentLines() { if (!this.duringAlignmentLinesQuery) { if (LayoutNodeLayoutDelegate.this.getLayoutState() == LayoutNode.LayoutState.LookaheadMeasuring) { getAlignmentLines().setUsedByModifierMeasurement$ui_release(true); if (getAlignmentLines().getDirty()) { LayoutNodeLayoutDelegate.this.markLookaheadLayoutPending$ui_release(); } } else { getAlignmentLines().setUsedByModifierLayout$ui_release(true); } } LookaheadDelegate lookaheadDelegate = getInnerCoordinator().getLookaheadDelegate(); if (lookaheadDelegate != null) { lookaheadDelegate.setPlacingForAlignment$ui_release(true); } layoutChildren(); LookaheadDelegate lookaheadDelegate2 = getInnerCoordinator().getLookaheadDelegate(); if (lookaheadDelegate2 != null) { lookaheadDelegate2.setPlacingForAlignment$ui_release(false); } return getAlignmentLines().getLastCalculation(); } @Override // androidx.compose.ui.node.AlignmentLinesOwner public AlignmentLinesOwner getParentAlignmentLinesOwner() { LayoutNodeLayoutDelegate layoutDelegate; LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if (parent$ui_release == null || (layoutDelegate = parent$ui_release.getLayoutDelegate()) == null) { return null; } return layoutDelegate.getLookaheadAlignmentLinesOwner$ui_release(); } @Override // androidx.compose.ui.node.AlignmentLinesOwner public void forEachChildAlignmentLinesOwner(Function1 block) { Intrinsics.checkNotNullParameter(block, "block"); MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); int i = 0; do { AlignmentLinesOwner lookaheadAlignmentLinesOwner$ui_release = content[i].getLayoutDelegate().getLookaheadAlignmentLinesOwner$ui_release(); Intrinsics.checkNotNull(lookaheadAlignmentLinesOwner$ui_release); block.invoke(lookaheadAlignmentLinesOwner$ui_release); i++; } while (i < size); } } @Override // androidx.compose.ui.node.AlignmentLinesOwner public void requestLayout() { LayoutNode.requestLookaheadRelayout$ui_release$default(LayoutNodeLayoutDelegate.this.layoutNode, false, 1, null); } @Override // androidx.compose.ui.node.AlignmentLinesOwner public void requestMeasure() { LayoutNode.requestLookaheadRemeasure$ui_release$default(LayoutNodeLayoutDelegate.this.layoutNode, false, false, 3, null); } public final void notifyChildrenUsingCoordinatesWhilePlacing() { MutableVector mutableVector; int size; if (LayoutNodeLayoutDelegate.this.getChildrenAccessingCoordinatesDuringPlacement() <= 0 || (size = (mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release()).getSize()) <= 0) { return; } LayoutNode[] content = mutableVector.getContent(); int i = 0; do { LayoutNode layoutNode = content[i]; LayoutNodeLayoutDelegate layoutDelegate = layoutNode.getLayoutDelegate(); if ((layoutDelegate.getCoordinatesAccessedDuringPlacement() || layoutDelegate.getCoordinatesAccessedDuringModifierPlacement()) && !layoutDelegate.getLayoutPending()) { LayoutNode.requestLookaheadRelayout$ui_release$default(layoutNode, false, 1, null); } LookaheadPassDelegate lookaheadPassDelegate = layoutDelegate.getLookaheadPassDelegate(); if (lookaheadPassDelegate != null) { lookaheadPassDelegate.notifyChildrenUsingCoordinatesWhilePlacing(); } i++; } while (i < size); } @Override // androidx.compose.ui.layout.Measurable /* renamed from: measure-BRTryo0 */ public Placeable mo3876measureBRTryo0(long constraints) { trackLookaheadMeasurementByParent(LayoutNodeLayoutDelegate.this.layoutNode); if (LayoutNodeLayoutDelegate.this.layoutNode.getIntrinsicsUsageByParent() == LayoutNode.UsageByParent.NotUsed) { LayoutNodeLayoutDelegate.this.layoutNode.clearSubtreeIntrinsicsUsage$ui_release(); } m4036remeasureBRTryo0(constraints); return this; } private final void trackLookaheadMeasurementByParent(LayoutNode node) { LayoutNode.UsageByParent usageByParent; LayoutNode parent$ui_release = node.getParent$ui_release(); if (parent$ui_release != null) { if (this.measuredByParent != LayoutNode.UsageByParent.NotUsed && !node.getCanMultiMeasure()) { throw new IllegalStateException("measure() may not be called multiple times on the same Measurable. If you want to get the content size of the Measurable before calculating the final constraints, please use methods like minIntrinsicWidth()/maxIntrinsicWidth() and minIntrinsicHeight()/maxIntrinsicHeight()".toString()); } int i = WhenMappings.$EnumSwitchMapping$0[parent$ui_release.getLayoutState$ui_release().ordinal()]; if (i == 1 || i == 2) { usageByParent = LayoutNode.UsageByParent.InMeasureBlock; } else if (i == 3 || i == 4) { usageByParent = LayoutNode.UsageByParent.InLayoutBlock; } else { throw new IllegalStateException("Measurable could be only measured from the parent's measure or layout block. Parents state is " + parent$ui_release.getLayoutState$ui_release()); } this.measuredByParent = usageByParent; return; } this.measuredByParent = LayoutNode.UsageByParent.NotUsed; } /* renamed from: remeasure-BRTryo0, reason: not valid java name */ public final boolean m4036remeasureBRTryo0(long constraints) { Constraints constraints2; LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); LayoutNodeLayoutDelegate.this.layoutNode.setCanMultiMeasure$ui_release(LayoutNodeLayoutDelegate.this.layoutNode.getCanMultiMeasure() || (parent$ui_release != null && parent$ui_release.getCanMultiMeasure())); if (!LayoutNodeLayoutDelegate.this.layoutNode.getLookaheadMeasurePending$ui_release() && (constraints2 = this.lookaheadConstraints) != null && Constraints.m4832equalsimpl0(constraints2.getValue(), constraints)) { Owner owner = LayoutNodeLayoutDelegate.this.layoutNode.getOwner(); if (owner != null) { owner.forceMeasureTheSubtree(LayoutNodeLayoutDelegate.this.layoutNode, true); } LayoutNodeLayoutDelegate.this.layoutNode.resetSubtreeIntrinsicsUsage$ui_release(); return false; } this.lookaheadConstraints = Constraints.m4827boximpl(constraints); getAlignmentLines().setUsedByModifierMeasurement$ui_release(false); forEachChildAlignmentLinesOwner(new Function1() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$remeasure$1 @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(AlignmentLinesOwner alignmentLinesOwner) { invoke2(alignmentLinesOwner); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(AlignmentLinesOwner it) { Intrinsics.checkNotNullParameter(it, "it"); it.getAlignmentLines().setUsedDuringParentMeasurement$ui_release(false); } }); this.measuredOnce = true; LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); if (lookaheadDelegate == null) { throw new IllegalStateException("Lookahead result from lookaheadRemeasure cannot be null".toString()); } long IntSize = IntSizeKt.IntSize(lookaheadDelegate.getWidth(), lookaheadDelegate.getHeight()); LayoutNodeLayoutDelegate.this.m4030performLookaheadMeasureBRTryo0(constraints); m3931setMeasuredSizeozmzZPI(IntSizeKt.IntSize(lookaheadDelegate.getWidth(), lookaheadDelegate.getHeight())); return (IntSize.m5043getWidthimpl(IntSize) == lookaheadDelegate.getWidth() && IntSize.m5042getHeightimpl(IntSize) == lookaheadDelegate.getHeight()) ? false : true; } /* JADX INFO: Access modifiers changed from: protected */ @Override // androidx.compose.ui.layout.Placeable /* renamed from: placeAt-f8xVGno */ public void mo3877placeAtf8xVGno(final long position, float zIndex, Function1 layerBlock) { LayoutNodeLayoutDelegate.this.layoutState = LayoutNode.LayoutState.LookaheadLayingOut; this.placedOnce = true; if (!IntOffset.m5000equalsimpl0(position, this.lastPosition)) { if (LayoutNodeLayoutDelegate.this.getCoordinatesAccessedDuringModifierPlacement() || LayoutNodeLayoutDelegate.this.getCoordinatesAccessedDuringPlacement()) { LayoutNodeLayoutDelegate.this.lookaheadLayoutPending = true; } notifyChildrenUsingCoordinatesWhilePlacing(); } Owner requireOwner = LayoutNodeKt.requireOwner(LayoutNodeLayoutDelegate.this.layoutNode); if (!LayoutNodeLayoutDelegate.this.getLookaheadLayoutPending() && getIsPlaced()) { onNodePlaced$ui_release(); } else { LayoutNodeLayoutDelegate.this.setCoordinatesAccessedDuringModifierPlacement(false); getAlignmentLines().setUsedByModifierLayout$ui_release(false); OwnerSnapshotObserver snapshotObserver = requireOwner.getSnapshotObserver(); LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; final LayoutNodeLayoutDelegate layoutNodeLayoutDelegate = LayoutNodeLayoutDelegate.this; OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release$default(snapshotObserver, layoutNode, false, new Function0() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$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(0); } @Override // kotlin.jvm.functions.Function0 public /* bridge */ /* synthetic */ Unit invoke() { invoke2(); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2() { Placeable.PlacementScope.Companion companion = Placeable.PlacementScope.INSTANCE; LayoutNodeLayoutDelegate layoutNodeLayoutDelegate2 = LayoutNodeLayoutDelegate.this; long j = position; LookaheadDelegate lookaheadDelegate = layoutNodeLayoutDelegate2.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); Placeable.PlacementScope.m3933place70tqf50$default(companion, lookaheadDelegate, j, 0.0f, 2, null); } }, 2, null); } this.lastPosition = position; this.lastZIndex = zIndex; this.lastLayerBlock = layerBlock; LayoutNodeLayoutDelegate.this.layoutState = LayoutNode.LayoutState.Idle; } @Override // androidx.compose.ui.layout.Placeable, androidx.compose.ui.layout.Measured public int getMeasuredWidth() { LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); return lookaheadDelegate.getMeasuredWidth(); } @Override // androidx.compose.ui.layout.Placeable, androidx.compose.ui.layout.Measured public int getMeasuredHeight() { LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); return lookaheadDelegate.getMeasuredHeight(); } @Override // androidx.compose.ui.layout.Measured public int get(AlignmentLine alignmentLine) { Intrinsics.checkNotNullParameter(alignmentLine, "alignmentLine"); LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if ((parent$ui_release != null ? parent$ui_release.getLayoutState$ui_release() : null) != LayoutNode.LayoutState.LookaheadMeasuring) { LayoutNode parent$ui_release2 = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if ((parent$ui_release2 != null ? parent$ui_release2.getLayoutState$ui_release() : null) == LayoutNode.LayoutState.LookaheadLayingOut) { getAlignmentLines().setUsedDuringParentLayout$ui_release(true); } } else { getAlignmentLines().setUsedDuringParentMeasurement$ui_release(true); } this.duringAlignmentLinesQuery = true; LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); int i = lookaheadDelegate.get(alignmentLine); this.duringAlignmentLinesQuery = false; return i; } @Override // androidx.compose.ui.layout.IntrinsicMeasurable public int minIntrinsicWidth(int height) { onIntrinsicsQueried(); LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); return lookaheadDelegate.minIntrinsicWidth(height); } @Override // androidx.compose.ui.layout.IntrinsicMeasurable public int maxIntrinsicWidth(int height) { onIntrinsicsQueried(); LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); return lookaheadDelegate.maxIntrinsicWidth(height); } @Override // androidx.compose.ui.layout.IntrinsicMeasurable public int minIntrinsicHeight(int width) { onIntrinsicsQueried(); LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); return lookaheadDelegate.minIntrinsicHeight(width); } @Override // androidx.compose.ui.layout.IntrinsicMeasurable public int maxIntrinsicHeight(int width) { onIntrinsicsQueried(); LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); return lookaheadDelegate.maxIntrinsicHeight(width); } private final void onIntrinsicsQueried() { LayoutNode.UsageByParent usageByParent; LayoutNode.requestLookaheadRemeasure$ui_release$default(LayoutNodeLayoutDelegate.this.layoutNode, false, false, 3, null); LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if (parent$ui_release == null || LayoutNodeLayoutDelegate.this.layoutNode.getIntrinsicsUsageByParent() != LayoutNode.UsageByParent.NotUsed) { return; } LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; int i = WhenMappings.$EnumSwitchMapping$0[parent$ui_release.getLayoutState$ui_release().ordinal()]; if (i == 2) { usageByParent = LayoutNode.UsageByParent.InMeasureBlock; } else if (i == 3) { usageByParent = LayoutNode.UsageByParent.InLayoutBlock; } else { usageByParent = parent$ui_release.getIntrinsicsUsageByParent(); } layoutNode.setIntrinsicsUsageByParent$ui_release(usageByParent); } public final void invalidateIntrinsicsParent(boolean forceRequest) { LayoutNode parent$ui_release; LayoutNode parent$ui_release2 = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); LayoutNode.UsageByParent intrinsicsUsageByParent = LayoutNodeLayoutDelegate.this.layoutNode.getIntrinsicsUsageByParent(); if (parent$ui_release2 == null || intrinsicsUsageByParent == LayoutNode.UsageByParent.NotUsed) { return; } while (parent$ui_release2.getIntrinsicsUsageByParent() == intrinsicsUsageByParent && (parent$ui_release = parent$ui_release2.getParent$ui_release()) != null) { parent$ui_release2 = parent$ui_release; } int i = WhenMappings.$EnumSwitchMapping$1[intrinsicsUsageByParent.ordinal()]; if (i == 1) { if (parent$ui_release2.getLookaheadRoot() != null) { LayoutNode.requestLookaheadRemeasure$ui_release$default(parent$ui_release2, forceRequest, false, 2, null); return; } else { LayoutNode.requestRemeasure$ui_release$default(parent$ui_release2, forceRequest, false, 2, null); return; } } if (i == 2) { if (parent$ui_release2.getLookaheadRoot() != null) { parent$ui_release2.requestLookaheadRelayout$ui_release(forceRequest); return; } else { parent$ui_release2.requestRelayout$ui_release(forceRequest); return; } } throw new IllegalStateException("Intrinsics isn't used by the parent".toString()); } public final boolean updateParentData() { if (getParentData() == null) { LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); if (lookaheadDelegate.getParentData() == null) { return false; } } if (!this.parentDataDirty) { return false; } this.parentDataDirty = false; LookaheadDelegate lookaheadDelegate2 = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate2); this.parentData = lookaheadDelegate2.getParentData(); return true; } public final void onNodePlaced$ui_release() { LayoutNode parent$ui_release = LayoutNodeLayoutDelegate.this.layoutNode.getParent$ui_release(); if (!getIsPlaced()) { markNodeAndSubtreeAsPlaced(); } if (parent$ui_release == null) { this.placeOrder = 0; } else if (!this.relayoutWithoutParentInProgress && (parent$ui_release.getLayoutState$ui_release() == LayoutNode.LayoutState.LayingOut || parent$ui_release.getLayoutState$ui_release() == LayoutNode.LayoutState.LookaheadLayingOut)) { if (this.placeOrder == Integer.MAX_VALUE) { this.placeOrder = parent$ui_release.getLayoutDelegate().nextChildLookaheadPlaceOrder; parent$ui_release.getLayoutDelegate().nextChildLookaheadPlaceOrder++; } else { throw new IllegalStateException("Place was called on a node which was placed already".toString()); } } layoutChildren(); } /* JADX INFO: Access modifiers changed from: private */ public final void clearPlaceOrder() { int i = 0; LayoutNodeLayoutDelegate.this.nextChildLookaheadPlaceOrder = 0; MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); do { LookaheadPassDelegate lookaheadPassDelegate = content[i].getLayoutDelegate().getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate); lookaheadPassDelegate.previousPlaceOrder = lookaheadPassDelegate.placeOrder; lookaheadPassDelegate.placeOrder = Integer.MAX_VALUE; if (lookaheadPassDelegate.measuredByParent == LayoutNode.UsageByParent.InLayoutBlock) { lookaheadPassDelegate.measuredByParent = LayoutNode.UsageByParent.NotUsed; } i++; } while (i < size); } } private final void markNodeAndSubtreeAsPlaced() { boolean isPlaced = getIsPlaced(); setPlaced(true); int i = 0; if (!isPlaced && LayoutNodeLayoutDelegate.this.getLookaheadMeasurePending()) { LayoutNode.requestLookaheadRemeasure$ui_release$default(LayoutNodeLayoutDelegate.this.layoutNode, true, false, 2, null); } MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); do { LayoutNode layoutNode = content[i]; if (layoutNode.getPlaceOrder$ui_release() != Integer.MAX_VALUE) { LookaheadPassDelegate lookaheadPassDelegate$ui_release = layoutNode.getLookaheadPassDelegate$ui_release(); Intrinsics.checkNotNull(lookaheadPassDelegate$ui_release); lookaheadPassDelegate$ui_release.markNodeAndSubtreeAsPlaced(); layoutNode.rescheduleRemeasureOrRelayout$ui_release(layoutNode); } i++; } while (i < size); } } private final void onBeforeLayoutChildren() { LayoutNode layoutNode = LayoutNodeLayoutDelegate.this.layoutNode; LayoutNodeLayoutDelegate layoutNodeLayoutDelegate = LayoutNodeLayoutDelegate.this; MutableVector mutableVector = layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); int i = 0; do { LayoutNode layoutNode2 = content[i]; if (layoutNode2.getLookaheadMeasurePending$ui_release() && layoutNode2.getMeasuredByParentInLookahead$ui_release() == LayoutNode.UsageByParent.InMeasureBlock) { LookaheadPassDelegate lookaheadPassDelegate = layoutNode2.getLayoutDelegate().getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate); Constraints lookaheadConstraints = getLookaheadConstraints(); Intrinsics.checkNotNull(lookaheadConstraints); if (lookaheadPassDelegate.m4036remeasureBRTryo0(lookaheadConstraints.getValue())) { LayoutNode.requestLookaheadRemeasure$ui_release$default(layoutNodeLayoutDelegate.layoutNode, false, false, 3, null); } } i++; } while (i < size); } } public final void replace() { try { this.relayoutWithoutParentInProgress = true; if (!this.placedOnce) { throw new IllegalStateException("Check failed.".toString()); } mo3877placeAtf8xVGno(this.lastPosition, 0.0f, null); } finally { this.relayoutWithoutParentInProgress = false; } } public final void onNodeDetached() { this.placeOrder = Integer.MAX_VALUE; this.previousPlaceOrder = Integer.MAX_VALUE; setPlaced(false); } /* JADX INFO: Access modifiers changed from: private */ public final void checkChildrenPlaceOrderForUpdates() { MutableVector mutableVector = LayoutNodeLayoutDelegate.this.layoutNode.get_children$ui_release(); int size = mutableVector.getSize(); if (size > 0) { LayoutNode[] content = mutableVector.getContent(); int i = 0; do { LookaheadPassDelegate lookaheadPassDelegate = content[i].getLayoutDelegate().getLookaheadPassDelegate(); Intrinsics.checkNotNull(lookaheadPassDelegate); int i2 = lookaheadPassDelegate.previousPlaceOrder; int i3 = lookaheadPassDelegate.placeOrder; if (i2 != i3 && i3 == Integer.MAX_VALUE) { lookaheadPassDelegate.markSubtreeAsNotPlaced(); } i++; } while (i < size); } } } /* JADX INFO: Access modifiers changed from: private */ public final boolean isOutMostLookaheadRoot(LayoutNode layoutNode) { if (layoutNode.getLookaheadRoot() != null) { LayoutNode parent$ui_release = layoutNode.getParent$ui_release(); if ((parent$ui_release != null ? parent$ui_release.getLookaheadRoot() : null) == null) { return true; } } return false; } /* JADX INFO: Access modifiers changed from: private */ /* renamed from: performMeasure-BRTryo0, reason: not valid java name */ public final void m4031performMeasureBRTryo0(final long constraints) { if (this.layoutState != LayoutNode.LayoutState.Idle) { throw new IllegalStateException("layout state is not idle before measure starts".toString()); } this.layoutState = LayoutNode.LayoutState.Measuring; this.measurePending = false; LayoutNodeKt.requireOwner(this.layoutNode).getSnapshotObserver().observeMeasureSnapshotReads$ui_release(this.layoutNode, false, new Function0() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasure$2 /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ { super(0); } @Override // kotlin.jvm.functions.Function0 public /* bridge */ /* synthetic */ Unit invoke() { invoke2(); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2() { LayoutNodeLayoutDelegate.this.getOuterCoordinator().mo3876measureBRTryo0(constraints); } }); if (this.layoutState == LayoutNode.LayoutState.Measuring) { markLayoutPending$ui_release(); this.layoutState = LayoutNode.LayoutState.Idle; } } /* JADX INFO: Access modifiers changed from: private */ /* renamed from: performLookaheadMeasure-BRTryo0, reason: not valid java name */ public final void m4030performLookaheadMeasureBRTryo0(final long constraints) { this.layoutState = LayoutNode.LayoutState.LookaheadMeasuring; this.lookaheadMeasurePending = false; OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release$default(LayoutNodeKt.requireOwner(this.layoutNode).getSnapshotObserver(), this.layoutNode, false, new Function0() { // from class: androidx.compose.ui.node.LayoutNodeLayoutDelegate$performLookaheadMeasure$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(0); } @Override // kotlin.jvm.functions.Function0 public /* bridge */ /* synthetic */ Unit invoke() { invoke2(); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2() { LookaheadDelegate lookaheadDelegate = LayoutNodeLayoutDelegate.this.getOuterCoordinator().getLookaheadDelegate(); Intrinsics.checkNotNull(lookaheadDelegate); lookaheadDelegate.mo3876measureBRTryo0(constraints); } }, 2, null); markLookaheadLayoutPending$ui_release(); if (isOutMostLookaheadRoot(this.layoutNode)) { markLayoutPending$ui_release(); } else { markMeasurePending$ui_release(); } this.layoutState = LayoutNode.LayoutState.Idle; } public final void ensureLookaheadDelegateCreated$ui_release() { if (this.lookaheadPassDelegate == null) { this.lookaheadPassDelegate = new LookaheadPassDelegate(); } } public final void updateParentData() { LayoutNode parent$ui_release; if (this.measurePassDelegate.updateParentData() && (parent$ui_release = this.layoutNode.getParent$ui_release()) != null) { LayoutNode.requestRemeasure$ui_release$default(parent$ui_release, false, false, 3, null); } LookaheadPassDelegate lookaheadPassDelegate = this.lookaheadPassDelegate; if (lookaheadPassDelegate == null || !lookaheadPassDelegate.updateParentData()) { return; } if (isOutMostLookaheadRoot(this.layoutNode)) { LayoutNode parent$ui_release2 = this.layoutNode.getParent$ui_release(); if (parent$ui_release2 != null) { LayoutNode.requestRemeasure$ui_release$default(parent$ui_release2, false, false, 3, null); return; } return; } LayoutNode parent$ui_release3 = this.layoutNode.getParent$ui_release(); if (parent$ui_release3 != null) { LayoutNode.requestLookaheadRemeasure$ui_release$default(parent$ui_release3, false, false, 3, null); } } public final void invalidateParentData() { this.measurePassDelegate.invalidateParentData(); LookaheadPassDelegate lookaheadPassDelegate = this.lookaheadPassDelegate; if (lookaheadPassDelegate != null) { lookaheadPassDelegate.invalidateParentData(); } } public final void resetAlignmentLines() { AlignmentLines alignmentLines; this.measurePassDelegate.getAlignmentLines().reset$ui_release(); LookaheadPassDelegate lookaheadPassDelegate = this.lookaheadPassDelegate; if (lookaheadPassDelegate == null || (alignmentLines = lookaheadPassDelegate.getAlignmentLines()) == null) { return; } alignmentLines.reset$ui_release(); } public final void markChildrenDirty() { this.measurePassDelegate.setChildDelegatesDirty$ui_release(true); LookaheadPassDelegate lookaheadPassDelegate = this.lookaheadPassDelegate; if (lookaheadPassDelegate != null) { lookaheadPassDelegate.setChildDelegatesDirty$ui_release(true); } } }