125 lines
4.0 KiB
Java
125 lines
4.0 KiB
Java
package o;
|
|
|
|
import java.util.Iterator;
|
|
import java.util.Objects;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public final class fXR<T, U, V> extends AbstractC13163fSk<V> {
|
|
private AbstractC13163fSk<? extends T> a;
|
|
private fSL<? super T, ? super U, ? extends V> d;
|
|
private Iterable<U> e;
|
|
|
|
public fXR(AbstractC13163fSk<? extends T> abstractC13163fSk, Iterable<U> iterable, fSL<? super T, ? super U, ? extends V> fsl) {
|
|
this.a = abstractC13163fSk;
|
|
this.e = iterable;
|
|
this.d = fsl;
|
|
}
|
|
|
|
@Override // o.AbstractC13163fSk
|
|
public final void subscribeActual(InterfaceC13174fSv<? super V> interfaceC13174fSv) {
|
|
try {
|
|
Iterator it = (Iterator) Objects.requireNonNull(this.e.iterator(), "The iterator returned by other is null");
|
|
try {
|
|
if (!it.hasNext()) {
|
|
EnumC13195fTi.e(interfaceC13174fSv);
|
|
} else {
|
|
this.a.subscribe(new HBt(interfaceC13174fSv, it, this.d));
|
|
}
|
|
} catch (Throwable th) {
|
|
C13147fSI.c(th);
|
|
EnumC13195fTi.a(th, interfaceC13174fSv);
|
|
}
|
|
} catch (Throwable th2) {
|
|
C13147fSI.c(th2);
|
|
EnumC13195fTi.a(th2, interfaceC13174fSv);
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes6.dex */
|
|
static final class HBt<T, U, V> implements InterfaceC13174fSv<T>, fSJ {
|
|
private Iterator<U> a;
|
|
private boolean b;
|
|
private fSL<? super T, ? super U, ? extends V> c;
|
|
private fSJ d;
|
|
private InterfaceC13174fSv<? super V> e;
|
|
|
|
HBt(InterfaceC13174fSv<? super V> interfaceC13174fSv, Iterator<U> it, fSL<? super T, ? super U, ? extends V> fsl) {
|
|
this.e = interfaceC13174fSv;
|
|
this.a = it;
|
|
this.c = fsl;
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onSubscribe(fSJ fsj) {
|
|
if (EnumC13192fTf.d(this.d, fsj)) {
|
|
this.d = fsj;
|
|
this.e.onSubscribe(this);
|
|
}
|
|
}
|
|
|
|
@Override // o.fSJ
|
|
public final void dispose() {
|
|
this.d.dispose();
|
|
}
|
|
|
|
@Override // o.fSJ
|
|
public final boolean isDisposed() {
|
|
return this.d.isDisposed();
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onNext(T t) {
|
|
if (this.b) {
|
|
return;
|
|
}
|
|
try {
|
|
try {
|
|
this.e.onNext(Objects.requireNonNull(this.c.e(t, Objects.requireNonNull(this.a.next(), "The iterator returned a null value")), "The zipper function returned a null value"));
|
|
try {
|
|
if (this.a.hasNext()) {
|
|
return;
|
|
}
|
|
this.b = true;
|
|
this.d.dispose();
|
|
this.e.onComplete();
|
|
} catch (Throwable th) {
|
|
C13147fSI.c(th);
|
|
this.b = true;
|
|
this.d.dispose();
|
|
this.e.onError(th);
|
|
}
|
|
} catch (Throwable th2) {
|
|
C13147fSI.c(th2);
|
|
this.b = true;
|
|
this.d.dispose();
|
|
this.e.onError(th2);
|
|
}
|
|
} catch (Throwable th3) {
|
|
C13147fSI.c(th3);
|
|
this.b = true;
|
|
this.d.dispose();
|
|
this.e.onError(th3);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onError(Throwable th) {
|
|
if (this.b) {
|
|
C13418fZu.c(th);
|
|
} else {
|
|
this.b = true;
|
|
this.e.onError(th);
|
|
}
|
|
}
|
|
|
|
@Override // o.InterfaceC13174fSv
|
|
public final void onComplete() {
|
|
if (this.b) {
|
|
return;
|
|
}
|
|
this.b = true;
|
|
this.e.onComplete();
|
|
}
|
|
}
|
|
}
|