导航菜单

页面标题

页面副标题

Moneyman v2.316.0.0 - a.java 源代码

正在查看: Moneyman v2.316.0.0 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package Rd;

import Td.a;
import Wf.E;
import Wf.K;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import androidx.appcompat.widget.AppCompatEditText;
import bl.AbstractC0752b;
import com.redmadrobot.inputmask.helper.AffinityCalculationStrategy;
import com.redmadrobot.inputmask.helper.Mask;
import com.singular.sdk.BuildConfig;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.NoWhenBranchMatchedException;
import kotlin.collections.EmptyList;
import kotlin.jvm.internal.i;

public class a implements TextWatcher, View.OnFocusChangeListener {
    public static final C0036a m = new C0036a(null);
    public final String a;
    public final List b;
    public final List c;
    public final AffinityCalculationStrategy d;
    public final boolean e;
    public final boolean f;
    public final TextWatcher g;
    public final b h;
    public boolean i;
    public String j;
    public int k;
    public final WeakReference l;

    public static final class C0036a {
        public C0036a(kotlin.jvm.internal.d dVar) {
        }

        public static a a(C0036a c0036a, AppCompatEditText editText, String str, List list, boolean z, b bVar, int i) {
            AffinityCalculationStrategy affinityCalculationStrategy = AffinityCalculationStrategy.b;
            List affineFormats = (i & 4) != 0 ? EmptyList.a : list;
            EmptyList customNotations = EmptyList.a;
            if ((i & 16) != 0) {
                affinityCalculationStrategy = AffinityCalculationStrategy.a;
            }
            AffinityCalculationStrategy affinityCalculationStrategy2 = affinityCalculationStrategy;
            boolean z2 = (i & 64) == 0;
            c0036a.getClass();
            i.g(editText, "editText");
            i.g(affineFormats, "affineFormats");
            i.g(customNotations, "customNotations");
            a aVar = new a(str, affineFormats, customNotations, affinityCalculationStrategy2, z, z2, editText, null, bVar, false, 512, null);
            editText.addTextChangedListener(aVar);
            editText.setOnFocusChangeListener(aVar);
            return aVar;
        }
    }

    public a(String primaryFormat, List<String> affineFormats, List<Td.c> customNotations, AffinityCalculationStrategy affinityCalculationStrategy, boolean z, boolean z2, EditText field, TextWatcher textWatcher, b bVar, boolean z3) {
        i.g(primaryFormat, "primaryFormat");
        i.g(affineFormats, "affineFormats");
        i.g(customNotations, "customNotations");
        i.g(affinityCalculationStrategy, "affinityCalculationStrategy");
        i.g(field, "field");
        this.a = primaryFormat;
        this.b = affineFormats;
        this.c = customNotations;
        this.d = affinityCalculationStrategy;
        this.e = z;
        this.f = z2;
        this.g = textWatcher;
        this.h = bVar;
        this.i = z3;
        this.j = BuildConfig.FLAVOR;
        this.l = new WeakReference(field);
    }

    public final int a(Mask mask, Td.a aVar) {
        String str;
        int length;
        int e;
        AffinityCalculationStrategy affinityCalculationStrategy = this.d;
        affinityCalculationStrategy.getClass();
        int ordinal = affinityCalculationStrategy.ordinal();
        if (ordinal == 0) {
            return mask.b(aVar).c;
        }
        String str2 = aVar.a;
        if (ordinal != 1) {
            if (ordinal != 2) {
                if (ordinal != 3) {
                    throw new NoWhenBranchMatchedException();
                }
                length = mask.b(aVar).b.length();
                if (length > mask.f()) {
                    return Integer.MIN_VALUE;
                }
                e = mask.f();
            } else {
                if (str2.length() > mask.e()) {
                    return Integer.MIN_VALUE;
                }
                length = str2.length();
                e = mask.e();
            }
            return length - e;
        }
        String str3 = mask.b(aVar).a.a;
        if (str3.length() == 0 || str2.length() == 0) {
            str = BuildConfig.FLAVOR;
        } else {
            int i = 0;
            while (i < str3.length() && i < str2.length()) {
                if (str3.charAt(i) != str2.charAt(i)) {
                    str = str3.substring(0, i);
                    i.f(str, "this as java.lang.String…ing(startIndex, endIndex)");
                    break;
                }
                i++;
            }
            str = str3.substring(0, i);
            i.f(str, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        return str.length();
    }

    @Override
    public final void afterTextChanged(Editable editable) {
        WeakReference weakReference = this.l;
        EditText editText = (EditText) weakReference.get();
        if (editText != null) {
            editText.removeTextChangedListener(this);
        }
        if (editable != null) {
            editable.replace(0, editable.length(), this.j);
        }
        try {
            EditText editText2 = (EditText) weakReference.get();
            if (editText2 != null) {
                editText2.setSelection(this.k);
            }
        } catch (IndexOutOfBoundsException unused) {
            Log.e("input-mask-android", "\n                    \n                    WARNING! Your text field is not configured for the MaskedTextChangedListener! \n                    For more information please refer to \n                    \n                    InputMask vs. android:inputType and IndexOutOfBoundsException\n                    https://github.com/RedMadRobot/input-mask-android#inputmask-vs-androidinputtype-and-indexoutofboundsexception\n                    ");
        }
        EditText editText3 = (EditText) weakReference.get();
        if (editText3 != null) {
            editText3.addTextChangedListener(this);
        }
        TextWatcher textWatcher = this.g;
        if (textWatcher != null) {
            textWatcher.afterTextChanged(editable);
        }
    }

    public final Mask b(String format, List customNotations) {
        if (this.i) {
            com.redmadrobot.inputmask.helper.b.d.getClass();
            i.g(format, "format");
            i.g(customNotations, "customNotations");
            HashMap hashMap = com.redmadrobot.inputmask.helper.b.e;
            com.redmadrobot.inputmask.helper.b bVar = (com.redmadrobot.inputmask.helper.b) hashMap.get(AbstractC0752b.f(format));
            if (bVar != null) {
                return bVar;
            }
            com.redmadrobot.inputmask.helper.b bVar2 = new com.redmadrobot.inputmask.helper.b(format, customNotations);
            hashMap.put(AbstractC0752b.f(format), bVar2);
            return bVar2;
        }
        Mask.b.getClass();
        i.g(format, "format");
        i.g(customNotations, "customNotations");
        HashMap hashMap2 = Mask.c;
        Mask mask = (Mask) hashMap2.get(format);
        if (mask != null) {
            return mask;
        }
        Mask mask2 = new Mask(format, customNotations);
        hashMap2.put(format, mask2);
        return mask2;
    }

    @Override
    public final void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        TextWatcher textWatcher = this.g;
        if (textWatcher != null) {
            textWatcher.beforeTextChanged(charSequence, i, i2, i3);
        }
    }

    public final Mask c(Td.a aVar) {
        List list = this.b;
        if (list.isEmpty()) {
            return b(this.a, this.c);
        }
        int a = a(b(this.a, this.c), aVar);
        ArrayList arrayList = new ArrayList();
        Iterator it = list.iterator();
        while (it.hasNext()) {
            Mask b = b((String) it.next(), this.c);
            arrayList.add(new d(b, a(b, aVar)));
        }
        if (arrayList.size() > 1) {
            E.r(arrayList, new c());
        }
        Iterator it2 = arrayList.iterator();
        int i = 0;
        while (true) {
            if (!it2.hasNext()) {
                i = -1;
                break;
            }
            int i2 = i + 1;
            if (a >= ((d) it2.next()).b) {
                break;
            }
            i = i2;
        }
        if (i >= 0) {
            arrayList.add(i, new d(b(this.a, this.c), a));
        } else {
            arrayList.add(new d(b(this.a, this.c), a));
        }
        return ((d) K.L(arrayList)).a;
    }

    @Override
    public final void onFocusChange(View view, boolean z) {
        String valueOf;
        boolean z2 = this.e;
        if (z2 && z) {
            WeakReference weakReference = this.l;
            EditText editText = (EditText) weakReference.get();
            Editable text = editText != null ? editText.getText() : null;
            i.d(text);
            if (text.length() == 0) {
                valueOf = BuildConfig.FLAVOR;
            } else {
                EditText editText2 = (EditText) weakReference.get();
                valueOf = String.valueOf(editText2 != null ? editText2.getText() : null);
            }
            Td.a aVar = new Td.a(valueOf, valueOf.length(), new a.AbstractC0042a.b(z2));
            Mask.b b = c(aVar).b(aVar);
            Td.a aVar2 = b.a;
            this.j = aVar2.a;
            this.k = aVar2.b;
            EditText editText3 = (EditText) weakReference.get();
            if (editText3 != null) {
                editText3.setText(this.j);
            }
            try {
                EditText editText4 = (EditText) weakReference.get();
                if (editText4 != null) {
                    editText4.setSelection(aVar2.b);
                }
            } catch (IndexOutOfBoundsException unused) {
                Log.e("input-mask-android", "\n                        \n                    WARNING! Your text field is not configured for the MaskedTextChangedListener! \n                    For more information please refer to \n                    \n                    InputMask vs. android:inputType and IndexOutOfBoundsException\n                    https://github.com/RedMadRobot/input-mask-android#inputmask-vs-androidinputtype-and-indexoutofboundsexception\n                    ");
            }
            b bVar = this.h;
            if (bVar != null) {
                bVar.z(b.b, this.j, b.e);
            }
        }
    }

    @Override
    public final void onTextChanged(CharSequence text, int i, int i2, int i3) {
        i.g(text, "text");
        boolean z = i2 > 0 && i3 == 0;
        a.AbstractC0042a c0043a = z ? new a.AbstractC0042a.C0043a(z ? this.f : false) : new a.AbstractC0042a.b(z ? false : this.e);
        if (!z) {
            i += i3;
        }
        Td.a aVar = new Td.a(text.toString(), i, c0043a);
        Mask.b b = c(aVar).b(aVar);
        Td.a aVar2 = b.a;
        String str = aVar2.a;
        this.j = str;
        this.k = aVar2.b;
        b bVar = this.h;
        if (bVar != null) {
            bVar.z(b.b, str, b.e);
        }
    }

    public a(String format, EditText field) {
        this(format, field, (b) null);
        i.g(format, "format");
        i.g(field, "field");
    }

    public a(String format, EditText field, b bVar) {
        this(format, field, (TextWatcher) null, bVar);
        i.g(format, "format");
        i.g(field, "field");
    }

    public a(String format, EditText field, TextWatcher textWatcher, b bVar) {
        this(format, true, field, textWatcher, bVar);
        i.g(format, "format");
        i.g(field, "field");
    }

    public a(String primaryFormat, List<String> affineFormats, AffinityCalculationStrategy affinityCalculationStrategy, boolean z, EditText field, TextWatcher textWatcher, b bVar) {
        this(primaryFormat, affineFormats, EmptyList.a, affinityCalculationStrategy, z, false, field, textWatcher, bVar, false, 512, null);
        i.g(primaryFormat, "primaryFormat");
        i.g(affineFormats, "affineFormats");
        i.g(affinityCalculationStrategy, "affinityCalculationStrategy");
        i.g(field, "field");
    }

    public a(java.lang.String r12, java.util.List r13, java.util.List r14, com.redmadrobot.inputmask.helper.AffinityCalculationStrategy r15, boolean r16, boolean r17, android.widget.EditText r18, android.text.TextWatcher r19, Rd.b r20, boolean r21, int r22, kotlin.jvm.internal.d r23) {
        throw new UnsupportedOperationException("Method not decompiled: Rd.a.<init>(java.lang.String, java.util.List, java.util.List, com.redmadrobot.inputmask.helper.AffinityCalculationStrategy, boolean, boolean, android.widget.EditText, android.text.TextWatcher, Rd.b, boolean, int, kotlin.jvm.internal.d):void");
    }

    public a(java.lang.String r15, boolean r16, android.widget.EditText r17, android.text.TextWatcher r18, Rd.b r19) {
        throw new UnsupportedOperationException("Method not decompiled: Rd.a.<init>(java.lang.String, boolean, android.widget.EditText, android.text.TextWatcher, Rd.b):void");
    }

    public a(String primaryFormat, List<String> affineFormats, EditText field) {
        this(primaryFormat, affineFormats, field, (b) null);
        i.g(primaryFormat, "primaryFormat");
        i.g(affineFormats, "affineFormats");
        i.g(field, "field");
    }

    public a(String primaryFormat, List<String> affineFormats, EditText field, b bVar) {
        this(primaryFormat, affineFormats, field, (TextWatcher) null, bVar);
        i.g(primaryFormat, "primaryFormat");
        i.g(affineFormats, "affineFormats");
        i.g(field, "field");
    }

    public a(String primaryFormat, List<String> affineFormats, EditText field, TextWatcher textWatcher, b bVar) {
        this(primaryFormat, affineFormats, true, field, textWatcher, bVar);
        i.g(primaryFormat, "primaryFormat");
        i.g(affineFormats, "affineFormats");
        i.g(field, "field");
    }

    public a(String primaryFormat, List<String> affineFormats, boolean z, EditText field, TextWatcher textWatcher, b bVar) {
        this(primaryFormat, affineFormats, AffinityCalculationStrategy.a, z, field, textWatcher, bVar);
        i.g(primaryFormat, "primaryFormat");
        i.g(affineFormats, "affineFormats");
        i.g(field, "field");
    }
}