package o; import com.scb.phone.data.entity.transfer.SingleDataEntity; import java.util.ArrayList; import java.util.List; import java.util.Objects; import o.PRA; import org.threeten.bp.OffsetDateTime; /* loaded from: classes3.dex */ public final class uZS implements Jzm { final AUd a; final HUS b; final vsJ c; final InterfaceC3521azC d; final RsS e; final C17646ybx f; private final Evt g; final hmt h; private final C15897jTl i; private final FUU j; private final String k; @InterfaceC13391fZD public uZS(C15897jTl c15897jTl, HUS hus, FUU fuu, C17646ybx c17646ybx, RsS rsS, Evt evt, hmt hmtVar, vsJ vsj, AUd aUd, InterfaceC3521azC interfaceC3521azC, String str) { this.i = c15897jTl; this.b = hus; this.j = fuu; this.f = c17646ybx; this.e = rsS; this.g = evt; this.h = hmtVar; this.c = vsj; this.a = aUd; this.d = interfaceC3521azC; this.k = str; } @Override // o.Jzm public final AbstractC13163fSk g() { return d(false); } @Override // o.Jzm public final AbstractC13163fSk d(boolean z) { phi i = i(); if (i != null && i.b != null && i.b.isEmpty()) { return AbstractC13163fSk.just(new hMS(new ArrayList(), null, Double.valueOf(0.0d), false, null, "", false, new ArrayList(), new qXn(), false)); } if (z && this.b.b != null) { return AbstractC13163fSk.just(d(this.b.b)); } AbstractC13163fSk creditCard = this.i.b.getCreditCard(i); final HUS hus = this.b; Objects.requireNonNull(hus); return creditCard.doOnNext(new fSQ(hus) { // from class: o.zdy private HUS c; @Override // o.fSQ public final void c(Object obj) { this.c.b = (lBu) obj; } { this.c = hus; } }).doOnError(new fSQ(this) { // from class: o.KpY private uZS c; @Override // o.fSQ public final void c(Object obj) { this.c.b.b = null; } { this.c = this; } }).map(new fSS(this) { // from class: o.TTg private uZS b; @Override // o.fSS public final Object a(Object obj) { return this.b.d((lBu) obj); } { this.b = this; } }); } /* JADX INFO: Access modifiers changed from: package-private */ public final hMS d(lBu lbu) { List arrayList; Evt evt = this.g; FUU fuu = this.j; C7968cyO c7968cyO = (C7968cyO) FUU.d(new Object[]{fuu}, 1479505950, -1479505941, System.identityHashCode(fuu)); if (c7968cyO == null) { arrayList = new ArrayList<>(); } else { arrayList = c7968cyO.e; } hMS e = evt.e(lbu, arrayList, (String) null, lbu.a); if (e.d != null && this.d.d(String.valueOf(e.d.a))) { e.d = null; } return e; } @Override // o.Jzm public final AbstractC13163fSk e(YUT yut) { return this.i.b.getCreditCardStatement(yut).flatMap(new fSS(this) { // from class: o.VFI private uZS c; @Override // o.fSS public final Object a(Object obj) { nrT nrt = (nrT) obj; hmt hmtVar = this.c.h; jDq d = jDq.d(); d.d = nrt.b; d.b = nrt.a; d.a = nrt.d; d.c = (OffsetDateTime) ZTC.e(new Object[]{nrt.e, null}, 267499366, -267499366, (int) System.currentTimeMillis()); final C12207etp c12207etp = hmtVar.d; Iterable iterable = nrt.c; if (iterable == null) { iterable = new ArrayList(); } YKU yku = new YKU(iterable); d.h = (List) new YKU(yku.a, new wxK(yku.b, new InterfaceC1244Ytw(c12207etp) { // from class: o.bxw private C12207etp e; @Override // o.InterfaceC1244Ytw public final Object d(Object obj2) { QSH qsh = (QSH) obj2; nLn e = nLn.e(); e.i = (OffsetDateTime) ZTC.e(new Object[]{qsh.e, null}, 267499366, -267499366, (int) System.currentTimeMillis()); e.f = qsh.f; e.d = qsh.c; e.a = qsh.b.c; e.j = (OffsetDateTime) ZTC.e(new Object[]{qsh.j, null}, 267499366, -267499366, (int) System.currentTimeMillis()); e.h = qsh.g; e.c = qsh.d; e.b = qsh.a; e.g = qsh.h; return e; } { this.e = c12207etp; } })).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8())); return AbstractC13163fSk.just(d); } { this.c = this; } }).onErrorReturnItem(jDq.d()); } private phi i() { Iterable arrayList; phi e = phi.e(); FUU fuu = this.j; C7968cyO c7968cyO = (C7968cyO) FUU.d(new Object[]{fuu}, 1479505950, -1479505941, System.identityHashCode(fuu)); if (c7968cyO == null) { arrayList = new ArrayList(); } else { arrayList = c7968cyO.e; } YKU yku = new YKU(arrayList); e.b = (List) new YKU(yku.a, new wxK(yku.b, new InterfaceC1244Ytw() { // from class: o.ofI @Override // o.InterfaceC1244Ytw public final Object d(Object obj) { YUT d = YUT.d(); d.b = ((hAo) obj).j; return d; } })).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8())); e.a = this.k; return e; } @Override // o.Jzm public final void e(String str, List list) { this.b.d.put(str, list); } @Override // o.Jzm public final List e(String str) { return this.b.d.get(str); } @Override // o.Jzm public final void e() { this.b.d.clear(); } @Override // o.Jzm public final void c() { this.b.e.clear(); } @Override // o.Jzm public final void a() { this.b.c.clear(); } @Override // o.Jzm public final void b() { this.a.d = null; } @Override // o.Jzm public final void d() { this.b.b = null; } @Override // o.Jzm public final AbstractC13175fSw e(String str, String str2) { if (this.a.d != null) { return AbstractC13175fSw.d(vsJ.b(this.a.d, this.d)); } C15897jTl c15897jTl = this.i; return new C13372fYk(new C13372fYk(c15897jTl.b.getContextualAds(this.k, str, str2), new fSS() { // from class: o.gMG @Override // o.fSS public final Object a(Object obj) { return (C17769zcZ) ((SingleDataEntity) obj).getData(); } }), new fSS(this) { // from class: o.RJn private uZS b; @Override // o.fSS public final Object a(Object obj) { uZS uzs = this.b; C17769zcZ c17769zcZ = (C17769zcZ) obj; uzs.a.d = c17769zcZ; vsJ vsj = uzs.c; return vsJ.b(c17769zcZ, uzs.d); } { this.b = this; } }); } @Override // o.Jzm public final AbstractC13163fSk b(final JGs jGs) { HUS hus = this.b; C0867QhA c0867QhA = hus.c.get(jGs.a); if (c0867QhA == null) { return this.i.b.getRewards(jGs).map(new fSS() { // from class: o.RxD @Override // o.fSS public final Object a(Object obj) { return (C0867QhA) ((SingleDataEntity) obj).getData(); } }).doOnNext(new fSQ(this, jGs) { // from class: o.Gmn private uZS a; private JGs b; @Override // o.fSQ public final void c(Object obj) { uZS uzs = this.a; JGs jGs2 = this.b; HUS hus2 = uzs.b; String str = jGs2.a; hus2.c.put(str, (C0867QhA) obj); } { this.a = this; this.b = jGs; } }).flatMap(new fSS(this) { // from class: o.VCy private uZS a; @Override // o.fSS public final Object a(Object obj) { RsS rsS = this.a.e; return AbstractC13163fSk.just(RsS.c((C0867QhA) obj)); } { this.a = this; } }); } return AbstractC13163fSk.just(RsS.c(c0867QhA)); } @Override // o.Jzm public final AbstractC13163fSk e(final oJJ ojj) { HUS hus = this.b; C2829alw c2829alw = hus.e.get(ojj.a); if (c2829alw == null) { return this.i.b.getUnbilled(ojj).doOnNext(new fSQ(this, ojj) { // from class: o.AQD private oJJ b; private uZS c; @Override // o.fSQ public final void c(Object obj) { uZS uzs = this.c; oJJ ojj2 = this.b; HUS hus2 = uzs.b; String str = ojj2.a; hus2.e.put(str, (C2829alw) obj); } { this.c = this; this.b = ojj; } }).flatMap(new fSS(this) { // from class: o.tMR private uZS a; @Override // o.fSS public final Object a(Object obj) { return AbstractC13163fSk.just(this.a.f.e((C2829alw) obj)); } { this.a = this; } }); } return AbstractC13163fSk.just(this.f.e(c2829alw)); } }