Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 a.java 源代码,内容仅作参考
package ye1;
import android.content.Context;
import co.k;
import co.m;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.inappstory.sdk.stories.api.models.Image;
import es.d2;
import es.f;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.u;
import org.jetbrains.annotations.NotNull;
import p029do.c0;
import p029do.t;
import p029do.v;
import p029do.z;
import sinet.startup.inDriver.core.network.data.common.model.NetworkConfigData;
import wo.p;
import yf1.DefaultHost;
import yf1.NetworkConfig;
@Metadata(d1 = {"\u0000N\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u001c\b\u0001\u0018\u0000 ;2\u00020\u0001:\u0001\fB#\b\u0007\u0012\b\b\u0001\u0010\u000f\u001a\u00020\r\u0012\u0006\u0010\u0013\u001a\u00020\u0010\u0012\u0006\u0010\u0017\u001a\u00020\u0014¢\u0006\u0004\b9\u0010:J\u000e\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0002H\u0002J\b\u0010\u0006\u001a\u00020\u0005H\u0002J\u0014\u0010\t\u001a\u00020\u0007*\u00020\u00032\u0006\u0010\b\u001a\u00020\u0007H\u0002J\u000e\u0010\n\u001a\b\u0012\u0004\u0012\u00020\u00030\u0002H\u0002J\b\u0010\f\u001a\u00020\u000bH\u0016R\u0014\u0010\u000f\u001a\u00020\r8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\f\u0010\u000eR\u0014\u0010\u0013\u001a\u00020\u00108\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0011\u0010\u0012R\u0014\u0010\u0017\u001a\u00020\u00148\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0015\u0010\u0016R\"\u0010\u001f\u001a\u00020\u00188\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0019\u0010\u001a\u001a\u0004\b\u001b\u0010\u001c\"\u0004\b\u001d\u0010\u001eR\u001c\u0010$\u001a\n !*\u0004\u0018\u00010 0 8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\"\u0010#R!\u0010)\u001a\b\u0012\u0004\u0012\u00020\u00030\u00028BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b%\u0010&\u001a\u0004\b'\u0010(R\u001b\u0010-\u001a\u00020\u00058BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b*\u0010&\u001a\u0004\b+\u0010,R\u0014\u0010\b\u001a\u00020\u00078BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b.\u0010/R\u0014\u00101\u001a\u00020\u00038VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0019\u00100R$\u00104\u001a\u00020\u00052\u0006\u00102\u001a\u00020\u00058V@VX\u0096\u000e¢\u0006\f\u001a\u0004\b*\u0010,\"\u0004\b\u0011\u00103R\u001a\u00105\u001a\b\u0012\u0004\u0012\u00020\u00180\u00028VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\"\u0010(R0\u00108\u001a\b\u0012\u0004\u0012\u00020\u00180\u00022\f\u00106\u001a\b\u0012\u0004\u0012\u00020\u00180\u00028V@VX\u0096\u000e¢\u0006\f\u001a\u0004\b%\u0010(\"\u0004\b\u0015\u00107¨\u0006<"}, d2 = {"Lye1/a;", "Lwf1/a;", "", "Lyf1/d;", Image.TYPE_MEDIUM, "", "j", "", "isProdEnvEnabled", "n", "p", "Lco/g0;", "a", "Lfs/a;", "Lfs/a;", "json", "Landroid/content/Context;", "b", "Landroid/content/Context;", "context", "Lad1/a;", "c", "Lad1/a;", "prodEnvDelegate", "", "d", "Ljava/lang/String;", "getProdHost", "()Ljava/lang/String;", "setProdHost", "(Ljava/lang/String;)V", "prodHost", "Lfd1/a;", "kotlin.jvm.PlatformType", "e", "Lfd1/a;", "preferences", "f", "Lco/k;", "k", "()Ljava/util/List;", "debugNetworkConfigsList", "g", "l", "()I", "defaultPosition", "o", "()Z", "()Lyf1/d;", "selectedNetworkConfig", AppMeasurementSdk.ConditionalUserProperty.VALUE, "(I)V", "selectedNetworkConfigPosition", "networkConfigsFirstRouters", "hosts", "(Ljava/util/List;)V", "customRouters", "<init>", "(Lfs/a;Landroid/content/Context;Lad1/a;)V", "Companion", "network_release"}, k = 1, mv = {1, 8, 0})
public final class a implements wf1.a {
@NotNull
private final fs.a json;
@NotNull
private final Context context;
@NotNull
private final ad1.a prodEnvDelegate;
@NotNull
private String prodHost = "https://talaria.online";
private final fd1.a preferences;
@NotNull
private final k debugNetworkConfigsList;
@NotNull
private final k defaultPosition;
@Metadata(d1 = {"\u0000\f\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00010\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"", "Lyf1/d;", "invoke", "()Ljava/util/List;", "<anonymous>"}, k = 3, mv = {1, 8, 0})
static final class b extends u implements qo.a<List<? extends NetworkConfig>> {
b() {
super(0);
}
@Override
@NotNull
public final List<? extends NetworkConfig> invoke() {
return a.this.p();
}
}
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"<anonymous>", "", "invoke", "()Ljava/lang/Integer;"}, k = 3, mv = {1, 8, 0}, xi = 48)
static final class c extends u implements qo.a<Integer> {
c() {
super(0);
}
@Override
@NotNull
public final Integer invoke() {
return Integer.valueOf(a.this.j());
}
}
public a(@NotNull fs.a aVar, @NotNull Context context, @NotNull ad1.a aVar2) {
k b15;
k b16;
this.json = aVar;
this.context = context;
this.prodEnvDelegate = aVar2;
this.preferences = fd1.a.h(context);
b15 = m.b(new b());
this.debugNetworkConfigsList = b15;
b16 = m.b(new c());
this.defaultPosition = b16;
}
public final int j() {
int e15;
boolean o15 = o();
Iterator<NetworkConfig> it = k().iterator();
int i15 = 0;
while (true) {
if (it.hasNext()) {
if (n(it.next(), o15)) {
break;
}
i15++;
} else {
i15 = -1;
break;
}
}
e15 = p.e(i15, 0);
return e15;
}
private final List<NetworkConfig> k() {
return (List) this.debugNetworkConfigsList.getValue();
}
private final int l() {
return ((Number) this.defaultPosition.getValue()).intValue();
}
private final List<NetworkConfig> m() {
int v15;
List e15;
List k15;
List e16;
ArrayList arrayList = new ArrayList();
List<String> f15 = f();
v15 = v.v(f15, 10);
ArrayList arrayList2 = new ArrayList(v15);
for (String str : f15) {
e15 = t.e(str);
k15 = p029do.u.k();
e16 = t.e(new DefaultHost(str, null, null, 6, null));
arrayList2.add(new NetworkConfig(e15, k15, e16, false, 8, null));
}
z.C(arrayList, arrayList2);
arrayList.addAll(k());
return arrayList;
}
private final boolean n(NetworkConfig networkConfig, boolean z15) {
Object obj;
if (z15) {
Iterator<T> it = networkConfig.b().iterator();
while (true) {
if (it.hasNext()) {
obj = it.next();
if (Intrinsics.g((String) obj, this.prodHost)) {
break;
}
} else {
obj = null;
break;
}
}
if (obj != null) {
return true;
}
return false;
}
return networkConfig.getIsDefault();
}
private final boolean o() {
return this.prodEnvDelegate.isEnabled();
}
public final List<NetworkConfig> p() {
BufferedReader bufferedReader;
int v15;
Reader inputStreamReader = new InputStreamReader(this.context.getResources().openRawResource(this.context.getResources().getIdentifier("network_configs", "raw", this.context.getPackageName())), kotlin.text.b.UTF_8);
if (inputStreamReader instanceof BufferedReader) {
bufferedReader = (BufferedReader) inputStreamReader;
} else {
bufferedReader = new BufferedReader(inputStreamReader, 8192);
}
try {
fs.a aVar = this.json;
String f15 = no.m.f(bufferedReader);
aVar.getSerializersModule();
Iterable iterable = (Iterable) aVar.c(new f(NetworkConfigData.INSTANCE.serializer()), f15);
v15 = v.v(iterable, 10);
ArrayList arrayList = new ArrayList(v15);
Iterator it = iterable.iterator();
while (it.hasNext()) {
arrayList.add(hf1.b.b((NetworkConfigData) it.next()));
}
no.b.a(bufferedReader, null);
return arrayList;
} catch (Throwable th4) {
try {
throw th4;
} catch (Throwable th5) {
no.b.a(bufferedReader, th4);
throw th5;
}
}
}
@Override
public void a() {
b(j());
}
@Override
public void b(int i15) {
this.preferences.y0(i15);
}
@Override
public void c(@NotNull List<String> list) {
fd1.a aVar = this.preferences;
fs.a aVar2 = this.json;
aVar2.getSerializersModule();
aVar.X(aVar2.b(new f(d2.f53094a), list));
}
@Override
@NotNull
public NetworkConfig d() {
return m().get(g());
}
@Override
@NotNull
public List<String> e() {
int v15;
Object n05;
String host;
Object n06;
List<NetworkConfig> m15 = m();
v15 = v.v(m15, 10);
ArrayList arrayList = new ArrayList(v15);
for (NetworkConfig networkConfig : m15) {
if (!networkConfig.b().isEmpty()) {
n06 = c0.n0(networkConfig.b());
host = (String) n06;
} else {
n05 = c0.n0(networkConfig.a());
host = ((DefaultHost) n05).getHost();
}
arrayList.add(host);
}
return arrayList;
}
@Override
@NotNull
public List<String> f() {
fs.a aVar = this.json;
String d15 = this.preferences.d();
aVar.getSerializersModule();
return (List) aVar.c(new f(d2.f53094a), d15);
}
@Override
public int g() {
return this.preferences.w(l());
}
}