package o; import com.scb.phone.domain.errors.RetrofitException; import java.util.Collections; import java.util.List; import java.util.Objects; import o.C0690Mh; import o.C15715hv; import o.C6553cWc; import o.InterfaceC9010dbe; import o.PRA; import o.ZI; import o.wRi; /* renamed from: o.cWc, reason: case insensitive filesystem */ /* loaded from: classes4.dex */ public class C6553cWc extends ZI { private final EC a; private final C0357Ew b; private final Jgy c; private boolean d; private final C0361Ez e; private final yGw g; @InterfaceC13391fZD public C6553cWc(C16903sI c16903sI, yGw ygw, Jgy jgy, EC ec, C0357Ew c0357Ew, C0361Ez c0361Ez) { super(c16903sI); this.g = ygw; this.c = jgy; this.a = ec; this.b = c0357Ew; this.e = c0361Ez; } @Override // o.ZI public final void w_() { super.w_(); yGw ygw = this.g; if (ygw.h.isDisposed()) { return; } ygw.h.dispose(); } public final void c(final C1189Xo c1189Xo, qhK qhk, String str, String str2, boolean z) { C14377fs c14377fs; C14377fs c14377fs2; C12852fJ c12852fJ; if (this.d) { return; } this.d = true; if (qhk == qhK.PROMPTPAY) { String a = c1189Xo.a(); C14589fw b = this.g.a.b(); C17024tMc e = this.g.a.e(); if (e == null) { c14377fs2 = new C14377fs(); } else { c14377fs = new C14377fs(); c14377fs.u = e.u; c14377fs.e = b.b; c14377fs.a = b.a; c14377fs.d = e.e; c14377fs.c = e.d; c14377fs.b = e.c; c14377fs.h = e.b; c14377fs.g = e.a; c14377fs.f = e.f; c14377fs.n = e.l; c14377fs.m = e.t; c14377fs.f9134o = e.k; c14377fs.r = e.s; c14377fs.j = e.h; c14377fs.l = e.i; c14377fs.i = C15602gz.e(C6583cXR.c(b.c).doubleValue()); c14377fs.t = b.h; c14377fs.q = b.j; String str3 = e.r; if (str3 == null) { str3 = ""; } c14377fs.s = str3; String str4 = e.q; if (str4 == null) { str4 = ""; } c14377fs.p = str4; c14377fs.v = a; c14377fs.k = z; c14377fs2 = c14377fs; } } else { String a2 = c1189Xo.a(); C14536fv a3 = this.g.a.a(); C17024tMc e2 = this.g.a.e(); if (e2 == null) { c14377fs2 = new C14377fs(); } else { c14377fs = new C14377fs(); c14377fs.u = e2.u; c14377fs.e = a3.a; c14377fs.a = a3.d; c14377fs.d = e2.e; c14377fs.c = e2.d; c14377fs.b = e2.c; c14377fs.g = e2.a; c14377fs.n = e2.l; c14377fs.m = e2.t; c14377fs.f9134o = e2.k; c14377fs.r = e2.s; c14377fs.j = e2.h; c14377fs.l = e2.i; c14377fs.i = C15602gz.e(C6583cXR.c(a3.b).doubleValue()); String str5 = e2.r; if (str5 == null) { str5 = ""; } c14377fs.s = str5; String str6 = e2.q; if (str6 == null) { str6 = ""; } c14377fs.p = str6; c14377fs.v = a2; c14377fs.k = z; c14377fs2 = c14377fs; } } if ("FIXED_TRANSFER".equals(c1189Xo.j())) { Jgy jgy = this.c; String a4 = c1189Xo.a(); if (jgy.b.f() == null) { c12852fJ = new C12852fJ(""); } else { c12852fJ = new C12852fJ(a4); } this.c.d(jgy.b.b(c12852fJ, str, str2).map(new fSS(this, c1189Xo) { // from class: o.cWa private C1189Xo c; private C6553cWc d; @Override // o.fSS public final Object a(Object obj) { return C6553cWc.e(this.d, this.c, (kkD) obj); } { this.d = this; this.c = c1189Xo; } }), new RVV(this, (byte) 0)); return; } this.g.d(this.g.a.a(c14377fs2, str, str2), new LWm(this, c1189Xo, c14377fs2.u, c14377fs2.v)); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.cWc$LWm */ /* loaded from: classes4.dex */ public final class LWm extends wRi.LWm { private final String b; private final C1189Xo c; private C6553cWc d; private final String e; @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onComplete() { } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { final kkD kkd = (kkD) obj; if (this.d.f != 0) { this.d.d = false; final iJI iji = kkd.m; C6553cWc c6553cWc = this.d; ZI.IeS ieS = new ZI.IeS(this, iji, kkd) { // from class: o.cWl private iJI b; private C6553cWc.LWm c; private kkD e; @Override // o.ZI.IeS public final void e(Object obj2) { C6553cWc.LWm.e(this.c, this.b, this.e, (InterfaceC9010dbe.Hsz) obj2); } { this.c = this; this.b = iji; this.e = kkd; } }; if (c6553cWc.f != 0) { ieS.e(c6553cWc.f); } } } public LWm(C6553cWc c6553cWc, C1189Xo c1189Xo, String str, String str2) { this.d = c6553cWc; this.c = c1189Xo; this.e = str; this.b = str2; } public static /* synthetic */ void e(LWm lWm, iJI iji, kkD kkd, InterfaceC9010dbe.Hsz hsz) { String str = ((iJI) Objects.requireNonNull(iji)).a; str.hashCode(); if (str.equals("8101") || str.equals("8102")) { C0361Ez unused = lWm.d.e; hsz.a(C0361Ez.d(iji.b, iji.d, lWm.e, lWm.b, kkd)); } else { C1191Xp d = lWm.d.a.d(kkd, lWm.c); if (lWm.d.g.b.H() != null) { d.m = true; } hsz.e(d); } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(final Throwable th) { if (this.d.f != 0) { this.d.d = false; final ggV h = C6553cWc.h(th); if (!ZI.j(th)) { if (ZI.c(th)) { C6553cWc c6553cWc = this.d; ZI.IeS ieS = new ZI.IeS(this, th) { // from class: o.cWh private C6553cWc.LWm a; private Throwable b; @Override // o.ZI.IeS public final void e(Object obj) { InterfaceC9010dbe.Hsz hsz = (InterfaceC9010dbe.Hsz) obj; hsz.d(this.a.d.j.e(this.b).c); } { this.a = this; this.b = th; } }; if (c6553cWc.f != 0) { ieS.e(c6553cWc.f); return; } return; } if (!ZI.d(th)) { if (!this.d.b(th, "8103") || h == null) { C6553cWc c6553cWc2 = this.d; C0690Mh.IeS ieS2 = C0690Mh.IeS.NAVIGATE_BACK; if (c6553cWc2.b(th)) { c6553cWc2.d(c6553cWc2.j.b(th, ieS2)); } C6553cWc c6553cWc3 = this.d; C6557cWg c6557cWg = new C6557cWg(); if (c6553cWc3.f != 0) { c6557cWg.e(c6553cWc3.f); return; } return; } C6553cWc c6553cWc4 = this.d; ZI.IeS ieS3 = new ZI.IeS(h) { // from class: o.cWm private ggV a; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9010dbe.Hsz) obj).c(r0.d, this.a.c); } { this.a = h; } }; if (c6553cWc4.f != 0) { ieS3.e(c6553cWc4.f); return; } return; } C6553cWc c6553cWc5 = this.d; C0690Mh.IeS ieS4 = C0690Mh.IeS.NAVIGATE_BACK; if (c6553cWc5.b(th)) { c6553cWc5.d(c6553cWc5.j.b(th, ieS4)); } C6553cWc c6553cWc6 = this.d; C6557cWg c6557cWg2 = new C6557cWg(); if (c6553cWc6.f != 0) { c6557cWg2.e(c6553cWc6.f); return; } return; } C6553cWc c6553cWc7 = this.d; C6556cWf c6556cWf = new C6556cWf(); if (c6553cWc7.f != 0) { c6556cWf.e(c6553cWc7.f); } } } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.cWc$RVV */ /* loaded from: classes4.dex */ public final class RVV extends wRi.LWm { private C6553cWc a; @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onComplete() { } private RVV(C6553cWc c6553cWc) { this.a = c6553cWc; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { final C1187Xm c1187Xm = (C1187Xm) obj; if (this.a.f != 0) { C6553cWc c6553cWc = this.a; ZI.IeS ieS = new ZI.IeS(c1187Xm) { // from class: o.cWi private C1187Xm b; @Override // o.ZI.IeS public final void e(Object obj2) { C6553cWc.RVV.d(this.b, (InterfaceC9010dbe.Hsz) obj2); } { this.b = c1187Xm; } }; if (c6553cWc.f != 0) { ieS.e(c6553cWc.f); } this.a.d = false; } } /* JADX INFO: Access modifiers changed from: package-private */ public static /* synthetic */ void d(C1187Xm c1187Xm, InterfaceC9010dbe.Hsz hsz) { hsz.b(c1187Xm); hsz.ar_(); } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(final Throwable th) { if (this.a.f != 0) { this.a.d = false; if (!ZI.j(th)) { if (ZI.c(th)) { C6553cWc c6553cWc = this.a; ZI.IeS ieS = new ZI.IeS(this, th) { // from class: o.cWj private C6553cWc.RVV c; private Throwable e; @Override // o.ZI.IeS public final void e(Object obj) { InterfaceC9010dbe.Hsz hsz = (InterfaceC9010dbe.Hsz) obj; hsz.d(this.c.a.j.e(this.e).c); } { this.c = this; this.e = th; } }; if (c6553cWc.f != 0) { ieS.e(c6553cWc.f); return; } return; } if (ZI.d(th)) { C6553cWc c6553cWc2 = this.a; C0690Mh.IeS ieS2 = C0690Mh.IeS.NAVIGATE_BACK; if (c6553cWc2.b(th)) { c6553cWc2.d(c6553cWc2.j.b(th, ieS2)); } C6553cWc c6553cWc3 = this.a; C6557cWg c6557cWg = new C6557cWg(); if (c6553cWc3.f != 0) { c6557cWg.e(c6553cWc3.f); return; } return; } if (C15602gz.c(th, "9000")) { C6553cWc c6553cWc4 = this.a; C0690Mh.IeS ieS3 = C0690Mh.IeS.JUST_DISMISS; if (c6553cWc4.b(th)) { c6553cWc4.d(c6553cWc4.j.b(th, ieS3)); return; } return; } C6553cWc c6553cWc5 = this.a; C0690Mh.IeS ieS4 = C0690Mh.IeS.NAVIGATE_BACK; if (c6553cWc5.b(th)) { c6553cWc5.d(c6553cWc5.j.b(th, ieS4)); } C6553cWc c6553cWc6 = this.a; C6557cWg c6557cWg2 = new C6557cWg(); if (c6553cWc6.f != 0) { c6557cWg2.e(c6553cWc6.f); return; } return; } C6553cWc c6553cWc7 = this.a; C6556cWf c6556cWf = new C6556cWf(); if (c6553cWc7.f != 0) { c6556cWf.e(c6553cWc7.f); } } } /* synthetic */ RVV(C6553cWc c6553cWc, byte b) { this(c6553cWc); } } public static /* synthetic */ C1187Xm e(C6553cWc c6553cWc, C1189Xo c1189Xo, kkD kkd) { String str; List emptyList; final C0357Ew c0357Ew = c6553cWc.b; boolean z = (c1189Xo.B == null || c1189Xo.B.isEmpty()) ? false : true; if (!"OWN".equalsIgnoreCase(c1189Xo.aE) && !"SCB".equalsIgnoreCase(c1189Xo.aE)) { if ("OTHER".equalsIgnoreCase(c1189Xo.aE)) { c1189Xo.s = null; c1189Xo.a(C0357Ew.i(c1189Xo.S)); } } else { c1189Xo.s = C0357Ew.i(c1189Xo.t); c1189Xo.a(C0357Ew.i(c1189Xo.S)); } String str2 = kkd.s; String a = c0357Ew.a(kkd.k, true); String a2 = c0357Ew.a(kkd.k, false); String str3 = (String) C16157lj.c(new Object[]{c0357Ew, kkd.q}, 838289628, -838289623, System.identityHashCode(c0357Ew)); String c = c0357Ew.c(C15715hv.tOB.ref_id, kkd.s); String b = c1189Xo.b(); String str4 = b != null ? b : ""; String d = c1189Xo.d(); String str5 = d != null ? d : ""; String str6 = c1189Xo.S; String str7 = str6 != null ? str6 : ""; String obj = C6583cXR.VS_(c0357Ew.a, C15715hv.IeS.bankicon_scb).toString(); String e = c1189Xo.e(); String str8 = e != null ? e : ""; String str9 = c1189Xo.s; String str10 = str9 != null ? str9 : ""; String str11 = c1189Xo.t; String str12 = str11 != null ? str11 : ""; String obj2 = C6583cXR.VS_(c0357Ew.a, C15715hv.IeS.bankicon_scb).toString(); String j = c1189Xo.j(); String str13 = c1189Xo.aE; String str14 = c1189Xo.V; String str15 = c1189Xo.z; String str16 = str15 != null ? str15 : ""; String str17 = c1189Xo.aH; String str18 = str17 != null ? str17 : ""; String c2 = C0357Ew.c(Double.valueOf(kkd.h)); String c3 = C0357Ew.c(Double.valueOf(kkd.f9192o)); String c4 = C16157lj.c(kkd.r); String c5 = C0357Ew.c(Double.valueOf(kkd.n)); List list = kkd.k; if (list == null) { str = str14; emptyList = Collections.emptyList(); } else { YKU yku = new YKU(list); str = str14; emptyList = (List) new YKU(yku.a, new wxK(yku.b, new InterfaceC1244Ytw(c0357Ew) { // from class: o.Es private C0357Ew d; @Override // o.InterfaceC1244Ytw public final Object d(Object obj3) { C0357Ew c0357Ew2 = this.d; HYO hyo = (HYO) obj3; boolean z2 = hyo.j != null && "1000".equals(hyo.j.c); StringBuilder sb = new StringBuilder(); sb.append(c0357Ew2.e(C15715hv.tOB.fixed_transfer_deposit_count)); sb.append(hyo.f); String obj4 = sb.toString(); if (obj4 == null) { obj4 = ""; } return new C1183Xj(obj4, z2, (z2 || hyo.j == null) ? null : hyo.j.d, C0357Ew.c(Double.valueOf(hyo.e)), C0357Ew.c(Double.valueOf(hyo.a)), C16157lj.c(hyo.h), C0357Ew.c(Double.valueOf(hyo.i))); } { this.d = c0357Ew; } })).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8())); } return new C1187Xm(str2, a, a2, str3, c, str4, str5, str7, obj, str8, str10, str12, obj2, j, str13, str, z, str16, str18, c2, c3, c4, c5, emptyList, C0357Ew.c(Double.valueOf(kkd.i))); } static /* synthetic */ ggV h(Throwable th) { if (!(th instanceof RetrofitException)) { return null; } RetrofitException retrofitException = (RetrofitException) th; if (retrofitException.e != null) { return retrofitException.e.c; } return null; } }