package a0;

import android.content.Context;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.util.SparseArray;
import android.util.Xml;
import java.util.ArrayList;
import tv.danmaku.ijk.media.player.IjkEventListener;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f8a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final boolean f9b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f10c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f11d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public int f12e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public String f13f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f14g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public int f15h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final float f16i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final androidx.constraintlayout.motion.widget.b f17j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final ArrayList f18k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public androidx.constraintlayout.motion.widget.c f19l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final ArrayList f20m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final int f21n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final boolean f22o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public int f23p;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final int f24q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final int f25r;

    public b0(androidx.constraintlayout.motion.widget.b bVar, b0 b0Var) {
        this.f8a = -1;
        this.f9b = false;
        this.f10c = -1;
        this.f11d = -1;
        this.f12e = 0;
        this.f13f = null;
        this.f14g = -1;
        this.f15h = IjkEventListener.VIDEO_SIZE_CHANGED;
        this.f16i = 0.0f;
        this.f18k = new ArrayList();
        this.f19l = null;
        this.f20m = new ArrayList();
        this.f21n = 0;
        this.f22o = false;
        this.f23p = -1;
        this.f24q = 0;
        this.f25r = 0;
        this.f17j = bVar;
        this.f15h = bVar.f1143j;
        if (b0Var != null) {
            this.f23p = b0Var.f23p;
            this.f12e = b0Var.f12e;
            this.f13f = b0Var.f13f;
            this.f14g = b0Var.f14g;
            this.f15h = b0Var.f15h;
            this.f18k = b0Var.f18k;
            this.f16i = b0Var.f16i;
            this.f24q = b0Var.f24q;
        }
    }

    public b0(androidx.constraintlayout.motion.widget.b bVar, int i10, int i11) {
        this.f8a = -1;
        this.f9b = false;
        this.f10c = -1;
        this.f11d = -1;
        this.f12e = 0;
        this.f13f = null;
        this.f14g = -1;
        this.f15h = IjkEventListener.VIDEO_SIZE_CHANGED;
        this.f16i = 0.0f;
        this.f18k = new ArrayList();
        this.f19l = null;
        this.f20m = new ArrayList();
        this.f21n = 0;
        this.f22o = false;
        this.f23p = -1;
        this.f24q = 0;
        this.f25r = 0;
        this.f8a = -1;
        this.f17j = bVar;
        this.f11d = i10;
        this.f10c = i11;
        this.f15h = bVar.f1143j;
        this.f24q = bVar.f1144k;
    }

    public b0(androidx.constraintlayout.motion.widget.b bVar, Context context, XmlResourceParser xmlResourceParser) {
        this.f8a = -1;
        this.f9b = false;
        this.f10c = -1;
        this.f11d = -1;
        this.f12e = 0;
        this.f13f = null;
        this.f14g = -1;
        this.f15h = IjkEventListener.VIDEO_SIZE_CHANGED;
        this.f16i = 0.0f;
        this.f18k = new ArrayList();
        this.f19l = null;
        this.f20m = new ArrayList();
        this.f21n = 0;
        this.f22o = false;
        this.f23p = -1;
        this.f24q = 0;
        this.f25r = 0;
        this.f15h = bVar.f1143j;
        this.f24q = bVar.f1144k;
        this.f17j = bVar;
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(Xml.asAttributeSet(xmlResourceParser), androidx.constraintlayout.widget.s.Transition);
        int indexCount = typedArrayObtainStyledAttributes.getIndexCount();
        for (int i10 = 0; i10 < indexCount; i10++) {
            int index = typedArrayObtainStyledAttributes.getIndex(i10);
            int i11 = androidx.constraintlayout.widget.s.Transition_constraintSetEnd;
            SparseArray sparseArray = bVar.f1140g;
            if (index == i11) {
                this.f10c = typedArrayObtainStyledAttributes.getResourceId(index, -1);
                String resourceTypeName = context.getResources().getResourceTypeName(this.f10c);
                if ("layout".equals(resourceTypeName)) {
                    androidx.constraintlayout.widget.o oVar = new androidx.constraintlayout.widget.o();
                    oVar.j(context, this.f10c);
                    sparseArray.append(this.f10c, oVar);
                } else if ("xml".equals(resourceTypeName)) {
                    this.f10c = bVar.j(context, this.f10c);
                }
            } else if (index == androidx.constraintlayout.widget.s.Transition_constraintSetStart) {
                this.f11d = typedArrayObtainStyledAttributes.getResourceId(index, this.f11d);
                String resourceTypeName2 = context.getResources().getResourceTypeName(this.f11d);
                if ("layout".equals(resourceTypeName2)) {
                    androidx.constraintlayout.widget.o oVar2 = new androidx.constraintlayout.widget.o();
                    oVar2.j(context, this.f11d);
                    sparseArray.append(this.f11d, oVar2);
                } else if ("xml".equals(resourceTypeName2)) {
                    this.f11d = bVar.j(context, this.f11d);
                }
            } else if (index == androidx.constraintlayout.widget.s.Transition_motionInterpolator) {
                int i12 = typedArrayObtainStyledAttributes.peekValue(index).type;
                if (i12 == 1) {
                    int resourceId = typedArrayObtainStyledAttributes.getResourceId(index, -1);
                    this.f14g = resourceId;
                    if (resourceId != -1) {
                        this.f12e = -2;
                    }
                } else if (i12 == 3) {
                    String string = typedArrayObtainStyledAttributes.getString(index);
                    this.f13f = string;
                    if (string != null) {
                        if (string.indexOf("/") > 0) {
                            this.f14g = typedArrayObtainStyledAttributes.getResourceId(index, -1);
                            this.f12e = -2;
                        } else {
                            this.f12e = -1;
                        }
                    }
                } else {
                    this.f12e = typedArrayObtainStyledAttributes.getInteger(index, this.f12e);
                }
            } else if (index == androidx.constraintlayout.widget.s.Transition_duration) {
                int i13 = typedArrayObtainStyledAttributes.getInt(index, this.f15h);
                this.f15h = i13;
                if (i13 < 8) {
                    this.f15h = 8;
                }
            } else if (index == androidx.constraintlayout.widget.s.Transition_staggered) {
                this.f16i = typedArrayObtainStyledAttributes.getFloat(index, this.f16i);
            } else if (index == androidx.constraintlayout.widget.s.Transition_autoTransition) {
                this.f21n = typedArrayObtainStyledAttributes.getInteger(index, this.f21n);
            } else if (index == androidx.constraintlayout.widget.s.Transition_android_id) {
                this.f8a = typedArrayObtainStyledAttributes.getResourceId(index, this.f8a);
            } else if (index == androidx.constraintlayout.widget.s.Transition_transitionDisable) {
                this.f22o = typedArrayObtainStyledAttributes.getBoolean(index, this.f22o);
            } else if (index == androidx.constraintlayout.widget.s.Transition_pathMotionArc) {
                this.f23p = typedArrayObtainStyledAttributes.getInteger(index, -1);
            } else if (index == androidx.constraintlayout.widget.s.Transition_layoutDuringTransition) {
                this.f24q = typedArrayObtainStyledAttributes.getInteger(index, 0);
            } else if (index == androidx.constraintlayout.widget.s.Transition_transitionFlags) {
                this.f25r = typedArrayObtainStyledAttributes.getInteger(index, 0);
            }
        }
        if (this.f11d == -1) {
            this.f9b = true;
        }
        typedArrayObtainStyledAttributes.recycle();
    }
}
