package ῲ.ᓆ;

import android.animation.TimeInterpolator;
import android.util.AndroidRuntimeException;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.Iterator;
import ඓ.K.K.K.C1293;
import ῲ.ᓆ.AbstractC1647;

/* renamed from: ῲ.ᓆ.㗗  reason: contains not printable characters */
/* compiled from: TransitionSet */
public class C1663 extends AbstractC1647 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public boolean f5902 = true;

    /* renamed from: ඓ  reason: contains not printable characters */
    public boolean f5903 = false;

    /* renamed from: ῲ  reason: contains not printable characters */
    public ArrayList<AbstractC1647> f5904 = new ArrayList<>();

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f5905 = 0;

    /* renamed from: 㸾  reason: contains not printable characters */
    public int f5906;

    /* renamed from: ῲ.ᓆ.㗗$ῲ  reason: contains not printable characters */
    /* compiled from: TransitionSet */
    public static class C1664 extends C1662 {

        /* renamed from: K  reason: contains not printable characters */
        public C1663 f5907;

        public C1664(C1663 r1) {
            this.f5907 = r1;
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionEnd(AbstractC1647 r3) {
            C1663 r0 = this.f5907;
            r0.f5906--;
            if (r0.f5906 == 0) {
                r0.f5903 = false;
                r0.end();
            }
            r3.removeListener(this);
        }

        @Override // ῲ.ᓆ.C1662, ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionStart(AbstractC1647 r2) {
            C1663 r22 = this.f5907;
            if (!r22.f5903) {
                r22.start();
                this.f5907.f5903 = true;
            }
        }
    }

    /* renamed from: ῲ.ᓆ.㗗$K  reason: contains not printable characters */
    /* compiled from: TransitionSet */
    public class C1665 extends C1662 {

        /* renamed from: K  reason: contains not printable characters */
        public final /* synthetic */ AbstractC1647 f5908;

        public C1665(C1663 r1, AbstractC1647 r2) {
            this.f5908 = r2;
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionEnd(AbstractC1647 r2) {
            this.f5908.runAnimators();
            r2.removeListener(this);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 addListener(AbstractC1647.AbstractC1652 r1) {
        return (C1663) super.addListener(r1);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 addTarget(View view) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).addTarget(view);
        }
        return (C1663) super.addTarget(view);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void cancel() {
        super.cancel();
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).cancel();
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void captureEndValues(C1646 r4) {
        if (isValidTarget(r4.f5882)) {
            Iterator<AbstractC1647> it2 = this.f5904.iterator();
            while (it2.hasNext()) {
                AbstractC1647 next = it2.next();
                if (next.isValidTarget(r4.f5882)) {
                    next.captureEndValues(r4);
                    r4.f5881.add(next);
                }
            }
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void capturePropagationValues(C1646 r4) {
        super.capturePropagationValues(r4);
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).capturePropagationValues(r4);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void captureStartValues(C1646 r4) {
        if (isValidTarget(r4.f5882)) {
            Iterator<AbstractC1647> it2 = this.f5904.iterator();
            while (it2.hasNext()) {
                AbstractC1647 next = it2.next();
                if (next.isValidTarget(r4.f5882)) {
                    next.captureStartValues(r4);
                    r4.f5881.add(next);
                }
            }
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void createAnimators(ViewGroup viewGroup, C1666 r14, C1666 r15, ArrayList<C1646> arrayList, ArrayList<C1646> arrayList2) {
        long startDelay = getStartDelay();
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            AbstractC1647 r6 = this.f5904.get(i);
            if (startDelay > 0 && (this.f5902 || i == 0)) {
                long startDelay2 = r6.getStartDelay();
                if (startDelay2 > 0) {
                    r6.setStartDelay(startDelay2 + startDelay);
                } else {
                    r6.setStartDelay(startDelay);
                }
            }
            r6.createAnimators(viewGroup, r14, r15, arrayList, arrayList2);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 excludeTarget(View view, boolean z) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).excludeTarget(view, z);
        }
        return super.excludeTarget(view, z);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void forceToEnd(ViewGroup viewGroup) {
        super.forceToEnd(viewGroup);
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).forceToEnd(viewGroup);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void pause(View view) {
        super.pause(view);
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).pause(view);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 removeListener(AbstractC1647.AbstractC1652 r1) {
        return (C1663) super.removeListener(r1);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 removeTarget(int i) {
        for (int i2 = 0; i2 < this.f5904.size(); i2++) {
            this.f5904.get(i2).removeTarget(i);
        }
        return (C1663) super.removeTarget(i);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void resume(View view) {
        super.resume(view);
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).resume(view);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void runAnimators() {
        if (this.f5904.isEmpty()) {
            start();
            end();
            return;
        }
        C1664 r0 = new C1664(this);
        Iterator<AbstractC1647> it2 = this.f5904.iterator();
        while (it2.hasNext()) {
            it2.next().addListener(r0);
        }
        this.f5906 = this.f5904.size();
        if (!this.f5902) {
            for (int i = 1; i < this.f5904.size(); i++) {
                this.f5904.get(i - 1).addListener(new C1665(this, this.f5904.get(i)));
            }
            AbstractC1647 r02 = this.f5904.get(0);
            if (r02 != null) {
                r02.runAnimators();
                return;
            }
            return;
        }
        Iterator<AbstractC1647> it3 = this.f5904.iterator();
        while (it3.hasNext()) {
            it3.next().runAnimators();
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void setCanRemoveViews(boolean z) {
        super.setCanRemoveViews(z);
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).setCanRemoveViews(z);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void setEpicenterCallback(AbstractC1647.AbstractC1649 r4) {
        super.setEpicenterCallback(r4);
        this.f5905 |= 8;
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).setEpicenterCallback(r4);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void setPathMotion(AbstractC1672 r3) {
        super.setPathMotion(r3);
        this.f5905 |= 4;
        if (this.f5904 != null) {
            for (int i = 0; i < this.f5904.size(); i++) {
                this.f5904.get(i).setPathMotion(r3);
            }
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public void setPropagation(AbstractC1630 r4) {
        super.setPropagation(r4);
        this.f5905 |= 2;
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).setPropagation(r4);
        }
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 setSceneRoot(ViewGroup viewGroup) {
        super.setSceneRoot(viewGroup);
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            this.f5904.get(i).setSceneRoot(viewGroup);
        }
        return this;
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 setStartDelay(long j) {
        return (C1663) super.setStartDelay(j);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public String toString(String str) {
        String r0 = super.toString(str);
        for (int i = 0; i < this.f5904.size(); i++) {
            StringBuilder r02 = C1293.m3402(r0, "\n");
            r02.append(this.f5904.get(i).toString(str + "  "));
            r0 = r02.toString();
        }
        return r0;
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public C1663 m4253(int i) {
        if (i == 0) {
            this.f5902 = true;
        } else if (i == 1) {
            this.f5902 = false;
        } else {
            throw new AndroidRuntimeException(C1293.m3408("Invalid parameter for TransitionSet ordering: ", i));
        }
        return this;
    }

    /* renamed from: K  reason: contains not printable characters */
    public C1663 m4255(AbstractC1647 r6) {
        this.f5904.add(r6);
        r6.mParent = this;
        long j = this.mDuration;
        if (j >= 0) {
            r6.setDuration(j);
        }
        if ((this.f5905 & 1) != 0) {
            r6.setInterpolator(getInterpolator());
        }
        if ((this.f5905 & 2) != 0) {
            r6.setPropagation(getPropagation());
        }
        if ((this.f5905 & 4) != 0) {
            r6.setPathMotion(getPathMotion());
        }
        if ((this.f5905 & 8) != 0) {
            r6.setEpicenterCallback(getEpicenterCallback());
        }
        return this;
    }

    @Override // ῲ.ᓆ.AbstractC1647, ῲ.ᓆ.AbstractC1647, java.lang.Object
    public AbstractC1647 clone() {
        C1663 r0 = (C1663) super.clone();
        r0.f5904 = new ArrayList<>();
        int size = this.f5904.size();
        for (int i = 0; i < size; i++) {
            AbstractC1647 clone = this.f5904.get(i).clone();
            r0.f5904.add(clone);
            clone.mParent = r0;
        }
        return r0;
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public C1663 setDuration(long j) {
        ArrayList<AbstractC1647> arrayList;
        super.setDuration(j);
        if (this.mDuration >= 0 && (arrayList = this.f5904) != null) {
            int size = arrayList.size();
            for (int i = 0; i < size; i++) {
                this.f5904.get(i).setDuration(j);
            }
        }
        return this;
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public C1663 setInterpolator(TimeInterpolator timeInterpolator) {
        this.f5905 |= 1;
        ArrayList<AbstractC1647> arrayList = this.f5904;
        if (arrayList != null) {
            int size = arrayList.size();
            for (int i = 0; i < size; i++) {
                this.f5904.get(i).setInterpolator(timeInterpolator);
            }
        }
        return (C1663) super.setInterpolator(timeInterpolator);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 addTarget(int i) {
        for (int i2 = 0; i2 < this.f5904.size(); i2++) {
            this.f5904.get(i2).addTarget(i);
        }
        return (C1663) super.addTarget(i);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 excludeTarget(String str, boolean z) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).excludeTarget(str, z);
        }
        return super.excludeTarget(str, z);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 removeTarget(View view) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).removeTarget(view);
        }
        return (C1663) super.removeTarget(view);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 addTarget(String str) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).addTarget(str);
        }
        return (C1663) super.addTarget(str);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 excludeTarget(int i, boolean z) {
        for (int i2 = 0; i2 < this.f5904.size(); i2++) {
            this.f5904.get(i2).excludeTarget(i, z);
        }
        return super.excludeTarget(i, z);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 removeTarget(Class cls) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).removeTarget(cls);
        }
        return (C1663) super.removeTarget(cls);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 addTarget(Class cls) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).addTarget(cls);
        }
        return (C1663) super.addTarget(cls);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 excludeTarget(Class<?> cls, boolean z) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).excludeTarget(cls, z);
        }
        return super.excludeTarget(cls, z);
    }

    @Override // ῲ.ᓆ.AbstractC1647
    public AbstractC1647 removeTarget(String str) {
        for (int i = 0; i < this.f5904.size(); i++) {
            this.f5904.get(i).removeTarget(str);
        }
        return (C1663) super.removeTarget(str);
    }

    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1647 m4254(int i) {
        if (i < 0 || i >= this.f5904.size()) {
            return null;
        }
        return this.f5904.get(i);
    }
}
