package p037.p118;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.view.View;
import android.view.ViewGroup;
import p037.p118.AbstractC2485;

/* JADX INFO: renamed from: މ.ޔ.ޛ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC2516 extends AbstractC2485 {

    /* JADX INFO: renamed from: ޱ, reason: contains not printable characters */
    public static final String[] f7886 = {"android:visibility:visibility", "android:visibility:parent"};

    /* JADX INFO: renamed from: ޥ, reason: contains not printable characters */
    public int f7887 = 3;

    /* JADX INFO: renamed from: މ.ޔ.ޛ$֏, reason: contains not printable characters */
    public static class C2517 extends AnimatorListenerAdapter implements AbstractC2485.InterfaceC2489 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final View f7888;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final int f7889;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public final ViewGroup f7890;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public final boolean f7891;

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public boolean f7892;

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public boolean f7893 = false;

        public C2517(View view, int i, boolean z) {
            this.f7888 = view;
            this.f7889 = i;
            this.f7890 = (ViewGroup) view.getParent();
            this.f7891 = z;
            m4595(true);
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationCancel(Animator animator) {
            this.f7893 = true;
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationEnd(Animator animator) {
            m4594();
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener
        public void onAnimationPause(Animator animator) {
            if (this.f7893) {
                return;
            }
            C2506.f7871.mo4591(this.f7888, this.f7889);
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationRepeat(Animator animator) {
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener
        public void onAnimationResume(Animator animator) {
            if (this.f7893) {
                return;
            }
            C2506.f7871.mo4591(this.f7888, 0);
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationStart(Animator animator) {
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final void m4594() {
            if (!this.f7893) {
                C2506.f7871.mo4591(this.f7888, this.f7889);
                ViewGroup viewGroup = this.f7890;
                if (viewGroup != null) {
                    viewGroup.invalidate();
                }
            }
            m4595(false);
        }

        @Override // p037.p118.AbstractC2485.InterfaceC2489
        /* JADX INFO: renamed from: ֏ */
        public void mo2431(AbstractC2485 abstractC2485) {
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final void m4595(boolean z) {
            ViewGroup viewGroup;
            if (!this.f7891 || this.f7892 == z || (viewGroup = this.f7890) == null) {
                return;
            }
            this.f7892 = z;
            C2503.m4579(viewGroup, z);
        }

        @Override // p037.p118.AbstractC2485.InterfaceC2489
        /* JADX INFO: renamed from: ؠ */
        public void mo2432(AbstractC2485 abstractC2485) {
        }

        @Override // p037.p118.AbstractC2485.InterfaceC2489
        /* JADX INFO: renamed from: ހ */
        public void mo4535(AbstractC2485 abstractC2485) {
            m4595(false);
        }

        @Override // p037.p118.AbstractC2485.InterfaceC2489
        /* JADX INFO: renamed from: ށ */
        public void mo4536(AbstractC2485 abstractC2485) {
            m4595(true);
        }

        @Override // p037.p118.AbstractC2485.InterfaceC2489
        /* JADX INFO: renamed from: ނ */
        public void mo1665(AbstractC2485 abstractC2485) {
            m4594();
            abstractC2485.mo4560(this);
        }
    }

    /* JADX INFO: renamed from: މ.ޔ.ޛ$ؠ, reason: contains not printable characters */
    public static class C2518 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public boolean f7894;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public boolean f7895;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public int f7896;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public int f7897;

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public ViewGroup f7898;

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public ViewGroup f7899;
    }

    /* JADX INFO: renamed from: ֏ */
    public abstract Animator mo2129(ViewGroup viewGroup, View view, C2501 c2501, C2501 c25012);

    /* JADX WARN: Removed duplicated region for block: B:43:0x007d  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x0082  */
    /* JADX WARN: Removed duplicated region for block: B:62:0x00c7 A[PHI: r6
      0x00c7: PHI (r6v3 android.view.View) = 
      (r6v2 android.view.View)
      (r6v2 android.view.View)
      (r6v2 android.view.View)
      (r6v2 android.view.View)
      (r6v2 android.view.View)
      (r6v2 android.view.View)
      (r6v6 android.view.View)
     binds: [B:44:0x0080, B:49:0x008f, B:54:0x00b4, B:56:0x00b7, B:58:0x00bd, B:60:0x00c1, B:52:0x00a7] A[DONT_GENERATE, DONT_INLINE]] */
    @Override // p037.p118.AbstractC2485
    /* JADX INFO: renamed from: ֏ */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public Animator mo2514(ViewGroup viewGroup, C2501 c2501, C2501 c25012) {
        View view;
        boolean z;
        boolean z2;
        View view2;
        C2518 c2518M4592 = m4592(c2501, c25012);
        Animator animatorMo2130 = null;
        if (c2518M4592.f7894 && (c2518M4592.f7898 != null || c2518M4592.f7899 != null)) {
            if (c2518M4592.f7895) {
                if ((this.f7887 & 1) != 1 || c25012 == null) {
                    return null;
                }
                if (c2501 == null) {
                    View view3 = (View) c25012.f7863.getParent();
                    if (m4592(m4564(view3, false), m4567(view3, false)).f7894) {
                        return null;
                    }
                }
                return mo2129(viewGroup, c25012.f7863, c2501, c25012);
            }
            int i = c2518M4592.f7897;
            if ((this.f7887 & 2) == 2 && c2501 != null) {
                View view4 = c2501.f7863;
                View viewM4578 = c25012 != null ? c25012.f7863 : null;
                View view5 = (View) view4.getTag(C2482.save_overlay_view);
                if (view5 != null) {
                    view2 = null;
                    z2 = true;
                } else if (viewM4578 == null || viewM4578.getParent() == null) {
                    if (viewM4578 != null) {
                        view = null;
                        z = false;
                    } else {
                        viewM4578 = null;
                        view = null;
                        z = true;
                    }
                    if (z) {
                        if (view4.getParent() != null) {
                            if (view4.getParent() instanceof View) {
                                View view6 = (View) view4.getParent();
                                if (m4592(m4567(view6, true), m4564(view6, true)).f7894) {
                                    int id = view6.getId();
                                    if (view6.getParent() != null || id == -1 || viewGroup.findViewById(id) == null || !this.f7829) {
                                    }
                                } else {
                                    viewM4578 = C2500.m4578(viewGroup, view4, view6);
                                }
                            }
                            z2 = false;
                            View view7 = view;
                            view5 = viewM4578;
                            view2 = view7;
                        }
                        view2 = view;
                        z2 = false;
                        view5 = view4;
                    } else {
                        z2 = false;
                        View view72 = view;
                        view5 = viewM4578;
                        view2 = view72;
                    }
                } else {
                    if (i == 4 || view4 == viewM4578) {
                        view = viewM4578;
                        z = false;
                        viewM4578 = null;
                    }
                    if (z) {
                    }
                }
                if (view5 != null) {
                    if (!z2) {
                        int[] iArr = (int[]) c2501.f7862.get("android:visibility:screenLocation");
                        int i2 = iArr[0];
                        int i3 = iArr[1];
                        int[] iArr2 = new int[2];
                        viewGroup.getLocationOnScreen(iArr2);
                        view5.offsetLeftAndRight((i2 - iArr2[0]) - view5.getLeft());
                        view5.offsetTopAndBottom((i3 - iArr2[1]) - view5.getTop());
                        viewGroup.getOverlay().add(view5);
                    }
                    animatorMo2130 = mo2130(viewGroup, view5, c2501, c25012);
                    if (!z2) {
                        if (animatorMo2130 == null) {
                            viewGroup.getOverlay().remove(view5);
                        } else {
                            view4.setTag(C2482.save_overlay_view, view5);
                            mo4548(new C2515(this, viewGroup, view5, view4));
                        }
                    }
                } else if (view2 != null) {
                    int visibility = view2.getVisibility();
                    C2506.f7871.mo4591(view2, 0);
                    animatorMo2130 = mo2130(viewGroup, view2, c2501, c25012);
                    if (animatorMo2130 != null) {
                        C2517 c2517 = new C2517(view2, i, true);
                        animatorMo2130.addListener(c2517);
                        animatorMo2130.addPauseListener(c2517);
                        mo4548(c2517);
                    } else {
                        C2506.f7871.mo4591(view2, visibility);
                    }
                }
            }
        }
        return animatorMo2130;
    }

    @Override // p037.p118.AbstractC2485
    /* JADX INFO: renamed from: ֏ */
    public void mo2515(C2501 c2501) {
        m4593(c2501);
    }

    @Override // p037.p118.AbstractC2485
    /* JADX INFO: renamed from: ֏ */
    public boolean mo4557(C2501 c2501, C2501 c25012) {
        if (c2501 == null && c25012 == null) {
            return false;
        }
        if (c2501 != null && c25012 != null && c25012.f7862.containsKey("android:visibility:visibility") != c2501.f7862.containsKey("android:visibility:visibility")) {
            return false;
        }
        C2518 c2518M4592 = m4592(c2501, c25012);
        if (c2518M4592.f7894) {
            return c2518M4592.f7896 == 0 || c2518M4592.f7897 == 0;
        }
        return false;
    }

    /* JADX INFO: renamed from: ؠ */
    public abstract Animator mo2130(ViewGroup viewGroup, View view, C2501 c2501, C2501 c25012);

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final C2518 m4592(C2501 c2501, C2501 c25012) {
        C2518 c2518 = new C2518();
        c2518.f7894 = false;
        c2518.f7895 = false;
        if (c2501 == null || !c2501.f7862.containsKey("android:visibility:visibility")) {
            c2518.f7896 = -1;
            c2518.f7898 = null;
        } else {
            c2518.f7896 = ((Integer) c2501.f7862.get("android:visibility:visibility")).intValue();
            c2518.f7898 = (ViewGroup) c2501.f7862.get("android:visibility:parent");
        }
        if (c25012 == null || !c25012.f7862.containsKey("android:visibility:visibility")) {
            c2518.f7897 = -1;
            c2518.f7899 = null;
        } else {
            c2518.f7897 = ((Integer) c25012.f7862.get("android:visibility:visibility")).intValue();
            c2518.f7899 = (ViewGroup) c25012.f7862.get("android:visibility:parent");
        }
        if (c2501 == null || c25012 == null) {
            if (c2501 == null && c2518.f7897 == 0) {
                c2518.f7895 = true;
                c2518.f7894 = true;
            } else if (c25012 == null && c2518.f7896 == 0) {
                c2518.f7895 = false;
                c2518.f7894 = true;
            }
        } else {
            if (c2518.f7896 == c2518.f7897 && c2518.f7898 == c2518.f7899) {
                return c2518;
            }
            int i = c2518.f7896;
            int i2 = c2518.f7897;
            if (i != i2) {
                if (i == 0) {
                    c2518.f7895 = false;
                    c2518.f7894 = true;
                } else if (i2 == 0) {
                    c2518.f7895 = true;
                    c2518.f7894 = true;
                }
            } else if (c2518.f7899 == null) {
                c2518.f7895 = false;
                c2518.f7894 = true;
            } else if (c2518.f7898 == null) {
                c2518.f7895 = true;
                c2518.f7894 = true;
            }
        }
        return c2518;
    }

    @Override // p037.p118.AbstractC2485
    /* JADX INFO: renamed from: ހ */
    public void mo2516(C2501 c2501) {
        m4593(c2501);
    }

    @Override // p037.p118.AbstractC2485
    /* JADX INFO: renamed from: ހ */
    public String[] mo2517() {
        return f7886;
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final void m4593(C2501 c2501) {
        c2501.f7862.put("android:visibility:visibility", Integer.valueOf(c2501.f7863.getVisibility()));
        c2501.f7862.put("android:visibility:parent", c2501.f7863.getParent());
        int[] iArr = new int[2];
        c2501.f7863.getLocationOnScreen(iArr);
        c2501.f7862.put("android:visibility:screenLocation", iArr);
    }
}
