package i2;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import y1.AbstractC1111a;

/* JADX INFO: loaded from: classes.dex */
public final class k {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public AbstractC1111a f6608a = new C0632i();

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public AbstractC1111a f6609b = new C0632i();

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public AbstractC1111a f6610c = new C0632i();

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public AbstractC1111a f6611d = new C0632i();

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public InterfaceC0626c f6612e = new C0624a(0.0f);

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public InterfaceC0626c f6613f = new C0624a(0.0f);

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public InterfaceC0626c f6614g = new C0624a(0.0f);

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public InterfaceC0626c f6615h = new C0624a(0.0f);
    public C0628e i = new C0628e(0);

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public C0628e f6616j = new C0628e(0);

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public C0628e f6617k = new C0628e(0);

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public C0628e f6618l = new C0628e(0);

    public static j a(Context context, int i, int i5, C0624a c0624a) {
        ContextThemeWrapper contextThemeWrapper = new ContextThemeWrapper(context, i);
        if (i5 != 0) {
            contextThemeWrapper = new ContextThemeWrapper(contextThemeWrapper, i5);
        }
        TypedArray typedArrayObtainStyledAttributes = contextThemeWrapper.obtainStyledAttributes(Q1.a.q);
        try {
            int i6 = typedArrayObtainStyledAttributes.getInt(0, 0);
            int i7 = typedArrayObtainStyledAttributes.getInt(3, i6);
            int i8 = typedArrayObtainStyledAttributes.getInt(4, i6);
            int i9 = typedArrayObtainStyledAttributes.getInt(2, i6);
            int i10 = typedArrayObtainStyledAttributes.getInt(1, i6);
            InterfaceC0626c interfaceC0626cC = c(typedArrayObtainStyledAttributes, 5, c0624a);
            InterfaceC0626c interfaceC0626cC2 = c(typedArrayObtainStyledAttributes, 8, interfaceC0626cC);
            InterfaceC0626c interfaceC0626cC3 = c(typedArrayObtainStyledAttributes, 9, interfaceC0626cC);
            InterfaceC0626c interfaceC0626cC4 = c(typedArrayObtainStyledAttributes, 7, interfaceC0626cC);
            InterfaceC0626c interfaceC0626cC5 = c(typedArrayObtainStyledAttributes, 6, interfaceC0626cC);
            j jVar = new j();
            AbstractC1111a abstractC1111aI = A1.h.i(i7);
            jVar.f6597a = abstractC1111aI;
            j.b(abstractC1111aI);
            jVar.f6601e = interfaceC0626cC2;
            AbstractC1111a abstractC1111aI2 = A1.h.i(i8);
            jVar.f6598b = abstractC1111aI2;
            j.b(abstractC1111aI2);
            jVar.f6602f = interfaceC0626cC3;
            AbstractC1111a abstractC1111aI3 = A1.h.i(i9);
            jVar.f6599c = abstractC1111aI3;
            j.b(abstractC1111aI3);
            jVar.f6603g = interfaceC0626cC4;
            AbstractC1111a abstractC1111aI4 = A1.h.i(i10);
            jVar.f6600d = abstractC1111aI4;
            j.b(abstractC1111aI4);
            jVar.f6604h = interfaceC0626cC5;
            return jVar;
        } finally {
            typedArrayObtainStyledAttributes.recycle();
        }
    }

    public static j b(Context context, AttributeSet attributeSet, int i, int i5) {
        C0624a c0624a = new C0624a(0);
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, Q1.a.f2592l, i, i5);
        int resourceId = typedArrayObtainStyledAttributes.getResourceId(0, 0);
        int resourceId2 = typedArrayObtainStyledAttributes.getResourceId(1, 0);
        typedArrayObtainStyledAttributes.recycle();
        return a(context, resourceId, resourceId2, c0624a);
    }

    public static InterfaceC0626c c(TypedArray typedArray, int i, InterfaceC0626c interfaceC0626c) {
        TypedValue typedValuePeekValue = typedArray.peekValue(i);
        if (typedValuePeekValue != null) {
            int i5 = typedValuePeekValue.type;
            if (i5 == 5) {
                return new C0624a(TypedValue.complexToDimensionPixelSize(typedValuePeekValue.data, typedArray.getResources().getDisplayMetrics()));
            }
            if (i5 == 6) {
                return new C0631h(typedValuePeekValue.getFraction(1.0f, 1.0f));
            }
        }
        return interfaceC0626c;
    }

    public final boolean d(RectF rectF) {
        boolean z5 = this.f6618l.getClass().equals(C0628e.class) && this.f6616j.getClass().equals(C0628e.class) && this.i.getClass().equals(C0628e.class) && this.f6617k.getClass().equals(C0628e.class);
        float fA = this.f6612e.a(rectF);
        return z5 && ((this.f6613f.a(rectF) > fA ? 1 : (this.f6613f.a(rectF) == fA ? 0 : -1)) == 0 && (this.f6615h.a(rectF) > fA ? 1 : (this.f6615h.a(rectF) == fA ? 0 : -1)) == 0 && (this.f6614g.a(rectF) > fA ? 1 : (this.f6614g.a(rectF) == fA ? 0 : -1)) == 0) && ((this.f6609b instanceof C0632i) && (this.f6608a instanceof C0632i) && (this.f6610c instanceof C0632i) && (this.f6611d instanceof C0632i));
    }

    public final j e() {
        j jVar = new j();
        jVar.f6597a = this.f6608a;
        jVar.f6598b = this.f6609b;
        jVar.f6599c = this.f6610c;
        jVar.f6600d = this.f6611d;
        jVar.f6601e = this.f6612e;
        jVar.f6602f = this.f6613f;
        jVar.f6603g = this.f6614g;
        jVar.f6604h = this.f6615h;
        jVar.i = this.i;
        jVar.f6605j = this.f6616j;
        jVar.f6606k = this.f6617k;
        jVar.f6607l = this.f6618l;
        return jVar;
    }
}
