package ῲ.ⁱ.K.ῲ;

import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseIntArray;
import androidx.constraintlayout.motion.widget.MotionLayout;
import androidx.constraintlayout.widget.ConstraintAttribute;
import androidx.constraintlayout.widget.R$styleable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import ඓ.K.K.K.C1293;
import ῲ.ⁱ.K.ῲ.AbstractC2113;

/* renamed from: ῲ.ⁱ.K.ῲ.㸾  reason: contains not printable characters */
/* compiled from: KeyAttributes */
public class C2166 extends AbstractC2109 {

    /* renamed from: Ԕ  reason: contains not printable characters */
    public float f7540 = Float.NaN;

    /* renamed from: ؿ  reason: contains not printable characters */
    public float f7541 = Float.NaN;

    /* renamed from: ݜ  reason: contains not printable characters */
    public float f7542 = Float.NaN;

    /* renamed from: ඓ  reason: contains not printable characters */
    public String f7543;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public float f7544 = Float.NaN;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public float f7545 = Float.NaN;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public float f7546 = Float.NaN;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public float f7547 = Float.NaN;

    /* renamed from: 㑃  reason: contains not printable characters */
    public float f7548 = Float.NaN;

    /* renamed from: 㗗  reason: contains not printable characters */
    public float f7549 = Float.NaN;

    /* renamed from: 㗽  reason: contains not printable characters */
    public float f7550 = Float.NaN;

    /* renamed from: 㳳  reason: contains not printable characters */
    public float f7551 = Float.NaN;

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f7552 = -1;

    /* renamed from: 㿎  reason: contains not printable characters */
    public float f7553 = Float.NaN;

    /* renamed from: 䀟  reason: contains not printable characters */
    public float f7554 = Float.NaN;

    /* renamed from: 䁗  reason: contains not printable characters */
    public float f7555 = Float.NaN;

    /* renamed from: ῲ.ⁱ.K.ῲ.㸾$K  reason: contains not printable characters */
    /* compiled from: KeyAttributes */
    public static class C2167 {

        /* renamed from: K  reason: contains not printable characters */
        public static SparseIntArray f7556 = new SparseIntArray();

        static {
            f7556.append(R$styleable.KeyAttribute_android_alpha, 1);
            f7556.append(R$styleable.KeyAttribute_android_elevation, 2);
            f7556.append(R$styleable.KeyAttribute_android_rotation, 4);
            f7556.append(R$styleable.KeyAttribute_android_rotationX, 5);
            f7556.append(R$styleable.KeyAttribute_android_rotationY, 6);
            f7556.append(R$styleable.KeyAttribute_android_transformPivotX, 19);
            f7556.append(R$styleable.KeyAttribute_android_transformPivotY, 20);
            f7556.append(R$styleable.KeyAttribute_android_scaleX, 7);
            f7556.append(R$styleable.KeyAttribute_transitionPathRotate, 8);
            f7556.append(R$styleable.KeyAttribute_transitionEasing, 9);
            f7556.append(R$styleable.KeyAttribute_motionTarget, 10);
            f7556.append(R$styleable.KeyAttribute_framePosition, 12);
            f7556.append(R$styleable.KeyAttribute_curveFit, 13);
            f7556.append(R$styleable.KeyAttribute_android_scaleY, 14);
            f7556.append(R$styleable.KeyAttribute_android_translationX, 15);
            f7556.append(R$styleable.KeyAttribute_android_translationY, 16);
            f7556.append(R$styleable.KeyAttribute_android_translationZ, 17);
            f7556.append(R$styleable.KeyAttribute_motionProgress, 18);
        }

        /* renamed from: K  reason: contains not printable characters */
        public static void m5694(C2166 r5, TypedArray typedArray) {
            int indexCount = typedArray.getIndexCount();
            for (int i = 0; i < indexCount; i++) {
                int index = typedArray.getIndex(i);
                switch (f7556.get(index)) {
                    case 1:
                        r5.f7547 = typedArray.getFloat(index, r5.f7547);
                        break;
                    case 2:
                        r5.f7553 = typedArray.getDimension(index, r5.f7553);
                        break;
                    case 3:
                    case 11:
                    default:
                        StringBuilder r3 = C1293.m3416("unused attribute 0x");
                        r3.append(Integer.toHexString(index));
                        r3.append("   ");
                        r3.append(f7556.get(index));
                        Log.e("KeyAttribute", r3.toString());
                        break;
                    case 4:
                        r5.f7546 = typedArray.getFloat(index, r5.f7546);
                        break;
                    case 5:
                        r5.f7551 = typedArray.getFloat(index, r5.f7551);
                        break;
                    case 6:
                        r5.f7545 = typedArray.getFloat(index, r5.f7545);
                        break;
                    case 7:
                        r5.f7549 = typedArray.getFloat(index, r5.f7549);
                        break;
                    case 8:
                        r5.f7540 = typedArray.getFloat(index, r5.f7540);
                        break;
                    case 9:
                        r5.f7543 = typedArray.getString(index);
                        break;
                    case 10:
                        if (!MotionLayout.f691) {
                            if (typedArray.peekValue(index).type == 3) {
                                r5.f7329 = typedArray.getString(index);
                                break;
                            } else {
                                r5.f7330 = typedArray.getResourceId(index, r5.f7330);
                                break;
                            }
                        } else {
                            r5.f7330 = typedArray.getResourceId(index, r5.f7330);
                            if (r5.f7330 == -1) {
                                r5.f7329 = typedArray.getString(index);
                                break;
                            } else {
                                break;
                            }
                        }
                    case 12:
                        r5.f7331 = typedArray.getInt(index, r5.f7331);
                        break;
                    case 13:
                        r5.f7552 = typedArray.getInteger(index, r5.f7552);
                        break;
                    case 14:
                        r5.f7541 = typedArray.getFloat(index, r5.f7541);
                        break;
                    case 15:
                        r5.f7544 = typedArray.getDimension(index, r5.f7544);
                        break;
                    case 16:
                        r5.f7550 = typedArray.getDimension(index, r5.f7550);
                        break;
                    case 17:
                        int i2 = Build.VERSION.SDK_INT;
                        r5.f7542 = typedArray.getDimension(index, r5.f7542);
                        break;
                    case 18:
                        r5.f7554 = typedArray.getFloat(index, r5.f7554);
                        break;
                    case 19:
                        r5.f7548 = typedArray.getDimension(index, r5.f7548);
                        break;
                    case 20:
                        r5.f7555 = typedArray.getDimension(index, r5.f7555);
                        break;
                }
            }
        }
    }

    public C2166() {
        this.f7332 = new HashMap<>();
    }

    @Override // ῲ.ⁱ.K.ῲ.AbstractC2109
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m5690(HashMap<String, Integer> hashMap) {
        if (this.f7552 != -1) {
            if (!Float.isNaN(this.f7547)) {
                hashMap.put("alpha", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7553)) {
                hashMap.put("elevation", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7546)) {
                hashMap.put("rotation", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7551)) {
                hashMap.put("rotationX", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7545)) {
                hashMap.put("rotationY", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7548)) {
                hashMap.put("transformPivotX", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7555)) {
                hashMap.put("transformPivotY", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7544)) {
                hashMap.put("translationX", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7550)) {
                hashMap.put("translationY", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7542)) {
                hashMap.put("translationZ", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7540)) {
                hashMap.put("transitionPathRotate", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7549)) {
                hashMap.put("scaleX", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7541)) {
                hashMap.put("scaleY", Integer.valueOf(this.f7552));
            }
            if (!Float.isNaN(this.f7554)) {
                hashMap.put("progress", Integer.valueOf(this.f7552));
            }
            if (this.f7332.size() > 0) {
                for (String str : this.f7332.keySet()) {
                    hashMap.put(C1293.m3412("CUSTOM,", str), Integer.valueOf(this.f7552));
                }
            }
        }
    }

    @Override // ῲ.ⁱ.K.ῲ.AbstractC2109
    /* renamed from: K  reason: contains not printable characters */
    public void m5691(Context context, AttributeSet attributeSet) {
        C2167.m5694(this, context.obtainStyledAttributes(attributeSet, R$styleable.KeyAttribute));
    }

    @Override // ῲ.ⁱ.K.ῲ.AbstractC2109
    /* renamed from: K  reason: contains not printable characters */
    public void m5693(HashSet<String> hashSet) {
        if (!Float.isNaN(this.f7547)) {
            hashSet.add("alpha");
        }
        if (!Float.isNaN(this.f7553)) {
            hashSet.add("elevation");
        }
        if (!Float.isNaN(this.f7546)) {
            hashSet.add("rotation");
        }
        if (!Float.isNaN(this.f7551)) {
            hashSet.add("rotationX");
        }
        if (!Float.isNaN(this.f7545)) {
            hashSet.add("rotationY");
        }
        if (!Float.isNaN(this.f7548)) {
            hashSet.add("transformPivotX");
        }
        if (!Float.isNaN(this.f7555)) {
            hashSet.add("transformPivotY");
        }
        if (!Float.isNaN(this.f7544)) {
            hashSet.add("translationX");
        }
        if (!Float.isNaN(this.f7550)) {
            hashSet.add("translationY");
        }
        if (!Float.isNaN(this.f7542)) {
            hashSet.add("translationZ");
        }
        if (!Float.isNaN(this.f7540)) {
            hashSet.add("transitionPathRotate");
        }
        if (!Float.isNaN(this.f7549)) {
            hashSet.add("scaleX");
        }
        if (!Float.isNaN(this.f7541)) {
            hashSet.add("scaleY");
        }
        if (!Float.isNaN(this.f7554)) {
            hashSet.add("progress");
        }
        if (this.f7332.size() > 0) {
            Iterator<String> it2 = this.f7332.keySet().iterator();
            while (it2.hasNext()) {
                hashSet.add("CUSTOM," + it2.next());
            }
        }
    }

    /* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARNING: Code restructure failed: missing block: B:14:0x0055, code lost:
        if (r1.equals("transitionPathRotate") != false) goto L_0x00da;
     */
    @Override // ῲ.ⁱ.K.ῲ.AbstractC2109
    /* renamed from: K  reason: contains not printable characters */
    public void m5692(HashMap<String, AbstractC2113> hashMap) {
        Iterator<String> it2 = hashMap.keySet().iterator();
        while (it2.hasNext()) {
            String next = it2.next();
            AbstractC2113 r2 = hashMap.get(next);
            char c = 7;
            if (next.startsWith("CUSTOM")) {
                ConstraintAttribute constraintAttribute = this.f7332.get(next.substring(7));
                if (constraintAttribute != null) {
                    ((AbstractC2113.C2119) r2).f7381.append(this.f7331, constraintAttribute);
                }
            } else {
                switch (next.hashCode()) {
                    case -1249320806:
                        if (next.equals("rotationX")) {
                            c = 3;
                            break;
                        }
                        c = 65535;
                        break;
                    case -1249320805:
                        if (next.equals("rotationY")) {
                            c = 4;
                            break;
                        }
                        c = 65535;
                        break;
                    case -1225497657:
                        if (next.equals("translationX")) {
                            c = '\n';
                            break;
                        }
                        c = 65535;
                        break;
                    case -1225497656:
                        if (next.equals("translationY")) {
                            c = 11;
                            break;
                        }
                        c = 65535;
                        break;
                    case -1225497655:
                        if (next.equals("translationZ")) {
                            c = '\f';
                            break;
                        }
                        c = 65535;
                        break;
                    case -1001078227:
                        if (next.equals("progress")) {
                            c = '\r';
                            break;
                        }
                        c = 65535;
                        break;
                    case -908189618:
                        if (next.equals("scaleX")) {
                            c = '\b';
                            break;
                        }
                        c = 65535;
                        break;
                    case -908189617:
                        if (next.equals("scaleY")) {
                            c = '\t';
                            break;
                        }
                        c = 65535;
                        break;
                    case -760884510:
                        if (next.equals("transformPivotX")) {
                            c = 5;
                            break;
                        }
                        c = 65535;
                        break;
                    case -760884509:
                        if (next.equals("transformPivotY")) {
                            c = 6;
                            break;
                        }
                        c = 65535;
                        break;
                    case -40300674:
                        if (next.equals("rotation")) {
                            c = 2;
                            break;
                        }
                        c = 65535;
                        break;
                    case -4379043:
                        if (next.equals("elevation")) {
                            c = 1;
                            break;
                        }
                        c = 65535;
                        break;
                    case 37232917:
                        break;
                    case 92909918:
                        if (next.equals("alpha")) {
                            c = 0;
                            break;
                        }
                        c = 65535;
                        break;
                    default:
                        c = 65535;
                        break;
                }
                switch (c) {
                    case 0:
                        if (!Float.isNaN(this.f7547)) {
                            r2.m5603(this.f7331, this.f7547);
                            break;
                        } else {
                            continue;
                        }
                    case 1:
                        if (!Float.isNaN(this.f7553)) {
                            r2.m5603(this.f7331, this.f7553);
                            break;
                        } else {
                            continue;
                        }
                    case 2:
                        if (!Float.isNaN(this.f7546)) {
                            r2.m5603(this.f7331, this.f7546);
                            break;
                        } else {
                            continue;
                        }
                    case 3:
                        if (!Float.isNaN(this.f7551)) {
                            r2.m5603(this.f7331, this.f7551);
                            break;
                        } else {
                            continue;
                        }
                    case 4:
                        if (!Float.isNaN(this.f7545)) {
                            r2.m5603(this.f7331, this.f7545);
                            break;
                        } else {
                            continue;
                        }
                    case 5:
                        if (!Float.isNaN(this.f7551)) {
                            r2.m5603(this.f7331, this.f7548);
                            break;
                        } else {
                            continue;
                        }
                    case 6:
                        if (!Float.isNaN(this.f7545)) {
                            r2.m5603(this.f7331, this.f7555);
                            break;
                        } else {
                            continue;
                        }
                    case 7:
                        if (!Float.isNaN(this.f7540)) {
                            r2.m5603(this.f7331, this.f7540);
                            break;
                        } else {
                            continue;
                        }
                    case '\b':
                        if (!Float.isNaN(this.f7549)) {
                            r2.m5603(this.f7331, this.f7549);
                            break;
                        } else {
                            continue;
                        }
                    case '\t':
                        if (!Float.isNaN(this.f7541)) {
                            r2.m5603(this.f7331, this.f7541);
                            break;
                        } else {
                            continue;
                        }
                    case '\n':
                        if (!Float.isNaN(this.f7544)) {
                            r2.m5603(this.f7331, this.f7544);
                            break;
                        } else {
                            continue;
                        }
                    case 11:
                        if (!Float.isNaN(this.f7550)) {
                            r2.m5603(this.f7331, this.f7550);
                            break;
                        } else {
                            continue;
                        }
                    case '\f':
                        if (!Float.isNaN(this.f7542)) {
                            r2.m5603(this.f7331, this.f7542);
                            break;
                        } else {
                            continue;
                        }
                    case '\r':
                        if (!Float.isNaN(this.f7554)) {
                            r2.m5603(this.f7331, this.f7554);
                            break;
                        } else {
                            continue;
                        }
                    default:
                        Log.v("KeyAttributes", "UNKNOWN addValues \"" + next + "\"");
                        continue;
                }
            }
        }
    }
}
