alexandroid/decompiled/jadx/sources/androidx/compose/material/DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

190 lines
11 KiB
Java

package androidx.compose.material;
import androidx.compose.foundation.gestures.Orientation;
import androidx.compose.ui.geometry.Offset;
import androidx.compose.ui.geometry.OffsetKt;
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection;
import androidx.compose.ui.input.nestedscroll.NestedScrollSource;
import androidx.compose.ui.unit.Velocity;
import com.mapbox.maps.plugin.locationcomponent.ModelSourceWrapper;
import kotlin.Metadata;
import kotlin.jvm.JvmName;
import org.jetbrains.annotations.NotNull;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u00001\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0010\u0007\n\u0002\b\u0006*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J#\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u0007H\u0096@ø\u0001\u0000¢\u0006\u0004\b\n\u0010\u000bJ*\u0010\f\u001a\u00020\r2\u0006\u0010\b\u001a\u00020\r2\u0006\u0010\t\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000fH\u0016ø\u0001\u0000¢\u0006\u0004\b\u0010\u0010\u0011J\u001b\u0010\u0012\u001a\u00020\u00072\u0006\u0010\t\u001a\u00020\u0007H\u0096@ø\u0001\u0000¢\u0006\u0004\b\u0013\u0010\u0014J\"\u0010\u0015\u001a\u00020\r2\u0006\u0010\t\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000fH\u0016ø\u0001\u0000¢\u0006\u0004\b\u0016\u0010\u0017J\u0013\u0010\u0018\u001a\u00020\u0019*\u00020\rH\u0003¢\u0006\u0004\b\u001a\u0010\u001bJ\u0013\u0010\u0018\u001a\u00020\u0019*\u00020\u0007H\u0003¢\u0006\u0004\b\u001c\u0010\u001bJ\u0017\u0010\u001d\u001a\u00020\r*\u00020\u0019H\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0002\u0010\u001eR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0004\u0010\u0005\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u0006\u001f"}, d2 = {"androidx/compose/material/DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1", "Landroidx/compose/ui/input/nestedscroll/NestedScrollConnection;", ModelSourceWrapper.ORIENTATION, "Landroidx/compose/foundation/gestures/Orientation;", "getOrientation", "()Landroidx/compose/foundation/gestures/Orientation;", "onPostFling", "Landroidx/compose/ui/unit/Velocity;", "consumed", "available", "onPostFling-RZ2iAVY", "(JJLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "onPostScroll", "Landroidx/compose/ui/geometry/Offset;", "source", "Landroidx/compose/ui/input/nestedscroll/NestedScrollSource;", "onPostScroll-DzOQY0M", "(JJI)J", "onPreFling", "onPreFling-QWom1Mo", "(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "onPreScroll", "onPreScroll-OzD1aCk", "(JI)J", "toFloat", "", "offsetToFloat", "(J)F", "velocityToFloat", "toOffset", "(F)J", "material_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1 implements NestedScrollConnection {
final /* synthetic */ AnchoredDraggableState<?> $state;
@NotNull
private final Orientation orientation = Orientation.Vertical;
public DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1(AnchoredDraggableState<?> anchoredDraggableState) {
this.$state = anchoredDraggableState;
}
@JvmName(name = "offsetToFloat")
private final float offsetToFloat(long j) {
return this.orientation == Orientation.Horizontal ? Offset.m4400getXimpl(j) : Offset.m4401getYimpl(j);
}
private final long toOffset(float f) {
Orientation orientation = this.orientation;
float f2 = orientation == Orientation.Horizontal ? f : 0.0f;
if (orientation != Orientation.Vertical) {
f = 0.0f;
}
return OffsetKt.Offset(f2, f);
}
@JvmName(name = "velocityToFloat")
private final float velocityToFloat(long j) {
return this.orientation == Orientation.Horizontal ? Velocity.m7606getXimpl(j) : Velocity.m7607getYimpl(j);
}
@NotNull
public final Orientation getOrientation() {
return this.orientation;
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0033 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
@org.jetbrains.annotations.Nullable
/* renamed from: onPostFling-RZ2iAVY */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object mo666onPostFlingRZ2iAVY(long r3, long r5, @org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> r7) {
/*
r2 = this;
boolean r3 = r7 instanceof androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPostFling$1
if (r3 == 0) goto L13
r3 = r7
androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPostFling$1 r3 = (androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPostFling$1) r3
int r4 = r3.label
r0 = -2147483648(0xffffffff80000000, float:-0.0)
r1 = r4 & r0
if (r1 == 0) goto L13
int r4 = r4 - r0
r3.label = r4
goto L18
L13:
androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPostFling$1 r3 = new androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPostFling$1
r3.<init>(r2, r7)
L18:
java.lang.Object r4 = r3.result
java.lang.Object r7 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r0 = r3.label
r1 = 1
if (r0 == 0) goto L33
if (r0 != r1) goto L2b
long r5 = r3.J$0
kotlin.ResultKt.throwOnFailure(r4)
goto L47
L2b:
java.lang.String r2 = "call to 'resume' before 'invoke' with coroutine"
rx.Single$$ExternalSyntheticBUOutline0.m$2(r2)
r2 = 0
return r2
L33:
kotlin.ResultKt.throwOnFailure(r4)
androidx.compose.material.AnchoredDraggableState<?> r4 = r2.$state
float r2 = r2.velocityToFloat(r5)
r3.J$0 = r5
r3.label = r1
java.lang.Object r2 = r4.settle(r2, r3)
if (r2 != r7) goto L47
return r7
L47:
androidx.compose.ui.unit.Velocity r2 = androidx.compose.ui.unit.Velocity.m7597boximpl(r5)
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1.mo666onPostFlingRZ2iAVY(long, long, kotlin.coroutines.Continuation):java.lang.Object");
}
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
/* renamed from: onPostScroll-DzOQY0M */
public long mo667onPostScrollDzOQY0M(long consumed, long available, int source) {
return NestedScrollSource.m5823equalsimpl0(source, NestedScrollSource.INSTANCE.m5835getUserInputWNlRxjI()) ? toOffset(this.$state.dispatchRawDelta(offsetToFloat(available))) : Offset.INSTANCE.m4416getZeroF1C5BW0();
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0033 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
@org.jetbrains.annotations.Nullable
/* renamed from: onPreFling-QWom1Mo */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object mo940onPreFlingQWom1Mo(long r6, @org.jetbrains.annotations.NotNull kotlin.coroutines.Continuation<? super androidx.compose.ui.unit.Velocity> r8) {
/*
r5 = this;
boolean r0 = r8 instanceof androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPreFling$1
if (r0 == 0) goto L13
r0 = r8
androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPreFling$1 r0 = (androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPreFling$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPreFling$1 r0 = new androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1$onPreFling$1
r0.<init>(r5, r8)
L18:
java.lang.Object r8 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L33
if (r2 != r3) goto L2b
long r6 = r0.J$0
kotlin.ResultKt.throwOnFailure(r8)
goto L66
L2b:
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
rx.Single$$ExternalSyntheticBUOutline0.m$2(r5)
r5 = 0
return r5
L33:
kotlin.ResultKt.throwOnFailure(r8)
float r8 = r5.velocityToFloat(r6)
androidx.compose.material.AnchoredDraggableState<?> r2 = r5.$state
float r2 = r2.requireOffset()
r4 = 0
int r4 = (r8 > r4 ? 1 : (r8 == r4 ? 0 : -1))
if (r4 >= 0) goto L60
androidx.compose.material.AnchoredDraggableState<?> r4 = r5.$state
androidx.compose.material.DraggableAnchors r4 = r4.getAnchors()
float r4 = r4.minAnchor()
int r2 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))
if (r2 <= 0) goto L60
androidx.compose.material.AnchoredDraggableState<?> r5 = r5.$state
r0.J$0 = r6
r0.label = r3
java.lang.Object r5 = r5.settle(r8, r0)
if (r5 != r1) goto L66
return r1
L60:
androidx.compose.ui.unit.Velocity$Companion r5 = androidx.compose.ui.unit.Velocity.INSTANCE
long r6 = r5.m7617getZero9UxMQ8M()
L66:
androidx.compose.ui.unit.Velocity r5 = androidx.compose.ui.unit.Velocity.m7597boximpl(r6)
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.material.DrawerKt$ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection$1.mo940onPreFlingQWom1Mo(long, kotlin.coroutines.Continuation):java.lang.Object");
}
@Override // androidx.compose.ui.input.nestedscroll.NestedScrollConnection
/* renamed from: onPreScroll-OzD1aCk */
public long mo941onPreScrollOzD1aCk(long available, int source) {
float offsetToFloat = offsetToFloat(available);
return (offsetToFloat >= 0.0f || !NestedScrollSource.m5823equalsimpl0(source, NestedScrollSource.INSTANCE.m5835getUserInputWNlRxjI())) ? Offset.INSTANCE.m4416getZeroF1C5BW0() : toOffset(this.$state.dispatchRawDelta(offsetToFloat));
}
}