Luno v7.28.0版本的 MD5 值为:08d81b3b88ef7df48c89cb5d56dc11a2
以下内容为反编译后的 ea.java 源代码,内容仅作参考
package com.plaid.internal;
import android.net.Uri;
import android.webkit.ValueCallback;
import com.facebook.internal.AnalyticsEvents;
import com.leanplum.internal.Constants;
import com.plaid.internal.f8;
import com.plaid.internal.i4;
import com.plaid.internal.l2;
import com.plaid.internal.webview.LinkWebview;
import com.plaid.link.Plaid;
import com.plaid.link.event.LinkEvent;
import com.plaid.link.event.LinkEventMetadata;
import com.plaid.link.event.LinkEventName;
import com.plaid.link.exception.LinkException;
import com.plaid.link.result.LinkAccount;
import com.plaid.link.result.LinkError;
import com.plaid.link.result.LinkExit;
import com.plaid.link.result.LinkSuccess;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.NoSuchElementException;
import java.util.Set;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import mdi.sdk.ac1;
import mdi.sdk.bz1;
import mdi.sdk.c85;
import mdi.sdk.es4;
import mdi.sdk.hy;
import mdi.sdk.iy;
import mdi.sdk.ly2;
import mdi.sdk.n40;
import mdi.sdk.n50;
import mdi.sdk.pf4;
import mdi.sdk.ro;
import mdi.sdk.t55;
import mdi.sdk.ud2;
import mdi.sdk.w32;
import mdi.sdk.x74;
import mdi.sdk.z32;
import mdi.sdk.zj;
public final class ea extends androidx.lifecycle.s implements LinkWebview.a, i4.a {
public ud2 a;
public o3 b;
public k8 c;
public final i4 d;
public final zj<String> e;
public ValueCallback<Uri[]> f;
@kotlin.coroutines.jvm.internal.c(c = "com.plaid.internal.workflow.webview.WebviewViewModel$1", f = "WebviewViewModel.kt", l = {51}, m = "invokeSuspend")
public static final class a extends c85 implements ac1<n50, n40<? super Unit>, Object> {
public int a;
public a(n40<? super a> n40Var) {
super(2, n40Var);
}
@Override
public final n40<Unit> create(Object obj, n40<?> n40Var) {
return new a(n40Var);
}
@Override
public Object invoke(n50 n50Var, n40<? super Unit> n40Var) {
return new a(n40Var).invokeSuspend(Unit.a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object d;
d = z32.d();
int i = this.a;
boolean z = true;
if (i == 0) {
pf4.b(obj);
k8 k8Var = ea.this.c;
if (k8Var == null) {
w32.y("readWebviewFallbackUri");
k8Var = null;
}
this.a = 1;
obj = k8Var.a(this);
if (obj == d) {
return d;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
pf4.b(obj);
}
String str = (String) obj;
if (str != null && str.length() != 0) {
z = false;
}
if (z) {
return Unit.a;
}
ea.this.e.accept(str);
return Unit.a;
}
}
@kotlin.coroutines.jvm.internal.c(c = "com.plaid.internal.workflow.webview.WebviewViewModel$onWebviewCancelled$1", f = "WebviewViewModel.kt", l = {70}, m = "invokeSuspend")
public static final class b extends c85 implements ac1<n50, n40<? super Unit>, Object> {
public int a;
public b(n40<? super b> n40Var) {
super(2, n40Var);
}
@Override
public final n40<Unit> create(Object obj, n40<?> n40Var) {
return new b(n40Var);
}
@Override
public Object invoke(n50 n50Var, n40<? super Unit> n40Var) {
return new b(n40Var).invokeSuspend(Unit.a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object d;
d = z32.d();
int i = this.a;
if (i == 0) {
pf4.b(obj);
o3 c = ea.this.c();
this.a = 1;
if (c.b(this) == d) {
return d;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
pf4.b(obj);
}
return Unit.a;
}
}
public ea(ba baVar) {
w32.h(baVar, "webviewComponent");
zj<String> d = zj.d();
w32.g(d, "create()");
this.e = d;
baVar.a(this);
this.d = new i4(this, b());
kotlinx.coroutines.d.d(androidx.lifecycle.t.a(this), null, null, new a(null), 3, null);
}
@Override
public void a() {
kotlinx.coroutines.d.d(androidx.lifecycle.t.a(this), null, null, new b(null), 3, null);
}
@Override
public void a(String str) {
}
public final ud2 b() {
ud2 ud2Var = this.a;
if (ud2Var != null) {
return ud2Var;
}
w32.y("json");
return null;
}
public final o3 c() {
o3 o3Var = this.b;
if (o3Var != null) {
return o3Var;
}
w32.y("linkController");
return null;
}
@Override
public void a(ValueCallback<Uri[]> valueCallback) {
this.f = valueCallback;
}
@Override
public boolean b(String str) {
boolean M;
String G;
int u;
int e;
int b2;
String str2;
List<l2> list;
int u2;
w32.h(str, "url");
i4 i4Var = this.d;
i4Var.getClass();
w32.h(str, "url");
List list2 = 0;
Unit unit = null;
M = t55.M(str, "plaidlink://", false, 2, null);
if (!M) {
f8.a.a(f8.a, w32.q("external link: ", str), new Object[0], false, 4, null);
i4Var.a.c(str);
} else {
bz1.b bVar = bz1.l;
G = t55.G(str, "plaidlink://", "https://", false, 4, null);
bz1 d = bVar.d(G);
f8.a.a(f8.a, w32.q("plaidcallback ", str), new Object[0], false, 4, null);
String i = d.i();
Set<String> r = d.r();
u = iy.u(r, 10);
e = ly2.e(u);
b2 = x74.b(e, 16);
LinkedHashMap linkedHashMap = new LinkedHashMap(b2);
Iterator<T> it = r.iterator();
while (true) {
str2 = "";
if (!it.hasNext()) {
break;
}
Object next = it.next();
String q = d.q((String) next);
if (q != null) {
str2 = q;
}
linkedHashMap.put(next, str2);
}
i4Var.c = (String) linkedHashMap.get("link_session_id");
int hashCode = i.hashCode();
if (hashCode != -579210487) {
if (hashCode != 3127582) {
if (hashCode == 96891546 && i.equals("event")) {
f8.a aVar = f8.a;
String q2 = w32.q("Event name: ", linkedHashMap.get("event_name"));
Object[] objArr = new Object[0];
w32.h(objArr, "args");
aVar.a(3, (Throwable) null, q2, Arrays.copyOf(objArr, 0), false);
f8.a.a(aVar, d.toString(), new Object[0], false, 4, null);
String str3 = (String) linkedHashMap.get("event_name");
if (str3 != null) {
Locale locale = i4.d;
w32.g(locale, "SERVER_LOCALE");
w32.g(str3.toUpperCase(locale), "(this as java.lang.String).toUpperCase(locale)");
if (w32.d(str3, "OPEN")) {
i4Var.a.a((String) linkedHashMap.get("link_session_id"));
}
i4Var.a(linkedHashMap);
unit = Unit.a;
}
if (unit == null) {
i4Var.a(linkedHashMap);
}
}
} else if (i.equals("exit")) {
f8.a aVar2 = f8.a;
f8.a.a(aVar2, "User status in flow: ", new Object[]{w32.q("data: ", linkedHashMap.get(AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_STATUS))}, false, 4, null);
f8.a.a(aVar2, "Link request ID: ", new Object[]{w32.q("data: ", linkedHashMap.get("request_id"))}, false, 4, null);
try {
i4.a aVar3 = i4Var.a;
w32.h(linkedHashMap, "linkData");
aVar3.a(LinkExit.INSTANCE.fromMap$link_sdk_release(linkedHashMap));
} catch (NoSuchElementException unused) {
i4Var.a.a(new t1("Failed to parse exit"));
}
}
} else if (i.equals("connected")) {
f8.a aVar4 = f8.a;
f8.a.a(aVar4, w32.q("Institution id: ", linkedHashMap.get("institution_id")), new Object[0], false, 4, null);
f8.a.a(aVar4, w32.q("Institution name: ", linkedHashMap.get("institution_name")), new Object[0], false, 4, null);
String str4 = (String) linkedHashMap.get("accounts");
str2 = str4 != null ? str4 : "";
try {
try {
ud2 ud2Var = i4Var.b;
l2.g.getClass();
list = (List) ud2Var.c(ro.h(l2.a.a), str2);
} catch (es4 unused2) {
f8.a.b(f8.a, w32.q("Unable to parse accounts data: ", u5.a.a(str2)), new Object[0], false, 4, null);
list = null;
}
if (list != null) {
u2 = iy.u(list, 10);
list2 = new ArrayList(u2);
for (l2 l2Var : list) {
w32.h(l2Var, "account");
list2.add(LinkAccount.INSTANCE.fromResponse$link_sdk_release(l2Var));
}
}
if (list2 == 0) {
list2 = hy.j();
}
i4.a aVar5 = i4Var.a;
w32.h(linkedHashMap, "linkData");
w32.h(list2, "accounts");
aVar5.a(LinkSuccess.INSTANCE.fromMap$link_sdk_release(linkedHashMap, list2));
} catch (NoSuchElementException unused3) {
i4Var.a.a(new t1("Failed to parse success"));
}
}
f8.a.a(f8.a, w32.q("Link action detected: ", i), new Object[0], false, 4, null);
i4Var.a.a(i, LinkEventMetadata.INSTANCE.fromMap(linkedHashMap, i4Var.c));
}
return true;
}
@Override
public void c(String str) {
w32.h(str, "url");
c().a(str);
}
@Override
public void a(LinkSuccess linkSuccess) {
w32.h(linkSuccess, "linkSuccess");
c().a(linkSuccess);
}
@Override
public void a(LinkEvent linkEvent) {
w32.h(linkEvent, "linkEvent");
Function1<LinkEvent, Unit> linkEventListenerInternal$link_sdk_release = Plaid.INSTANCE.getLinkEventListenerInternal$link_sdk_release();
if (linkEventListenerInternal$link_sdk_release == null) {
return;
}
linkEventListenerInternal$link_sdk_release.invoke(linkEvent);
}
@Override
public void a(Throwable th) {
w32.h(th, "exception");
f8.a.a(f8.a, th, false, 2, (Object) null);
LinkError fromException$link_sdk_release = LinkError.INSTANCE.fromException$link_sdk_release(new LinkException("Link has exited unexpectedly please report this to support via https://dashboard.plaid.com/support with the session id if it persists"));
c().a(new LinkExit(fromException$link_sdk_release, null, 2, 0 == true ? 1 : 0));
}
@Override
public void a(LinkExit linkExit) {
w32.h(linkExit, "linkExit");
c().a(linkExit);
}
@Override
public void a(String str, LinkEventMetadata linkEventMetadata) {
w32.h(str, "action");
w32.h(linkEventMetadata, "linkEventMetadata");
Function1<LinkEvent, Unit> linkEventListenerInternal$link_sdk_release = Plaid.INSTANCE.getLinkEventListenerInternal$link_sdk_release();
if (linkEventListenerInternal$link_sdk_release == null) {
return;
}
w32.h(str, Constants.Kinds.STRING);
LinkEventName fromString$link_sdk_release = LinkEventName.INSTANCE.fromString$link_sdk_release(str);
w32.h(fromString$link_sdk_release, "eventName");
w32.h(linkEventMetadata, "metadata");
linkEventListenerInternal$link_sdk_release.invoke(new LinkEvent(fromString$link_sdk_release, linkEventMetadata));
}
}