/*
 * Decompiled with CFR 0.152.
 */
import com.google.googlenav.GoogleNav;
import java.util.Vector;

public final class eb {
    private final bi F;
    private final gd G;
    private final lh H;
    private final bu I;
    private final ff J;
    private final lh K;
    private final hj L;
    private final ck M;
    private final GoogleNav N;
    private final ka O;
    private final String P;
    private final boolean Q;
    private ac m;
    private dz o;
    private ds A;
    private fc B;
    private gf C;
    private dp D;
    private ep E;
    private og e;
    private bz f;
    private gg g;
    private nu h;
    private ab j;
    private en k;
    private pq l;
    private gn n;
    private cj p;
    private bf q;
    private f r;
    private ih s;
    private li t;
    private cd v;
    private hu w;
    private eq x;
    private j y;
    private jc z;
    public je c;
    public ep b;
    public ep d;

    public final int b(pb pb2) {
        return this.d.a(pb2);
    }

    public final int c(pb pb2) {
        return this.d.b(pb2);
    }

    public final int a(nj nj2) {
        return this.d.a(nj2);
    }

    public final void a(iv iv2) {
        this.N().a(iv2);
    }

    public final void a(jt jt2) {
        this.e().a(jt2);
    }

    private void a(aq aq2) {
        this.m().a(aq2);
    }

    public final void e(mo mo2) {
        this.m().b(mo2);
    }

    public final void f(mo mo2) {
        this.m().a(mo2);
    }

    public final void c(mo mo2) {
        this.f().a(mo2);
    }

    public final void d(mo mo2) {
        this.f().b(mo2);
    }

    public final void a(mo mo2) {
        this.g().a(mo2);
        if (!mo2.t() || mo2.E || mo2.z == 3) {
            this.g().n();
        }
    }

    public final void n() {
        ep ep2 = this.s != null && this.s.t ? this.s : (this.k != null && this.k.t ? this.k : (this.c != null && this.c.t ? this.c : (this.h != null && this.h.t ? this.h : (this.e != null && this.e.t ? this.e : (this.t != null && this.t.t ? this.t : (this.f != null && this.f.t ? this.f : (this.j != null && this.j.t ? this.j : (this.n != null && this.n.t ? this.n : (this.g != null && this.g.t ? this.g : (this.m != null && this.m.t ? this.m : (this.v != null && this.v.t ? this.v : (this.w != null && this.w.t ? this.w : (this.x != null && this.x.t ? this.x : (this.y != null && this.y.t ? this.y : (this.o != null && this.o.t ? this.o : (this.q != null && this.q.t ? this.q : (this.p != null && this.p.t ? this.p : (this.l != null && this.l.t ? this.l : (this.r != null && this.r.t ? this.r : (this.z != null && this.z.t ? this.z : (this.A != null && this.A.t ? this.A : (this.B != null && this.B.t ? this.B : (this.C != null && this.C.t ? this.C : (this.D != null && this.D.t ? this.D : null))))))))))))))))))))))));
        this.d = ep2;
    }

    public final boolean A() {
        int n;
        return this.A != null && this.A.t && !this.A.n_() || this.f != null && this.f.t && ((n = this.f.n) == 1 || n == 2) || this.t != null && this.t.t;
    }

    public final boolean o() {
        ep ep2 = this.d;
        return ep2 != null && this.c != null && ep2 == this.c;
    }

    public final boolean p() {
        ep ep2 = this.d;
        return ep2 != null && ep2 == this.v;
    }

    public final boolean y() {
        ep ep2 = this.d;
        return ep2 != null && ep2.n_();
    }

    public final boolean z() {
        ep ep2 = this.d;
        return ep2 == null || ep2.p_();
    }

    public final boolean r() {
        return !this.o() || !((je)this.d).a;
    }

    public final boolean x() {
        return this.d != null;
    }

    public final boolean a(pb pb2) {
        ep ep2 = this.d;
        return ep2 != null && ep2.o_() && (pb2.d == 6 || pb2.b == 42 || pb2.c == 7 || pb2.c == 8);
    }

    public final void a(ht ht2) {
        ep ep2 = this.d;
        if (ep2 != null) {
            ep2.a(ht2);
        }
    }

    public final void w() {
        if (this.g != null) {
            this.g.l();
        }
    }

    public final void B() {
        if (this.A != null && this.A()) {
            this.A.l();
        }
    }

    public final void E() {
        this.E = this.d;
        if (this.E != null) {
            this.E.l_();
        }
    }

    public final void F() {
        if (this.E != null) {
            this.E.m_();
        }
        return;
        finally {
            this.E = null;
        }
    }

    /*
     * Enabled aggressive block sorting
     */
    public final int t() {
        int n;
        if (this.s != null && this.s.t) {
            this.s.o();
            return 0;
        }
        if (this.c != null && this.c.t) {
            Boolean bl2 = this.c.m();
            int n2 = 0;
            if (bl2 == null) {
                if (this.h == null) {
                    this.h = new nu(this, this.N.b(), lh.k().a(), this.M);
                }
                this.h.n();
            } else {
                n2 = bl2 != false ? 2 : 3;
            }
            this.c.o();
            return n2;
        }
        if (this.h != null && this.h.t) {
            this.h.o();
            return 0;
        }
        if (this.e != null && this.e.t) {
            if (!this.e.k()) {
                this.G.a(this.e.m(), 2, 0, this.e.l(), null, this.e.k, null);
                this.e.o();
                return 1;
            }
            this.aa();
            this.e.o();
            return 0;
        }
        if (this.f != null && this.f.t) {
            this.G.a(this.f.l(), true);
            this.f.o();
            return 1;
        }
        if (this.j != null && this.j.t) {
            this.j.f();
            this.j.o();
            return 0;
        }
        if (this.n != null && this.n.t) {
            this.n.o();
            return 0;
        }
        if (this.g != null && this.g.t) {
            this.g.o();
            n = this.g.b;
            if (n == 5) return 12;
            if (!this.g.m()) {
                if (n == 0) {
                    this.m().a(this.g.a.P(), 2);
                }
            } else {
                this.G.a(this.g.a, true);
            }
        }
        if (this.y != null && this.y.t) {
            this.y.o();
            n = this.y.b;
            if (n == 1) return 13;
            if (n == 2) return 14;
            if (n != 3) {
                if (n == 4) {
                    this.G.a(this.y.a, false);
                }
            } else {
                this.G.a(this.y.a, true);
            }
        }
        if (this.v != null && this.v.t) {
            if (this.v.j) return 6;
            this.G.a(this.v.h(), this.v.i, 1, -1, this.v.h.i, "o", null);
            return 0;
        }
        if (this.w != null && this.w.t) {
            this.w.o();
            return 0;
        }
        if (this.x != null && this.x.t) {
            this.x.o();
            return 0;
        }
        if (this.y != null && this.y.t) {
            this.y.o();
            return 0;
        }
        if (this.m != null && this.m.t) {
            this.m.o();
            this.K.a(this.m.h, 2);
            if (this.m.j()) return 18;
            return 5;
        }
        if (this.o != null && this.o.t) {
            this.o.o();
            return 0;
        }
        if (this.q != null && this.q.t) {
            this.q.o();
            return 0;
        }
        if (this.p != null && this.p.t) {
            this.p.o();
            return 0;
        }
        if (this.l != null && this.l.t) {
            this.l.o();
            this.l = null;
            return 0;
        }
        if (this.t != null && this.t.t) {
            this.t.o();
            return 0;
        }
        if (this.r != null && this.r.t) {
            this.r.o();
            return 0;
        }
        if (this.z != null && this.z.t) {
            this.z.o();
            switch (this.z.v) {
                default: {
                    return 0;
                }
                case 4: {
                    this.b("c");
                    return 0;
                }
                case 6: {
                    return 15;
                }
                case 5: {
                    return 11;
                }
                case 2: {
                    return 8;
                }
                case 1: {
                    return 7;
                }
                case 3: 
            }
            return 9;
        }
        if (this.A != null && this.A.t) {
            this.A.o();
        }
        if (this.B != null && this.B.t) {
            this.B.o();
        }
        if (this.C == null) return 0;
        if (!this.C.t) return 0;
        this.C.o();
        return 0;
    }

    public final boolean a(cq cq2, lk lk2) {
        if (!cq2.equals(bi.a)) {
            if (!cq2.equals(bi.b)) {
                if (!cq2.equals(bi.n)) {
                    if (!cq2.equals(bi.k)) {
                        if (!cq2.equals(bi.d) && !cq2.equals(bi.e)) {
                            if (cq2.equals(bi.o)) {
                                int cfr_ignored_0 = (null).length;
                            }
                            return false;
                        }
                        if (!ka.b()) {
                            if (!iu.g()) {
                                if (this.j == null) {
                                    this.j = new ab(this, this.O, this.L, lh.k().i());
                                }
                                this.j.n();
                                return true;
                            }
                            this.I.f();
                            this.I.z();
                        }
                        return true;
                    }
                    this.d().c_();
                    return true;
                }
                this.J().n();
                return true;
            }
            this.m().a(lk2);
            return true;
        }
        this.b("m");
        return true;
    }

    public final boolean a(String string, String string2) {
        String[] stringArray;
        aq aq2;
        int n = string.startsWith("dirfrom:");
        int n2 = string.startsWith("dirto:");
        if (n == 0 && n2 == 0) {
            aq2 = null;
        } else {
            fk fk2;
            String string3 = string.substring(string.indexOf(58) + 1);
            if (string3.indexOf(3) != -1) {
                stringArray = ed.a(string3, '\u0003');
                String string4 = stringArray.length > 2 ? stringArray[2] : null;
                n = stringArray.length > 3 && "1".equals(stringArray[3]) ? 1 : 0;
                string3 = stringArray.length > 4 && !ed.b(stringArray[4]) ? stringArray[4] : null;
                fk2 = n != 0 ? fk.b(new ar(iv.a(stringArray[0]), string4, 0)) : fk.a(stringArray[1], iv.a(stringArray[0]), null, string4, string3);
            } else {
                fk2 = fk.a(string3, null);
            }
            aq2 = n2 == 0 ? new aq(fk2, null) : new aq(null, fk2);
        }
        if (aq2 == null) {
            if (!string.startsWith("nearby:")) {
                if (!string.startsWith("sendsms:")) {
                    if (!string.startsWith("search:")) {
                        if (string.startsWith("kmlload:")) {
                            this.a(string2, 2, 3);
                            return true;
                        }
                        if (!string.startsWith("modifysearch:")) {
                            if (!string.startsWith("gmm:")) {
                                if (!string.startsWith("streetview_latlon:")) {
                                    if (!string.startsWith("streetview_panoid:")) {
                                        if (string.startsWith("streetview_directionstep:") && (n2 = (stringArray = ed.a(string2, '\u0003')).length - 1) >= 1) {
                                            int n3 = Integer.parseInt(stringArray[0]);
                                            ij[] ijArray = new ij[n2];
                                            for (n = 0; n < n2; ++n) {
                                                string = stringArray[n + 1];
                                                if (ed.b(string)) continue;
                                                ijArray[n] = ij.a(string);
                                            }
                                            this.N().a(n3, ijArray);
                                            return true;
                                        }
                                    } else {
                                        stringArray = ed.a(string2, '\u0003');
                                        if (stringArray.length >= 2) {
                                            string = stringArray[0];
                                            iv iv2 = iv.a(stringArray[1]);
                                            this.N().a(string, iv2);
                                            return true;
                                        }
                                    }
                                    return false;
                                }
                                this.a(iv.a(string2));
                                return true;
                            }
                            this.a(string);
                            return true;
                        }
                        this.a((byte)Integer.parseInt(string2));
                        return true;
                    }
                    this.a(string2, 2, 0);
                    return true;
                }
                this.R().a(string2);
                this.R().n();
                return true;
            }
            this.b("o");
            return true;
        }
        this.m().a(aq2);
        return true;
    }

    public final void a(gu gu2, gu gu3, ij ij2, lk lk2) {
        int n = gu2.a;
        int n2 = gu3.a;
        aq aq2 = new aq();
        if (n == 4) {
            if (n2 != 4) {
                aq2.b = ij2.a(gu3);
            }
        } else {
            aq2.a = ij2.a(gu2);
        }
        aq2.c = lk2;
        this.a(aq2);
    }

    public final void a(Vector vector, jt jt2) {
        if (this.r == null) {
            this.r = new f(this, this.L);
        }
        this.r.a(vector, jt2);
    }

    public final void b(jt jt2) {
        if (this.q == null) {
            this.q = new bf(this, this.L);
        }
        this.q.a(jt2);
    }

    public final void b(mo mo2) {
        if (this.w == null) {
            this.w = new hu(this, this.G);
        }
        this.w.a(mo2);
    }

    public final void a(iu iu2) {
        if (this.l == null) {
            if (this.l == null) {
                this.l = new pq(this, this.L);
            }
            this.l.a(iu2);
        }
    }

    public final void a(String string, String string2, String string3, String string4, jt jt2) {
        if (this.s == null) {
            this.s = new ih(this, this.L);
        }
        this.s.a(string, string2, string3, string4, jt2);
    }

    public final void h() {
        if (this.z == null) {
            this.z = new jc(this, this.M);
        }
        this.z.n();
    }

    public final j f() {
        if (this.y == null) {
            this.y = new j(this, this.L);
        }
        return this.y;
    }

    public final dz e() {
        if (this.o == null) {
            this.o = new dz(this, this.L);
        }
        return this.o;
    }

    public final eq c() {
        if (this.x == null) {
            this.x = new eq(this, this.G);
        }
        return this.x;
    }

    private en L() {
        if (this.k == null) {
            this.k = new en(this, this.L, this.G);
        }
        return this.k;
    }

    public final og b() {
        if (this.e == null) {
            this.e = new og(this, this.L, this.F);
        }
        return this.e;
    }

    private je J() {
        if (this.c == null) {
            this.c = new je(this, this.P, this.H);
        }
        return this.c;
    }

    private gn R() {
        if (this.n == null) {
            this.n = new gn(this, this.L, lh.k().i());
        }
        return this.n;
    }

    public final void i() {
        if (this.B == null) {
            this.B = new fc(this, this.K, lh.k().i());
        }
        this.B.n();
    }

    public final void l() {
        if (this.D == null) {
            this.D = new dp(this);
        }
        this.D.n();
    }

    public final ac d() {
        if (this.m == null) {
            this.m = new ac(this);
        }
        return this.m;
    }

    public final void j() {
        if (gf.l()) {
            if (this.C == null) {
                this.C = new gf(this);
            }
            this.C.n();
        }
    }

    public final void a() {
        if (this.Q) {
            this.j();
            return;
        }
        me.a((short)10, "i");
        this.J().l();
        this.J().n();
    }

    private ds N() {
        if (this.A == null) {
            this.A = new ds(this, this.L, this.M, this.K, this.G);
        }
        return this.A;
    }

    public final gg g() {
        if (this.g == null) {
            this.g = new gg(this, this.J, this.K, this.G);
        }
        return this.g;
    }

    public final bz m() {
        if (this.f == null) {
            this.f = new bz(this, this.M, this.H, this.L, this.K, this.F, bz.j());
        }
        return this.f;
    }

    public final void a(jr jr2) {
        if (!(jr2 instanceof gc)) {
            if (!(jr2 instanceof bp)) {
                this.m().a(((by)jr2).P(), 1);
                return;
            }
            this.m().a(((bp)jr2).P(), 4);
            return;
        }
        this.g().n();
    }

    public final void c(jt jt2) {
        if (this.p == null) {
            this.p = new cj(this);
        }
        this.p.a(jt2);
    }

    public final void s() {
        ep ep2 = this.d;
        if (ep2 != null) {
            if (this.e != null && this.e.t) {
                this.aa();
            }
            ep2.o();
        }
    }

    public final void u() {
        ep ep2 = this.d;
        if (ep2 != null) {
            ep2.g_();
        }
    }

    public final void v() {
        mo mo2 = gg.a(ps.a().j);
        if (mo2 != null) {
            this.G.a(mo2, mo2 instanceof by);
        }
    }

    public final void d(pb pb2) {
        if (pb2.b() == '*' && !this.d().t) {
            this.d().c_();
        }
    }

    private void aa() {
        if (this.e != null) {
            me.a((short)2, "", me.a(new String[]{"q=", "t=", "s=" + this.e.k, "c=c"}));
        }
    }

    public final void D() {
        this.d().i();
    }

    public final Vector G() {
        return this.F.b();
    }

    public final byte q() {
        return this.v.k;
    }

    public final boolean C() {
        return this.b instanceof gg;
    }

    public final void a(String string, int n, int n2, br br2) {
        this.G.a(string, n, n2, -1, null, "o", br2);
    }

    private void a(String string, int n, int n2) {
        this.G.a(string, n, n2, -1, null, "o", null);
    }

    public final void a(byte by2) {
        this.v.k = by2;
        this.v.n();
    }

    public final void a(String string) {
        this.L().n();
        this.L().a(string);
    }

    public final void b(String string) {
        this.b().k = string;
        this.b().n();
    }

    public final void c(String string) {
        this.J().n();
        this.J().a(string, true);
    }

    public final void a(ps ps2) {
        this.v = new cd(this, ps2);
    }

    public final void a(jt jt2, jt jt3, String string) {
        this.t = new li(this, this.L, this.K, this.M, this.H, this.F);
        this.t.a(li.l(), jt3, string, jt2);
    }

    public final void a(fk fk2, fk fk3, lk lk2) {
        this.a(new aq(fk2, fk3, lk2));
    }

    public eb(hj hj2, bi bi2, ka ka2, ck ck2, lh lh2, lh lh3, GoogleNav googleNav, String string, ff ff2, boolean bl2, bu bu2, gd gd2) {
        this.F = bi2;
        this.I = bu2;
        this.G = gd2;
        this.H = lh3;
        this.J = ff2;
        this.K = lh2;
        this.L = hj2;
        this.M = ck2;
        this.N = googleNav;
        this.O = ka2;
        this.P = string;
        this.Q = bl2;
        if (bu2 != null) {
            bu2.a = this;
        }
    }
}

