package X6FRs_4.XnFJ5_9.KQgRr5e_0;

import X6FRs_4.IMuAHx_6.EuDEkJe_12.H5YG8fq_22;
import X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/* compiled from: FragmentTransitionImpl.java */
/* loaded from: classes.dex */
public abstract class KNBe_11 {

    /* compiled from: FragmentTransitionImpl.java */
    /* loaded from: classes.dex */
    public class KQgRr5e_0 implements Runnable {
        public final /* synthetic */ int KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final /* synthetic */ ArrayList f1297KQgRr5e_0;

        /* renamed from: Mqv2r_3  reason: collision with root package name */
        public final /* synthetic */ ArrayList f3323Mqv2r_3;
        public final /* synthetic */ ArrayList PGPF6hQ_2;
        public final /* synthetic */ ArrayList QxJ9d_1;

        public KQgRr5e_0(KNBe_11 kNBe_11, int i, ArrayList arrayList, ArrayList arrayList2, ArrayList arrayList3, ArrayList arrayList4) {
            this.KQgRr5e_0 = i;
            this.f1297KQgRr5e_0 = arrayList;
            this.QxJ9d_1 = arrayList2;
            this.PGPF6hQ_2 = arrayList3;
            this.f3323Mqv2r_3 = arrayList4;
        }

        @Override // java.lang.Runnable
        public void run() {
            for (int i = 0; i < this.KQgRr5e_0; i++) {
                ZzDuCHW_20.KQgRr5e_0((View) this.f1297KQgRr5e_0.get(i), (String) this.QxJ9d_1.get(i));
                ZzDuCHW_20.KQgRr5e_0((View) this.PGPF6hQ_2.get(i), (String) this.f3323Mqv2r_3.get(i));
            }
        }
    }

    /* compiled from: FragmentTransitionImpl.java */
    /* loaded from: classes.dex */
    public class PGPF6hQ_2 implements Runnable {
        public final /* synthetic */ ArrayList KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final /* synthetic */ Map f1298KQgRr5e_0;

        public PGPF6hQ_2(KNBe_11 kNBe_11, ArrayList arrayList, Map map) {
            this.KQgRr5e_0 = arrayList;
            this.f1298KQgRr5e_0 = map;
        }

        @Override // java.lang.Runnable
        public void run() {
            int size = this.KQgRr5e_0.size();
            for (int i = 0; i < size; i++) {
                View view = (View) this.KQgRr5e_0.get(i);
                ZzDuCHW_20.KQgRr5e_0(view, (String) this.f1298KQgRr5e_0.get(ZzDuCHW_20.m261KQgRr5e_0(view)));
            }
        }
    }

    /* compiled from: FragmentTransitionImpl.java */
    /* loaded from: classes.dex */
    public class QxJ9d_1 implements Runnable {
        public final /* synthetic */ ArrayList KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final /* synthetic */ Map f1299KQgRr5e_0;

        public QxJ9d_1(KNBe_11 kNBe_11, ArrayList arrayList, Map map) {
            this.KQgRr5e_0 = arrayList;
            this.f1299KQgRr5e_0 = map;
        }

        @Override // java.lang.Runnable
        public void run() {
            int size = this.KQgRr5e_0.size();
            for (int i = 0; i < size; i++) {
                View view = (View) this.KQgRr5e_0.get(i);
                String m261KQgRr5e_0 = ZzDuCHW_20.m261KQgRr5e_0(view);
                if (m261KQgRr5e_0 != null) {
                    ZzDuCHW_20.KQgRr5e_0(view, KNBe_11.KQgRr5e_0(this.f1299KQgRr5e_0, m261KQgRr5e_0));
                }
            }
        }
    }

    public abstract Object KQgRr5e_0(Object obj);

    public abstract Object KQgRr5e_0(Object obj, Object obj2, Object obj3);

    public void KQgRr5e_0(View view, Rect rect) {
        int[] iArr = new int[2];
        view.getLocationOnScreen(iArr);
        rect.set(iArr[0], iArr[1], iArr[0] + view.getWidth(), iArr[1] + view.getHeight());
    }

    public abstract void KQgRr5e_0(ViewGroup viewGroup, Object obj);

    public abstract void KQgRr5e_0(Object obj, Rect rect);

    public abstract void KQgRr5e_0(Object obj, View view);

    public abstract void KQgRr5e_0(Object obj, View view, ArrayList<View> arrayList);

    public abstract void KQgRr5e_0(Object obj, Object obj2, ArrayList<View> arrayList, Object obj3, ArrayList<View> arrayList2, Object obj4, ArrayList<View> arrayList3);

    public abstract void KQgRr5e_0(Object obj, ArrayList<View> arrayList);

    public abstract void KQgRr5e_0(Object obj, ArrayList<View> arrayList, ArrayList<View> arrayList2);

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public abstract boolean m611KQgRr5e_0(Object obj);

    public abstract void PGPF6hQ_2(Object obj, View view);

    public abstract Object QxJ9d_1(Object obj);

    public abstract Object QxJ9d_1(Object obj, Object obj2, Object obj3);

    public abstract void QxJ9d_1(Object obj, View view);

    public abstract void QxJ9d_1(Object obj, View view, ArrayList<View> arrayList);

    public abstract void QxJ9d_1(Object obj, ArrayList<View> arrayList, ArrayList<View> arrayList2);

    public ArrayList<String> KQgRr5e_0(ArrayList<View> arrayList) {
        ArrayList<String> arrayList2 = new ArrayList<>();
        int size = arrayList.size();
        for (int i = 0; i < size; i++) {
            View view = arrayList.get(i);
            arrayList2.add(ZzDuCHW_20.m261KQgRr5e_0(view));
            ZzDuCHW_20.KQgRr5e_0(view, (String) null);
        }
        return arrayList2;
    }

    public void KQgRr5e_0(View view, ArrayList<View> arrayList, ArrayList<View> arrayList2, ArrayList<String> arrayList3, Map<String, String> map) {
        int size = arrayList2.size();
        ArrayList arrayList4 = new ArrayList();
        for (int i = 0; i < size; i++) {
            View view2 = arrayList.get(i);
            String m261KQgRr5e_0 = ZzDuCHW_20.m261KQgRr5e_0(view2);
            arrayList4.add(m261KQgRr5e_0);
            if (m261KQgRr5e_0 != null) {
                ZzDuCHW_20.KQgRr5e_0(view2, (String) null);
                String str = map.get(m261KQgRr5e_0);
                int i2 = 0;
                while (true) {
                    if (i2 >= size) {
                        break;
                    } else if (str.equals(arrayList3.get(i2))) {
                        ZzDuCHW_20.KQgRr5e_0(arrayList2.get(i2), m261KQgRr5e_0);
                        break;
                    } else {
                        i2++;
                    }
                }
            }
        }
        EuDEkJe_12.KQgRr5e_0(view, new KQgRr5e_0(this, size, arrayList2, arrayList3, arrayList, arrayList4));
    }

    public void KQgRr5e_0(ArrayList<View> arrayList, View view) {
        if (view.getVisibility() == 0) {
            if (view instanceof ViewGroup) {
                ViewGroup viewGroup = (ViewGroup) view;
                if (H5YG8fq_22.KQgRr5e_0(viewGroup)) {
                    arrayList.add(viewGroup);
                    return;
                }
                int childCount = viewGroup.getChildCount();
                for (int i = 0; i < childCount; i++) {
                    KQgRr5e_0(arrayList, viewGroup.getChildAt(i));
                }
                return;
            }
            arrayList.add(view);
        }
    }

    public void KQgRr5e_0(Map<String, View> map, View view) {
        if (view.getVisibility() == 0) {
            String m261KQgRr5e_0 = ZzDuCHW_20.m261KQgRr5e_0(view);
            if (m261KQgRr5e_0 != null) {
                map.put(m261KQgRr5e_0, view);
            }
            if (view instanceof ViewGroup) {
                ViewGroup viewGroup = (ViewGroup) view;
                int childCount = viewGroup.getChildCount();
                for (int i = 0; i < childCount; i++) {
                    KQgRr5e_0(map, viewGroup.getChildAt(i));
                }
            }
        }
    }

    public void KQgRr5e_0(View view, ArrayList<View> arrayList, Map<String, String> map) {
        EuDEkJe_12.KQgRr5e_0(view, new QxJ9d_1(this, arrayList, map));
    }

    public void KQgRr5e_0(ViewGroup viewGroup, ArrayList<View> arrayList, Map<String, String> map) {
        EuDEkJe_12.KQgRr5e_0(viewGroup, new PGPF6hQ_2(this, arrayList, map));
    }

    public static void KQgRr5e_0(List<View> list, View view) {
        int size = list.size();
        if (KQgRr5e_0(list, view, size)) {
            return;
        }
        list.add(view);
        for (int i = size; i < list.size(); i++) {
            View view2 = list.get(i);
            if (view2 instanceof ViewGroup) {
                ViewGroup viewGroup = (ViewGroup) view2;
                int childCount = viewGroup.getChildCount();
                for (int i2 = 0; i2 < childCount; i2++) {
                    View childAt = viewGroup.getChildAt(i2);
                    if (!KQgRr5e_0(list, childAt, size)) {
                        list.add(childAt);
                    }
                }
            }
        }
    }

    public static boolean KQgRr5e_0(List<View> list, View view, int i) {
        for (int i2 = 0; i2 < i; i2++) {
            if (list.get(i2) == view) {
                return true;
            }
        }
        return false;
    }

    public static boolean KQgRr5e_0(List list) {
        return list == null || list.isEmpty();
    }

    public static String KQgRr5e_0(Map<String, String> map, String str) {
        for (Map.Entry<String, String> entry : map.entrySet()) {
            if (str.equals(entry.getValue())) {
                return entry.getKey();
            }
        }
        return null;
    }
}
