package defpackage;

import androidx.media3.container.NalUnitUtil;
import defpackage.um5;
import defpackage.xd7;
import java.io.Serializable;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b\u0000\u0018\u00002\u00020\u0001¨\u0006\u0002"}, d2 = {"Lie7;", "Lxd7;", "postgrest-kt_release"}, k = 1, mv = {2, 1, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@vx8
public final class ie7 implements xd7 {
    public final cc9 c;
    public final xd7.b d;
    public final vd9 e;
    public final m00 f;

    public ie7(cc9 cc9Var, xd7.b bVar) {
        cr4.g(cc9Var, "supabaseClient");
        cr4.g(bVar, "config");
        this.c = cc9Var;
        this.d = bVar;
        this.e = cc9Var.f();
        this.f = p00.a(cc9Var, this);
    }

    @Override // defpackage.um5
    public final String a(String str) {
        cr4.g(str, "path");
        return um5.a.a(this, str);
    }

    @Override // defpackage.um5
    public final String d() {
        xd7.b.getClass();
        return "rest";
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    @Override // defpackage.um5
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Serializable e(rd4 rd4Var, Continuation continuation) throws Throwable {
        he7 he7Var;
        Object objC;
        Serializable e7aVar;
        if (continuation instanceof he7) {
            he7Var = (he7) continuation;
            int i = he7Var.d;
            if ((i & Integer.MIN_VALUE) != 0) {
                he7Var.d = i - Integer.MIN_VALUE;
            } else {
                he7Var = new he7(this, continuation);
            }
        }
        Object objA = he7Var.b;
        ck1 ck1Var = ck1.a;
        int i2 = he7Var.d;
        try {
            if (i2 == 0) {
                s38.b(objA);
                he7Var.a = rd4Var;
                he7Var.d = 1;
                objA = yd4.a(rd4Var, bz0.a, he7Var);
                if (objA == ck1Var) {
                    return ck1Var;
                }
            } else {
                if (i2 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rd4Var = he7Var.a;
                s38.b(objA);
            }
            dy4 dy4Var = gea.a;
            dy4Var.getClass();
            objC = dy4Var.c(zd7.INSTANCE.serializer(), (String) objA);
        } catch (Exception unused) {
            objC = null;
        }
        zd7 zd7Var = (zd7) objC;
        if (zd7Var == null) {
            zd7Var = new zd7();
        }
        String str = zd7Var.b;
        String str2 = zd7Var.c;
        String str3 = zd7Var.a;
        pe4 pe4VarG = rd4Var.getC();
        if (cr4.b(pe4VarG, pe4.o)) {
            if (str2 != null) {
                str = str2;
            }
            cr4.g(str3, "error");
            e7aVar = new z4a(str3, rd4Var, str);
        } else if (cr4.b(pe4VarG, pe4.p)) {
            if (str2 != null) {
                str = str2;
            }
            cr4.g(str3, "error");
            e7aVar = new ip6(str3, rd4Var, str);
        } else if (cr4.b(pe4VarG, pe4.n)) {
            if (str2 != null) {
                str = str2;
            }
            cr4.g(str3, "error");
            e7aVar = new h60(str3, rd4Var, str);
        } else {
            if (str2 != null) {
                str = str2;
            }
            cr4.g(str3, "error");
            e7aVar = new e7a(str3, rd4Var, str);
        }
        return e7aVar;
    }

    @Override // defpackage.td9
    public final Object f() {
        return this.d;
    }

    @Override // defpackage.td9
    /* JADX INFO: renamed from: h, reason: from getter */
    public final cc9 getC() {
        return this.c;
    }

    @Override // defpackage.jo1
    /* JADX INFO: renamed from: k, reason: from getter */
    public final vd9 getE() {
        return this.e;
    }

    @Override // defpackage.xd7
    public final ke7 l(String str) {
        return new ke7(this, str);
    }

    @Override // defpackage.td9
    public final void m() {
    }
}
