what-the-bank/sources/o/C2497afi.java

750 lines
24 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.scb.phone.domain.errors.RetrofitException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import kotlin.NoWhenBranchMatchedException;
import o.C0400Ft;
import o.C0690Mh;
import o.C2497afi;
import o.ZI;
import o.hHj;
import o.wRi;
/* renamed from: o.afi, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C2497afi extends ZI<InterfaceC9021dbp> {
public final C1100VpK a;
public C0400Ft b;
public String c;
public final YeV d;
public final Fbt e;
public C0400Ft.HBt h;
private final MzM i;
public static final /* synthetic */ void d(final C2497afi c2497afi, String str) {
Object obj;
C0400Ft c0400Ft = c2497afi.b;
C0400Ft c0400Ft2 = null;
if (c0400Ft == null) {
C14957gcv.a("");
c0400Ft = null;
}
for (C0400Ft.HBt hBt : c0400Ft.e) {
Iterator<T> it = hBt.l.iterator();
while (true) {
if (it.hasNext()) {
obj = it.next();
if (C14957gcv.b((Object) ((C0400Ft.LWm) obj).c, (Object) str)) {
break;
}
} else {
obj = null;
break;
}
}
gcQ.c(hBt.l).remove((C0400Ft.LWm) obj);
}
C0400Ft c0400Ft3 = c2497afi.b;
if (c0400Ft3 == null) {
C14957gcv.a("");
c0400Ft3 = null;
}
C0400Ft c0400Ft4 = c2497afi.b;
if (c0400Ft4 == null) {
C14957gcv.a("");
} else {
c0400Ft2 = c0400Ft4;
}
Iterator<T> it2 = c0400Ft2.e.iterator();
int i = 0;
while (it2.hasNext()) {
i += ((C0400Ft.HBt) it2.next()).l.size();
}
c0400Ft3.c = i;
ZI.IeS ieS = new ZI.IeS(c2497afi) { // from class: o.afH
private C2497afi e;
@Override // o.ZI.IeS
public final void e(Object obj2) {
C2497afi.d(this.e, (InterfaceC9021dbp) obj2);
}
{
this.e = c2497afi;
}
};
if (c2497afi.f != 0) {
ieS.e(c2497afi.f);
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
@InterfaceC13391fZD
public C2497afi(Fbt fbt, YeV yeV, C1100VpK c1100VpK, MzM mzM, C16903sI c16903sI) {
super(c16903sI);
C14957gcv.e(fbt, "");
C14957gcv.e(yeV, "");
C14957gcv.e(c1100VpK, "");
C14957gcv.e(mzM, "");
C14957gcv.e(c16903sI, "");
this.e = fbt;
this.d = yeV;
this.a = c1100VpK;
this.i = mzM;
this.c = "";
}
/* renamed from: o.afi$RVV */
/* loaded from: classes3.dex */
public static final class RVV {
private RVV() {
}
public /* synthetic */ RVV(byte b) {
this();
}
}
public final boolean c() {
C0400Ft.RVV rvv;
C0400Ft.HBt hBt = this.h;
if (hBt == null || (rvv = hBt.a) == null) {
rvv = C0400Ft.RVV.KOFAX;
}
return rvv == C0400Ft.RVV.KOFAX;
}
/* renamed from: o.afi$ojQ */
/* loaded from: classes3.dex */
public static final class ojQ extends wRi.LWm<hHj> {
private C2497afi a;
public ojQ(C2497afi c2497afi) {
this.a = c2497afi;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
C0400Ft.RVV rvv;
YW yw;
hHj hhj = (hHj) obj;
C14957gcv.e(hhj, "");
C2497afi c2497afi = this.a;
C0400Ft.IeS ieS = C0400Ft.b;
C14957gcv.e(hhj, "");
List<hHj.LWm> list = hhj.a;
C14957gcv.e(list, "");
ArrayList arrayList = new ArrayList(list instanceof Collection ? list.size() : 10);
Iterator it = list.iterator();
while (it.hasNext()) {
hHj.LWm lWm = (hHj.LWm) it.next();
C0400Ft.IeS ieS2 = C0400Ft.b;
String str = lWm.a;
String str2 = lWm.b;
boolean z = lWm.c;
int i = lWm.g;
Integer num = lWm.i;
String str3 = lWm.d;
String str4 = lWm.h;
int i2 = C0400Ft.IeS.HBt.d[lWm.e.ordinal()];
Iterator it2 = it;
if (i2 == 1) {
rvv = C0400Ft.RVV.NATIVE;
} else {
if (i2 != 2) {
throw new NoWhenBranchMatchedException();
}
rvv = C0400Ft.RVV.KOFAX;
}
C0400Ft.RVV rvv2 = rvv;
Set<Hzp> set = lWm.f;
C14957gcv.e(set, "");
ArrayList arrayList2 = new ArrayList(set instanceof Collection ? set.size() : 10);
Iterator it3 = set.iterator();
while (it3.hasNext()) {
int i3 = C0400Ft.IeS.HBt.b[((Hzp) it3.next()).ordinal()];
Iterator it4 = it3;
if (i3 == 1) {
yw = YW.TAKE_PHOTO;
} else if (i3 == 2) {
yw = YW.UPLOAD_PHOTO;
} else {
if (i3 != 3) {
throw new NoWhenBranchMatchedException();
}
yw = YW.UPLOAD_PDF;
}
arrayList2.add(yw);
it3 = it4;
}
Set h = C14881gav.h(arrayList2);
List<hHj.Sts> list2 = lWm.j;
C14957gcv.e(list2, "");
ArrayList arrayList3 = new ArrayList(list2 instanceof Collection ? list2.size() : 10);
for (Iterator it5 = list2.iterator(); it5.hasNext(); it5 = it5) {
hHj.Sts sts = (hHj.Sts) it5.next();
C0400Ft.IeS ieS3 = C0400Ft.b;
arrayList3.add(new C0400Ft.LWm(sts.b, sts.a));
}
ArrayList arrayList4 = arrayList3;
C14957gcv.e(arrayList4, "");
ArrayList arrayList5 = new ArrayList(arrayList4);
String b = C2974aoj.b(lWm.a);
arrayList.add(new C0400Ft.HBt(str, str2, z, i, num, str3, rvv2, str4, h, arrayList5, C14957gcv.b((Object) b, (Object) "CID") || C14957gcv.b((Object) b, (Object) "SALARY") || C14957gcv.b((Object) b, (Object) "STATEMENT") || C14957gcv.b((Object) b, (Object) "CAR")));
it = it2;
}
ArrayList arrayList6 = arrayList;
String str5 = hhj.e;
Iterator<T> it6 = hhj.a.iterator();
int i4 = 0;
while (it6.hasNext()) {
i4 += ((hHj.LWm) it6.next()).j.size();
}
c2497afi.b = new C0400Ft(arrayList6, str5, i4);
final C2497afi c2497afi2 = this.a;
ZI.IeS ieS4 = new ZI.IeS(c2497afi2) { // from class: o.afO
private C2497afi a;
@Override // o.ZI.IeS
public final void e(Object obj2) {
C2497afi.ojQ.e(this.a, (InterfaceC9021dbp) obj2);
}
{
this.a = c2497afi2;
}
};
if (c2497afi2.f != 0) {
ieS4.e(c2497afi2.f);
}
C2497afi.e(this.a);
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
C14957gcv.e(th, "");
C2497afi.d(this.a, th);
}
public static /* synthetic */ void e(C2497afi c2497afi, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(c2497afi, "");
C0400Ft c0400Ft = c2497afi.b;
if (c0400Ft == null) {
C14957gcv.a("");
c0400Ft = null;
}
interfaceC9021dbp.b(c0400Ft);
}
}
/* renamed from: o.afi$IeS */
/* loaded from: classes3.dex */
public final class IeS extends wRi.LWm<C17491xGR> {
private C2497afi c;
public IeS(C2497afi c2497afi) {
this.c = c2497afi;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
C17491xGR c17491xGR = (C17491xGR) obj;
C14957gcv.e(c17491xGR, "");
super.onNext(c17491xGR);
C2497afi.e(this.c);
C2497afi c2497afi = this.c;
ZI.IeS ieS = new ZI.IeS() { // from class: o.afN
@Override // o.ZI.IeS
public final void e(Object obj2) {
((InterfaceC9021dbp) obj2).h();
}
};
if (c2497afi.f != 0) {
ieS.e(c2497afi.f);
}
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
C14866gag c14866gag;
final ggV ggv;
C14957gcv.e(th, "");
if (th instanceof RetrofitException) {
VCl vCl = ((RetrofitException) th).e;
if (vCl == null || (ggv = vCl.c) == null) {
c14866gag = null;
} else {
C2497afi c2497afi = this.c;
String str = ggv.e;
if (C14957gcv.b((Object) str, (Object) "3034") || C14957gcv.b((Object) str, (Object) "3035")) {
ZI.IeS ieS = new ZI.IeS(ggv) { // from class: o.afP
private ggV a;
@Override // o.ZI.IeS
public final void e(Object obj) {
C2497afi.IeS.c(this.a, (InterfaceC9021dbp) obj);
}
{
this.a = ggv;
}
};
if (c2497afi.f != 0) {
ieS.e(c2497afi.f);
}
} else {
C2497afi.c(c2497afi, th, C0690Mh.IeS.JUST_DISMISS);
}
c14866gag = C14866gag.c;
}
if (c14866gag != null) {
return;
}
}
C2497afi.c(this.c, th, C0690Mh.IeS.JUST_DISMISS);
}
public static /* synthetic */ void c(ggV ggv, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(ggv, "");
interfaceC9021dbp.ar_();
String str = ggv.d;
C14957gcv.c((Object) str, "");
String str2 = ggv.c;
C14957gcv.c((Object) str2, "");
interfaceC9021dbp.d(str, str2);
}
}
/* renamed from: o.afi$LWm */
/* loaded from: classes3.dex */
public static final class LWm extends wRi.LWm<Boolean> {
private C2497afi a;
private boolean e;
LWm(C2497afi c2497afi, boolean z) {
this.a = c2497afi;
this.e = z;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
C2497afi.e(this.a);
if (this.e) {
C2497afi c2497afi = this.a;
ZI.IeS ieS = new ZI.IeS() { // from class: o.afQ
@Override // o.ZI.IeS
public final void e(Object obj2) {
((InterfaceC9021dbp) obj2).b();
}
};
if (c2497afi.f != 0) {
ieS.e(c2497afi.f);
return;
}
return;
}
C2497afi c2497afi2 = this.a;
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.afR
@Override // o.ZI.IeS
public final void e(Object obj2) {
((InterfaceC9021dbp) obj2).c();
}
};
if (c2497afi2.f != 0) {
ieS2.e(c2497afi2.f);
}
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
C14957gcv.e(th, "");
C2497afi.d(this.a, th);
}
}
/* renamed from: o.afi$Sts */
/* loaded from: classes3.dex */
public static final class Sts extends wRi.LWm<Boolean> {
private String b;
private C2497afi d;
public Sts(C2497afi c2497afi, String str) {
this.d = c2497afi;
this.b = str;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
C2497afi.d(this.d, this.b);
C2497afi.e(this.d);
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
C14957gcv.e(th, "");
C2497afi.d(this.d, th);
}
}
public static boolean b(String str, int i) {
return i <= 0 && (C14957gcv.b((Object) C2974aoj.b(str), (Object) C2974aoj.b("CID")) || C14957gcv.b((Object) C2974aoj.b(str), (Object) C2974aoj.b("SALARY")) || C14957gcv.b((Object) C2974aoj.b(str), (Object) C2974aoj.b("STATEMENT")) || C14957gcv.b((Object) C2974aoj.b(str), (Object) "CAR"));
}
public final void a(final String str) {
C14957gcv.e(str, "");
String[] strArr = {"jpeg", "jpg", "png"};
C14957gcv.e(strArr, "");
Set e = C14875gap.e(strArr);
if (!(e instanceof Collection) || !e.isEmpty()) {
Iterator it = e.iterator();
while (it.hasNext()) {
if (gdZ.a((String) it.next(), c(str), true)) {
ZI.IeS ieS = new ZI.IeS(str) { // from class: o.afF
private String a;
@Override // o.ZI.IeS
public final void e(Object obj) {
C2497afi.b(this.a, (InterfaceC9021dbp) obj);
}
{
this.a = str;
}
};
if (this.f != 0) {
ieS.e(this.f);
return;
}
return;
}
}
}
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.afG
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9021dbp) obj).f();
}
};
if (this.f != 0) {
ieS2.e(this.f);
}
}
public static String c(String str) {
String str2 = str;
C14957gcv.e(str2, "");
int b = gdZ.b((CharSequence) str2, '.', str2.length() - 1);
if (b > 0) {
String substring = str.substring(b + 1);
C14957gcv.c((Object) substring, "");
return substring;
}
return "";
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: o.afi$jbe */
/* loaded from: classes3.dex */
public static final class jbe extends AbstractC14961gcz implements InterfaceC14894gbR<BES, C14866gag> {
private C2497afi b;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(BES bes) {
C2497afi c2497afi = this.b;
final String str = bes.c;
C14957gcv.e(str, "");
ZI.IeS ieS = new ZI.IeS() { // from class: o.afz
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9021dbp) obj).ar_();
}
};
if (c2497afi.f != 0) {
ieS.e(c2497afi.f);
}
String[] strArr = {"jpeg", "jpg", "png"};
C14957gcv.e(strArr, "");
Set e = C14875gap.e(strArr);
if (!(e instanceof Collection) || !e.isEmpty()) {
Iterator it = e.iterator();
while (it.hasNext()) {
if (gdZ.a((String) it.next(), C2497afi.c(str), true)) {
ZI.IeS ieS2 = new ZI.IeS(str) { // from class: o.afC
private String c;
@Override // o.ZI.IeS
public final void e(Object obj) {
C2497afi.a(this.c, (InterfaceC9021dbp) obj);
}
{
this.c = str;
}
};
if (c2497afi.f != 0) {
ieS2.e(c2497afi.f);
}
return C14866gag.c;
}
}
}
ZI.IeS ieS3 = new ZI.IeS() { // from class: o.afy
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9021dbp) obj).f();
}
};
if (c2497afi.f != 0) {
ieS3.e(c2497afi.f);
}
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
jbe(C2497afi c2497afi) {
super(1);
this.b = c2497afi;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: o.afi$tOB */
/* loaded from: classes3.dex */
public static final class tOB extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
private C2497afi b;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
C2497afi c2497afi = this.b;
ZI.IeS ieS = new ZI.IeS() { // from class: o.afl
@Override // o.ZI.IeS
public final void e(Object obj) {
C2497afi.j((InterfaceC9021dbp) obj);
}
};
if (c2497afi.f != 0) {
ieS.e(c2497afi.f);
}
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
tOB(C2497afi c2497afi) {
super(1);
this.b = c2497afi;
}
}
public final void e(AbstractC13175fSw<BES> abstractC13175fSw) {
C14957gcv.e(abstractC13175fSw, "");
ZI.IeS ieS = new ZI.IeS() { // from class: o.afv
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9021dbp) obj).y();
}
};
if (this.f != 0) {
ieS.e(this.f);
}
final jbe jbeVar = new jbe(this);
fSQ<? super BES> fsq = new fSQ(jbeVar) { // from class: o.afu
private InterfaceC14894gbR e;
@Override // o.fSQ
public final void c(Object obj) {
C2497afi.e(this.e, obj);
}
{
this.e = jbeVar;
}
};
final tOB tob = new tOB(this);
abstractC13175fSw.b(fsq, new fSQ(tob) { // from class: o.afw
private InterfaceC14894gbR a;
@Override // o.fSQ
public final void c(Object obj) {
C2497afi.a(this.a, obj);
}
{
this.a = tob;
}
});
}
public static /* synthetic */ void c(C0400Ft.HBt hBt, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(hBt, "");
interfaceC9021dbp.c(hBt.h);
}
public static /* synthetic */ void c(String str, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(str, "");
interfaceC9021dbp.c(str, Hzp.FILE_STORAGE);
}
public static /* synthetic */ void e(String str, String str2, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(str, "");
C14957gcv.e(str2, "");
interfaceC9021dbp.a(str, str2, "pdf");
}
public static /* synthetic */ void d(String str, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(str, "");
interfaceC9021dbp.c(str, Hzp.GALLERY);
}
public static /* synthetic */ void a(String str, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(str, "");
interfaceC9021dbp.d(str);
}
public static /* synthetic */ void e(C2497afi c2497afi, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(c2497afi, "");
interfaceC9021dbp.e(c2497afi.c);
}
public static /* synthetic */ void e(boolean z, String str, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(str, "");
if (z) {
interfaceC9021dbp.e(str);
} else {
interfaceC9021dbp.i();
}
}
public static /* synthetic */ void b(String str, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(str, "");
interfaceC9021dbp.c(str);
}
public static /* synthetic */ void j(InterfaceC9021dbp interfaceC9021dbp) {
interfaceC9021dbp.ar_();
interfaceC9021dbp.i();
}
public static /* synthetic */ void e(String str, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(str, "");
interfaceC9021dbp.d(str, Hzp.CAMERA);
}
public static /* synthetic */ void e(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static /* synthetic */ void g(String str, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(str, "");
interfaceC9021dbp.c(str, Hzp.CAMERA);
}
public static /* synthetic */ void b(C0400Ft.LWm lWm, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(lWm, "");
interfaceC9021dbp.a(lWm.c);
}
public static /* synthetic */ void a(InterfaceC14894gbR interfaceC14894gbR, Object obj) {
C14957gcv.e(interfaceC14894gbR, "");
interfaceC14894gbR.invoke(obj);
}
public static /* synthetic */ void d(C2497afi c2497afi, InterfaceC9021dbp interfaceC9021dbp) {
C14957gcv.e(c2497afi, "");
C0400Ft c0400Ft = c2497afi.b;
if (c0400Ft == null) {
C14957gcv.a("");
c0400Ft = null;
}
interfaceC9021dbp.b(c0400Ft);
}
public static final /* synthetic */ void e(C2497afi c2497afi) {
if (c2497afi.f != 0) {
c2497afi.f.ar_();
}
}
public static final /* synthetic */ void d(C2497afi c2497afi, Throwable th) {
if (c2497afi.b(th)) {
c2497afi.d(c2497afi.j.e(th));
}
}
public static final /* synthetic */ void c(C2497afi c2497afi, Throwable th, C0690Mh.IeS ieS) {
if (c2497afi.b(th)) {
c2497afi.d(c2497afi.j.d(th, ieS));
}
}
public final void a() {
C0400Ft.RVV rvv;
C0400Ft.HBt hBt = this.h;
if (hBt == null || (rvv = hBt.a) == null) {
rvv = C0400Ft.RVV.KOFAX;
}
if (rvv == C0400Ft.RVV.KOFAX) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.afx
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9021dbp) obj).e();
}
};
if (this.f != 0) {
ieS.e(this.f);
return;
}
return;
}
ZI.IeS ieS2 = new ZI.IeS() { // from class: o.afE
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9021dbp) obj).g();
}
};
if (this.f != 0) {
ieS2.e(this.f);
}
}
public final void a(boolean z, String str, String str2, String str3) {
if (this.f != 0) {
this.f.y();
}
this.i.d(str, str2, str3);
MzM mzM = this.i;
mzM.d(mzM.i, new LWm(this, z));
}
/* renamed from: o.afi$HBt */
/* loaded from: classes3.dex */
public final /* synthetic */ class HBt {
public static final int[] a;
static {
int[] iArr = new int[Hzp.values().length];
try {
iArr[Hzp.CAMERA.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Hzp.GALLERY.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[Hzp.FILE_STORAGE.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
a = iArr;
}
}
static {
new RVV((byte) 0);
}
}