/*
 * Decompiled with CFR 0.152.
 */
public final class bf
extends ep
implements mt {
    private final bq c = lh.k().i().a(this, lh.d(143), jy.i, jy.a);
    private jt a;
    private jp b;
    private iy d;
    private hx e;

    public final cq d() {
        return jy.a;
    }

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

    public final void a() {
        this.l();
    }

    public final void b() {
        this.d = null;
        this.e = null;
        this.c.a("");
    }

    public final cq e() {
        gm gm2;
        if (this.e != null && (gm2 = this.e.r()) != null && gm2 == this.b) {
            return jy.c;
        }
        return null;
    }

    public final int a(nj nj2) {
        if (this.d.b(nj2) == -3) {
            return this.a(pb.a(7));
        }
        return 3;
    }

    public final boolean a(boolean bl2) {
        return this.a(this.d);
    }

    public final void a(ht ht2) {
        this.d.a(ht2, 0, 0);
    }

    public bf(eb eb2, hj hj2) {
        super(eb2, hj2);
        this.c.b(8);
    }

    private void l() {
        this.d = this.s.b(false, true);
        this.e = (hx)this.d.a();
        w w2 = jj.a();
        w w3 = jj.a(false);
        dz.a(this.e, lh.d(186), w2);
        dz.a(this.e, 4);
        dz.a(this.e, lh.d(185), w3);
        dz.a(this.e, 4);
        this.b = dz.a(this.e, lh.d(183), false, 4, this.s.k);
    }

    public final void g_() {
        if (this.t) {
            int n = -1;
            if (this.e != null) {
                n = this.e.g(this.e.q());
            }
            this.l();
            if (n != -1) {
                this.e.l(this.e.h(n));
            }
        }
    }

    public final int a(pb pb2) {
        gm gm2;
        if (this.e != null && pb2.c == 7 && (gm2 = this.e.r()) != null && gm2 == this.b) {
            this.c.a("+1");
            this.c.a();
            return 3;
        }
        if (pb2.d != 5 && pb2.c != 8) {
            this.d.a(pb2);
            return 3;
        }
        return 1;
    }

    public final void a(cq cq2, Object object) {
        object = (jp)this.e.r();
        if (cq2.equals(jy.i) && object == this.b) {
            String string = this.c.b().trim();
            StringBuffer stringBuffer = new StringBuffer();
            int n = string.length();
            for (int i = 0; i < n; ++i) {
                char c = string.charAt(i);
                if (c == '-' || c == ')' || c == '(' || c == ' ') continue;
                stringBuffer.append(c);
            }
            string = stringBuffer.toString();
            if (string.length() > 0 && !string.startsWith("+")) {
                string = "+" + string;
            }
            this.a.d(string);
            this.o();
        }
    }
}

