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

610 lines
21 KiB
Java

package o;
import android.content.res.Resources;
import com.scb.phone.domain.errors.RetrofitException;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import o.C0690Mh;
import o.C1064Uv;
import o.C1171Xc;
import o.C15715hv;
import o.C7606crW;
import o.InterfaceC9514dlF;
import o.TPk;
import o.ZI;
/* renamed from: o.crW, reason: case insensitive filesystem */
/* loaded from: classes4.dex */
public final class C7606crW extends ZI<InterfaceC9514dlF.Sts> {
public C1044Uj a;
final C0142Ab b;
public final C15864jJ c;
public C1047Um d;
public WW e;
final C0155Ak g;
private C1064Uv h;
private final C17411wa i;
private final Resources k;
private final C0148Af l;
private List<C1047Um> m;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
@InterfaceC13391fZD
public C7606crW(C16903sI c16903sI, C0142Ab c0142Ab, C17411wa c17411wa, C0155Ak c0155Ak, C0148Af c0148Af, C15864jJ c15864jJ, Resources resources) {
super(c16903sI);
C14957gcv.e(c16903sI, "");
C14957gcv.e(c0142Ab, "");
C14957gcv.e(c17411wa, "");
C14957gcv.e(c0155Ak, "");
C14957gcv.e(c0148Af, "");
C14957gcv.e(c15864jJ, "");
C14957gcv.e(resources, "");
this.b = c0142Ab;
this.i = c17411wa;
this.g = c0155Ak;
this.l = c0148Af;
this.c = c15864jJ;
this.k = resources;
}
/* renamed from: o.crW$IeS */
/* loaded from: classes4.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
/* renamed from: o.crW$HBt */
/* loaded from: classes4.dex */
public static final class HBt extends AbstractC14961gcz implements InterfaceC14894gbR<TPk, C14866gag> {
private C7606crW a;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(TPk tPk) {
TPk tPk2 = tPk;
String str = "";
C14957gcv.e(tPk2, "");
C7606crW.c(this.a);
C7606crW c7606crW = this.a;
C0142Ab c0142Ab = c7606crW.b;
C14957gcv.e(tPk2, "");
List<TPk.LWm> list = tPk2.a;
C14957gcv.e(list, "");
ArrayList arrayList = new ArrayList(list instanceof Collection ? list.size() : 10);
for (TPk.LWm lWm : list) {
arrayList.add(new C1064Uv.Sts(lWm.e, lWm.d, lWm.b, lWm.a, lWm.c, C0142Ab.d(lWm.g)));
}
ArrayList arrayList2 = arrayList;
List<SiD> list2 = tPk2.d;
C14957gcv.e(list2, "");
ArrayList arrayList3 = new ArrayList(list2 instanceof Collection ? list2.size() : 10);
for (Iterator it = list2.iterator(); it.hasNext(); it = it) {
SiD siD = (SiD) it.next();
String str2 = siD.b;
String str3 = siD.a;
String str4 = siD.e;
mNn mnn = siD.c;
arrayList3.add(new C1047Um(str2, str3, str4, new C1051Uo(mnn.e, mnn.a, mnn.d), C0142Ab.d(siD.d)));
str = str;
c7606crW = c7606crW;
arrayList2 = arrayList2;
}
String str5 = str;
C7606crW c7606crW2 = c7606crW;
ArrayList arrayList4 = arrayList2;
ArrayList arrayList5 = arrayList3;
String str6 = tPk2.e;
pCe pce = tPk2.c;
String str7 = pce.b;
String str8 = str7 == null ? str5 : str7;
String str9 = pce.f9237o;
String str10 = str9 == null ? str5 : str9;
String str11 = pce.i;
String str12 = str11 == null ? str5 : str11;
String str13 = pce.a;
String str14 = str13 == null ? str5 : str13;
String str15 = pce.c;
String str16 = str15 == null ? str5 : str15;
String str17 = pce.j;
String str18 = str17 == null ? str5 : str17;
String str19 = pce.h;
String str20 = str19 == null ? str5 : str19;
String str21 = pce.f;
String str22 = str21 == null ? str5 : str21;
String str23 = pce.d;
String str24 = str23 == null ? str5 : str23;
String str25 = pce.e;
String str26 = str25 == null ? str5 : str25;
String str27 = pce.g;
String str28 = str27 == null ? str5 : str27;
String str29 = pce.m;
c7606crW2.h = new C1064Uv(arrayList4, arrayList5, str6, new C1044Uj(str8, str10, str12, str14, str16, str18, str20, str22, str24, str26, str28, str29 == null ? str5 : str29));
C7606crW c7606crW3 = this.a;
C1064Uv c1064Uv = c7606crW3.h;
C1064Uv c1064Uv2 = null;
if (c1064Uv == null) {
C14957gcv.a(str5);
c1064Uv = null;
}
c7606crW3.a = c1064Uv.d;
C7606crW c7606crW4 = this.a;
C1064Uv c1064Uv3 = c7606crW4.h;
if (c1064Uv3 == null) {
C14957gcv.a(str5);
} else {
c1064Uv2 = c1064Uv3;
}
C7606crW.c(c7606crW4, c1064Uv2);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public HBt(C7606crW c7606crW) {
super(1);
this.a = c7606crW;
}
}
/* renamed from: o.crW$Sts */
/* loaded from: classes4.dex */
public static final class Sts extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
private C7606crW d;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
Throwable th2 = th;
C14957gcv.e(th2, "");
C7606crW.e(this.d, th2);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Sts(C7606crW c7606crW) {
super(1);
this.d = c7606crW;
}
}
public final void b(int i) {
List<C1047Um> list = this.m;
if (list == null) {
C14957gcv.a("");
list = null;
}
this.d = list.get(i);
ZI.IeS ieS = new ZI.IeS(this) { // from class: o.csc
private C7606crW b;
@Override // o.ZI.IeS
public final void e(Object obj) {
C7606crW.d(this.b, (InterfaceC9514dlF.Sts) obj);
}
{
this.b = this;
}
};
if (this.f != 0) {
ieS.e(this.f);
}
}
/* renamed from: o.crW$LWm */
/* loaded from: classes4.dex */
public static final class LWm extends AbstractC14961gcz implements InterfaceC14894gbR<Throwable, C14866gag> {
private C7606crW b;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(Throwable th) {
Throwable th2 = th;
C14957gcv.e(th2, "");
C7606crW.d(this.b, th2);
return C14866gag.c;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LWm(C7606crW c7606crW) {
super(1);
this.b = c7606crW;
}
}
/* renamed from: o.crW$RVV */
/* loaded from: classes4.dex */
public static final class RVV extends AbstractC14961gcz implements InterfaceC14894gbR<C10236dyv, C14866gag> {
private C7606crW d;
@Override // o.InterfaceC14894gbR
public final /* synthetic */ C14866gag invoke(C10236dyv c10236dyv) {
final C10236dyv c10236dyv2 = c10236dyv;
C14957gcv.e(c10236dyv2, "");
C7606crW.c(this.d);
final C7606crW c7606crW = this.d;
ZI.IeS ieS = new ZI.IeS(c7606crW, c10236dyv2) { // from class: o.csd
private C7606crW a;
private C10236dyv e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C7606crW.RVV.a(this.a, this.e, (InterfaceC9514dlF.Sts) obj);
}
{
this.a = c7606crW;
this.e = c10236dyv2;
}
};
if (c7606crW.f != 0) {
ieS.e(c7606crW.f);
}
return C14866gag.c;
}
public static /* synthetic */ void a(C7606crW c7606crW, C10236dyv c10236dyv, InterfaceC9514dlF.Sts sts) {
C14957gcv.e(c7606crW, "");
C14957gcv.e(c10236dyv, "");
C0155Ak c0155Ak = c7606crW.g;
C14957gcv.e(c10236dyv, "");
UD ud = new UD(c10236dyv.f8938o, c10236dyv.e, c10236dyv.a, c10236dyv.c, c10236dyv.h, c10236dyv.g, c10236dyv.b, c10236dyv.j, c10236dyv.d, c10236dyv.f, c10236dyv.m, c10236dyv.i);
C1064Uv c1064Uv = c7606crW.h;
if (c1064Uv == null) {
C14957gcv.a("");
c1064Uv = null;
}
sts.e(ud, c1064Uv);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RVV(C7606crW c7606crW) {
super(1);
this.d = c7606crW;
}
}
@Override // o.ZI
public final void w_() {
this.c.a();
super.w_();
}
private static String a(String str, String str2) {
if (str2.length() == 0) {
return "";
}
if (C14957gcv.b((Object) str, (Object) "Road")) {
StringBuilder sb = new StringBuilder();
sb.append(str2);
sb.append(" ");
sb.append(str);
return sb.toString();
}
if (C14957gcv.b((Object) str, (Object) "")) {
return str2;
}
StringBuilder sb2 = new StringBuilder();
sb2.append(str);
sb2.append(" ");
sb2.append(str2);
return sb2.toString();
}
private static String a(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, String str9, String str10) {
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append(" ");
sb.append(str2);
String obj = gdZ.b((CharSequence) sb.toString()).toString();
StringBuilder sb2 = new StringBuilder();
sb2.append(str3);
sb2.append(" ");
sb2.append(str4);
sb2.append(" ");
sb2.append(str5);
sb2.append(" ");
sb2.append(str6);
String obj2 = gdZ.b((CharSequence) sb2.toString()).toString();
StringBuilder sb3 = new StringBuilder();
sb3.append(str7);
sb3.append(" ");
sb3.append(str8);
String obj3 = gdZ.b((CharSequence) sb3.toString()).toString();
StringBuilder sb4 = new StringBuilder();
sb4.append(str9);
sb4.append(" ");
sb4.append(str10);
ArrayList<String> c = C14881gav.c(obj, obj2, obj3, gdZ.b((CharSequence) sb4.toString()).toString());
StringBuffer stringBuffer = new StringBuffer();
for (String str11 : c) {
if (str11.length() > 0) {
stringBuffer.append(str11).append("\n");
}
}
StringBuffer stringBuffer2 = stringBuffer;
C14957gcv.e(stringBuffer2, "");
int length = stringBuffer2.length() - 1;
if (length < 0) {
length = 0;
}
C14957gcv.e(stringBuffer2, "");
if (length < 0) {
StringBuilder sb5 = new StringBuilder("Requested character count ");
sb5.append(length);
sb5.append(" is less than zero.");
throw new IllegalArgumentException(sb5.toString().toString());
}
int length2 = stringBuffer2.length();
if (length > length2) {
length = length2;
}
return stringBuffer2.subSequence(0, length).toString();
}
private static String b(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, String str9, String str10, String str11, String str12) {
StringBuilder sb = new StringBuilder();
sb.append(str2);
sb.append(" ");
sb.append(str4);
sb.append(" ");
sb.append(str3);
String obj = gdZ.b((CharSequence) sb.toString()).toString();
StringBuilder sb2 = new StringBuilder();
sb2.append(str);
sb2.append(" ");
sb2.append(str5);
sb2.append(" ");
sb2.append(str6);
sb2.append(" ");
sb2.append(str7);
sb2.append(" ");
sb2.append(str8);
String obj2 = gdZ.b((CharSequence) sb2.toString()).toString();
StringBuilder sb3 = new StringBuilder();
sb3.append(str9);
sb3.append(" ");
sb3.append(str10);
String obj3 = gdZ.b((CharSequence) sb3.toString()).toString();
StringBuilder sb4 = new StringBuilder();
sb4.append(str11);
sb4.append(" ");
sb4.append(str12);
ArrayList<String> c = C14881gav.c(obj, obj2, obj3, gdZ.b((CharSequence) sb4.toString()).toString());
StringBuffer stringBuffer = new StringBuffer();
for (String str13 : c) {
if (str13.length() > 0) {
stringBuffer.append(str13).append("\n");
}
}
String obj4 = stringBuffer.toString();
C14957gcv.c((Object) obj4, "");
C14957gcv.e(obj4, "");
int length = obj4.length() - 1;
if (length < 0) {
length = 0;
}
return gdZ.b(obj4, length);
}
public static /* synthetic */ void b(List list, C7606crW c7606crW, InterfaceC9514dlF.Sts sts) {
C14957gcv.e(list, "");
C14957gcv.e(c7606crW, "");
C1171Xc.IeS ieS = new C1171Xc.IeS(YE.PREPAID_CARD_REQUEST_SOURCE_FUNCTION);
C1171Xc c1171Xc = ieS.c;
c1171Xc.a = false;
c1171Xc.b = true;
c1171Xc.j = true;
c1171Xc.g = true;
ieS.c.g = false;
ieS.c.j = false;
ieS.c.b = false;
ieS.c.c = 2;
sts.d(ieS.c);
sts.e((List<? extends QE>) list);
List<C1047Um> list2 = c7606crW.m;
if (list2 == null) {
C14957gcv.a("");
list2 = null;
}
sts.b(list2.size() <= 10);
c7606crW.b(0);
C1044Uj c1044Uj = c7606crW.a;
if (c1044Uj != null) {
sts.e(c7606crW.a(c1044Uj));
}
sts.e();
}
public static /* synthetic */ void d(C7606crW c7606crW, InterfaceC9514dlF.Sts sts) {
C14957gcv.e(c7606crW, "");
NumberFormat c = C6583cXR.c();
C1047Um c1047Um = c7606crW.d;
C1047Um c1047Um2 = null;
if (c1047Um == null) {
C14957gcv.a("");
c1047Um = null;
}
String format = c.format(c1047Um.a.c);
C14957gcv.c((Object) format, "");
sts.a(format);
NumberFormat c2 = C6583cXR.c();
C1047Um c1047Um3 = c7606crW.d;
if (c1047Um3 == null) {
C14957gcv.a("");
c1047Um3 = null;
}
String format2 = c2.format(c1047Um3.a.a);
C14957gcv.c((Object) format2, "");
sts.c(format2);
NumberFormat c3 = C6583cXR.c();
C1047Um c1047Um4 = c7606crW.d;
if (c1047Um4 == null) {
C14957gcv.a("");
} else {
c1047Um2 = c1047Um4;
}
String format3 = c3.format(c1047Um2.a.e);
C14957gcv.c((Object) format3, "");
sts.d(format3);
}
public static /* synthetic */ void b(C7606crW c7606crW, C1044Uj c1044Uj, InterfaceC9514dlF.Sts sts) {
C14957gcv.e(c7606crW, "");
C14957gcv.e(c1044Uj, "");
sts.e(c7606crW.a(c1044Uj));
}
public static /* synthetic */ void c(C7606crW c7606crW, InterfaceC9514dlF.Sts sts) {
C14957gcv.e(c7606crW, "");
C1044Uj c1044Uj = c7606crW.a;
if (c1044Uj != null) {
C0148Af c0148Af = c7606crW.l;
SP b = C0148Af.b(c1044Uj);
C14957gcv.c(b, "");
sts.e(b);
}
}
public static final /* synthetic */ void c(C7606crW c7606crW) {
if (c7606crW.f != 0) {
c7606crW.f.ar_();
}
}
public static final /* synthetic */ void e(C7606crW c7606crW, Throwable th) {
C14866gag c14866gag;
if (th instanceof RetrofitException) {
VCl vCl = ((RetrofitException) th).e;
if (vCl != null) {
if (C14957gcv.b((Object) vCl.c.e, (Object) "9100")) {
ZI.IeS ieS = new ZI.IeS() { // from class: o.csa
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9514dlF.Sts) obj).d();
}
};
if (c7606crW.f != 0) {
ieS.e(c7606crW.f);
}
if (c7606crW.f != 0) {
c7606crW.f.ar_();
}
} else {
C0690Mh.IeS ieS2 = C0690Mh.IeS.NAVIGATE_BACK;
if (c7606crW.b(th)) {
c7606crW.d(c7606crW.j.d(th, ieS2));
}
}
c14866gag = C14866gag.c;
} else {
c14866gag = null;
}
if (c14866gag != null) {
return;
}
}
C0690Mh.IeS ieS3 = C0690Mh.IeS.NAVIGATE_BACK;
if (c7606crW.b(th)) {
c7606crW.d(c7606crW.j.d(th, ieS3));
}
}
public static final /* synthetic */ void c(final C7606crW c7606crW, C1064Uv c1064Uv) {
List<C1047Um> list = c1064Uv.e;
c7606crW.m = list;
if (list == null) {
C14957gcv.a("");
list = null;
}
List<C1047Um> list2 = list;
C14957gcv.e(list2, "");
ArrayList arrayList = new ArrayList(list2 instanceof Collection ? list2.size() : 10);
Iterator<T> it = list2.iterator();
while (it.hasNext()) {
arrayList.add(c7606crW.i.b(((C1047Um) it.next()).d, null));
}
final ArrayList arrayList2 = arrayList;
ZI.IeS ieS = new ZI.IeS(arrayList2, c7606crW) { // from class: o.csb
private List a;
private C7606crW c;
@Override // o.ZI.IeS
public final void e(Object obj) {
C7606crW.b(this.a, this.c, (InterfaceC9514dlF.Sts) obj);
}
{
this.a = arrayList2;
this.c = c7606crW;
}
};
if (c7606crW.f != 0) {
ieS.e(c7606crW.f);
}
}
public static final /* synthetic */ void d(C7606crW c7606crW, Throwable th) {
C14866gag c14866gag;
if (th instanceof RetrofitException) {
VCl vCl = ((RetrofitException) th).e;
if (vCl != null) {
C14957gcv.b((Object) vCl.c.e, (Object) "7001");
C0690Mh.IeS ieS = C0690Mh.IeS.JUST_DISMISS;
if (c7606crW.b(th)) {
c7606crW.d(c7606crW.j.d(th, ieS));
}
c14866gag = C14866gag.c;
} else {
c14866gag = null;
}
if (c14866gag != null) {
return;
}
}
C0690Mh.IeS ieS2 = C0690Mh.IeS.JUST_DISMISS;
if (c7606crW.b(th)) {
c7606crW.d(c7606crW.j.d(th, ieS2));
}
}
private final String a(C1044Uj c1044Uj) {
String a = a("", c1044Uj.a);
String a2 = a("", c1044Uj.m);
String string = this.k.getString(C15715hv.tOB.prepaid_request_mailing_address_unit);
C14957gcv.c((Object) string, "");
String a3 = a(string, c1044Uj.h);
String string2 = this.k.getString(C15715hv.tOB.prepaid_request_mailing_address_floor);
C14957gcv.c((Object) string2, "");
String a4 = a(string2, c1044Uj.c);
String string3 = this.k.getString(C15715hv.tOB.prepaid_request_mailing_address_moo);
C14957gcv.c((Object) string3, "");
String a5 = a(string3, c1044Uj.d);
String string4 = this.k.getString(C15715hv.tOB.prepaid_request_mailing_address_trok);
C14957gcv.c((Object) string4, "");
String a6 = a(string4, c1044Uj.f);
String string5 = this.k.getString(C15715hv.tOB.prepaid_request_mailing_address_soi);
C14957gcv.c((Object) string5, "");
String a7 = a(string5, c1044Uj.i);
String string6 = this.k.getString(C15715hv.tOB.prepaid_request_mailing_address_road);
C14957gcv.c((Object) string6, "");
String a8 = a(string6, c1044Uj.g);
String a9 = a("", c1044Uj.b);
String a10 = a("", c1044Uj.e);
String a11 = a("", c1044Uj.j);
String a12 = a("", c1044Uj.n);
if (a4.length() > 0) {
return b(a, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12);
}
return a(a, a2, a5, a6, a7, a8, a9, a10, a11, a12);
}
static {
new IeS((byte) 0);
}
}