Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 BaseEffectUseCase.java 源代码,内容仅作参考
package com.picsart.effect.core;
import android.graphics.Bitmap;
import androidx.recyclerview.widget.RecyclerView;
import com.beautify.studio.impl.common.modelDownloading.resourceDownloadStrategies.EffectLandmarkModelDownloadStrategy$fetchResources$$inlined$map$1;
import com.google.android.gms.ads.RequestConfiguration;
import com.picsart.coroutine.CoroutinesWrappersKt;
import com.picsart.effect.common.EffectCancellationException;
import com.picsart.effect.common.EffectsCommonException;
import com.picsart.effect.common.NoNetworkException;
import com.picsart.effect.core.h;
import com.picsart.effect.core.k;
import com.picsart.effect.core.o;
import com.picsart.effect.core.p;
import com.picsart.effect.core.x;
import com.picsart.model.exception.PicsArtNoNetworkException;
import com.picsart.model.exception.PicsArtSocketTimeoutException;
import com.picsart.picore.effects.FXEffect;
import com.picsart.picore.effects.parameters.FXParameter;
import com.picsart.picore.effects.resources.FXResource;
import com.picsart.picore.effects.resources.FXResourceDescriptor;
import com.picsart.picore.x.RXSession;
import com.picsart.picore.x.value.virtual.RXVirtualImageARGB8;
import com.picsart.picore.x.value.virtual.RXVirtualValue;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.EmptyList;
import kotlin.coroutines.EmptyCoroutineContext;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import myobfuscated.pn2.o0;
import myobfuscated.pn2.x1;
import myobfuscated.vq0.g0;
import org.jetbrains.annotations.NotNull;
public abstract class BaseEffectUseCase<T extends p> implements m<T> {
@NotNull
public final myobfuscated.vq0.r<myobfuscated.vq0.l, myobfuscated.vq0.q> a;
@NotNull
public final myobfuscated.yq0.o b;
@NotNull
public final myobfuscated.yq0.n c;
@NotNull
public final myobfuscated.yq0.f d;
@NotNull
public final myobfuscated.yq0.q e;
@NotNull
public final myobfuscated.yq0.s f;
public FXEffect g;
@NotNull
public final MipmappingHandler<T> h;
public Map<String, ? extends FXParameter> i;
@NotNull
public final LinkedHashMap j;
@NotNull
public final myobfuscated.vq0.t k;
public Function0<Unit> l;
public BaseEffectUseCase(@NotNull myobfuscated.vq0.c baseDependencyProvider) {
Intrinsics.checkNotNullParameter(baseDependencyProvider, "baseDependencyProvider");
this.a = baseDependencyProvider.e;
myobfuscated.yq0.o oVar = baseDependencyProvider.a;
this.b = oVar;
this.c = baseDependencyProvider.b;
this.d = baseDependencyProvider.c;
myobfuscated.yq0.q qVar = baseDependencyProvider.d;
this.e = qVar;
this.f = baseDependencyProvider.f;
o.d dVar = o.d.a;
this.h = new MipmappingHandler<>(oVar, qVar);
this.j = new LinkedHashMap();
this.k = baseDependencyProvider.g;
}
public static Object e(BaseEffectUseCase baseEffectUseCase, String str, Object obj, myobfuscated.mk2.c cVar) {
BaseEffectUseCase$changeEffectParameter$1 baseEffectUseCase$changeEffectParameter$1;
int i;
Unit unit;
g0 g0Var;
FXParameter fXParameter;
if (cVar instanceof BaseEffectUseCase$changeEffectParameter$1) {
baseEffectUseCase$changeEffectParameter$1 = (BaseEffectUseCase$changeEffectParameter$1) cVar;
int i2 = baseEffectUseCase$changeEffectParameter$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$changeEffectParameter$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
Object obj2 = baseEffectUseCase$changeEffectParameter$1.result;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$changeEffectParameter$1.label;
Unit unit2 = null;
boolean z = false;
if (i != 0) {
myobfuscated.ik2.i.b(obj2);
if (Intrinsics.c(str, "blendmode")) {
str = "blend";
}
if (!Intrinsics.c(str, "fade") && !Intrinsics.c(str, "blend")) {
MipmappingHandler<T> mipmappingHandler = baseEffectUseCase.h;
baseEffectUseCase$changeEffectParameter$1.L$0 = baseEffectUseCase;
baseEffectUseCase$changeEffectParameter$1.L$1 = obj;
baseEffectUseCase$changeEffectParameter$1.L$2 = str;
baseEffectUseCase$changeEffectParameter$1.label = 1;
if (mipmappingHandler.c == null) {
unit = Unit.a;
} else {
x1 x1Var = mipmappingHandler.d;
if (x1Var != null) {
x1Var.c(null);
}
mipmappingHandler.d = kotlinx.coroutines.b.c(myobfuscated.pn2.g0.a(baseEffectUseCase$changeEffectParameter$1.getContext()), o0.c, null, new MipmappingHandler$handleMipmapping$2(mipmappingHandler, 201L, null), 2);
unit = Unit.a;
}
if (unit == coroutineSingletons) {
return coroutineSingletons;
}
}
} else if (i != 1) {
if (i == 2) {
String str2 = (String) baseEffectUseCase$changeEffectParameter$1.L$2;
BaseEffectUseCase baseEffectUseCase2 = (BaseEffectUseCase) baseEffectUseCase$changeEffectParameter$1.L$0;
myobfuscated.ik2.i.b(obj2);
unit2 = Unit.a;
if (unit2 != null) {
z = true;
}
return Boolean.valueOf(z);
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
String str3 = (String) baseEffectUseCase$changeEffectParameter$1.L$2;
obj = baseEffectUseCase$changeEffectParameter$1.L$1;
BaseEffectUseCase baseEffectUseCase3 = (BaseEffectUseCase) baseEffectUseCase$changeEffectParameter$1.L$0;
myobfuscated.ik2.i.b(obj2);
str = str3;
baseEffectUseCase = baseEffectUseCase3;
}
Object obj3 = baseEffectUseCase.j.get(str);
g0Var = !(obj3 instanceof g0) ? (g0) obj3 : null;
if (g0Var != null) {
Map<String, ? extends FXParameter> map = baseEffectUseCase.i;
if (map != null && (fXParameter = map.get(str)) != null) {
unit2 = myobfuscated.oq0.a.d(fXParameter, obj);
}
if (unit2 != null) {
}
return Boolean.valueOf(z);
}
baseEffectUseCase$changeEffectParameter$1.L$0 = baseEffectUseCase;
baseEffectUseCase$changeEffectParameter$1.L$1 = obj;
baseEffectUseCase$changeEffectParameter$1.L$2 = str;
baseEffectUseCase$changeEffectParameter$1.label = 2;
if (g0Var.a(obj, baseEffectUseCase$changeEffectParameter$1) == coroutineSingletons) {
return coroutineSingletons;
}
unit2 = Unit.a;
if (unit2 != null) {
}
return Boolean.valueOf(z);
}
}
baseEffectUseCase$changeEffectParameter$1 = new BaseEffectUseCase$changeEffectParameter$1(baseEffectUseCase, cVar);
Object obj22 = baseEffectUseCase$changeEffectParameter$1.result;
CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$changeEffectParameter$1.label;
Unit unit22 = null;
boolean z2 = false;
if (i != 0) {
}
Object obj32 = baseEffectUseCase.j.get(str);
if (!(obj32 instanceof g0)) {
}
if (g0Var != null) {
}
}
public static <T extends p> Object j(final BaseEffectUseCase<T> baseEffectUseCase, final T t, myobfuscated.mk2.c<? super InputMap> cVar) {
BaseEffectUseCase$getInputs$1 baseEffectUseCase$getInputs$1;
CoroutineSingletons coroutineSingletons;
int i;
myobfuscated.yq0.q qVar;
Function1<RXSession, Unit> function1;
Object obj;
if (cVar instanceof BaseEffectUseCase$getInputs$1) {
baseEffectUseCase$getInputs$1 = (BaseEffectUseCase$getInputs$1) cVar;
int i2 = baseEffectUseCase$getInputs$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$getInputs$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
Object obj2 = baseEffectUseCase$getInputs$1.result;
coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getInputs$1.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj2);
MipmappingHandler<T> mipmappingHandler = baseEffectUseCase.h;
baseEffectUseCase$getInputs$1.L$0 = baseEffectUseCase;
baseEffectUseCase$getInputs$1.L$1 = t;
baseEffectUseCase$getInputs$1.label = 1;
obj2 = mipmappingHandler.b(t, baseEffectUseCase.e, baseEffectUseCase$getInputs$1);
if (obj2 == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i != 1) {
if (i == 2) {
obj = baseEffectUseCase$getInputs$1.L$1;
t = (T) baseEffectUseCase$getInputs$1.L$0;
myobfuscated.ik2.i.b(obj2);
return c.a((RXVirtualImageARGB8) obj, new Function1<InputMap, Unit>() {
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0005\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00040\u0002\"\b\b\u0000\u0010\u0001*\u00020\u0000H\u008a@"}, d2 = {"Lcom/picsart/effect/core/p;", RequestConfiguration.MAX_AD_CONTENT_RATING_T, "", "Lcom/picsart/effect/core/LibInputName;", "Lcom/picsart/picore/x/value/virtual/RXVirtualValue;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
@myobfuscated.ok2.d(c = "com.picsart.effect.core.BaseEffectUseCase$getInputs$3$1", f = "BaseUseCase.kt", l = {}, m = "invokeSuspend")
public static final class AnonymousClass1 extends SuspendLambda implements Function1<myobfuscated.mk2.c<? super Map<LibInputName, ? extends RXVirtualValue>>, Object> {
final p $inputData;
int label;
public AnonymousClass1(p pVar, myobfuscated.mk2.c cVar) {
super(1, cVar);
this.$inputData = pVar;
}
@Override
@NotNull
public final myobfuscated.mk2.c<Unit> create(@NotNull myobfuscated.mk2.c<?> cVar) {
return new AnonymousClass1(this.$inputData, cVar);
}
@Override
public final Object invoke(myobfuscated.mk2.c<? super Map<LibInputName, ? extends RXVirtualValue>> cVar) {
return ((AnonymousClass1) create(cVar)).invokeSuspend(Unit.a);
}
@Override
public final Object invokeSuspend(@NotNull Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
if (this.label == 0) {
myobfuscated.ik2.i.b(obj);
return this.$inputData.h;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}
{
super(1);
}
@Override
public Unit invoke(InputMap inputMap) {
invoke2(inputMap);
return Unit.a;
}
public final void invoke2(@NotNull InputMap inputMap) {
Intrinsics.checkNotNullParameter(inputMap, "$this$inputMap");
AnonymousClass1 anonymousClass1 = new AnonymousClass1(p.this, null);
inputMap.getClass();
Intrinsics.checkNotNullParameter(anonymousClass1, "<set-?>");
inputMap.c = anonymousClass1;
}
});
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
t = (T) baseEffectUseCase$getInputs$1.L$1;
baseEffectUseCase = (BaseEffectUseCase) baseEffectUseCase$getInputs$1.L$0;
myobfuscated.ik2.i.b(obj2);
}
RXVirtualImageARGB8 rXVirtualImageARGB8 = (RXVirtualImageARGB8) obj2;
qVar = baseEffectUseCase.e;
function1 = new Function1<RXSession, Unit>(baseEffectUseCase) {
final BaseEffectUseCase<T> this$0;
{
super(1);
this.this$0 = baseEffectUseCase;
}
@Override
public Unit invoke(RXSession rXSession) {
invoke2(rXSession);
return Unit.a;
}
public final void invoke2(@NotNull RXSession it) {
Intrinsics.checkNotNullParameter(it, "it");
final BaseEffectUseCase<T> baseEffectUseCase2 = this.this$0;
it.L0(new myobfuscated.q81.c() {
@Override
public final void a(int i3) {
BaseEffectUseCase this$0 = BaseEffectUseCase.this;
Intrinsics.checkNotNullParameter(this$0, "this$0");
kotlinx.coroutines.b.d(EmptyCoroutineContext.INSTANCE, new BaseEffectUseCase$getInputs$2$1$1$1(this$0, null));
}
});
}
};
baseEffectUseCase$getInputs$1.L$0 = t;
baseEffectUseCase$getInputs$1.L$1 = obj2;
baseEffectUseCase$getInputs$1.label = 2;
if (qVar.b(null, function1, baseEffectUseCase$getInputs$1) != coroutineSingletons) {
return coroutineSingletons;
}
obj = obj2;
return c.a((RXVirtualImageARGB8) obj, new Function1<InputMap, Unit>() {
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0005\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00040\u0002\"\b\b\u0000\u0010\u0001*\u00020\u0000H\u008a@"}, d2 = {"Lcom/picsart/effect/core/p;", RequestConfiguration.MAX_AD_CONTENT_RATING_T, "", "Lcom/picsart/effect/core/LibInputName;", "Lcom/picsart/picore/x/value/virtual/RXVirtualValue;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
@myobfuscated.ok2.d(c = "com.picsart.effect.core.BaseEffectUseCase$getInputs$3$1", f = "BaseUseCase.kt", l = {}, m = "invokeSuspend")
public static final class AnonymousClass1 extends SuspendLambda implements Function1<myobfuscated.mk2.c<? super Map<LibInputName, ? extends RXVirtualValue>>, Object> {
final p $inputData;
int label;
public AnonymousClass1(p pVar, myobfuscated.mk2.c cVar) {
super(1, cVar);
this.$inputData = pVar;
}
@Override
@NotNull
public final myobfuscated.mk2.c<Unit> create(@NotNull myobfuscated.mk2.c<?> cVar) {
return new AnonymousClass1(this.$inputData, cVar);
}
@Override
public final Object invoke(myobfuscated.mk2.c<? super Map<LibInputName, ? extends RXVirtualValue>> cVar) {
return ((AnonymousClass1) create(cVar)).invokeSuspend(Unit.a);
}
@Override
public final Object invokeSuspend(@NotNull Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
if (this.label == 0) {
myobfuscated.ik2.i.b(obj);
return this.$inputData.h;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}
{
super(1);
}
@Override
public Unit invoke(InputMap inputMap) {
invoke2(inputMap);
return Unit.a;
}
public final void invoke2(@NotNull InputMap inputMap) {
Intrinsics.checkNotNullParameter(inputMap, "$this$inputMap");
AnonymousClass1 anonymousClass1 = new AnonymousClass1(p.this, null);
inputMap.getClass();
Intrinsics.checkNotNullParameter(anonymousClass1, "<set-?>");
inputMap.c = anonymousClass1;
}
});
}
}
baseEffectUseCase$getInputs$1 = new BaseEffectUseCase$getInputs$1(baseEffectUseCase, cVar);
Object obj22 = baseEffectUseCase$getInputs$1.result;
coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getInputs$1.label;
if (i != 0) {
}
RXVirtualImageARGB8 rXVirtualImageARGB82 = (RXVirtualImageARGB8) obj22;
qVar = baseEffectUseCase.e;
function1 = new Function1<RXSession, Unit>(baseEffectUseCase) {
final BaseEffectUseCase<T> this$0;
{
super(1);
this.this$0 = baseEffectUseCase;
}
@Override
public Unit invoke(RXSession rXSession) {
invoke2(rXSession);
return Unit.a;
}
public final void invoke2(@NotNull RXSession it) {
Intrinsics.checkNotNullParameter(it, "it");
final BaseEffectUseCase baseEffectUseCase2 = this.this$0;
it.L0(new myobfuscated.q81.c() {
@Override
public final void a(int i3) {
BaseEffectUseCase this$0 = BaseEffectUseCase.this;
Intrinsics.checkNotNullParameter(this$0, "this$0");
kotlinx.coroutines.b.d(EmptyCoroutineContext.INSTANCE, new BaseEffectUseCase$getInputs$2$1$1$1(this$0, null));
}
});
}
};
baseEffectUseCase$getInputs$1.L$0 = t;
baseEffectUseCase$getInputs$1.L$1 = obj22;
baseEffectUseCase$getInputs$1.label = 2;
if (qVar.b(null, function1, baseEffectUseCase$getInputs$1) != coroutineSingletons) {
}
}
public static Object s(BaseEffectUseCase baseEffectUseCase, String str, Integer num, myobfuscated.mk2.c cVar) {
BaseEffectUseCase$getThumbResourceInternal$1 baseEffectUseCase$getThumbResourceInternal$1;
int i;
if (cVar instanceof BaseEffectUseCase$getThumbResourceInternal$1) {
baseEffectUseCase$getThumbResourceInternal$1 = (BaseEffectUseCase$getThumbResourceInternal$1) cVar;
int i2 = baseEffectUseCase$getThumbResourceInternal$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$getThumbResourceInternal$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
Object obj = baseEffectUseCase$getThumbResourceInternal$1.result;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getThumbResourceInternal$1.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj);
if (str == null) {
return x.e.a;
}
BaseEffectUseCase$getThumbResourceInternal$path$1 baseEffectUseCase$getThumbResourceInternal$path$1 = new BaseEffectUseCase$getThumbResourceInternal$path$1(baseEffectUseCase, str, num, null);
baseEffectUseCase$getThumbResourceInternal$1.label = 1;
myobfuscated.wn2.b bVar = CoroutinesWrappersKt.a;
obj = kotlinx.coroutines.b.f(o0.c, baseEffectUseCase$getThumbResourceInternal$path$1, baseEffectUseCase$getThumbResourceInternal$1);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
myobfuscated.ik2.i.b(obj);
}
return new x.d((String) obj);
}
}
baseEffectUseCase$getThumbResourceInternal$1 = new BaseEffectUseCase$getThumbResourceInternal$1(baseEffectUseCase, cVar);
Object obj2 = baseEffectUseCase$getThumbResourceInternal$1.result;
CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getThumbResourceInternal$1.label;
if (i != 0) {
}
return new x.d((String) obj2);
}
public static <T extends p> Object x(BaseEffectUseCase<T> baseEffectUseCase, T t, myobfuscated.mk2.c<? super Unit> cVar) {
BaseEffectUseCase$prepareEffect$1 baseEffectUseCase$prepareEffect$1;
CoroutineSingletons coroutineSingletons;
int i;
String v;
if (cVar instanceof BaseEffectUseCase$prepareEffect$1) {
baseEffectUseCase$prepareEffect$1 = (BaseEffectUseCase$prepareEffect$1) cVar;
int i2 = baseEffectUseCase$prepareEffect$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$prepareEffect$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
Object obj = baseEffectUseCase$prepareEffect$1.result;
coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$prepareEffect$1.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj);
Integer num = t.g;
baseEffectUseCase$prepareEffect$1.L$0 = baseEffectUseCase;
baseEffectUseCase$prepareEffect$1.L$1 = t;
baseEffectUseCase$prepareEffect$1.label = 1;
if (baseEffectUseCase.g(t, num, baseEffectUseCase$prepareEffect$1) == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i != 1) {
if (i == 2) {
myobfuscated.ik2.i.b(obj);
return Unit.a;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
t = (T) baseEffectUseCase$prepareEffect$1.L$1;
baseEffectUseCase = (BaseEffectUseCase) baseEffectUseCase$prepareEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
}
v = baseEffectUseCase.v(t);
baseEffectUseCase$prepareEffect$1.L$0 = null;
baseEffectUseCase$prepareEffect$1.L$1 = null;
baseEffectUseCase$prepareEffect$1.label = 2;
if (baseEffectUseCase.q(v, baseEffectUseCase$prepareEffect$1) == coroutineSingletons) {
return coroutineSingletons;
}
return Unit.a;
}
}
baseEffectUseCase$prepareEffect$1 = new BaseEffectUseCase$prepareEffect$1(baseEffectUseCase, cVar);
Object obj2 = baseEffectUseCase$prepareEffect$1.result;
coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$prepareEffect$1.label;
if (i != 0) {
}
v = baseEffectUseCase.v(t);
baseEffectUseCase$prepareEffect$1.L$0 = null;
baseEffectUseCase$prepareEffect$1.L$1 = null;
baseEffectUseCase$prepareEffect$1.label = 2;
if (baseEffectUseCase.q(v, baseEffectUseCase$prepareEffect$1) == coroutineSingletons) {
}
return Unit.a;
}
public static <T extends p> Object z(BaseEffectUseCase<T> baseEffectUseCase, T t, myobfuscated.mk2.c<? super h> cVar) {
BaseEffectUseCase$tryCreateEffect$1 baseEffectUseCase$tryCreateEffect$1;
?? r4;
T t2;
BaseEffectUseCase baseEffectUseCase2;
Object d;
T t3;
InputMap inputMap;
BaseEffectUseCase baseEffectUseCase3;
BaseEffectUseCase baseEffectUseCase4;
FXEffect fXEffect;
Map<String, ? extends FXParameter> map;
Object invoke;
InputMap inputMap2;
FXEffect fXEffect2;
BaseEffectUseCase baseEffectUseCase5;
p a;
BaseEffectUseCase<T> baseEffectUseCase6 = baseEffectUseCase;
p pVar = t;
try {
try {
try {
if (cVar instanceof BaseEffectUseCase$tryCreateEffect$1) {
baseEffectUseCase$tryCreateEffect$1 = (BaseEffectUseCase$tryCreateEffect$1) cVar;
int i = baseEffectUseCase$tryCreateEffect$1.label;
if ((i & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$tryCreateEffect$1.label = i - RecyclerView.UNDEFINED_DURATION;
Object obj = baseEffectUseCase$tryCreateEffect$1.result;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
r4 = baseEffectUseCase$tryCreateEffect$1.label;
switch (r4) {
case 0:
myobfuscated.ik2.i.b(obj);
myobfuscated.yq0.o oVar = baseEffectUseCase6.b;
RXVirtualImageARGB8 rXVirtualImageARGB8 = pVar.c;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase6;
baseEffectUseCase$tryCreateEffect$1.L$1 = pVar;
baseEffectUseCase$tryCreateEffect$1.label = 1;
obj = oVar.d(rXVirtualImageARGB8);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
myobfuscated.yq0.q qVar = baseEffectUseCase6.e;
RXSession rXSession = pVar.i;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase6;
baseEffectUseCase$tryCreateEffect$1.L$1 = pVar;
baseEffectUseCase$tryCreateEffect$1.label = 2;
obj = qVar.a(rXSession, (Function1) obj, baseEffectUseCase$tryCreateEffect$1);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
a = r15.a((r17 & 1) != 0 ? r15.a : null, (r17 & 2) != 0 ? r15.b : null, (r17 & 4) != 0 ? r15.c : (RXVirtualImageARGB8) obj, (r17 & 8) != 0 ? r15.d : null, (r17 & 16) != 0 ? r15.e : null, (r17 & 32) != 0 ? r15.f : false, (r17 & 64) != 0 ? r15.g : null, (r17 & 128) != 0 ? pVar.h : null);
t2 = (T) a;
if (t2 != null) {
baseEffectUseCase6.g = null;
baseEffectUseCase6.j.clear();
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase6;
baseEffectUseCase$tryCreateEffect$1.L$1 = t2;
baseEffectUseCase$tryCreateEffect$1.label = 3;
obj = baseEffectUseCase6.h(t2, baseEffectUseCase$tryCreateEffect$1);
baseEffectUseCase2 = baseEffectUseCase6;
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
InputMap inputMap3 = (InputMap) obj;
BaseEffectUseCase$tryCreateEffect$effectCall$1 baseEffectUseCase$tryCreateEffect$effectCall$1 = new BaseEffectUseCase$tryCreateEffect$effectCall$1(baseEffectUseCase2);
BaseEffectUseCase$tryCreateEffect$effectCall$2 baseEffectUseCase$tryCreateEffect$effectCall$2 = new BaseEffectUseCase$tryCreateEffect$effectCall$2(baseEffectUseCase2);
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase2;
baseEffectUseCase$tryCreateEffect$1.L$1 = t2;
baseEffectUseCase$tryCreateEffect$1.L$2 = inputMap3;
baseEffectUseCase$tryCreateEffect$1.label = 4;
d = baseEffectUseCase2.d(t2, baseEffectUseCase$tryCreateEffect$effectCall$1, baseEffectUseCase$tryCreateEffect$effectCall$2, inputMap3, baseEffectUseCase$tryCreateEffect$1);
if (d != coroutineSingletons) {
return coroutineSingletons;
}
t3 = t2;
inputMap = inputMap3;
baseEffectUseCase3 = baseEffectUseCase2;
myobfuscated.yq0.q qVar2 = baseEffectUseCase3.e;
RXSession rXSession2 = t3.i;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase3;
baseEffectUseCase$tryCreateEffect$1.L$1 = inputMap;
baseEffectUseCase$tryCreateEffect$1.L$2 = null;
baseEffectUseCase$tryCreateEffect$1.label = 5;
obj = qVar2.b(rXSession2, (Function1) d, baseEffectUseCase$tryCreateEffect$1);
baseEffectUseCase4 = baseEffectUseCase3;
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
fXEffect = (FXEffect) obj;
baseEffectUseCase4.g = fXEffect;
if (fXEffect != null) {
ArrayList L0 = fXEffect.L0();
ArrayList arrayList = new ArrayList(myobfuscated.jk2.p.n(L0, 10));
Iterator it = L0.iterator();
while (it.hasNext()) {
FXParameter fXParameter = (FXParameter) it.next();
arrayList.add(new Pair(fXParameter.E0(), fXParameter));
}
map = kotlin.collections.d.o(arrayList);
} else {
map = null;
}
baseEffectUseCase4.i = map;
Function1<? super myobfuscated.mk2.c<? super Map<String, ? extends g0<?>>>, ? extends Object> function1 = inputMap.d;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase4;
baseEffectUseCase$tryCreateEffect$1.L$1 = inputMap;
baseEffectUseCase$tryCreateEffect$1.L$2 = fXEffect;
baseEffectUseCase$tryCreateEffect$1.label = 6;
invoke = function1.invoke(baseEffectUseCase$tryCreateEffect$1);
if (invoke == coroutineSingletons) {
return coroutineSingletons;
}
inputMap2 = inputMap;
fXEffect2 = fXEffect;
baseEffectUseCase5 = baseEffectUseCase4;
baseEffectUseCase5.j.putAll((Map) invoke);
Function1<? super myobfuscated.mk2.c<? super h.a>, ? extends Object> function12 = inputMap2.e;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase5;
baseEffectUseCase$tryCreateEffect$1.L$1 = fXEffect2;
baseEffectUseCase$tryCreateEffect$1.L$2 = null;
baseEffectUseCase$tryCreateEffect$1.label = 7;
obj = function12.invoke(baseEffectUseCase$tryCreateEffect$1);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
return new h(new h.b.C0514b(fXEffect2), (h.a) obj, 4);
}
throw new EffectsCommonException("not supported copy");
case 1:
pVar = (p) baseEffectUseCase$tryCreateEffect$1.L$1;
baseEffectUseCase6 = (BaseEffectUseCase) baseEffectUseCase$tryCreateEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
myobfuscated.yq0.q qVar3 = baseEffectUseCase6.e;
RXSession rXSession3 = pVar.i;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase6;
baseEffectUseCase$tryCreateEffect$1.L$1 = pVar;
baseEffectUseCase$tryCreateEffect$1.label = 2;
obj = qVar3.a(rXSession3, (Function1) obj, baseEffectUseCase$tryCreateEffect$1);
if (obj == coroutineSingletons) {
}
a = r15.a((r17 & 1) != 0 ? r15.a : null, (r17 & 2) != 0 ? r15.b : null, (r17 & 4) != 0 ? r15.c : (RXVirtualImageARGB8) obj, (r17 & 8) != 0 ? r15.d : null, (r17 & 16) != 0 ? r15.e : null, (r17 & 32) != 0 ? r15.f : false, (r17 & 64) != 0 ? r15.g : null, (r17 & 128) != 0 ? pVar.h : null);
t2 = (T) a;
if (t2 != null) {
}
break;
case 2:
pVar = (p) baseEffectUseCase$tryCreateEffect$1.L$1;
baseEffectUseCase6 = (BaseEffectUseCase) baseEffectUseCase$tryCreateEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
a = r15.a((r17 & 1) != 0 ? r15.a : null, (r17 & 2) != 0 ? r15.b : null, (r17 & 4) != 0 ? r15.c : (RXVirtualImageARGB8) obj, (r17 & 8) != 0 ? r15.d : null, (r17 & 16) != 0 ? r15.e : null, (r17 & 32) != 0 ? r15.f : false, (r17 & 64) != 0 ? r15.g : null, (r17 & 128) != 0 ? pVar.h : null);
t2 = (T) a;
if (t2 != null) {
}
break;
case 3:
t2 = (T) baseEffectUseCase$tryCreateEffect$1.L$1;
BaseEffectUseCase baseEffectUseCase7 = (BaseEffectUseCase) baseEffectUseCase$tryCreateEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
baseEffectUseCase2 = baseEffectUseCase7;
InputMap inputMap32 = (InputMap) obj;
BaseEffectUseCase$tryCreateEffect$effectCall$1 baseEffectUseCase$tryCreateEffect$effectCall$12 = new BaseEffectUseCase$tryCreateEffect$effectCall$1(baseEffectUseCase2);
BaseEffectUseCase$tryCreateEffect$effectCall$2 baseEffectUseCase$tryCreateEffect$effectCall$22 = new BaseEffectUseCase$tryCreateEffect$effectCall$2(baseEffectUseCase2);
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase2;
baseEffectUseCase$tryCreateEffect$1.L$1 = t2;
baseEffectUseCase$tryCreateEffect$1.L$2 = inputMap32;
baseEffectUseCase$tryCreateEffect$1.label = 4;
d = baseEffectUseCase2.d(t2, baseEffectUseCase$tryCreateEffect$effectCall$12, baseEffectUseCase$tryCreateEffect$effectCall$22, inputMap32, baseEffectUseCase$tryCreateEffect$1);
if (d != coroutineSingletons) {
}
break;
case 4:
inputMap = (InputMap) baseEffectUseCase$tryCreateEffect$1.L$2;
?? r1 = (p) baseEffectUseCase$tryCreateEffect$1.L$1;
BaseEffectUseCase baseEffectUseCase8 = (BaseEffectUseCase) baseEffectUseCase$tryCreateEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
t3 = r1;
baseEffectUseCase3 = baseEffectUseCase8;
d = obj;
myobfuscated.yq0.q qVar22 = baseEffectUseCase3.e;
RXSession rXSession22 = t3.i;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase3;
baseEffectUseCase$tryCreateEffect$1.L$1 = inputMap;
baseEffectUseCase$tryCreateEffect$1.L$2 = null;
baseEffectUseCase$tryCreateEffect$1.label = 5;
obj = qVar22.b(rXSession22, (Function1) d, baseEffectUseCase$tryCreateEffect$1);
baseEffectUseCase4 = baseEffectUseCase3;
if (obj == coroutineSingletons) {
}
fXEffect = (FXEffect) obj;
baseEffectUseCase4.g = fXEffect;
if (fXEffect != null) {
}
baseEffectUseCase4.i = map;
Function1<? super myobfuscated.mk2.c<? super Map<String, ? extends g0<?>>>, ? extends Object> function13 = inputMap.d;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase4;
baseEffectUseCase$tryCreateEffect$1.L$1 = inputMap;
baseEffectUseCase$tryCreateEffect$1.L$2 = fXEffect;
baseEffectUseCase$tryCreateEffect$1.label = 6;
invoke = function13.invoke(baseEffectUseCase$tryCreateEffect$1);
if (invoke == coroutineSingletons) {
}
break;
case 5:
inputMap = (InputMap) baseEffectUseCase$tryCreateEffect$1.L$1;
BaseEffectUseCase baseEffectUseCase9 = (BaseEffectUseCase) baseEffectUseCase$tryCreateEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
baseEffectUseCase4 = baseEffectUseCase9;
fXEffect = (FXEffect) obj;
baseEffectUseCase4.g = fXEffect;
if (fXEffect != null) {
}
baseEffectUseCase4.i = map;
Function1<? super myobfuscated.mk2.c<? super Map<String, ? extends g0<?>>>, ? extends Object> function132 = inputMap.d;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase4;
baseEffectUseCase$tryCreateEffect$1.L$1 = inputMap;
baseEffectUseCase$tryCreateEffect$1.L$2 = fXEffect;
baseEffectUseCase$tryCreateEffect$1.label = 6;
invoke = function132.invoke(baseEffectUseCase$tryCreateEffect$1);
if (invoke == coroutineSingletons) {
}
break;
case 6:
fXEffect2 = (FXEffect) baseEffectUseCase$tryCreateEffect$1.L$2;
InputMap inputMap4 = (InputMap) baseEffectUseCase$tryCreateEffect$1.L$1;
BaseEffectUseCase baseEffectUseCase10 = (BaseEffectUseCase) baseEffectUseCase$tryCreateEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
inputMap2 = inputMap4;
baseEffectUseCase5 = baseEffectUseCase10;
invoke = obj;
baseEffectUseCase5.j.putAll((Map) invoke);
Function1<? super myobfuscated.mk2.c<? super h.a>, ? extends Object> function122 = inputMap2.e;
baseEffectUseCase$tryCreateEffect$1.L$0 = baseEffectUseCase5;
baseEffectUseCase$tryCreateEffect$1.L$1 = fXEffect2;
baseEffectUseCase$tryCreateEffect$1.L$2 = null;
baseEffectUseCase$tryCreateEffect$1.label = 7;
obj = function122.invoke(baseEffectUseCase$tryCreateEffect$1);
if (obj == coroutineSingletons) {
}
return new h(new h.b.C0514b(fXEffect2), (h.a) obj, 4);
case 7:
fXEffect2 = (FXEffect) baseEffectUseCase$tryCreateEffect$1.L$1;
BaseEffectUseCase baseEffectUseCase11 = (BaseEffectUseCase) baseEffectUseCase$tryCreateEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
return new h(new h.b.C0514b(fXEffect2), (h.a) obj, 4);
default:
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}
}
switch (r4) {
}
} catch (PicsArtNoNetworkException unused) {
throw new NoNetworkException(null, 1, null);
} catch (UnknownHostException unused2) {
throw new NoNetworkException(null, 1, null);
}
} catch (EffectCancellationException e) {
e = e;
baseEffectUseCase6 = r4;
baseEffectUseCase6.t();
throw e;
} catch (SocketException unused3) {
baseEffectUseCase6 = r4;
baseEffectUseCase6.t();
throw new PicsArtSocketTimeoutException(null, null, 3, null);
} catch (SocketTimeoutException unused4) {
baseEffectUseCase6 = r4;
baseEffectUseCase6.t();
throw new PicsArtSocketTimeoutException(null, null, 3, null);
}
} catch (EffectCancellationException e2) {
e = e2;
baseEffectUseCase6.t();
throw e;
} catch (SocketException unused5) {
baseEffectUseCase6.t();
throw new PicsArtSocketTimeoutException(null, null, 3, null);
} catch (SocketTimeoutException unused6) {
baseEffectUseCase6.t();
throw new PicsArtSocketTimeoutException(null, null, 3, null);
}
baseEffectUseCase$tryCreateEffect$1 = new BaseEffectUseCase$tryCreateEffect$1(baseEffectUseCase6, cVar);
Object obj2 = baseEffectUseCase$tryCreateEffect$1.result;
CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
r4 = baseEffectUseCase$tryCreateEffect$1.label;
}
@Override
public <R> Object a(@NotNull String str, @NotNull String str2, R r, boolean z, @NotNull myobfuscated.wk2.n<? super Bitmap, ? super Bitmap, ? super Bitmap, Unit> nVar, @NotNull myobfuscated.mk2.c<? super Boolean> cVar) {
return e(this, str2, r, cVar);
}
@Override
public Object b(@NotNull myobfuscated.mk2.c<? super Unit> cVar) {
t();
Object a = this.h.a(cVar);
return a == CoroutineSingletons.COROUTINE_SUSPENDED ? a : Unit.a;
}
public final Object c(@NotNull p.c cVar, @NotNull InputMap inputMap, @NotNull myobfuscated.mk2.c cVar2) {
return d(cVar, new BaseEffectUseCase$buildEffect$2(this), new BaseEffectUseCase$buildEffect$3(this), inputMap, cVar2);
}
public final Object d(T t, myobfuscated.wk2.n<? super T, ? super Integer, ? super myobfuscated.mk2.c<? super Unit>, ? extends Object> nVar, Function2<? super String, ? super myobfuscated.mk2.c<? super List<? extends FXResource>>, ? extends Object> function2, InputMap inputMap, myobfuscated.mk2.c<? super Function1<? super RXSession, FXEffect>> cVar) {
BaseEffectUseCase$buildEffect$4 baseEffectUseCase$buildEffect$4;
Object obj;
CoroutineSingletons coroutineSingletons;
int i;
Function2<? super String, ? super myobfuscated.mk2.c<? super List<? extends FXResource>>, ? extends Object> function22;
String str;
BaseEffectUseCase<T> baseEffectUseCase;
String str2;
myobfuscated.yq0.n nVar2;
Map<LibInputName, ? extends RXVirtualValue> map;
if (cVar instanceof BaseEffectUseCase$buildEffect$4) {
baseEffectUseCase$buildEffect$4 = (BaseEffectUseCase$buildEffect$4) cVar;
int i2 = baseEffectUseCase$buildEffect$4.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$buildEffect$4.label = i2 - RecyclerView.UNDEFINED_DURATION;
obj = baseEffectUseCase$buildEffect$4.result;
coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$buildEffect$4.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj);
String v = v(t);
Integer num = t.g;
baseEffectUseCase$buildEffect$4.L$0 = this;
baseEffectUseCase$buildEffect$4.L$1 = function2;
baseEffectUseCase$buildEffect$4.L$2 = inputMap;
baseEffectUseCase$buildEffect$4.L$3 = v;
baseEffectUseCase$buildEffect$4.label = 1;
if (nVar.invoke(t, num, baseEffectUseCase$buildEffect$4) == coroutineSingletons) {
return coroutineSingletons;
}
function22 = function2;
str = v;
baseEffectUseCase = this;
} else if (i == 1) {
str = (String) baseEffectUseCase$buildEffect$4.L$3;
inputMap = (InputMap) baseEffectUseCase$buildEffect$4.L$2;
Function2<? super String, ? super myobfuscated.mk2.c<? super List<? extends FXResource>>, ? extends Object> function23 = (Function2) baseEffectUseCase$buildEffect$4.L$1;
myobfuscated.ik2.i.b(obj);
baseEffectUseCase = (BaseEffectUseCase) baseEffectUseCase$buildEffect$4.L$0;
function22 = function23;
} else if (i != 2) {
if (i != 3) {
if (i != 4) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
myobfuscated.ik2.i.b(obj);
}
map = (Map) baseEffectUseCase$buildEffect$4.L$2;
str2 = (String) baseEffectUseCase$buildEffect$4.L$1;
nVar2 = (myobfuscated.yq0.n) baseEffectUseCase$buildEffect$4.L$0;
myobfuscated.ik2.i.b(obj);
baseEffectUseCase$buildEffect$4.L$0 = null;
baseEffectUseCase$buildEffect$4.L$1 = null;
baseEffectUseCase$buildEffect$4.L$2 = null;
baseEffectUseCase$buildEffect$4.label = 4;
obj = nVar2.e(str2, map, (List) obj, baseEffectUseCase$buildEffect$4);
return obj != coroutineSingletons ? coroutineSingletons : obj;
} else {
str = (String) baseEffectUseCase$buildEffect$4.L$2;
function22 = (Function2) baseEffectUseCase$buildEffect$4.L$1;
baseEffectUseCase = (BaseEffectUseCase) baseEffectUseCase$buildEffect$4.L$0;
myobfuscated.ik2.i.b(obj);
Function2<? super String, ? super myobfuscated.mk2.c<? super List<? extends FXResource>>, ? extends Object> function24 = function22;
str2 = str;
Map<LibInputName, ? extends RXVirtualValue> map2 = (Map) obj;
nVar2 = baseEffectUseCase.c;
baseEffectUseCase$buildEffect$4.L$0 = nVar2;
baseEffectUseCase$buildEffect$4.L$1 = str2;
baseEffectUseCase$buildEffect$4.L$2 = map2;
baseEffectUseCase$buildEffect$4.label = 3;
obj = function24.invoke(str2, baseEffectUseCase$buildEffect$4);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
map = map2;
baseEffectUseCase$buildEffect$4.L$0 = null;
baseEffectUseCase$buildEffect$4.L$1 = null;
baseEffectUseCase$buildEffect$4.L$2 = null;
baseEffectUseCase$buildEffect$4.label = 4;
obj = nVar2.e(str2, map, (List) obj, baseEffectUseCase$buildEffect$4);
if (obj != coroutineSingletons) {
}
}
baseEffectUseCase$buildEffect$4.L$0 = baseEffectUseCase;
baseEffectUseCase$buildEffect$4.L$1 = function22;
baseEffectUseCase$buildEffect$4.L$2 = str;
baseEffectUseCase$buildEffect$4.L$3 = null;
baseEffectUseCase$buildEffect$4.label = 2;
obj = inputMap.a(baseEffectUseCase$buildEffect$4);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
Function2<? super String, ? super myobfuscated.mk2.c<? super List<? extends FXResource>>, ? extends Object> function242 = function22;
str2 = str;
Map<LibInputName, ? extends RXVirtualValue> map22 = (Map) obj;
nVar2 = baseEffectUseCase.c;
baseEffectUseCase$buildEffect$4.L$0 = nVar2;
baseEffectUseCase$buildEffect$4.L$1 = str2;
baseEffectUseCase$buildEffect$4.L$2 = map22;
baseEffectUseCase$buildEffect$4.label = 3;
obj = function242.invoke(str2, baseEffectUseCase$buildEffect$4);
if (obj == coroutineSingletons) {
}
}
}
baseEffectUseCase$buildEffect$4 = new BaseEffectUseCase$buildEffect$4(this, cVar);
obj = baseEffectUseCase$buildEffect$4.result;
coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$buildEffect$4.label;
if (i != 0) {
}
baseEffectUseCase$buildEffect$4.L$0 = baseEffectUseCase;
baseEffectUseCase$buildEffect$4.L$1 = function22;
baseEffectUseCase$buildEffect$4.L$2 = str;
baseEffectUseCase$buildEffect$4.L$3 = null;
baseEffectUseCase$buildEffect$4.label = 2;
obj = inputMap.a(baseEffectUseCase$buildEffect$4);
if (obj == coroutineSingletons) {
}
Function2<? super String, ? super myobfuscated.mk2.c<? super List<? extends FXResource>>, ? extends Object> function2422 = function22;
str2 = str;
Map<LibInputName, ? extends RXVirtualValue> map222 = (Map) obj;
nVar2 = baseEffectUseCase.c;
baseEffectUseCase$buildEffect$4.L$0 = nVar2;
baseEffectUseCase$buildEffect$4.L$1 = str2;
baseEffectUseCase$buildEffect$4.L$2 = map222;
baseEffectUseCase$buildEffect$4.label = 3;
obj = function2422.invoke(str2, baseEffectUseCase$buildEffect$4);
if (obj == coroutineSingletons) {
}
}
@Override
public final Object f(@NotNull T t, @NotNull myobfuscated.mk2.c<? super h> cVar) {
BaseEffectUseCase$createAndGetEffect$1 baseEffectUseCase$createAndGetEffect$1;
int i;
BaseEffectUseCase<T> baseEffectUseCase;
if (cVar instanceof BaseEffectUseCase$createAndGetEffect$1) {
baseEffectUseCase$createAndGetEffect$1 = (BaseEffectUseCase$createAndGetEffect$1) cVar;
int i2 = baseEffectUseCase$createAndGetEffect$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$createAndGetEffect$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
Object obj = baseEffectUseCase$createAndGetEffect$1.result;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$createAndGetEffect$1.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj);
o.b bVar = o.b.a;
try {
baseEffectUseCase$createAndGetEffect$1.L$0 = this;
baseEffectUseCase$createAndGetEffect$1.label = 1;
obj = y(t, baseEffectUseCase$createAndGetEffect$1);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
baseEffectUseCase = this;
} catch (Exception e) {
e = e;
baseEffectUseCase = this;
if (e instanceof EffectCancellationException) {
}
baseEffectUseCase.getClass();
throw e;
}
} else if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
baseEffectUseCase = (BaseEffectUseCase) baseEffectUseCase$createAndGetEffect$1.L$0;
try {
myobfuscated.ik2.i.b(obj);
} catch (Exception e2) {
e = e2;
if (e instanceof EffectCancellationException) {
baseEffectUseCase.t();
new o.c(e);
} else {
o.a aVar = o.a.a;
}
baseEffectUseCase.getClass();
throw e;
}
}
h hVar = (h) obj;
o.e eVar = o.e.a;
baseEffectUseCase.getClass();
return (h) obj;
}
}
baseEffectUseCase$createAndGetEffect$1 = new BaseEffectUseCase$createAndGetEffect$1(this, cVar);
Object obj2 = baseEffectUseCase$createAndGetEffect$1.result;
CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$createAndGetEffect$1.label;
if (i != 0) {
}
h hVar2 = (h) obj2;
o.e eVar2 = o.e.a;
baseEffectUseCase.getClass();
return (h) obj2;
}
public final Object g(@NotNull T t, Integer num, @NotNull myobfuscated.mk2.c<? super Unit> cVar) {
BaseEffectUseCase$getAndRegisterEffect$1 baseEffectUseCase$getAndRegisterEffect$1;
CoroutineSingletons coroutineSingletons;
int i;
BaseEffectUseCase<T> baseEffectUseCase;
if (cVar instanceof BaseEffectUseCase$getAndRegisterEffect$1) {
baseEffectUseCase$getAndRegisterEffect$1 = (BaseEffectUseCase$getAndRegisterEffect$1) cVar;
int i2 = baseEffectUseCase$getAndRegisterEffect$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$getAndRegisterEffect$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
Object obj = baseEffectUseCase$getAndRegisterEffect$1.result;
coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getAndRegisterEffect$1.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj);
baseEffectUseCase$getAndRegisterEffect$1.L$0 = this;
baseEffectUseCase$getAndRegisterEffect$1.L$1 = t;
baseEffectUseCase$getAndRegisterEffect$1.L$2 = num;
baseEffectUseCase$getAndRegisterEffect$1.label = 1;
if (Unit.a == coroutineSingletons) {
return coroutineSingletons;
}
baseEffectUseCase = this;
} else if (i != 1) {
if (i == 2) {
myobfuscated.ik2.i.b(obj);
return Unit.a;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
num = (Integer) baseEffectUseCase$getAndRegisterEffect$1.L$2;
t = (T) baseEffectUseCase$getAndRegisterEffect$1.L$1;
baseEffectUseCase = (BaseEffectUseCase) baseEffectUseCase$getAndRegisterEffect$1.L$0;
myobfuscated.ik2.i.b(obj);
}
baseEffectUseCase$getAndRegisterEffect$1.L$0 = null;
baseEffectUseCase$getAndRegisterEffect$1.L$1 = null;
baseEffectUseCase$getAndRegisterEffect$1.L$2 = null;
baseEffectUseCase$getAndRegisterEffect$1.label = 2;
if (baseEffectUseCase.u(t, num, baseEffectUseCase$getAndRegisterEffect$1) == coroutineSingletons) {
return coroutineSingletons;
}
return Unit.a;
}
}
baseEffectUseCase$getAndRegisterEffect$1 = new BaseEffectUseCase$getAndRegisterEffect$1(this, cVar);
Object obj2 = baseEffectUseCase$getAndRegisterEffect$1.result;
coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getAndRegisterEffect$1.label;
if (i != 0) {
}
baseEffectUseCase$getAndRegisterEffect$1.L$0 = null;
baseEffectUseCase$getAndRegisterEffect$1.L$1 = null;
baseEffectUseCase$getAndRegisterEffect$1.L$2 = null;
baseEffectUseCase$getAndRegisterEffect$1.label = 2;
if (baseEffectUseCase.u(t, num, baseEffectUseCase$getAndRegisterEffect$1) == coroutineSingletons) {
}
return Unit.a;
}
public Object h(@NotNull T t, @NotNull myobfuscated.mk2.c<? super InputMap> cVar) {
return j(this, t, cVar);
}
@Override
public Object i(@NotNull String str, @NotNull myobfuscated.mk2.c<? super List<? extends k>> cVar) {
myobfuscated.vq0.r<myobfuscated.vq0.l, myobfuscated.vq0.q> rVar;
Collection<? extends FXParameter> values;
if (Intrinsics.c(str, "None")) {
return EmptyList.INSTANCE;
}
ArrayList arrayList = new ArrayList();
Iterator it = this.j.entrySet().iterator();
while (true) {
boolean hasNext = it.hasNext();
rVar = this.a;
if (!hasNext) {
break;
}
Map.Entry entry = (Map.Entry) it.next();
arrayList.add(rVar.c((g0) entry.getValue(), (String) entry.getKey()));
}
Map<String, ? extends FXParameter> map = this.i;
if (map != null && (values = map.values()) != null) {
for (FXParameter fXParameter : values) {
arrayList.add(rVar.e(fXParameter));
}
}
return kotlin.collections.c.q0(new Object(), arrayList);
}
@Override
public final Object k(@NotNull String str, @NotNull String str2, @NotNull myobfuscated.mk2.c<? super k> cVar) {
FXParameter fXParameter;
k c;
g0<?> g0Var = (g0) this.j.get(str2);
myobfuscated.vq0.r<myobfuscated.vq0.l, myobfuscated.vq0.q> rVar = this.a;
if (g0Var == null || (c = rVar.c(g0Var, str2)) == null) {
Map<String, ? extends FXParameter> map = this.i;
return (map == null || (fXParameter = map.get(str2)) == null) ? k.j.d : rVar.e(fXParameter);
}
return c;
}
@Override
public final Object l(@NotNull String str, @NotNull String str2, @NotNull Bitmap bitmap, String str3, @NotNull myobfuscated.vq0.i iVar, Integer num, @NotNull myobfuscated.mk2.c<? super x> cVar) {
BaseEffectUseCase$getThumbResource$1 baseEffectUseCase$getThumbResource$1;
int i;
try {
if (cVar instanceof BaseEffectUseCase$getThumbResource$1) {
baseEffectUseCase$getThumbResource$1 = (BaseEffectUseCase$getThumbResource$1) cVar;
int i2 = baseEffectUseCase$getThumbResource$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$getThumbResource$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
BaseEffectUseCase$getThumbResource$1 baseEffectUseCase$getThumbResource$12 = baseEffectUseCase$getThumbResource$1;
Object obj = baseEffectUseCase$getThumbResource$12.result;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getThumbResource$12.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj);
baseEffectUseCase$getThumbResource$12.label = 1;
obj = r(str, str2, bitmap, str3, iVar, num, baseEffectUseCase$getThumbResource$12);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
myobfuscated.ik2.i.b(obj);
}
return (x) obj;
}
}
if (i != 0) {
}
return (x) obj;
} catch (Exception e) {
if (e instanceof myobfuscated.hq0.b) {
throw e;
}
return new x.b(e);
}
baseEffectUseCase$getThumbResource$1 = new BaseEffectUseCase$getThumbResource$1(this, cVar);
BaseEffectUseCase$getThumbResource$1 baseEffectUseCase$getThumbResource$122 = baseEffectUseCase$getThumbResource$1;
Object obj2 = baseEffectUseCase$getThumbResource$122.result;
CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getThumbResource$122.label;
}
@Override
public final Object m(@NotNull p pVar, @NotNull EffectLandmarkModelDownloadStrategy$fetchResources$$inlined$map$1.AnonymousClass2.AnonymousClass1 anonymousClass1) {
return x(this, pVar, anonymousClass1);
}
@Override
public final void n(Function0<Unit> function0) {
this.l = function0;
this.h.e = function0;
}
@NotNull
public String o(@NotNull String jsonName) {
Intrinsics.checkNotNullParameter(jsonName, "jsonName");
return this.k.b(jsonName);
}
@NotNull
public String p(@NotNull String resName) {
Pair pair;
Intrinsics.checkNotNullParameter(resName, "resName");
myobfuscated.vq0.t tVar = this.k;
tVar.getClass();
Intrinsics.checkNotNullParameter(resName, "resName");
if (kotlin.text.d.w(resName, ".", false)) {
int H = kotlin.text.d.H(resName, ".", 0, 6);
String substring = resName.substring(0, H);
Intrinsics.checkNotNullExpressionValue(substring, "this as java.lang.String…ing(startIndex, endIndex)");
String substring2 = resName.substring(H);
Intrinsics.checkNotNullExpressionValue(substring2, "this as java.lang.String).substring(startIndex)");
pair = new Pair(substring, substring2);
} else {
pair = new Pair(resName, "");
}
String a = myobfuscated.vq0.t.a();
String a2 = tVar.b.a((String) pair.component1());
StringBuilder sb = new StringBuilder("https://effres.");
defpackage.j.z(sb, tVar.a, "/", a, "effects/res/");
return defpackage.e.m(sb, a2, (String) pair.component2());
}
public final Object q(@NotNull String str, @NotNull myobfuscated.mk2.c<? super List<? extends FXResource>> cVar) {
BaseEffectUseCase$getResources$1 baseEffectUseCase$getResources$1;
int i;
BaseEffectUseCase<T> baseEffectUseCase;
BaseEffectUseCase<T> baseEffectUseCase2;
ArrayList arrayList;
Iterator it;
if (cVar instanceof BaseEffectUseCase$getResources$1) {
baseEffectUseCase$getResources$1 = (BaseEffectUseCase$getResources$1) cVar;
int i2 = baseEffectUseCase$getResources$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$getResources$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
Object obj = baseEffectUseCase$getResources$1.result;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getResources$1.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj);
baseEffectUseCase$getResources$1.L$0 = this;
baseEffectUseCase$getResources$1.label = 1;
obj = this.c.c(str, baseEffectUseCase$getResources$1);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
baseEffectUseCase = this;
} else if (i == 1) {
baseEffectUseCase = (BaseEffectUseCase) baseEffectUseCase$getResources$1.L$0;
myobfuscated.ik2.i.b(obj);
} else if (i != 2) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
FXResourceDescriptor fXResourceDescriptor = (FXResourceDescriptor) baseEffectUseCase$getResources$1.L$3;
it = (Iterator) baseEffectUseCase$getResources$1.L$2;
baseEffectUseCase2 = (BaseEffectUseCase) baseEffectUseCase$getResources$1.L$0;
myobfuscated.ik2.i.b(obj);
ArrayList arrayList2 = (List) baseEffectUseCase$getResources$1.L$1;
String str2 = (String) obj;
if (fXResourceDescriptor instanceof myobfuscated.f81.d) {
arrayList = arrayList2;
if (fXResourceDescriptor instanceof myobfuscated.f81.b) {
arrayList2.add(new myobfuscated.f81.a(str2, (myobfuscated.f81.b) fXResourceDescriptor));
arrayList = arrayList2;
}
} else {
arrayList2.add(new myobfuscated.f81.c(str2, (myobfuscated.f81.d) fXResourceDescriptor));
arrayList = arrayList2;
}
if (!it.hasNext()) {
fXResourceDescriptor = (FXResourceDescriptor) it.next();
String p = baseEffectUseCase2.p(fXResourceDescriptor.B0());
baseEffectUseCase$getResources$1.L$0 = baseEffectUseCase2;
baseEffectUseCase$getResources$1.L$1 = arrayList;
baseEffectUseCase$getResources$1.L$2 = it;
baseEffectUseCase$getResources$1.L$3 = fXResourceDescriptor;
baseEffectUseCase$getResources$1.label = 2;
obj = baseEffectUseCase2.d.d(p, null, baseEffectUseCase$getResources$1);
arrayList2 = arrayList;
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
String str22 = (String) obj;
if (fXResourceDescriptor instanceof myobfuscated.f81.d) {
}
if (!it.hasNext()) {
return arrayList;
}
}
}
baseEffectUseCase2 = baseEffectUseCase;
arrayList = new ArrayList();
it = ((List) obj).iterator();
if (!it.hasNext()) {
}
}
}
baseEffectUseCase$getResources$1 = new BaseEffectUseCase$getResources$1(this, cVar);
Object obj2 = baseEffectUseCase$getResources$1.result;
CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$getResources$1.label;
if (i != 0) {
}
baseEffectUseCase2 = baseEffectUseCase;
arrayList = new ArrayList();
it = ((List) obj2).iterator();
if (!it.hasNext()) {
}
}
public Object r(@NotNull String str, @NotNull String str2, @NotNull Bitmap bitmap, String str3, @NotNull myobfuscated.vq0.i iVar, Integer num, @NotNull myobfuscated.mk2.c<? super x> cVar) {
return s(this, str3, num, cVar);
}
public final void t() {
this.i = null;
this.j.clear();
}
public final Object u(@NotNull T t, Integer num, @NotNull myobfuscated.mk2.c<? super Unit> cVar) {
BaseEffectUseCase$innerGetAndRegisterEffect$1 baseEffectUseCase$innerGetAndRegisterEffect$1;
int i;
String v;
Object f;
BaseEffectUseCase<T> baseEffectUseCase;
Object obj;
BaseEffectUseCase<T> baseEffectUseCase2;
T t2;
String str;
myobfuscated.yq0.n nVar;
if (cVar instanceof BaseEffectUseCase$innerGetAndRegisterEffect$1) {
baseEffectUseCase$innerGetAndRegisterEffect$1 = (BaseEffectUseCase$innerGetAndRegisterEffect$1) cVar;
int i2 = baseEffectUseCase$innerGetAndRegisterEffect$1.label;
if ((i2 & RecyclerView.UNDEFINED_DURATION) != 0) {
baseEffectUseCase$innerGetAndRegisterEffect$1.label = i2 - RecyclerView.UNDEFINED_DURATION;
Object obj2 = baseEffectUseCase$innerGetAndRegisterEffect$1.result;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$innerGetAndRegisterEffect$1.label;
if (i != 0) {
myobfuscated.ik2.i.b(obj2);
v = v(t);
baseEffectUseCase$innerGetAndRegisterEffect$1.L$0 = this;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$1 = t;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$2 = num;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$3 = v;
baseEffectUseCase$innerGetAndRegisterEffect$1.label = 1;
f = this.c.f(v, baseEffectUseCase$innerGetAndRegisterEffect$1);
if (f == coroutineSingletons) {
return coroutineSingletons;
}
baseEffectUseCase = this;
} else if (i != 1) {
if (i != 2) {
if (i != 3) {
if (i == 4) {
myobfuscated.ik2.i.b(obj2);
return Unit.a;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
str = (String) baseEffectUseCase$innerGetAndRegisterEffect$1.L$1;
baseEffectUseCase2 = (BaseEffectUseCase) baseEffectUseCase$innerGetAndRegisterEffect$1.L$0;
myobfuscated.ik2.i.b(obj2);
nVar = baseEffectUseCase2.c;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$0 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$1 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.label = 4;
if (nVar.a(str, (String) obj2, baseEffectUseCase$innerGetAndRegisterEffect$1) == coroutineSingletons) {
return coroutineSingletons;
}
return Unit.a;
}
str = (String) baseEffectUseCase$innerGetAndRegisterEffect$1.L$2;
myobfuscated.ik2.i.b(obj2);
t2 = (p) baseEffectUseCase$innerGetAndRegisterEffect$1.L$1;
baseEffectUseCase2 = (BaseEffectUseCase) baseEffectUseCase$innerGetAndRegisterEffect$1.L$0;
obj = obj2;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$0 = baseEffectUseCase2;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$1 = str;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$2 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.label = 3;
obj2 = baseEffectUseCase2.w(t2, (String) obj);
if (obj2 == coroutineSingletons) {
return coroutineSingletons;
}
nVar = baseEffectUseCase2.c;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$0 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$1 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.label = 4;
if (nVar.a(str, (String) obj2, baseEffectUseCase$innerGetAndRegisterEffect$1) == coroutineSingletons) {
}
return Unit.a;
} else {
num = (Integer) baseEffectUseCase$innerGetAndRegisterEffect$1.L$2;
baseEffectUseCase = (BaseEffectUseCase) baseEffectUseCase$innerGetAndRegisterEffect$1.L$0;
myobfuscated.ik2.i.b(obj2);
v = (String) baseEffectUseCase$innerGetAndRegisterEffect$1.L$3;
t = (p) baseEffectUseCase$innerGetAndRegisterEffect$1.L$1;
f = obj2;
}
if (((Boolean) f).booleanValue()) {
String o = baseEffectUseCase.o(t.b);
baseEffectUseCase$innerGetAndRegisterEffect$1.L$0 = baseEffectUseCase;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$1 = t;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$2 = v;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$3 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.label = 2;
Object a = baseEffectUseCase.d.a(t.b, o, num, baseEffectUseCase$innerGetAndRegisterEffect$1);
if (a == coroutineSingletons) {
return coroutineSingletons;
}
obj = a;
baseEffectUseCase2 = baseEffectUseCase;
String str2 = v;
t2 = t;
str = str2;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$0 = baseEffectUseCase2;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$1 = str;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$2 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.label = 3;
obj2 = baseEffectUseCase2.w(t2, (String) obj);
if (obj2 == coroutineSingletons) {
}
nVar = baseEffectUseCase2.c;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$0 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.L$1 = null;
baseEffectUseCase$innerGetAndRegisterEffect$1.label = 4;
if (nVar.a(str, (String) obj2, baseEffectUseCase$innerGetAndRegisterEffect$1) == coroutineSingletons) {
}
return Unit.a;
}
return Unit.a;
}
}
baseEffectUseCase$innerGetAndRegisterEffect$1 = new BaseEffectUseCase$innerGetAndRegisterEffect$1(this, cVar);
Object obj22 = baseEffectUseCase$innerGetAndRegisterEffect$1.result;
CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
i = baseEffectUseCase$innerGetAndRegisterEffect$1.label;
if (i != 0) {
}
if (((Boolean) f).booleanValue()) {
}
}
@NotNull
public String v(@NotNull T inputData) {
Intrinsics.checkNotNullParameter(inputData, "inputData");
return inputData.b;
}
public String w(@NotNull p pVar, @NotNull String str) {
return str;
}
public Object y(@NotNull T t, @NotNull myobfuscated.mk2.c<? super h> cVar) {
return z(this, t, cVar);
}
}