package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.s70, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2405s70 implements InterfaceC0764av {
    public final C0977d7 a;
    public final int b;

    public C2405s70(String str, int i) {
        this.a = new C0977d7(str);
        this.b = i;
    }

    @Override // o.InterfaceC0764av
    public final void a(C0860bv c0860bv) {
        int i = c0860bv.d;
        C0977d7 c0977d7 = this.a;
        if (i != -1) {
            int i2 = c0860bv.e;
            String str = c0977d7.m;
            String str2 = c0977d7.m;
            c0860bv.d(i, str, i2);
            if (str2.length() > 0) {
                c0860bv.e(i, str2.length() + i);
            }
        } else {
            int i3 = c0860bv.b;
            int i4 = c0860bv.c;
            String str3 = c0977d7.m;
            String str4 = c0977d7.m;
            c0860bv.d(i3, str3, i4);
            if (str4.length() > 0) {
                c0860bv.e(i3, str4.length() + i3);
            }
        }
        int i5 = c0860bv.b;
        int i6 = c0860bv.c;
        int i7 = i5 == i6 ? i6 : -1;
        int i8 = this.b;
        int iK = AbstractC0940cn0.k(i8 > 0 ? (i7 + i8) - 1 : (i7 + i8) - c0977d7.m.length(), 0, c0860bv.a.b());
        c0860bv.f(iK, iK);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof C2405s70)) {
            return false;
        }
        C2405s70 c2405s70 = (C2405s70) obj;
        return F3.c(this.a.m, c2405s70.a.m) && this.b == c2405s70.b;
    }

    public final int hashCode() {
        return (this.a.m.hashCode() * 31) + this.b;
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("SetComposingTextCommand(text='");
        sb.append(this.a.m);
        sb.append("', newCursorPosition=");
        return AbstractC2462sn.m(sb, this.b, ')');
    }
}
