Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 n9.java 源代码,内容仅作参考
package com.inmobi.media;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Paint;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.webkit.ConsoleMessage;
import android.webkit.GeolocationPermissions;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.URLUtil;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.widget.AbsoluteLayout;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import androidx.annotation.UiThread;
import androidx.annotation.WorkerThread;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import androidx.core.view.ViewCompat;
import com.google.android.exoplayer2.audio.WavUtil;
import com.iab.omid.library.inmobi.Omid;
import com.inmobi.adquality.models.AdQualityControl;
import com.inmobi.ads.rendering.InMobiAdActivity;
import com.inmobi.commons.core.configs.AdConfig;
import com.inmobi.media.f6;
import com.inmobi.media.g;
import com.inmobi.media.l4;
import com.inmobi.media.n9;
import com.inmobi.media.t8;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mbridge.msdk.MBridgeConstans;
import com.my.target.ads.Reward;
import com.tp.adx.sdk.bean.TPNativeInfo;
import com.tradplus.ads.common.AdType;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.jvm.JvmField;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Regex;
import kotlin.text.StringsKt__IndentKt;
import kotlin.text.StringsKt__StringsJVMKt;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@SuppressLint({"SetJavaScriptEnabled", "ViewConstructor", "ClickableViewAccessibility"})
public final class n9 extends WebView implements com.inmobi.media.g, v1, s1, f6.a, GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, y8, m9 {
@JvmField
public static final p9 B0 = new a();
public static final String C0 = n9.class.getSimpleName();
public cc A;
public final y0 A0;
public boolean B;
public boolean C;
public String D;
public final AtomicBoolean E;
public final Object F;
public final Object G;
public boolean H;
public boolean I;
public View f3372J;
public WebChromeClient.CustomViewCallback K;
public int L;
public long M;
public String N;
public String O;
public u1 P;
public com.inmobi.media.g Q;
public boolean R;
public boolean S;
public w T;
public yb U;
public boolean V;
public boolean W;
public final byte a;
public boolean a0;
public final Set<bb> f3373b;
public int b0;
public String c;
public String c0;
public final boolean d;
public int[] d0;
public String e;
public long e0;
public long f;
public int f0;
public byte g;
public int g0;
public n9 h;
public int h0;
public WeakReference<Activity> i;
public final f6 i0;
public WeakReference<ViewGroup> j;
public final GestureDetector j0;
public p9 k;
public boolean k0;
public String l;
public final o9 l0;
public g6 m;
public o3 m0;
public j6 n;
public String n0;
public i6 o;
public x8 o0;
public AdConfig p;
public d0 p0;
public boolean q;
public final boolean q0;
public boolean r;
public Map<String, l0> r0;
public c4 s;
public String s0;
public u9 t;
public u5 t0;
public JSONObject u;
public final d u0;
public JSONObject v;
public final c v0;
public boolean w;
public final dc w0;
public boolean x;
public t2 x0;
public boolean y;
public final g.a y0;
public boolean z;
public final WebChromeClient z0;
public static final class a extends p9 {
@Override
public void a(ta telemetryOnAdImpression) {
Intrinsics.checkNotNullParameter(telemetryOnAdImpression, "telemetryOnAdImpression");
}
@Override
public TimeoutConfigurations k() {
return TimeoutConfigurations.Companion.a();
}
}
public static final class b implements dc {
public b() {
}
@Override
public void a(View view, boolean z) {
Intrinsics.checkNotNullParameter(view, "view");
if (view instanceof n9) {
if (n9.this.hasWindowFocus()) {
n9.this.c(z);
} else {
n9.this.c(false);
}
}
}
}
public static final class d implements t5 {
public d() {
}
@Override
public void a() {
n9.this.getListener().a();
}
@Override
public void b() {
if (n9.this.E.get()) {
return;
}
n9.this.getListener().b(new HashMap<>());
}
@Override
public void c(String str, String str2, String str3) {
n9.a(n9.this, str, str2, str3);
}
@Override
public void a(String str, String message, String str2) {
Intrinsics.checkNotNullParameter(message, "message");
n9.this.b(str, message, str2);
}
@Override
public void a(Intent intent) {
Intrinsics.checkNotNullParameter(intent, "intent");
intent.putExtra("creativeId", n9.this.getCreativeId());
intent.putExtra("impressionId", n9.this.getImpressionId());
InMobiAdActivity.a aVar = InMobiAdActivity.h;
n9 n9Var = n9.this;
InMobiAdActivity.j = n9Var;
da.a.a(n9Var.getContainerContext(), intent);
}
@Override
public void b(String str, String message, String str2) {
Intrinsics.checkNotNullParameter(message, "message");
if (n9.this.E.get()) {
return;
}
a(str, message, str2);
}
}
public static final class g extends WebChromeClient {
public g() {
}
public static final void a(JsResult result, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(result, "$result");
result.confirm();
}
public static final boolean a(View view, MotionEvent motionEvent) {
return true;
}
public static final void b(JsResult result, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(result, "$result");
result.confirm();
}
public static final void c(JsResult result, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(result, "$result");
result.cancel();
}
@Override
public boolean onConsoleMessage(ConsoleMessage cm) {
Intrinsics.checkNotNullParameter(cm, "cm");
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("Console message:", cm.message() + " -- From line " + cm.lineNumber() + " of " + ((Object) cm.sourceId()));
return true;
}
@Override
public void onGeolocationPermissionsShowPrompt(final String origin, final GeolocationPermissions.Callback callback) {
Intrinsics.checkNotNullParameter(origin, "origin");
Intrinsics.checkNotNullParameter(callback, "callback");
if (n9.this.i.get() != null) {
new AlertDialog.Builder(n9.this.i.get()).setTitle("Location Permission").setMessage("Allow location access").setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
n9.g.a(callback, origin, dialogInterface, i);
}
}).setNegativeButton(17039360, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
n9.g.b(callback, origin, dialogInterface, i);
}
}).create().show();
}
super.onGeolocationPermissionsShowPrompt(origin, callback);
}
@Override
public void onHideCustomView() {
a();
super.onHideCustomView();
}
@Override
public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(url, "url");
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(result, "result");
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (n9.a(n9.this, result)) {
Activity fullScreenActivity = n9.this.getFullScreenActivity();
if (fullScreenActivity != null) {
new AlertDialog.Builder(fullScreenActivity).setMessage(message).setTitle(url).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
n9.g.a(result, dialogInterface, i);
}
}).setCancelable(false).create().show();
return true;
}
result.cancel();
return true;
}
return true;
}
@Override
public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(url, "url");
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(result, "result");
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (n9.a(n9.this, result)) {
if (n9.this.getFullScreenActivity() != null) {
new AlertDialog.Builder(n9.this.getFullScreenActivity()).setMessage(message).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
n9.g.b(result, dialogInterface, i);
}
}).setNegativeButton(17039360, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
n9.g.c(result, dialogInterface, i);
}
}).create().show();
return true;
}
result.cancel();
return true;
}
return true;
}
@Override
public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(url, "url");
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
Intrinsics.checkNotNullParameter(result, "result");
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (n9.a(n9.this, result)) {
if (n9.this.getFullScreenActivity() == null) {
result.cancel();
return true;
}
return false;
}
return true;
}
@Override
public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(callback, "callback");
if (n9.this.i.get() != null) {
n9 n9Var = n9.this;
n9Var.f3372J = view;
n9Var.K = callback;
if (view != null) {
view.setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view2, MotionEvent motionEvent) {
return n9.g.a(view2, motionEvent);
}
});
}
Activity activity = n9.this.i.get();
FrameLayout frameLayout = activity == null ? null : (FrameLayout) activity.findViewById(16908290);
View view2 = n9.this.f3372J;
if (view2 != null) {
view2.setBackgroundColor(ViewCompat.MEASURED_STATE_MASK);
}
if (frameLayout != null) {
frameLayout.addView(n9.this.f3372J, new AbsoluteLayout.LayoutParams(-1, -1, 0, 0));
}
View view3 = n9.this.f3372J;
if (view3 != null) {
view3.requestFocus();
}
View view4 = n9.this.f3372J;
View.OnKeyListener onKeyListener = new View.OnKeyListener() {
@Override
public final boolean onKey(View view5, int i, KeyEvent keyEvent) {
return n9.g.a(n9.g.this, view5, i, keyEvent);
}
};
if (view4 != null) {
view4.setOnKeyListener(onKeyListener);
}
if (view4 != null) {
view4.setFocusable(true);
}
if (view4 != null) {
view4.setFocusableInTouchMode(true);
}
if (view4 == null) {
return;
}
view4.requestFocus();
}
}
public static final boolean a(g this$0, View view, int i, KeyEvent keyEvent) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (4 == keyEvent.getKeyCode() && keyEvent.getAction() == 0) {
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
this$0.a();
return true;
}
return false;
}
public static final void b(GeolocationPermissions.Callback callback, String origin, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(callback, "$callback");
Intrinsics.checkNotNullParameter(origin, "$origin");
callback.invoke(origin, false, false);
}
public final void a() {
n9 n9Var = n9.this;
if (n9Var.f3372J == null) {
return;
}
WebChromeClient.CustomViewCallback customViewCallback = n9Var.K;
if (customViewCallback != null) {
customViewCallback.onCustomViewHidden();
}
n9 n9Var2 = n9.this;
n9Var2.K = null;
View view = n9Var2.f3372J;
if ((view == null ? null : view.getParent()) != null) {
View view2 = n9.this.f3372J;
ViewParent parent = view2 == null ? null : view2.getParent();
ViewGroup viewGroup = parent instanceof ViewGroup ? (ViewGroup) parent : null;
if (viewGroup != null) {
viewGroup.removeView(n9.this.f3372J);
}
n9.this.f3372J = null;
}
}
public static final void a(GeolocationPermissions.Callback callback, String origin, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(callback, "$callback");
Intrinsics.checkNotNullParameter(origin, "$origin");
callback.invoke(origin, true, false);
}
}
public n9(Context context, byte b2, Set set, String str, boolean z, String str2, long j, int i) {
this(context, b2, (i & 4) != 0 ? null : set, (i & 8) != 0 ? null : str, (i & 16) != 0 ? false : z, (i & 32) != 0 ? "DEFAULT" : str2, (i & 64) != 0 ? -1L : j);
}
public static final void a(n9 n9Var, String str, String str2, String str3) {
n9Var.getClass();
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onUserLandingCompleted ", n9Var);
n9Var.b("window.imraid.broadcastEvent('onUserLandingCompleted');");
if (str2 == null) {
return;
}
n9Var.a(str2, "broadcastEvent('" + ((Object) str) + "Successful','" + ((Object) str3) + "');");
}
public static void getAdType$annotations() {
}
public static void getImpressionType$annotations() {
}
public static void getMarkupType$annotations() {
}
public static void getMarkupTypeAdUnit$annotations() {
}
private final AdConfig.MraidConfig getMraidConfig() {
AdConfig adConfig = this.p;
if (adConfig == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig = null;
}
return adConfig.getMraidConfig();
}
public static void getPlacementType$annotations() {
}
public static void getViewState$annotations() {
}
private final int getVisibilityTrackingMinPercentage() {
AdConfig adConfig = null;
if (Intrinsics.areEqual("audio", getAdType())) {
AdConfig adConfig2 = this.p;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
return adConfig.getViewability().getAudioImpressionMinPercentageViewed();
}
AdConfig adConfig3 = this.p;
if (adConfig3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig3;
}
return adConfig.getViewability().getWebImpressionMinPercentageViewed();
}
@Override
public void b(f6 movementGestureDetector, MotionEvent initialEvent, MotionEvent endEvent) {
List listOf;
List listOf2;
List listOf3;
List listOf4;
Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
Intrinsics.checkNotNullParameter(initialEvent, "initialEvent");
Intrinsics.checkNotNullParameter(endEvent, "endEvent");
if (!getRenderingConfig().getSupportedGestures().contains(3)) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return;
}
String TAG2 = C0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
StringsKt__IndentKt.trimIndent(" Rotation detected " + movementGestureDetector.i + " \n " + initialEvent + " \n " + endEvent);
JSONArray jSONArray = new JSONArray();
listOf = CollectionsKt__CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(initialEvent.getX()), Float.valueOf(initialEvent.getY())});
jSONArray.put(new JSONArray((Collection) listOf));
listOf2 = CollectionsKt__CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(initialEvent.getX(1)), Float.valueOf(initialEvent.getY(1))});
jSONArray.put(new JSONArray((Collection) listOf2));
listOf3 = CollectionsKt__CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(endEvent.getX()), Float.valueOf(endEvent.getY())});
jSONArray.put(new JSONArray((Collection) listOf3));
listOf4 = CollectionsKt__CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(endEvent.getX(1)), Float.valueOf(endEvent.getY(1))});
jSONArray.put(new JSONArray((Collection) listOf4));
b("window.imraidview.onGestureDetected('3', '" + jSONArray + "');");
}
public final void c(boolean z) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("handleVisibilityChange ", this);
cc ccVar = z ? cc.VISIBLE : cc.HIDDEN;
if (this.A == ccVar || this.H) {
return;
}
this.A = ccVar;
if (z) {
getListener().k(this);
}
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireViewableChange ", this);
b("window.mraidview.broadcastEvent('viewableChange'," + z + ");");
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
d0 adQualityManager = getAdQualityManager();
adQualityManager.getClass();
Intrinsics.checkNotNullParameter(this, "adView");
if (adQualityManager.f3289b.get()) {
f0.a("AdQualityManager", "ad quality session is already in progress. skipping...");
} else if (!adQualityManager.a.getEnabled()) {
f0.a("AdQualityManager", "config kill switch - false. ad quality will skip");
} else if (adQualityManager.f == null) {
f0.a("AdQualityManager", "setup not done. skipping");
} else {
f0.a("AdQualityManager", "session start trigger...");
boolean z2 = true;
adQualityManager.f3289b.set(true);
AdQualityControl adQualityControl = adQualityManager.f;
if ((adQualityControl == null || !adQualityControl.getTakeScreenshot()) ? false : false) {
adQualityManager.a(this);
}
}
}
@Override
public boolean d() {
return this.E.get();
}
public final void e(String str) {
int a2;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processExpandRequest ", this);
if (!Intrinsics.areEqual("Default", this.l) && !Intrinsics.areEqual("Resized", this.l)) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("Render view state must be either DEFAULT or RESIZED to admit the expand request. Current state:", this.l);
return;
}
this.H = true;
g6 g6Var = this.m;
if (g6Var != null) {
if (g6Var.c == null) {
ViewParent parent = g6Var.a.getParent();
ViewGroup viewGroup = parent instanceof ViewGroup ? (ViewGroup) parent : null;
g6Var.c = viewGroup;
if (viewGroup != null) {
g6Var.d = viewGroup.indexOfChild(g6Var.a);
}
}
c4 expandProperties = g6Var.a.getExpandProperties();
boolean isValidUrl = URLUtil.isValidUrl(str);
n9 n9Var = g6Var.a;
if (isValidUrl) {
try {
n9 n9Var2 = new n9(n9Var.getContainerContext(), (byte) 0, null, g6Var.a.getImpressionId(), false, null, 0L, 116);
n9Var2.a(g6Var.a.getListener(), g6Var.a.getAdConfig(), false, false);
n9Var2.setOriginalRenderView(g6Var.a);
Intrinsics.checkNotNull(str);
n9Var2.loadUrl(str);
n9Var2.setPlacementId(g6Var.a.getPlacementId());
n9Var2.setAllowAutoRedirection(g6Var.a.getAllowAutoRedirection());
n9Var2.setCreativeId(g6Var.a.getCreativeId());
a2 = InMobiAdActivity.h.a((com.inmobi.media.g) n9Var2);
if (expandProperties != null) {
n9Var2.setUseCustomClose(g6Var.a.y);
}
} catch (Exception e2) {
x2.a.a(new x1(e2));
g6Var.a.getListener().g(g6Var.a);
}
} else {
n9Var.setShouldFireRenderBeacon(false);
ViewGroup viewGroup2 = g6Var.c;
if (viewGroup2 != null) {
FrameLayout frameLayout = new FrameLayout(g6Var.a.getContainerContext());
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(g6Var.a.getWidth(), g6Var.a.getHeight());
frameLayout.setId(65535);
viewGroup2.addView(frameLayout, g6Var.d, layoutParams);
viewGroup2.removeView(g6Var.a);
}
a2 = InMobiAdActivity.h.a((com.inmobi.media.g) g6Var.a);
}
g6Var.a.getListener().j();
Intent intent = new Intent(g6Var.a.getContainerContext(), InMobiAdActivity.class);
intent.putExtra("com.inmobi.ads.rendering.InMobiAdActivity.EXTRA_AD_ACTIVITY_TYPE", 102);
intent.putExtra("com.inmobi.ads.rendering.InMobiAdActivity.EXTRA_AD_CONTAINER_INDEX", a2);
intent.putExtra("com.inmobi.ads.rendering.InMobiAdActivity.EXTRA_AD_CONTAINER_TYPE", Intrinsics.areEqual(g6Var.f3318b, "htmlUrl") ? TPNativeInfo.ASSETS_ID_LOGO : 200);
da.a.a(g6Var.a.getContainerContext(), intent);
}
requestLayout();
invalidate();
setFocusable(true);
setFocusableInTouchMode(true);
requestFocus();
}
@Override
public void f() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("disableHardwareAcceleration called. ", this);
this.I = false;
try {
n9.class.getMethod("setLayerType", Integer.TYPE, Paint.class).invoke(this, 1, null);
} catch (IllegalAccessException | IllegalArgumentException | NoSuchMethodException | InvocationTargetException unused) {
}
}
@Override
public void g() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onPixelDetected ", this);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (this.E.get()) {
return;
}
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public final void run() {
n9.b(n9.this);
}
});
}
@Override
public AdConfig getAdConfig() {
AdConfig adConfig = this.p;
if (adConfig == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
return null;
}
return adConfig;
}
public final w getAdPodHandler() {
return this.T;
}
public final d0 getAdQualityManager() {
d0 d0Var = this.p0;
if (d0Var != null) {
return d0Var;
}
Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
return null;
}
@Override
public String getAdType() {
return this.O;
}
public final boolean getAllowAutoRedirection() {
return this.S;
}
public Context getContainerContext() {
Activity activity = this.i.get();
if (activity == null) {
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
return context;
}
return activity;
}
public final String getContentURL() {
return this.c0;
}
public final t2 getContextualDataHandler() {
return this.x0;
}
@Override
public String getCreativeId() {
return this.N;
}
public final String getCurrentPosition() {
String jSONObject;
JSONObject jSONObject2 = this.v;
return (jSONObject2 == null || (jSONObject = jSONObject2.toString()) == null) ? "" : jSONObject;
}
public final Object getCurrentPositionMonitor() {
return this.G;
}
@WorkerThread
public final int getCurrentRenderingPodAdIndex() {
w wVar = this.T;
if (wVar == null) {
return 0;
}
return wVar.a(this);
}
@Override
public Object getDataModel() {
return null;
}
public final String getDefaultPosition() {
String jSONObject;
JSONObject jSONObject2 = this.u;
return (jSONObject2 == null || (jSONObject = jSONObject2.toString()) == null) ? "" : jSONObject;
}
public final Object getDefaultPositionMonitor() {
return this.F;
}
public final o3 getEmbeddedBrowserJSCallbacks() {
return this.m0;
}
public final c4 getExpandProperties() {
return this.s;
}
public final Activity getFullScreenActivity() {
return this.i.get();
}
@Override
public g.a getFullScreenEventsListener() {
return this.y0;
}
@Override
public String getImpressionId() {
return this.c;
}
public final byte getImpressionType() {
return this.g;
}
public final u5 getLandingPageHandler() {
u5 u5Var = this.t0;
if (u5Var != null) {
return u5Var;
}
Intrinsics.throwUninitializedPropertyAccessException("landingPageHandler");
return null;
}
public final String getLandingScheme() {
return this.e;
}
public final p9 getListener() {
p9 p9Var = this.k;
if (p9Var == null) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("listener getter ", this);
p9 p9Var2 = B0;
this.k = p9Var2;
return p9Var2;
}
return p9Var;
}
@Override
public String getMarkupType() {
return this.s0;
}
public final String getMarkupTypeAdUnit() {
return this.s0;
}
public final i6 getMediaProcessor() {
return this.o;
}
public final int getMinimumPixelsPainted() {
return this.f0;
}
public final String getMraidJsString() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("mraidJsString getter ", this);
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
String a2 = new e9(context, "mraid_js_store").a("mraid_js_string");
if (a2 == null) {
StringBuilder sb = new StringBuilder(31545);
sb.append("var imIsObjValid=function(a){return\"undefined\"!=typeof a&&null!=a?!0:!1},EventListeners=function(a){this.event=a;this.count=0;var b=[];this.add=function(a){b.push(a);++this.count};this.remove=function(a){var e=!1,d=this;b=b.filter(function(b){if(b=b===a)--d.count,e=!0;return!b});return e};this.removeAll=function(){b=[];this.count=0};this.broadcast=function(a){b.forEach(function(b){try{b.apply({},a)}catch(d){}})};this.toString=function(){var c=[a,\":\"];b.forEach(function(a){c.push(\"|\",String(a),\"|\")});\nreturn c.join(\"\")}},InmobiObj=function(){this.listeners=[];this.addEventListener=function(a,b){try{if(imIsObjValid(b)&&imIsObjValid(a)){var c=this.listeners;c[a]||(c[a]=new EventListeners);c[a].add(b);\"micIntensityChange\"==a&&window.imraidview.startListeningMicIntensity();\"deviceMuted\"==a&&window.imraidview.startListeningDeviceMuteEvents();\"deviceVolumeChange\"==a&&window.imraidview.startListeningDeviceVolumeChange();\"volumeChange\"==a&&window.imraidview.startListeningVolumeChange();\"headphones\"==a&&\nwindow.imraidview.startListeningHeadphonePluggedEvents();\"backButtonPressed\"==a&&window.imraidview.startListeningForBackButtonPressedEvent();\"downloadStatusChanged\"==a&&window.imraidview.registerDownloaderCallbacks()}}catch(e){this.log(e)}};this.removeEventListener=function(a,b){if(imIsObjValid(a)){var c=this.listeners;imIsObjValid(c[a])&&(imIsObjValid(b)?c[a].remove(b):c[a].removeAll());\"micIntensityChange\"==a&&0==c[a].count&&window.imraidview.stopListeningMicIntensity();\"deviceMuted\"==a&&0==c[a].count&&\nwindow.imraidview.stopListeningDeviceMuteEvents();\"deviceVolumeChange\"==a&&0==c[a].count&&window.imraidview.stopListeningDeviceVolumeChange();\"volumeChange\"==a&&0==c[a].count&&window.imraidview.stopListeningVolumeChange();\"headphones\"==a&&0==c[a].count&&window.imraidview.stopListeningHeadphonePluggedEvents();\"backButtonPressed\"==a&&0==c[a].count&&window.imraidview.stopListeningForBackButtonPressedEvent();\"downloadStatusChanged\"==a&&0==c[a].count&&window.imraidview.unregisterDownloaderCallbacks()}};\nthis.broadcastEvent=function(a){if(imIsObjValid(a)){for(var b=Array(arguments.length),c=0;c<arguments.length;c++)b[c]=arguments[c];c=b.shift();try{this.listeners[c]&&this.listeners[c].broadcast(b)}catch(e){}}};this.sendSaveContentResult=function(a){if(imIsObjValid(a)){for(var b=Array(arguments.length),c=0;c<arguments.length;c++)if(2==c){var e=arguments[c],e=JSON.parse(e);b[c]=e}else b[c]=arguments[c];e=b[1];\"success\"!=e&&(c=b[0].substring(b[0].indexOf(\"_\")+1),imraid.saveContentIDMap[c]&&delete imraid.saveContentIDMap[c]);\nwindow.imraid.broadcastEvent(b[0],b[1],b[2])}}},__im__iosNativeMessageHandler=void 0;window.webkit&&(window.webkit.messageHandlers&&window.webkit.messageHandlers.nativeMessageHandler)&&(__im__iosNativeMessageHandler=window.webkit.messageHandlers.nativeMessageHandler);\nvar __im__iosNativeCall={nativeCallInFlight:!1,nativeCallQueue:[],executeNativeCall:function(a){this.nativeCallInFlight?this.nativeCallQueue.push(a):(this.nativeCallInFlight=!0,imIsObjValid(__im__iosNativeMessageHandler)?__im__iosNativeMessageHandler.postMessage(a):window.location=a)},nativeCallComplete:function(a){0==this.nativeCallQueue.length?this.nativeCallInFlight=!1:(a=this.nativeCallQueue.shift(),imIsObjValid(__im__iosNativeMessageHandler)?__im__iosNativeMessageHandler.postMessage(a):window.location=\na)}},IOSNativeCall=function(){this.urlScheme=\"\";this.executeNativeCall=function(a){if(imIsObjValid(__im__iosNativeMessageHandler)){e={};e.command=a;e.scheme=this.urlScheme;for(var b={},c=1;c<arguments.length;c+=2)d=arguments[c+1],null!=d&&(b[arguments[c]]=\"\"+d);e.params=b}else for(var e=this.urlScheme+\"://\"+a,d,b=!0,c=1;c<arguments.length;c+=2)d=arguments[c+1],null!=d&&(b?(e+=\"?\",b=!1):e+=\"&\",e+=arguments[c]+\"=\"+escape(d));__im__iosNativeCall.executeNativeCall(e);return\"OK\"};this.nativeCallComplete=\nfunction(a){__im__iosNativeCall.nativeCallComplete(a);return\"OK\"};this.updateKV=function(a,b){this[a]=b;var c=this.broadcastMap[a];c&&this.broadcastEvent(c,b)}};\n(function(){var a=window.mraidview={};a.orientationProperties={allowOrientationChange:!0,forceOrientation:\"none\",direction:\"right\"};var b=[],c=!1;a.detectAndBlockFraud=function(b){a.isPossibleFraud()&&a.fireRedirectFraudBeacon(b);return!1};a.popupBlocked=function(b){a.firePopupBlockedBeacon(b)};a.zeroPad=function(a){var b=\"\";10>a&&(b+=\"0\");return b+a};a.supports=function(a){console.log(\"bridge: supports (MRAID)\");if(\"string\"!=typeof a)window.mraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\n\"supports\");else return\"false\"!=sdkController.supports(\"window.mraidview\",a)};a.useCustomClose=function(a){try{sdkController.useCustomClose(\"window.mraidview\",a)}catch(b){imraidview.showAlert(\"use CustomClose: \"+b)}};a.close=function(){try{sdkController.close(\"window.mraidview\")}catch(a){imraidview.showAlert(\"close: \"+a)}};a.stackCommands=function(a,d){c?b.push(a):(eval(a),d&&(c=!0))};a.expand=function(a){try{\"undefined\"==typeof a&&(a=null),sdkController.expand(\"window.mraidview\",a)}catch(b){imraidview.showAlert(\"executeNativeExpand: \"+\nb+\", URL = \"+a)}};a.setExpandProperties=function(b){try{b?this.props=b:b=null;if(\"undefined\"!=typeof b.lockOrientation&&null!=b.lockOrientation&&\"undefined\"!=typeof b.orientation&&null!=b.orientation){var c={};c.allowOrientationChange=!b.lockOrientation;c.forceOrientation=b.orientation;a.setOrientationProperties(c)}sdkController.setExpandProperties(\"window.mraidview\",a.stringify(b))}catch(f){imraidview.showAlert(\"executeNativesetExpandProperties: \"+f+\", props = \"+b)}};a.getExpandProperties=function(){try{return eval(\"(\"+\nsdkController.getExpandProperties(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getExpandProperties: \"+a)}};a.setOrientationProperties=function(b){try{b?(\"undefined\"!=typeof b.allowOrientationChange&&(a.orientationProperties.allowOrientationChange=b.allowOrientationChange),\"undefined\"!=typeof b.forceOrientation&&(a.orientationProperties.forceOrientation=b.forceOrientation)):b=null,sdkController.setOrientationProperties(\"window.mraidview\",a.stringify(a.orientationProperties))}catch(c){imraidview.showAlert(\"setOrientationProperties: \"+\nc+\", props = \"+b)}};a.getOrientationProperties=function(){return{forceOrientation:a.orientationProperties.forceOrientation,allowOrientationChange:a.orientationProperties.allowOrientationChange}};a.resizeProps=null;a.setResizeProperties=function(b){var c,f;try{c=parseInt(b.width);f=parseInt(b.height);if(isNaN(c)||isNaN(f)||1>c||1>f)throw\"Invalid\";b.width=c;b.height=f;a.resizeProps=b;sdkController.setResizeProperties(\"window.mraidview\",a.stringify(b))}catch(g){window.mraid.broadcastEvent(\"error\",\"Invalid properties.\",\n\"setResizeProperties\")}};a.getResizeProperties=function(){try{return eval(\"(\"+sdkController.getResizeProperties(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getResizeProperties: \"+b)}};a.open=function(b){\"undefined\"==typeof b&&(b=null);try{sdkController.open(\"window.mraidview\",b)}catch(a){imraidview.showAlert(\"open: \"+a)}};a.getScreenSize=function(){try{return eval(\"(\"+sdkController.getScreenSize(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getScreenSize: \"+b)}};a.getMaxSize=\nfunction(){try{return eval(\"(\"+sdkController.getMaxSize(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getMaxSize: \"+b)}};a.getCurrentPosition=function(){try{return eval(\"(\"+sdkController.getCurrentPosition(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getCurrentPosition: \"+b)}};a.getDefaultPosition=function(){try{return eval(\"(\"+sdkController.getDefaultPosition(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getDefaultPosition: \"+b)}};a.getState=function(){try{return String(sdkController.getState(\"window.mraidview\"))}catch(b){imraidview.showAlert(\"getState: \"+\nb)}};a.isViewable=function(){try{return sdkController.isViewable(\"window.mraidview\")}catch(b){imraidview.showAlert(\"isViewable: \"+b)}};a.getPlacementType=function(){return sdkController.getPlacementType(\"window.mraidview\")};a.close=function(){try{sdkController.close(\"window.mraidview\")}catch(b){imraidview.showAlert(\"close: \"+b)}};\"function\"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(b){return 0==this.indexOf(b)});a.playVideo=function(b){var a=\"\";null!=b&&(a=b);try{sdkController.playVideo(\"window.mraidview\",\na)}catch(c){imraidview.showAlert(\"playVideo: \"+c)}};a.stringify=function(b){if(\"undefined\"===typeof JSON){var c=\"\",f;if(\"undefined\"==typeof b.length)return a.stringifyArg(b);for(f=0;f<b.length;f++)0<f&&(c+=\",\"),c+=a.stringifyArg(b[f]);return c+\"]\"}return JSON.stringify(b)};a.stringifyArg=function(b){var a,c,g;c=typeof b;a=\"\";if(\"number\"===c||\"boolean\"===c)a+=args;else if(b instanceof Array)a=a+\"[\"+b+\"]\";else if(b instanceof Object){c=!0;a+=\"{\";for(g in b)null!==b[g]&&(c||(a+=\",\"),a=a+'\"'+g+'\":',c=\ntypeof b[g],a=\"number\"===c||\"boolean\"===c?a+b[g]:\"function\"===typeof b[g]?a+'\"\"':b[g]instanceof Object?a+this.stringify(args[i][g]):a+'\"'+b[g]+'\"',c=!1);a+=\"}\"}else b=b.replace(/\\\\/g,\"\\\\\\\\\"),b=b.replace(/\"/g,'\\\\\"'),a=a+'\"'+b+'\"';imraidview.showAlert(\"json:\"+a);return a};getPID=function(b){var a=\"\";null!=b&&(\"undefined\"!=typeof b.id&&null!=b.id)&&(a=b.id);return a};a.resize=function(){if(null==a.resizeProps)window.mraid.broadcastEvent(\"error\",\"Valid resize dimensions must be provided before calling resize\",\n\"resize\");else try{sdkController.resize(\"window.mraidview\")}catch(b){imraidview.showAlert(\"resize called in bridge\")}};a.storePicture=function(b){console.log(\"bridge: storePicture\");if(\"string\"!=typeof b)window.mraid.broadcastEvent(\"error\",\"storePicture method expects url as string parameter\",\"storePicture\");else{if(a.supports(\"storePicture\"))return!window.confirm(\"Do you want to download the file?\")?(window.mraid.broadcastEvent(\"error\",\"Store picture on \"+b+\" was cancelled by user.\",\"storePicture\"),\n!1):sdkController.storePicture(\"window.mraidview\",b);window.mraid.broadcastEvent(\"error\",\"Store picture on \"+b+\" was cancelled because it is unsupported in this device/app.\",\"storePicture\")}};a.fireMediaTrackingEvent=function(b,a){};a.fireMediaErrorEvent=function(b,a){};a.fireMediaTimeUpdateEvent=function(b,a,c){};a.fireMediaCloseEvent=function(b,a,c){};a.fireMediaVolumeChangeEvent=function(b,a,c){};a.broadcastEvent=function(){window.mraid.broadcastEvent.apply(window.mraid,arguments)}})();\n(function(){var a=window.mraid=new InmobiObj,b=window.mraidview,c=!1;b.isAdShownToUser=!1;b.onUserInteraction=function(){imraidview.onUserInteraction();c=!0};b.isPossibleFraud=function(){return a.supports(\"redirectFraudDetection\")&&(!b.isAdShownToUser||!c)};b.fireRedirectFraudBeacon=function(a){if(\"undefined\"!=typeof inmobi&&inmobi.recordEvent){var c={};c.trigger=a;c.isAdShown=b.isAdShownToUser.toString();inmobi.recordEvent(135,c)}};b.firePopupBlockedBeacon=function(b){if(\"undefined\"!=typeof inmobi&&\ninmobi.recordEvent){var a={};a.trigger=b;inmobi.recordEvent(136,a)}};window.onbeforeunload=function(){b.detectAndBlockFraud(\"redirect\")};a.addEventListener(\"viewableChange\",function(a){a&&!b.isAdShownToUser&&(b.isAdShownToUser=!0)});a.useCustomClose=b.useCustomClose;a.close=b.close;a.getExpandProperties=b.getExpandProperties;a.setExpandProperties=function(c){\"undefined\"!=typeof c&&(\"useCustomClose\"in c&&\"undefined\"!=typeof a.getState()&&\"expanded\"!=a.getState())&&a.useCustomClose(c.useCustomClose);\nb.setExpandProperties(c)};a.getResizeProperties=b.getResizeProperties;a.setResizeProperties=b.setResizeProperties;a.getOrientationProperties=b.getOrientationProperties;a.setOrientationProperties=b.setOrientationProperties;a.expand=b.expand;a.getMaxSize=b.getMaxSize;a.getState=b.getState;a.isViewable=b.isViewable;a.createCalendarEvent=function(b){window.mraid.broadcastEvent(\"error\",\"Method not supported\",\"createCalendarEvent\")};a.open=function(c){b.detectAndBlockFraud(\"mraid.open\")||(\"string\"!=typeof c?\na.broadcastEvent(\"error\",\"URL is required.\",\"open\"):b.open(c))};a.resize=b.resize;a.getVersion=function(){return\"2.0\"};a.getPlacementType=b.getPlacementType;a.playVideo=function(a){b.playVideo(a)};a.getScreenSize=b.getScreenSize;a.getCurrentPosition=b.getCurrentPosition;a.getDefaultPosition=b.getDefaultPosition;a.supports=function(a){return b.supports(a)};a.storePicture=function(c){\"string\"!=typeof c?a.broadcastEvent(\"error\",\"Request must specify a valid URL\",\"storePicture\"):b.storePicture(c)}})();\n(function(){var a=window.imraidview={};a.setOrientationProperties=function(b){try{b?(\"undefined\"!=typeof b.allowOrientationChange&&(mraidview.orientationProperties.allowOrientationChange=b.allowOrientationChange),\"undefined\"!=typeof b.forceOrientation&&(mraidview.orientationProperties.forceOrientation=b.forceOrientation),\"undefined\"!=typeof b.direction&&(mraidview.orientationProperties.direction=b.direction)):b=null,sdkController.setOrientationProperties(\"window.imraidview\",mraidview.stringify(mraidview.orientationProperties))}catch(c){a.showAlert(\"setOrientationProperties: \"+\nc+\", props = \"+b)}};a.getOrientationProperties=function(){return mraidview.orientationProperties};a.firePostStatusEvent=function(b){window.imraid.broadcastEvent(\"postStatus\",b)};a.fireMediaTrackingEvent=function(b,a){var e={};e.name=b;var d=\"inmobi_media_\"+b;\"undefined\"!=typeof a&&(null!=a&&\"\"!=a)&&(d=d+\"_\"+a);window.imraid.broadcastEvent(d,e)};a.fireMediaErrorEvent=function(b,a){var e={name:\"error\"};e.code=a;var d=\"inmobi_media_\"+e.name;\"undefined\"!=typeof b&&(null!=b&&\"\"!=b)&&(d=d+\"_\"+b);window.imraid.broadcastEvent(d,\ne)};a.fireMediaTimeUpdateEvent=function(b,a,e){var d={name:\"timeupdate\",target:{}};d.target.currentTime=a;d.target.duration=e;a=\"inmobi_media_\"+d.name;\"undefined\"!=typeof b&&(null!=b&&\"\"!=b)&&(a=a+\"_\"+b);window.imraid.broadcastEvent(a,d)};a.saveContent=function(b,a,e){window.imraid.addEventListener(\"saveContent_\"+b,e);sdkController.saveContent(\"window.imraidview\",b,a)};a.cancelSaveContent=function(b){sdkController.cancelSaveContent(\"window.imraidview\",b)};a.disableCloseRegion=function(b){sdkController.disableCloseRegion(\"window.imraidview\",\nb)};a.fireGalleryImageSelectedEvent=function(b,a,e){var d=new Image;d.src=\"data:image/jpeg;base64,\"+b;d.width=a;d.height=e;window.imraid.broadcastEvent(\"galleryImageSelected\",d)};a.fireCameraPictureCatpturedEvent=function(b,a,e){var d=new Image;d.src=\"data:image/jpeg;base64,\"+b;d.width=a;d.height=e;window.imraid.broadcastEvent(\"cameraPictureCaptured\",d)};a.fireMediaCloseEvent=function(b,a,e){var d={name:\"close\"};d.viaUserInteraction=a;d.target={};d.target.currentTime=e;a=\"inmobi_media_\"+d.name;\"undefined\"!=\ntypeof b&&(null!=b&&\"\"!=b)&&(a=a+\"_\"+b);window.imraid.broadcastEvent(a,d)};a.fireMediaVolumeChangeEvent=function(b,a,e){var d={name:\"volumechange\",target:{}};d.target.volume=a;d.target.muted=e;a=\"inmobi_media_\"+d.name;\"undefined\"!=typeof b&&(null!=b&&\"\"!=b)&&(a=a+\"_\"+b);window.imraid.broadcastEvent(a,d)};a.fireDeviceMuteChangeEvent=function(a){window.imraid.broadcastEvent(\"deviceMuted\",a)};a.fireDeviceVolumeChangeEvent=function(a){window.imraid.broadcastEvent(\"deviceVolumeChange\",a)};a.fireHeadphonePluggedEvent=\nfunction(a){window.imraid.broadcastEvent(\"headphones\",a)};a.showAlert=function(a){sdkController.showAlert(\"window.imraidview\",a)};a.openExternal=function(b,c){try{600<=getSdkVersionInt()?sdkController.openExternal(\"window.imraidview\",b,c):sdkController.openExternal(\"window.imraidview\",b)}catch(e){a.showAlert(\"openExternal: \"+e)}};a.log=function(b){try{sdkController.log(\"window.imraidview\",b)}catch(c){a.showAlert(\"log: \"+c)}};a.getPlatform=function(){return\"android\"};a.asyncPing=function(b){try{sdkController.asyncPing(\"window.imraidview\",\nb)}catch(c){a.showAlert(\"asyncPing: \"+c)}};a.startListeningDeviceMuteEvents=function(){sdkController.registerDeviceMuteEventListener(\"window.imraidview\")};a.stopListeningDeviceMuteEvents=function(){sdkController.unregisterDeviceMuteEventListener(\"window.imraidview\")};a.startListeningDeviceVolumeChange=function(){sdkController.registerDeviceVolumeChangeEventListener(\"window.imraidview\")};a.stopListeningDeviceVolumeChange=function(){sdkController.unregisterDeviceVolumeChangeEventListener(\"window.imraidview\")};\na.startListeningHeadphonePluggedEvents=function(){sdkController.registerHeadphonePluggedEventListener(\"window.imraidview\")};a.stopListeningHeadphonePluggedEvents=function(){sdkController.unregisterHeadphonePluggedEventListener(\"window.imraidview\")};getSdkVersionInt=function(){for(var b=a.get");
sb.append("SdkVersion().split(\".\"),c=b.length,e=\"\",d=0;d<c;d++)e+=b[d];return parseInt(e)};a.getSdkVersion=function(){return window._im_imaiview.getSdkVersion()};a.supports=function(a){console.log(\"bridge: supports (IMRAID)\");\nif(\"string\"!=typeof a)window.imraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\"supports\");else return\"false\"!=sdkController.supports(\"window.imraidview\",a)};a.postToSocial=function(b,c,e,d){window.imraid.broadcastEvent(\"error\",\"Method not supported\",\"postToSocial\");a.log(\"Method postToSocial not supported\")};a.incentCompleted=function(a){if(\"object\"!=typeof a||null==a)sdkController.incentCompleted(\"window.imraidview\",null);else try{sdkController.incentCompleted(\"window.imraidview\",\nJSON.stringify(a))}catch(c){sdkController.incentCompleted(\"window.imraidview\",null)}};a.getOrientation=function(){try{return String(sdkController.getOrientation(\"window.imraidview\"))}catch(b){a.showAlert(\"getOrientation: \"+b)}};a.acceptAction=function(b){try{sdkController.acceptAction(\"window.imraidview\",mraidview.stringify(b))}catch(c){a.showAlert(\"acceptAction: \"+c+\", params = \"+b)}};a.rejectAction=function(b){try{sdkController.rejectAction(\"window.imraidview\",mraidview.stringify(b))}catch(c){a.showAlert(\"rejectAction: \"+\nc+\", params = \"+b)}};a.updateToPassbook=function(b){window.imraid.broadcastEvent(\"error\",\"Method not supported\",\"updateToPassbook\");a.log(\"Method not supported\")};a.isDeviceMuted=function(){return\"false\"!=sdkController.isDeviceMuted(\"window.imraidview\")};a.getDeviceVolume=function(){return 603>=getSdkVersionInt()?-1:sdkController.getDeviceVolume(\"window.imraidview\")};a.isHeadPhonesPlugged=function(){return\"false\"!=sdkController.isHeadphonePlugged(\"window.imraidview\")};a.sendSaveContentResult=function(){window.imraid.sendSaveContentResult.apply(window.imraid,\narguments)};a.broadcastEvent=function(){window.imraid.broadcastEvent.apply(window.imraid,arguments)};a.disableBackButton=function(a){void 0==a||\"boolean\"!=typeof a?console.log(\"disableBackButton called with invalid params\"):sdkController.disableBackButton(\"window.imraidview\",a)};a.isBackButtonDisabled=function(){return sdkController.isBackButtonDisabled(\"window.imraidview\")};a.startListeningForBackButtonPressedEvent=function(){sdkController.registerBackButtonPressedEventListener(\"window.imraidview\")};\na.stopListeningForBackButtonPressedEvent=function(){sdkController.unregisterBackButtonPressedEventListener(\"window.imraidview\")};a.hideStatusBar=function(){};a.setOpaqueBackground=function(){};a.startDownloader=function(a,c,e){682<=getSdkVersionInt()&&sdkController.startDownloader(\"window.imraidview\",a,c,e)};a.registerDownloaderCallbacks=function(){682<=getSdkVersionInt()&&sdkController.registerDownloaderCallbacks(\"window.imraidview\")};a.unregisterDownloaderCallbacks=function(){682<=getSdkVersionInt()&&\nsdkController.unregisterDownloaderCallbacks(\"window.imraidview\")};a.getDownloadProgress=function(){return 682<=getSdkVersionInt()?sdkController.getDownloadProgress(\"window.imraidview\"):-1};a.getDownloadStatus=function(){return 682<=getSdkVersionInt()?sdkController.getDownloadStatus(\"window.imraidview\"):-1};a.fireEvent=function(a){700<=getSdkVersionInt()&&(\"fireSkip\"===a?sdkController.fireSkip(\"window.imraidview\"):\"fireComplete\"===a?sdkController.fireComplete(\"window.imraidview\"):\"showEndCard\"===a&&\nsdkController.showEndCard(\"window.imraidview\"))};a.saveBlob=function(a){700<=getSdkVersionInt()&&sdkController.saveBlob(\"window.imraidview\",a)};a.getBlob=function(a,c){700<=getSdkVersionInt()&&sdkController.getBlob(a,c)};a.setCloseEndCardTracker=function(a){700<=getSdkVersionInt()&&sdkController.setCloseEndCardTracker(\"window.imraidview\",a)};a.getRenderableAdIndexes=function(){try{if(917<=getSdkVersionInt())return sdkController.getRenderableAdIndexes(\"window.imraidview\")}catch(a){}return\"[]\"};a.getCurrentRenderingIndex=\nfunction(){try{if(917<=getSdkVersionInt())return sdkController.getCurrentRenderingIndex(\"window.imraidview\")}catch(a){}return-1};a.showAd=function(a){try{917<=getSdkVersionInt()&&sdkController.showAd(\"window.imraidview\",a)}catch(c){}};a.timeSinceShow=function(){try{if(917<=getSdkVersionInt())return sdkController.timeSinceShow(\"window.imraidview\")}catch(a){}return-1};a.getShowTimeStamp=function(){try{if(917<=getSdkVersionInt())return sdkController.getShowTimeStamp(\"window.imraidview\")}catch(a){}return-1};\na.closeAll=function(){try{917<=getSdkVersionInt()&&sdkController.closeAll(\"window.imraidview\")}catch(a){}};a.loadAd=function(a){try{917<=getSdkVersionInt()&&sdkController.loadAd(\"window.imraidview\",a)}catch(c){}};a.setAdContext=function(a){try{917<=getSdkVersionInt()&&sdkController.setAdContext(\"window.imraidview\",a)}catch(c){}};a.getAdContext=function(){try{if(917<=getSdkVersionInt())return sdkController.getAdContext(\"window.imraidview\")}catch(a){}return\"\"};a.openWithoutTracker=function(a){try{\"undefined\"==\ntypeof a&&(a=null),sdkController.openWithoutTracker(\"window.imraidview\",a)}catch(c){}};a.impressionRendered=function(){window.imraid.broadcastEvent(\"impressionRendered\")};a.customExpand=function(b,c,e,d,f){try{void 0==e||\"number\"!=typeof e?console.log(\"screenPercentage called with invalid params\"):void 0==c||\"number\"!=typeof c?console.log(\"inputType called with invalid params\"):void 0==d||\"boolean\"!=typeof d?console.log(\"topNavBarVisible called with invalid params\"):void 0==f||\"boolean\"!=typeof f?\nconsole.log(\"bottomNavBarVisible called with invalid params\"):sdkController.customExpand(\"window.imraidview\",b,c,e,d,f)}catch(g){a.showAlert(\"executeNativeCustomExpand: \"+g+\", input = \"+b+\", inputType = \"+c+\", screenPercentage = \"+e+\", bottomNavBarVisible = \"+f+\", topNavBarVisible = \"+d)}};a.closeCustomExpand=function(){try{sdkController.closeCustomExpand(\"window.imraidview\")}catch(a){}};a.onGestureDetected=function(a,c){window.imraid.broadcastEvent(\"onGestureDetected\",a,c)};a.onUserLandingCompleted=\nfunction(){window.imraid.broadcastEvent(\"onUserLandingCompleted\")};a.onUserInteraction=function(){window.imraid.broadcastEvent(\"onUserInteraction\")};a.impressionFired=function(){try{sdkController.impressionFired(\"window.imraidview\")}catch(a){}};a.getMaxDeviceVolume=function(){try{return sdkController.getMaxDeviceVolume(\"window.imraidview\")}catch(a){return 15}};a.zoom=function(a){try{sdkController.zoom(\"window.imraidview\",a)}catch(c){}};a.onAudioStateChanged=function(a){try{sdkController.onAudioStateChanged(\"window.imraidview\",\na)}catch(c){}}})();\n(function(){var a=window.imraid=new InmobiObj,b=window.imraidview;a.getOrientation=b.getOrientation;a.setOrientationProperties=b.setOrientationProperties;a.getOrientationProperties=b.getOrientationProperties;a.saveContentIDMap={};a.saveContent=function(c,e,d){var f=arguments.length,g,h=null;if(3>f){if(\"function\"===typeof arguments[f-1])g=arguments[f-1];else return;h={reason:1}}else a.saveContentIDMap[c]&&(g=arguments[2],h={reason:11,url:arguments[1]});\"function\"!==!g&&(h?(window.imraid.addEventListener(\"saveContent_failed_\"+c,\ng),window.imraid.sendSaveContentResult(\"saveContent_failed_\"+c,\"failed\",JSON.stringify(h))):(a.removeEventListener(\"saveContent_\"+c),a.saveContentIDMap[c]=!0,b.saveContent(c,e,d)))};a.cancelSaveContent=function(a){b.cancelSaveContent(a)};a.asyncPing=function(c){\"string\"!=typeof c?a.broadcastEvent(\"error\",\"URL is required.\",\"asyncPing\"):b.asyncPing(c)};a.disableCloseRegion=b.disableCloseRegion;a.getSdkVersion=b.getSdkVersion;a.log=function(c){\"undefined\"==typeof c?a.broadcastEvent(\"error\",\"message is required.\",\n\"log\"):\"string\"==typeof c?b.log(c):b.log(JSON.stringify(c))};a.getInMobiAIVersion=function(){return\"2.0\"};a.getVendorName=function(){return\"inmobi\"};a.openExternal=function(a,e){console.log(\"openExternal is deprecated, will be removed in future version\");mraidview.detectAndBlockFraud(\"imraid.openExternal\")||b.openExternal(a,e)};a.updateToPassbook=function(c){mraidview.detectAndBlockFraud(\"imraid.updateToPassbook\")||(\"string\"!=typeof c?a.broadcastEvent(\"error\",\"Request must specify a valid URL\",\"updateToPassbook\"):\nb.updateToPassbook(c))};a.postToSocial=function(a,e,d,f){mraidview.detectAndBlockFraud(\"imraid.postToSocial\")||b.postToSocial(a,e,d,f)};a.getPlatform=b.getPlatform;a.incentCompleted=b.incentCompleted;a.loadSKStore=b.loadSKStore;a.showSKStore=function(a){mraidview.detectAndBlockFraud(\"imraid.showSKStore\")||b.showSKStore(a)};a.skoverlay=b.skoverlay;a.skoverlayWithSkan=b.skoverlayWithSkan;a.zoom=b.zoom;a.dismissSKOverlay=b.dismissSKOverlay;a.supports=function(a){return b.supports(a)};a.isDeviceMuted=\nfunction(){return!imIsObjValid(a.listeners.deviceMuted)?-1:b.isDeviceMuted()};a.isHeadPhonesPlugged=function(){return!imIsObjValid(a.listeners.headphones)?!1:b.isHeadPhonesPlugged()};a.getDeviceVolume=function(){return b.getDeviceVolume()};a.setDeviceVolume=function(a){b.setDeviceVolume(a)};a.hideStatusBar=function(){b.hideStatusBar()};a.setOpaqueBackground=function(){b.setOpaqueBackground()};a.getRenderableAdIndexes=b.getRenderableAdIndexes;a.getCurrentRenderingIndex=b.getCurrentRenderingIndex;a.showAd=\nb.showAd;a.timeSinceShow=b.timeSinceShow;a.closeAll=b.closeAll;a.loadAd=b.loadAd;a.setAdContext=b.setAdContext;a.getAdContext=b.getAdContext;a.getShowTimeStamp=b.getShowTimeStamp;a.disableBackButton=b.disableBackButton;a.isBackButtonDisabled=b.isBackButtonDisabled;a.startDownloader=b.startDownloader;a.getDownloadProgress=b.getDownloadProgress;a.getDownloadStatus=b.getDownloadStatus;a.fireEvent=b.fireEvent;a.saveBlob=b.saveBlob;a.getBlob=b.getBlob;a.setCloseEndCardTracker=b.setCloseEndCardTracker;\na.openWithoutTracker=b.openWithoutTracker;a.impressionRendered=b.impressionRendered;a.onGestureDetected=b.onGestureDetected;a.onUserLandingCompleted=b.onUserLandingCompleted;a.customExpand=b.customExpand;a.closeCustomExpand=b.closeCustomExpand;a.impressionFired=b.impressionFired;a.getImraidVersion=b.getImraidVersion;a.getMaxDeviceVolume=b.getMaxDeviceVolume;a.onAudioStateChanged=b.onAudioStateChanged})();\n(function(){var a=window._im_imaiview={ios:{}};window.imaiview=a;a.broadcastEvent=function(){for(var a=Array(arguments.length),c=0;c<arguments.length;c++)a[c]=arguments[c];c=a.shift();try{window.mraid.broadcastEvent(c,a)}catch(e){}};a.getPlatform=function(){return\"android\"};a.getPlatformVersion=function(){return sdkController.getPlatformVersion(\"window.imaiview\")};a.log=function(a){sdkController.log(\"window.imaiview\",a)};a.openEmbedded=function(a){sdkController.openEmbedded(\"window.imaiview\",a)};\na.openExternal=function(a,c){600<=getSdkVersionInt()?sdkController.openExternal(\"window.imaiview\",a,c):sdkController.openExternal(\"window.imaiview\",a)};a.ping=function(a,c){sdkController.ping(\"window.imaiview\",a,c)};a.pingInWebView=function(a,c){sdkController.pingInWebView(\"window.imaiview\",a,c)};a.getSdkVersion=function(){try{var a=sdkController.getSdkVersion(\"window.imaiview\");if(\"string\"==typeof a&&null!=a)return a}catch(c){return\"3.7.0\"}};a.onUserInteraction=function(a){if(\"object\"!=typeof a||\nnull==a)sdkController.onUserInteraction(\"window.imaiview\",null);else try{sdkController.onUserInteraction(\"window.imaiview\",JSON.stringify(a))}catch(c){sdkController.onUserInteraction(\"window.imaiview\",null)}};a.fireAdReady=function(){sdkController.fireAdReady(\"window.imaiview\")};a.fireAdFailed=function(){sdkController.fireAdFailed(\"window.imaiview\")};a.broadcastEvent=function(){window.imai.broadcastEvent.apply(window.imai,arguments)}})();\n(function(){var a=window._im_imaiview;window._im_imai=new InmobiObj;window._im_imai.ios=new InmobiObj;var b=window._im_imai;window.imai=window._im_imai;b.matchString=function(a,b){if(\"string\"!=typeof a||null==a||null==b)return-1;var d=-1;try{d=a.indexOf(b)}catch(f){}return d};b.isHttpUrl=function(a){return\"string\"!=typeof a||null==a?!1:0==b.matchString(a,\"http://\")?!0:0==b.matchString(a,\"https://\")?!0:!1};b.appendTapParams=function(a,e,d){if(!imIsObjValid(e)||!imIsObjValid(d))return a;b.isHttpUrl(a)&&\n(a=-1==b.matchString(a,\"?\")?a+(\"?u-tap-o=\"+e+\",\"+d):a+(\"&u-tap-o=\"+e+\",\"+d));return a};b.performAdClick=function(a,e){e=e||event;if(imIsObjValid(a)){var d=a.clickConfig,f=a.landingConfig;if(!imIsObjValid(d)&&!imIsObjValid(f))b.log(\"click/landing config are invalid, Nothing to process .\"),this.broadcastEvent(\"error\",\"click/landing config are invalid, Nothing to process .\");else{var g=null,h=null,k=null,m=null,n=null,l=null,q=null,p=null;if(imIsObjValid(e))try{m=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY}catch(r){n=\nm=0}imIsObjValid(f)?imIsObjValid(d)?(l=f.url,q=f.fallbackUrl,p=f.urlType,g=d.url,h=d.pingWV,k=d.fr):(l=f.url,p=f.urlType):(l=d.url,p=d.urlType);d=b.getPlatform();try{if(\"boolean\"!=typeof k&&\"number\"!=typeof k||null==k)k=!0;if(0>k||1<k)k=!0;if(\"boolean\"!=typeof h&&\"number\"!=typeof h||null==h)h=!0;if(0>h||1<h)h=!0;if(\"number\"!=typeof p||null==p)p=0;g=b.appendTapParams(g,m,n);imIsObjValid(g)?!0==h?b.pingInWebView(g,k):b.ping(g,k):b.log(\"clickurl provided is null.\");if(imIsObjValid(l))switch(imIsObjValid(g)||\n(l=b.appendTapParams(l,m,n)),p){case 1:b.openEmbedded(l);break;case 2:\"ios\"==d?b.ios.openItunesProductView(l):this.broadcastEvent(\"error\",\"Cannot process openItunesProductView for os\"+d);break;default:b.openExternal(l,q)}else b.log(\"Landing url provided is null.\")}catch(s){}}}else b.log(\" invalid config, nothing to process .\"),this.broadcastEvent(\"error\",\"invalid config, nothing to process .\")};b.performActionClick=function(a,e){e=e||event;if(imIsObjValid(a)){var d=a.clickConfig,f=a.landingConfig;\nif(!imIsObjValid(d)&&!imIsObjValid(f))b.log(\"click/landing config are invalid, Nothing to process .\"),this.broadcastEvent(\"error\",\"click/landing config are invalid, Nothing to process .\");else{var g=null,h=null,k=null,m=null,n=null;if(imIsObjValid(e))try{m=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY}catch(l){n=m=0}imIsObjValid(d)&&(g=d.url,h=d.pingWV,k=d.fr);try{if(\"boolean\"!=typeof k&&\"number\"!=typeof k||null==k)k=!0;if(0>k||1<k)k=!0;if(\"boolean\"!=typeof h&&\"number\"!=typeof h||null==h)h=\n!0;if(0>h||1<h)h=!0;g=b.appendTapParams(g,m,n);imIsObjValid(g)?!0==h?b.pingInWebView(g,k):b.ping(g,k):b.log(\"clickurl provided is null.\");b.onUserInteraction(f)}catch(q){}}}else b.log(\" invalid config, nothing to process .\"),this.broadcastEvent(\"error\",\"invalid config, nothing to process .\")};b.getVersion=function(){return\"1.0\"};b.getPlatform=a.getPlatform;b.getPlatformVersion=a.getPlatformVersion;b.log=a.log;b.openEmbedded=function(b){console.log(\"openEmbedded is deprecated, will be removed in future version\");\nmraidview.detectAndBlockFraud(\"imai.openEmbedded\")||a.openEmbedded(b)};b.openExternal=function(b,e){console.log(\"openExternal is deprecated, will be removed in future version\");mraidview.detectAndBlockFraud(\"imai.openExternal\")||a.openExternal(b,e)};b.ping=a.ping;b.pingInWebView=a.pingInWebView;b.onUserInteraction=a.onUserInteraction;b.getSdkVersion=a.getSdkVersion;b.loadSKStore=a.loadSKStore;b.showSKStore=function(b){mraidview.detectAndBlockFraud(\"imai.showSKStore\")||a.showSKStore(b)};b.ios.openItunesProductView=\nfunction(b){mraidview.detectAndBlockFraud(\"imai.ios.openItunesProductView\")||a.ios.openItunesProductView(b)};b.fireAdReady=a.fireAdReady;b.fireAdFailed=a.fireAdFailed})();\n");
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return sb2;
}
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return a2;
}
public final x8 getOrientationProperties() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("getOrientationProperties ", this);
return this.o0;
}
public final n9 getOriginalRenderView() {
return this.h;
}
public final long getPlacementId() {
return this.M;
}
@Override
public byte getPlacementType() {
return this.a;
}
public com.inmobi.media.g getReferenceContainer() {
return this.Q;
}
@WorkerThread
public final JSONArray getRenderableAdIndexes() {
w wVar = this.T;
JSONArray d2 = wVar == null ? null : wVar.d();
return d2 == null ? new JSONArray() : d2;
}
public final AdConfig.RenderingConfig getRenderingConfig() {
AdConfig adConfig = this.p;
if (adConfig == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig = null;
}
return adConfig.getRendering();
}
public final u9 getResizeProperties() {
return this.t;
}
@WorkerThread
public final long getShowTimeStamp() {
w wVar = this.T;
if (wVar == null) {
return 0L;
}
return wVar.c();
}
public Map<String, l0> getTelemetryManagerMap() {
return this.r0;
}
public ta getTelemetryOnAdImpression() {
Map<String, l0> telemetryManagerMap = getTelemetryManagerMap();
return new ta(telemetryManagerMap == null ? null : telemetryManagerMap.get("AdImpressionSuccessful"), getCreativeId(), getMarkupType());
}
public final long getTotalViewArea() {
return this.e0;
}
public final dc getVISIBILITY_CHANGE_LISTENER() {
return this.w0;
}
@Override
public View getVideoContainerView() {
return null;
}
public final String getViewState() {
return this.l;
}
@Override
public long getViewTouchTimestamp() {
return this.f;
}
@Override
public yb getViewableAd() {
boolean z;
String str;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("viewableAd getter ", this);
if (this.U == null) {
this.U = new c5(this, new zb(this), new l4(this.g, this.n0, this.g0, this.h0, getVisibilityTrackingMinPercentage()));
Set<bb> set = this.f3373b;
if (set != null) {
for (bb bbVar : set) {
try {
if (bbVar.a == 3) {
Object obj = bbVar.f3279b.get("omidAdSession");
g0 g0Var = obj instanceof g0 ? (g0) obj : null;
if (bbVar.f3279b.containsKey("deferred")) {
Object obj2 = bbVar.f3279b.get("deferred");
if (obj2 == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Boolean");
break;
} else if (((Boolean) obj2).booleanValue()) {
z = true;
Object obj3 = bbVar.f3279b.get("customReferenceData");
str = obj3 instanceof String ? (String) obj3 : null;
if (z && g0Var != null) {
g0Var.a(q8.g.a(this, this.c0, str));
}
String TAG2 = C0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
}
}
z = false;
Object obj32 = bbVar.f3279b.get("customReferenceData");
if (obj32 instanceof String) {
}
if (z) {
g0Var.a(q8.g.a(this, this.c0, str));
}
String TAG22 = C0;
Intrinsics.checkNotNullExpressionValue(TAG22, "TAG");
} else {
continue;
}
} catch (Exception e2) {
String TAG3 = C0;
Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
Intrinsics.stringPlus("Exception occurred while creating the HTML viewable ad : ", e2.getMessage());
}
}
}
}
yb ybVar = this.U;
Intrinsics.checkNotNull(ybVar);
return ybVar;
}
public final int[] getViewableFrameArray() {
return this.d0;
}
public final void h() {
Activity fullScreenActivity;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("finishFullScreenActivity ", this);
InMobiAdActivity.h.a((Object) this);
if (getFullScreenActivity() != null) {
w wVar = this.T;
if (wVar != null && wVar.b(this)) {
return;
}
Activity fullScreenActivity2 = getFullScreenActivity();
Objects.requireNonNull(fullScreenActivity2, "null cannot be cast to non-null type com.inmobi.ads.rendering.InMobiAdActivity");
((InMobiAdActivity) fullScreenActivity2).e = true;
Activity fullScreenActivity3 = getFullScreenActivity();
if (fullScreenActivity3 != null) {
fullScreenActivity3.finish();
}
if (this.L == -1 || (fullScreenActivity = getFullScreenActivity()) == null) {
return;
}
fullScreenActivity.overridePendingTransition(0, this.L);
return;
}
if (this.a == 0) {
setAndUpdateViewState("Default");
n9 n9Var = this.h;
if (n9Var != null) {
n9Var.setAndUpdateViewState("Default");
}
} else if (Intrinsics.areEqual("Default", this.l)) {
setAndUpdateViewState("Hidden");
}
t();
}
public final void i() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireClickTrackers ", this);
t2 t2Var = this.x0;
if (t2Var != null) {
t2Var.c();
}
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireOnUserInteraction ", this);
b("window.imraidview.onUserInteraction();");
getListener().c(this);
}
public final void j() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireImpression ", this);
if (Intrinsics.areEqual("video", this.n0) || Intrinsics.areEqual("audio", this.n0)) {
return;
}
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("recordContextualData ", this);
t2 t2Var = this.x0;
if (t2Var != null) {
t2Var.a();
}
b("window.imraidview.impressionRendered();");
getListener().d(this);
}
public boolean k() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (getRenderingConfig() == null) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
} else {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
getViewTouchTimestamp();
getRenderingConfig().getUserTouchResetTime();
boolean z = getViewTouchTimestamp() != -1 && SystemClock.elapsedRealtime() - getViewTouchTimestamp() < getRenderingConfig().getUserTouchResetTime();
if (!getRenderingConfig().getAutoRedirectionEnforcement() || this.S || z) {
return true;
}
}
return false;
}
public final boolean l() {
return this.A == cc.VISIBLE;
}
public final void m() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processResizeRequest ", this);
if (!Intrinsics.areEqual("Default", this.l) && !Intrinsics.areEqual("Resized", this.l)) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
} else if (this.t == null) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
} else {
this.H = true;
j6 j6Var = this.n;
if (j6Var != null) {
j6Var.a();
}
requestLayout();
invalidate();
setFocusable(true);
setFocusableInTouchMode(true);
requestFocus();
setAndUpdateViewState("Resized");
getListener().f(this);
this.H = false;
}
}
public final void n() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setCurrentPosition ", this);
this.v = new JSONObject();
int[] iArr = new int[2];
getLocationOnScreen(iArr);
try {
JSONObject jSONObject = this.v;
if (jSONObject != null) {
jSONObject.put("x", k3.b(iArr[0]));
}
JSONObject jSONObject2 = this.v;
if (jSONObject2 != null) {
jSONObject2.put("y", k3.b(iArr[1]));
}
int b2 = k3.b(getWidth());
int b3 = k3.b(getHeight());
JSONObject jSONObject3 = this.v;
if (jSONObject3 != null) {
jSONObject3.put("width", b2);
}
JSONObject jSONObject4 = this.v;
if (jSONObject4 != null) {
jSONObject4.put("height", b3);
}
} catch (JSONException unused) {
}
synchronized (this.G) {
this.x = false;
getCurrentPositionMonitor().notifyAll();
Unit unit = Unit.INSTANCE;
}
}
public final void o() {
ViewGroup viewGroup;
int width;
WeakReference<ViewGroup> weakReference;
ViewGroup viewGroup2;
int height;
JSONObject jSONObject;
JSONObject jSONObject2;
ViewGroup viewGroup3;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setDefaultPosition ", this);
int[] iArr = new int[2];
this.u = new JSONObject();
if (this.j == null) {
ViewParent parent = getParent();
this.j = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
}
WeakReference<ViewGroup> weakReference2 = this.j;
try {
if ((weakReference2 != null ? weakReference2.get() : null) != null) {
WeakReference<ViewGroup> weakReference3 = this.j;
if (weakReference3 != null && (viewGroup3 = weakReference3.get()) != null) {
viewGroup3.getLocationOnScreen(iArr);
}
JSONObject jSONObject3 = this.u;
if (jSONObject3 != null) {
jSONObject3.put("x", k3.b(iArr[0]));
}
JSONObject jSONObject4 = this.u;
if (jSONObject4 != null) {
jSONObject4.put("y", k3.b(iArr[1]));
}
WeakReference<ViewGroup> weakReference4 = this.j;
if (weakReference4 != null && (viewGroup = weakReference4.get()) != null) {
width = viewGroup.getWidth();
int b2 = k3.b(width);
weakReference = this.j;
if (weakReference != null && (viewGroup2 = weakReference.get()) != null) {
height = viewGroup2.getHeight();
int b3 = k3.b(height);
jSONObject = this.u;
if (jSONObject == null) {
jSONObject.put("width", b2);
}
jSONObject2 = this.u;
if (jSONObject2 == null) {
jSONObject2.put("height", b3);
}
}
height = 0;
int b32 = k3.b(height);
jSONObject = this.u;
if (jSONObject == null) {
}
jSONObject2 = this.u;
if (jSONObject2 == null) {
}
}
width = 0;
int b22 = k3.b(width);
weakReference = this.j;
if (weakReference != null) {
height = viewGroup2.getHeight();
int b322 = k3.b(height);
jSONObject = this.u;
if (jSONObject == null) {
}
jSONObject2 = this.u;
if (jSONObject2 == null) {
}
}
height = 0;
int b3222 = k3.b(height);
jSONObject = this.u;
if (jSONObject == null) {
}
jSONObject2 = this.u;
if (jSONObject2 == null) {
}
} else {
JSONObject jSONObject5 = this.u;
if (jSONObject5 != null) {
jSONObject5.put("x", 0);
}
JSONObject jSONObject6 = this.u;
if (jSONObject6 != null) {
jSONObject6.put("y", 0);
}
JSONObject jSONObject7 = this.u;
if (jSONObject7 != null) {
jSONObject7.put("width", 0);
}
JSONObject jSONObject8 = this.u;
if (jSONObject8 != null) {
jSONObject8.put("height", 0);
}
}
} catch (JSONException unused) {
}
synchronized (this.F) {
this.w = false;
getDefaultPositionMonitor().notifyAll();
Unit unit = Unit.INSTANCE;
}
}
@Override
public void onAttachedToWindow() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onAttachedToWindow ", this);
super.onAttachedToWindow();
i6 i6Var = this.o;
if (i6Var != null) {
c6 c6Var = i6Var.d;
if (c6Var != null) {
c6Var.a();
}
c6 c6Var2 = i6Var.e;
if (c6Var2 != null) {
c6Var2.a();
}
c6 c6Var3 = i6Var.f;
if (c6Var3 != null) {
c6Var3.a();
}
}
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setIsViewHardwareAccelerated ", this);
this.q = isHardwareAccelerated();
if (this.j == null) {
ViewParent parent = getParent();
this.j = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
}
if (this.a0) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("triggerBitmapCheck ", this);
if (this.V) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
new r1(this, this).a(getListener().k().a());
}
}
}
@Override
public void onDetachedFromWindow() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onDetachedFromWindow ", this);
this.l0.e.clear();
i6 i6Var = this.o;
if (i6Var != null) {
c6 c6Var = i6Var.d;
if (c6Var != null) {
c6Var.b();
}
c6 c6Var2 = i6Var.e;
if (c6Var2 != null) {
c6Var2.b();
}
c6 c6Var3 = i6Var.f;
if (c6Var3 != null) {
c6Var3.b();
}
}
getAdQualityManager().c();
try {
super.onDetachedFromWindow();
} catch (IllegalArgumentException unused) {
String TAG2 = C0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
}
}
@Override
public boolean onDoubleTap(MotionEvent e2) {
Intrinsics.checkNotNullParameter(e2, "e");
if (!getRenderingConfig().getSupportedGestures().contains(1)) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return false;
}
String TAG2 = C0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
Intrinsics.stringPlus("onDoubleTapEvent detected \n ", e2);
setViewTouchTimestamp(SystemClock.elapsedRealtime());
if (e2.getAction() == 1) {
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(e2.getX());
jSONArray.put(e2.getY());
} catch (JSONException unused) {
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
b("window.imraidview.onGestureDetected('1', '" + jSONArray2 + "');");
}
return false;
}
@Override
public boolean onDoubleTapEvent(MotionEvent e2) {
Intrinsics.checkNotNullParameter(e2, "e");
return false;
}
@Override
public boolean onDown(MotionEvent e2) {
Intrinsics.checkNotNullParameter(e2, "e");
return false;
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float f2, float f3) {
Intrinsics.checkNotNullParameter(e1, "e1");
Intrinsics.checkNotNullParameter(e2, "e2");
return false;
}
@Override
public void onLongPress(MotionEvent e2) {
Intrinsics.checkNotNullParameter(e2, "e");
if (!getRenderingConfig().getSupportedGestures().contains(5)) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return;
}
String TAG2 = C0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
Intrinsics.stringPlus("onLongPress detected \n ", e2);
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(e2.getX());
jSONArray.put(e2.getY());
} catch (JSONException unused) {
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
b("window.imraidview.onGestureDetected('5', '" + jSONArray2 + "');");
}
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float f2, float f3) {
Intrinsics.checkNotNullParameter(e1, "e1");
Intrinsics.checkNotNullParameter(e2, "e2");
return false;
}
@Override
public void onShowPress(MotionEvent e2) {
Intrinsics.checkNotNullParameter(e2, "e");
}
@Override
public boolean onSingleTapConfirmed(MotionEvent e2) {
Intrinsics.checkNotNullParameter(e2, "e");
if (!getRenderingConfig().getSupportedGestures().contains(0)) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return false;
}
String TAG2 = C0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
Intrinsics.stringPlus("onSingleTapConfirmed detected \n ", e2);
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(e2.getX());
jSONArray.put(e2.getY());
} catch (JSONException unused) {
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
b("window.imraidview.onGestureDetected('0', '" + jSONArray2 + "');");
return false;
}
@Override
public boolean onSingleTapUp(MotionEvent e2) {
Intrinsics.checkNotNullParameter(e2, "e");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onSingleTapUp detected \n ", e2);
setViewTouchTimestamp(SystemClock.elapsedRealtime());
return false;
}
@Override
public void onSizeChanged(int i, int i2, int i3, int i4) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onSizeChanged ", this);
super.onSizeChanged(i, i2, i3, i4);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (i == 0 || i2 == 0) {
return;
}
int b2 = k3.b(i);
int b3 = k3.b(i2);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireSizeChanged ", this);
b("window.mraidview.broadcastEvent('sizeChange'," + b2 + ',' + b3 + ");");
}
@Override
public boolean onTouchEvent(MotionEvent event) {
List listOf;
List listOf2;
float f2;
float f3;
float f4;
Intrinsics.checkNotNullParameter(event, "event");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onTouchEvent ", this);
if (this.a == 1) {
f6 f6Var = this.i0;
f6Var.getClass();
Intrinsics.checkNotNullParameter(event, "event");
int actionMasked = event.getActionMasked();
if (actionMasked == 0) {
String TAG2 = f6Var.f3309b;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
Intrinsics.stringPlus("ACTION_DOWN \n", event);
f6Var.g = event.getPointerId(event.getActionIndex());
f6Var.j = new JSONArray();
listOf = CollectionsKt__CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(event.getX()), Float.valueOf(event.getY())});
JSONArray jSONArray = new JSONArray((Collection) listOf);
JSONArray jSONArray2 = f6Var.j;
if (jSONArray2 != null) {
jSONArray2.put(jSONArray);
}
} else if (actionMasked != 1) {
float f5 = 0.0f;
if (actionMasked == 2) {
JSONArray jSONArray3 = f6Var.j;
int i = f6Var.g;
if (i != -1 && f6Var.h != -1) {
int findPointerIndex = event.findPointerIndex(i);
int findPointerIndex2 = event.findPointerIndex(f6Var.h);
if (findPointerIndex >= 0) {
f3 = event.getX(findPointerIndex);
f2 = event.getY(findPointerIndex);
} else {
x2 x2Var = x2.a;
x2Var.a(new x1(new IllegalArgumentException("Index for mPtrID1=" + f6Var.g + " is " + findPointerIndex + " | Pointer count=" + event.getPointerCount())));
f2 = 0.0f;
f3 = 0.0f;
}
if (findPointerIndex2 >= 0) {
float x = event.getX(findPointerIndex2);
f5 = event.getY(findPointerIndex2);
f4 = x;
} else {
x2 x2Var2 = x2.a;
x2Var2.a(new x1(new IllegalArgumentException("Index for mPtrID1=" + f6Var.h + " is " + findPointerIndex2 + " | Pointer count=" + event.getPointerCount())));
f4 = 0.0f;
}
float degrees = ((float) Math.toDegrees(((float) Math.atan2(f6Var.d - f6Var.f, f6Var.c - f6Var.e)) - ((float) Math.atan2(f5 - f2, f4 - f3)))) % 360;
if (degrees < -180.0f) {
degrees += 360.0f;
}
if (degrees > 180.0f) {
degrees -= 360.0f;
}
f6Var.i = Math.abs(degrees);
} else if (i != -1 && jSONArray3 != null && jSONArray3.length() > 0 && jSONArray3.length() < 50) {
try {
float x2 = event.getX();
float y = event.getY();
JSONArray jSONArray4 = jSONArray3.getJSONArray(jSONArray3.length() - 1);
listOf2 = CollectionsKt__CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(x2), Float.valueOf(y)});
JSONArray jSONArray5 = new JSONArray((Collection) listOf2);
if (f6Var.a(jSONArray4.getInt(0), jSONArray5.getInt(0), jSONArray4.getInt(1), jSONArray5.getInt(1)) > 100) {
jSONArray3.put(jSONArray5);
}
} catch (JSONException unused) {
}
}
} else if (actionMasked == 3) {
String TAG3 = f6Var.f3309b;
Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
event.toString();
f6Var.g = -1;
f6Var.h = -1;
} else if (actionMasked == 5) {
String TAG4 = f6Var.f3309b;
Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
Intrinsics.stringPlus("ACTION_POINTER_DOWN \n", event);
f6Var.h = event.getPointerId(event.getActionIndex());
f6Var.k = MotionEvent.obtain(event);
int findPointerIndex3 = event.findPointerIndex(f6Var.g);
int findPointerIndex4 = event.findPointerIndex(f6Var.h);
if (findPointerIndex3 >= 0) {
f6Var.e = event.getX(findPointerIndex3);
f6Var.f = event.getY(findPointerIndex3);
} else {
x2 x2Var3 = x2.a;
x2Var3.a(new x1(new IllegalArgumentException("Index for mPtrID1=" + f6Var.g + " is " + findPointerIndex3 + " | Pointer count=" + event.getPointerCount())));
}
if (findPointerIndex4 >= 0) {
f6Var.c = event.getX(findPointerIndex4);
f6Var.d = event.getY(findPointerIndex4);
} else {
x2 x2Var4 = x2.a;
x2Var4.a(new x1(new IllegalArgumentException("Index for mPtrID2=" + f6Var.h + " is " + findPointerIndex4 + " | Pointer count=" + event.getPointerCount())));
}
f6Var.l = f6Var.a(f6Var.e, f6Var.c, f6Var.f, f6Var.d);
} else if (actionMasked == 6) {
String TAG5 = f6Var.f3309b;
Intrinsics.checkNotNullExpressionValue(TAG5, "TAG");
event.toString();
f6Var.h = -1;
if (f6Var.i > 30.0f) {
MotionEvent motionEvent = f6Var.k;
if (motionEvent != null) {
f6Var.a.b(f6Var, motionEvent, event);
}
f6Var.i = 0.0f;
}
if (Math.abs(f6Var.a(event.getX(), event.getX(1), event.getY(), event.getY(1)) - f6Var.l) > 500) {
MotionEvent motionEvent2 = f6Var.k;
if (motionEvent2 != null) {
f6Var.a.a(f6Var, motionEvent2, event);
}
f6Var.l = Integer.MAX_VALUE;
}
}
} else {
String TAG6 = f6Var.f3309b;
Intrinsics.checkNotNullExpressionValue(TAG6, "TAG");
event.toString();
f6Var.g = -1;
JSONArray jSONArray6 = f6Var.j;
if (jSONArray6 != null && jSONArray6.length() > 5) {
f6Var.a.a(f6Var);
f6Var.j = new JSONArray();
}
}
}
this.j0.onTouchEvent(event);
if (this.d) {
setViewTouchTimestamp(SystemClock.elapsedRealtime());
}
return super.onTouchEvent(event);
}
@Override
public void onWindowFocusChanged(boolean z) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onWindowFocusChanged ", this);
super.onWindowFocusChanged(z);
boolean z2 = false;
if (z) {
if (isShown()) {
l4.a aVar = (l4.a) l4.j;
if (aVar.a(this, this, this.h0, null) && aVar.a(this, this, this.h0)) {
z = true;
}
}
z = false;
}
if (Build.VERSION.SDK_INT > 23) {
Activity fullScreenActivity = getFullScreenActivity();
if (fullScreenActivity != null && fullScreenActivity.isInMultiWindowMode()) {
z2 = true;
}
if (z2) {
return;
}
}
c(z);
}
@Override
public void onWindowVisibilityChanged(int i) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onWindowVisibilityChanged ", this);
super.onWindowVisibilityChanged(i);
boolean z = true;
boolean z2 = i == 0;
if (z2) {
int visibilityTrackingMinPercentage = getVisibilityTrackingMinPercentage();
if (isShown()) {
l4.a aVar = (l4.a) l4.j;
if (aVar.a(this, this, visibilityTrackingMinPercentage, null)) {
}
}
z = false;
} else {
z = z2;
}
c(z);
}
public final void p() {
int webImpressionMinPercentageViewed;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setFallbackImpressionMinPercentageViewed ", this);
AdConfig adConfig = null;
if (Intrinsics.areEqual("video", this.n0)) {
AdConfig adConfig2 = this.p;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
webImpressionMinPercentageViewed = adConfig.getViewability().getVideoImpressionMinPercentageViewed();
} else if (Intrinsics.areEqual("audio", this.n0)) {
if (Intrinsics.areEqual("audio", getAdType())) {
AdConfig adConfig3 = this.p;
if (adConfig3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig3;
}
webImpressionMinPercentageViewed = adConfig.getViewability().getAudioImpressionMinPercentageViewed();
} else {
AdConfig adConfig4 = this.p;
if (adConfig4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig4;
}
webImpressionMinPercentageViewed = adConfig.getViewability().getWebImpressionMinPercentageViewed();
}
} else {
AdConfig adConfig5 = this.p;
if (adConfig5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig5;
}
webImpressionMinPercentageViewed = adConfig.getViewability().getWebImpressionMinPercentageViewed();
}
this.h0 = webImpressionMinPercentageViewed;
}
public final void q() {
int webImpressionMinTimeViewed;
AdConfig adConfig = null;
if (Intrinsics.areEqual("video", this.n0)) {
AdConfig adConfig2 = this.p;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
webImpressionMinTimeViewed = adConfig.getViewability().getVideoImpressionMinTimeViewed();
} else if (Intrinsics.areEqual("audio", this.n0)) {
if (Intrinsics.areEqual("audio", getAdType())) {
AdConfig adConfig3 = this.p;
if (adConfig3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig3;
}
webImpressionMinTimeViewed = adConfig.getViewability().getAudioImpressionMinTimeViewed();
} else {
AdConfig adConfig4 = this.p;
if (adConfig4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig4;
}
webImpressionMinTimeViewed = adConfig.getViewability().getWebImpressionMinTimeViewed();
}
} else {
AdConfig adConfig5 = this.p;
if (adConfig5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig5;
}
webImpressionMinTimeViewed = adConfig.getViewability().getWebImpressionMinTimeViewed();
}
this.g0 = webImpressionMinTimeViewed;
}
public final void r() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setFallbackImpressionParams ", this);
q();
p();
s();
}
public final void s() {
byte interstitialImpressionType;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setFallbackImpressionType ", this);
String adType = getAdType();
AdConfig adConfig = null;
if (Intrinsics.areEqual(adType, "banner")) {
AdConfig adConfig2 = this.p;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
interstitialImpressionType = adConfig.getViewability().getBannerImpressionType();
} else if (Intrinsics.areEqual(adType, "audio")) {
AdConfig adConfig3 = this.p;
if (adConfig3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig3;
}
interstitialImpressionType = adConfig.getViewability().getAudioImpressionType();
} else {
AdConfig adConfig4 = this.p;
if (adConfig4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig4;
}
interstitialImpressionType = adConfig.getViewability().getInterstitialImpressionType();
}
this.g = interstitialImpressionType;
}
public final void setAdPodHandler(w wVar) {
this.T = wVar;
}
public final void setAdSize(String adSize) {
Intrinsics.checkNotNullParameter(adSize, "adSize");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setAdSize ", this);
Object[] array = new Regex("x").split(adSize, 0).toArray(new String[0]);
Objects.requireNonNull(array, "null cannot be cast to non-null type kotlin.Array<T>");
this.b0 = k3.a(Integer.parseInt(((String[]) array)[0]));
Object[] array2 = new Regex("x").split(adSize, 0).toArray(new String[0]);
Objects.requireNonNull(array2, "null cannot be cast to non-null type kotlin.Array<T>");
this.e0 = k3.a(Integer.parseInt(((String[]) array2)[1])) * this.b0;
}
public void setAdType(String str) {
this.O = str;
}
public final void setAllowAutoRedirection(boolean z) {
this.S = z;
}
public final void setAndUpdateViewState(String state) {
Intrinsics.checkNotNullParameter(state, "state");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setAndUpdateViewState ", this);
this.l = state;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("set state:", this.l);
Locale ENGLISH = Locale.ENGLISH;
Intrinsics.checkNotNullExpressionValue(ENGLISH, "ENGLISH");
String lowerCase = state.toLowerCase(ENGLISH);
Intrinsics.checkNotNullExpressionValue(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireStateChange ", this);
b("window.mraidview.broadcastEvent('stateChange','" + lowerCase + "');");
}
public final void setBlobProvider(u1 u1Var) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setBlobProvider ", this);
this.P = u1Var;
}
public final void setCloseEndCardTracker(String url) {
vb b2;
ob c2;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setCloseEndCardTracker ", this);
com.inmobi.media.g referenceContainer = getReferenceContainer();
if (!(referenceContainer instanceof u7) || url == null) {
return;
}
u7 u7Var = (u7) referenceContainer;
u7Var.getClass();
Intrinsics.checkNotNullParameter(url, "url");
String TAG2 = u7Var.T;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
Intrinsics.stringPlus("Setting close end tracker with URL : ", url);
View videoContainerView = u7Var.getVideoContainerView();
if (videoContainerView instanceof y7) {
Object tag = ((y7) videoContainerView).getVideoView().getTag();
v7 v7Var = tag instanceof v7 ? (v7) tag : null;
if (v7Var == null || (b2 = v7Var.b()) == null || (c2 = b2.c()) == null) {
return;
}
c2.a(new r7(url, 0, "closeEndCard", null));
}
}
public final void setCloseRegionDisabled(boolean z) {
this.B = z;
}
public final void setContentURL(String str) {
this.c0 = str;
}
public final void setContextualDataHandler(t2 t2Var) {
this.x0 = t2Var;
}
public void setCreativeId(String str) {
this.N = str;
}
public final void setDisableBackButton(boolean z) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setDisableBackButton ", this);
this.C = z;
}
public final void setEmbeddedBrowserJSCallbacks(o3 o3Var) {
this.m0 = o3Var;
}
public void setExitAnimation(int i) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setExitAnimation ", this);
this.L = i;
}
public final void setExpandProperties(c4 expandProperties) {
Intrinsics.checkNotNullParameter(expandProperties, "expandProperties");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setExpandProperties ", this);
if (expandProperties.d) {
setUseCustomClose(expandProperties.c);
}
this.s = expandProperties;
}
@Override
public void setFullScreenActivityContext(Activity activity) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setFullScreenActivityContext ", this);
this.i = new WeakReference<>(activity);
u();
}
public void setImpressionId(String str) {
this.c = str;
}
public final void setLandingPageHandler(u5 u5Var) {
Intrinsics.checkNotNullParameter(u5Var, "<set-?>");
this.t0 = u5Var;
}
public final void setLandingScheme(String str) {
Intrinsics.checkNotNullParameter(str, "<set-?>");
this.e = str;
}
public final void setMarkupTypeAdUnit(String str) {
Intrinsics.checkNotNullParameter(str, "<set-?>");
this.s0 = str;
}
@UiThread
public final void setOrientationProperties(x8 orientationProperties) {
Intrinsics.checkNotNullParameter(orientationProperties, "orientationProperties");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setOrientationProperties ", this);
this.o0 = orientationProperties;
u();
}
public final void setOriginalRenderView(n9 n9Var) {
this.h = n9Var;
}
public final void setPlacementId(long j) {
this.M = j;
}
public final void setPreloadView(boolean z) {
this.R = z;
}
public void setReferenceContainer(com.inmobi.media.g gVar) {
this.Q = gVar;
}
public final void setRenderViewEventListener(p9 p9Var) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setRenderViewEventListener ", this);
this.k = p9Var;
}
public final void setResizeProperties(u9 u9Var) {
this.t = u9Var;
}
public final void setScrollable(boolean z) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setScrollable ", this);
setScrollContainer(z);
setVerticalScrollBarEnabled(z);
setHorizontalScrollBarEnabled(z);
}
public final void setShouldFireRenderBeacon(boolean z) {
this.a0 = z;
}
public void setTelemetryManagerMap(Map<String, l0> map) {
this.r0 = map;
}
public final void setTotalViewArea(long j) {
this.e0 = getWidth() * getHeight();
}
public final void setUseCustomClose(boolean z) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setUseCustomClose ", this);
this.y = z;
}
public void setViewTouchTimestamp(long j) {
this.f = j;
}
@Override
public void stopLoading() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("stopLoading ", this);
if (this.E.get()) {
return;
}
super.stopLoading();
}
public final void t() {
getListener().e(this);
getAdQualityManager().c();
}
public final void u() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("updateActivitiesOrientationProperties ", this);
Activity activity = this.i.get();
if (activity != null && (activity instanceof InMobiAdActivity)) {
x8 orientationProperties = this.o0;
Intrinsics.checkNotNullParameter(orientationProperties, "orientationProperties");
v4 v4Var = ((InMobiAdActivity) activity).a;
if (v4Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("orientationHandler");
v4Var = null;
}
v4Var.a(orientationProperties);
}
}
public n9(Context context, byte b2, Set<bb> set, String str, boolean z, String landingScheme, long j) {
super(context.getApplicationContext());
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(landingScheme, "landingScheme");
this.a = b2;
this.f3373b = set;
this.c = str;
this.d = z;
this.e = landingScheme;
this.f = j;
this.i = new WeakReference<>(null);
this.l = "Default";
this.w = true;
this.x = true;
this.z = true;
this.A = cc.UNKNOWN;
this.E = new AtomicBoolean(false);
this.F = new Object();
this.G = new Object();
this.I = true;
this.L = -1;
this.M = Long.MIN_VALUE;
this.a0 = true;
this.g0 = Integer.MIN_VALUE;
this.h0 = Integer.MIN_VALUE;
this.l0 = new o9();
this.q0 = s5.f3413b.a(context, Reward.DEFAULT).a("enableImraidLogs", false);
this.s0 = AdType.HTML;
this.u0 = new d();
this.v0 = new c();
this.w0 = new b();
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("init constructor ", this);
this.Q = this;
this.W = true;
this.o0 = new x8();
this.i0 = new f6(this);
GestureDetector gestureDetector = new GestureDetector(context, this);
this.j0 = gestureDetector;
gestureDetector.setOnDoubleTapListener(this);
gestureDetector.setIsLongpressEnabled(b2 == 1);
this.y0 = new e();
this.z0 = new g();
this.A0 = new f();
}
public final void d(String str) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("loadUrlInWebView ", this);
this.H = false;
if (this.E.get() || str == null) {
return;
}
loadUrl(str);
}
public static final class c implements w1 {
public c() {
}
@Override
public void a() {
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
n9.this.t();
}
@Override
public void b() {
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
n9.this.getListener().f(n9.this);
n9.a(n9.this, (String) null, (String) null, (String) null);
}
@Override
public void a(String url, String api) {
Intrinsics.checkNotNullParameter(url, "url");
Intrinsics.checkNotNullParameter(api, "api");
n9.this.getLandingPageHandler().a(url, api);
}
}
public static final class e implements g.a {
public e() {
}
@Override
public void a() {
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
n9.this.getListener().g();
}
@Override
public void b(Object obj) {
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
n9 n9Var = n9.this;
if (n9Var.a == 0) {
n9Var.setAndUpdateViewState("Default");
n9 originalRenderView = n9.this.getOriginalRenderView();
if (originalRenderView != null) {
originalRenderView.setAndUpdateViewState("Default");
}
} else if (Intrinsics.areEqual("Default", n9Var.getViewState())) {
n9.this.setAndUpdateViewState("Hidden");
}
n9.this.t();
}
@Override
public void a(Object obj) {
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
n9 n9Var = n9.this;
if (n9Var.a == 0) {
if (n9Var.getOriginalRenderView() != null) {
n9 originalRenderView = n9.this.getOriginalRenderView();
if (originalRenderView != null) {
originalRenderView.setAndUpdateViewState("Expanded");
}
} else {
n9.this.setAndUpdateViewState("Expanded");
}
n9.this.H = false;
}
n9.this.getListener().f(n9.this);
}
}
public static final boolean a(n9 n9Var, JsResult jsResult) {
n9Var.getClass();
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("shouldRenderPopup ", n9Var);
if (n9Var.getRenderingConfig().shouldRenderPopup()) {
return true;
}
jsResult.cancel();
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("firePopupBlockedEvent ", n9Var);
n9Var.b("window.mraidview.popupBlocked('popupBlocked')");
return false;
}
public final void d(boolean z) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processDisableCloseRegionRequest ", this);
this.B = z;
View rootView = getRootView();
if (rootView != null) {
View findViewById = rootView.findViewById(65531);
Intrinsics.checkNotNullExpressionValue(findViewById, "rootView.findViewById(Vi…tants.ID_AD_CLOSE_REGION)");
((e3) findViewById).setVisibility(this.B ? 8 : 0);
}
}
@TargetApi(16)
public final boolean f(String str) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("supports ", this);
boolean z = true;
if (str != null) {
switch (str.hashCode()) {
case -1886160473:
if (str.equals("playVideo")) {
return true;
}
break;
case -1647691422:
break;
case 1509574865:
break;
case 1642189884:
if (str.equals("saveContent")) {
return true;
}
break;
case 1772979069:
str.equals("redirectFraudDetection");
break;
}
}
return false;
}
@Override
public void a(f6 movementGestureDetector) {
Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
if (!getRenderingConfig().getSupportedGestures().contains(2)) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return;
}
String TAG2 = C0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
StringBuilder sb = new StringBuilder();
sb.append("onPanDetected\n ");
JSONArray jSONArray = movementGestureDetector.j;
sb.append(jSONArray == null ? null : Integer.valueOf(jSONArray.length()));
sb.append(" \n ");
sb.append(movementGestureDetector.j);
StringsKt__IndentKt.trimIndent(sb.toString());
b("window.imraidview.onGestureDetected('2', '" + movementGestureDetector.j + "');");
}
public final void b(String str, String message, String str2) {
Intrinsics.checkNotNullParameter(message, "message");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireError ", this);
if (str == null || str2 == null) {
return;
}
a(str, "broadcastEvent('error',\"" + message + "\", \"" + ((Object) str2) + "\")");
}
public final void b(final String js) {
Intrinsics.checkNotNullParameter(js, "js");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("injectJavaScript ", this);
new Handler(getContainerContext().getMainLooper()).postAtFrontOfQueue(new Runnable() {
@Override
public final void run() {
n9.a(n9.this, js);
}
});
}
public final void b(String str, String url) {
Intrinsics.checkNotNullParameter(url, "url");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processMediaPlaybackRequest ", this);
if (1 != this.a && !Intrinsics.areEqual("Expanded", this.l)) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return;
}
Activity activity = this.i.get();
if (activity == null) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
b(str, "Media playback is not allowed before it is visible! Ignoring request ...", "playVideo");
return;
}
i6 i6Var = this.o;
if (i6Var == null) {
return;
}
i6Var.a(url, activity);
}
public static final class f implements y0 {
public f() {
}
@Override
public void a(com.inmobi.media.e assetBatch, byte b2) {
String replace$default;
Intrinsics.checkNotNullParameter(assetBatch, "assetBatch");
if (assetBatch.c == null || assetBatch.g.size() <= 0) {
return;
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("url", assetBatch.g.get(0).f3287b);
jSONObject.put(IronSourceConstants.EVENTS_ERROR_REASON, (int) assetBatch.g.get(0).l);
} catch (JSONException unused) {
}
String jSONObject2 = jSONObject.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "result.toString()");
replace$default = StringsKt__StringsJVMKt.replace$default(jSONObject2, "\"", "\\\"", false, 4, (Object) null);
String str = "sendSaveContentResult(\"saveContent_" + ((Object) assetBatch.f) + "\", 'failed', \"" + replace$default + "\");";
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("Failure injection ", str);
n9.this.a(assetBatch.c, str);
}
@Override
public void a(com.inmobi.media.e assetBatch) {
Intrinsics.checkNotNullParameter(assetBatch, "assetBatch");
if (assetBatch.c == null || assetBatch.g.size() <= 0) {
return;
}
String str = "sendSaveContentResult(\"saveContent_" + ((Object) assetBatch.f) + "\", 'success', \"" + ((Object) assetBatch.g.get(0).j) + "\");";
String TAG = n9.C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("Success injection ", str);
n9.this.a(assetBatch.c, str);
}
}
@Override
@TargetApi(11)
public void c() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("destroyContainer ", this);
if (this.E.get()) {
return;
}
if (!this.z) {
this.z = true;
return;
}
this.E.set(true);
t2 t2Var = this.x0;
if (t2Var != null) {
t2Var.b();
}
this.H = true;
this.L = -1;
removeJavascriptInterface("sdkController");
i6 i6Var = this.o;
AdConfig adConfig = null;
if (i6Var != null) {
c6 c6Var = i6Var.d;
if (c6Var != null) {
c6Var.b();
}
i6Var.d = null;
c6 c6Var2 = i6Var.e;
if (c6Var2 != null) {
c6Var2.b();
}
i6Var.e = null;
c6 c6Var3 = i6Var.f;
if (c6Var3 != null) {
c6Var3.b();
}
i6Var.f = null;
}
this.i.clear();
WeakReference<ViewGroup> weakReference = this.j;
if (weakReference != null) {
weakReference.clear();
}
yb ybVar = this.U;
if (ybVar != null) {
ybVar.e();
}
yb ybVar2 = this.U;
if (ybVar2 != null) {
ybVar2.a();
}
this.m0 = null;
this.k = null;
this.T = null;
this.Q = null;
ViewParent parent = getParent();
if (parent != null) {
((ViewGroup) parent).removeView(this);
removeAllViews();
}
AdConfig adConfig2 = this.p;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
AdConfig.OmidConfig omidConfig = adConfig.getViewability().getOmidConfig();
if (this.W && omidConfig.isOmidEnabled()) {
t8.a aVar = t8.f3424b;
t8.c.getClass();
if (Omid.isActive()) {
new q9(this, omidConfig.getWebViewRetainTime()).a();
return;
}
}
destroy();
}
@Override
public void a(f6 movementGestureDetector, MotionEvent initialEvent, MotionEvent endEvent) {
List listOf;
Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
Intrinsics.checkNotNullParameter(initialEvent, "initialEvent");
Intrinsics.checkNotNullParameter(endEvent, "endEvent");
if (!getRenderingConfig().getSupportedGestures().contains(4)) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return;
}
String TAG2 = C0;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
StringsKt__IndentKt.trimIndent(" onScaleDetected\n " + initialEvent + " \n " + endEvent);
JSONArray jSONArray = new JSONArray();
float f2 = (float) 2;
listOf = CollectionsKt__CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf((endEvent.getX() + endEvent.getX(1)) / f2), Float.valueOf((endEvent.getY() + endEvent.getY(1)) / f2)});
jSONArray.put(new JSONArray((Collection) listOf));
b("window.imraidview.onGestureDetected('4', '" + jSONArray + "');");
}
@Override
public void b() {
ViewGroup viewGroup;
w wVar;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("dismissCurrentViewContainer ", this);
i6 i6Var = this.o;
if (i6Var != null) {
e6 e6Var = i6Var.c;
if (e6Var != null) {
e6Var.a();
}
i6Var.c = null;
}
if (Intrinsics.areEqual("Expanded", this.l)) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processCloseRequestOnExpandedRenderView ", this);
if (!Intrinsics.areEqual("Default", this.l)) {
this.H = true;
g6 g6Var = this.m;
if (g6Var != null && g6Var.a.getOriginalRenderView() == null) {
ViewGroup viewGroup2 = g6Var.c;
View rootView = viewGroup2 == null ? null : viewGroup2.getRootView();
if (rootView != null) {
View findViewById = rootView.findViewById(65535);
ViewParent parent = g6Var.a.getParent();
ViewGroup viewGroup3 = parent instanceof ViewGroup ? (ViewGroup) parent : null;
if (viewGroup3 != null) {
viewGroup3.removeView(g6Var.a);
}
ViewParent parent2 = findViewById == null ? null : findViewById.getParent();
viewGroup = parent2 instanceof ViewGroup ? parent2 : null;
if (viewGroup != null) {
viewGroup.removeView(findViewById);
}
ViewGroup viewGroup4 = g6Var.c;
if (viewGroup4 != null) {
viewGroup4.addView(g6Var.a, g6Var.d, new RelativeLayout.LayoutParams(viewGroup4.getWidth(), viewGroup4.getHeight()));
}
n9 n9Var = g6Var.a;
n9Var.getClass();
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("resetLayout ", n9Var);
n9Var.setVisibility(0);
n9Var.requestLayout();
}
}
h();
this.H = false;
}
this.z = false;
} else if (Intrinsics.areEqual("Resized", this.l)) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processCloseRequestOnResizedRenderView ", this);
if (!Intrinsics.areEqual("Default", this.l)) {
this.H = true;
j6 j6Var = this.n;
if (j6Var != null) {
ViewParent parent3 = j6Var.a.getParent();
ViewGroup viewGroup5 = parent3 instanceof ViewGroup ? (ViewGroup) parent3 : null;
View rootView2 = viewGroup5 == null ? null : viewGroup5.getRootView();
View findViewById2 = rootView2 == null ? null : rootView2.findViewById(WavUtil.TYPE_WAVE_FORMAT_EXTENSIBLE);
ViewGroup viewGroup6 = j6Var.f3340b;
View rootView3 = viewGroup6 == null ? null : viewGroup6.getRootView();
View findViewById3 = rootView3 == null ? null : rootView3.findViewById(65535);
ViewParent parent4 = findViewById3 == null ? null : findViewById3.getParent();
ViewGroup viewGroup7 = parent4 instanceof ViewGroup ? (ViewGroup) parent4 : null;
ViewParent parent5 = findViewById2 == null ? null : findViewById2.getParent();
viewGroup = parent5 instanceof ViewGroup ? parent5 : null;
if (viewGroup != null) {
viewGroup.removeView(findViewById2);
}
if (viewGroup7 != null) {
viewGroup7.removeView(findViewById3);
}
if (viewGroup5 != null) {
viewGroup5.removeView(j6Var.a);
}
ViewGroup viewGroup8 = j6Var.f3340b;
if (viewGroup8 != null) {
viewGroup8.addView(j6Var.a, j6Var.c, new RelativeLayout.LayoutParams(viewGroup8.getWidth(), viewGroup8.getHeight()));
}
n9 n9Var2 = j6Var.a;
n9Var2.getClass();
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("resetLayout ", n9Var2);
n9Var2.setVisibility(0);
n9Var2.requestLayout();
}
setAndUpdateViewState("Default");
t();
this.H = false;
}
} else if (Intrinsics.areEqual("Default", this.l)) {
setAndUpdateViewState("Hidden");
ViewParent parent6 = getParent();
if (1 == this.a) {
h();
} else if (parent6 instanceof ViewGroup) {
((ViewGroup) parent6).removeAllViews();
}
}
if (l() && (wVar = this.T) != null) {
wVar.a(this, getFullScreenActivity());
}
this.l0.e.clear();
}
@SuppressLint({"AddJavascriptInterface"})
@TargetApi(19)
public final void a(p9 p9Var, AdConfig adConfig, boolean z, boolean z2) {
AdConfig adConfig2;
int otherNetworkLoadsLimit;
AdConfig adConfig3;
AdConfig adConfig4;
Intrinsics.checkNotNullParameter(adConfig, "adConfig");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("initialize ", this);
if (Build.VERSION.SDK_INT >= 21 && Intrinsics.areEqual(this.s0, "htmlUrl")) {
getSettings().setMixedContentMode(2);
}
this.p = adConfig;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("setImpressionParams ", this);
if (this.f3373b == null) {
r();
} else {
try {
r();
for (bb bbVar : this.f3373b) {
if (bbVar.a == 2) {
if (bbVar.f3279b.containsKey("type")) {
Object obj = bbVar.f3279b.get("type");
if (obj != null) {
this.g = (byte) ((Integer) obj).intValue();
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
}
} else {
s();
}
if (bbVar.f3279b.containsKey("time")) {
Object obj2 = bbVar.f3279b.get("time");
if (obj2 != null) {
this.g0 = ((Integer) obj2).intValue();
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
}
} else {
q();
}
if (bbVar.f3279b.containsKey(MBridgeConstans.DYNAMIC_VIEW_KEY_VIEW)) {
Object obj3 = bbVar.f3279b.get(MBridgeConstans.DYNAMIC_VIEW_KEY_VIEW);
if (obj3 != null) {
this.h0 = ((Integer) obj3).intValue();
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
}
} else {
p();
}
if (this.g != 2) {
continue;
} else {
if (bbVar.f3279b.containsKey("pixel")) {
Object obj4 = bbVar.f3279b.get("pixel");
if (obj4 != null) {
this.f0 = ((Integer) obj4).intValue();
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
}
} else {
s();
}
if (bbVar.f3279b.containsKey(TypedValues.AttributesType.S_FRAME)) {
Object obj5 = bbVar.f3279b.get(TypedValues.AttributesType.S_FRAME);
JSONArray jSONArray = obj5 instanceof JSONArray ? (JSONArray) obj5 : null;
if (jSONArray != null) {
this.d0 = new int[jSONArray.length()];
int length = jSONArray.length();
if (length > 0) {
int i = 0;
while (true) {
int i2 = i + 1;
int[] iArr = this.d0;
if (iArr != null) {
Object obj6 = jSONArray.get(i);
if (obj6 == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
}
iArr[i] = ((Integer) obj6).intValue();
}
if (i2 >= length) {
break;
}
i = i2;
}
} else {
continue;
}
}
} else {
s();
}
}
}
}
} catch (JSONException unused) {
Intrinsics.checkNotNullExpressionValue(C0, "TAG");
r();
} catch (Exception unused2) {
Intrinsics.checkNotNullExpressionValue(C0, "TAG");
r();
}
}
Intrinsics.checkNotNullExpressionValue(C0, "TAG");
Intrinsics.stringPlus("initLandingPageHandler ", this);
v5 v5Var = new v5(this.d, this.e, getAdConfig().isCCTEnabled());
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
setLandingPageHandler(new u5(context, v5Var, this.v0, this.u0, this));
this.k = p9Var;
this.V = z;
ViewParent parent = getParent();
this.j = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
this.a0 = z2;
setBackgroundColor(getRenderingConfig().getWebviewBackgroundColor());
new h6(getMraidConfig().getUrl(), getMraidConfig().getMaxRetries(), getMraidConfig().getRetryInterval(), getMraidConfig().getExpiry()).a();
int i3 = Build.VERSION.SDK_INT;
if (i3 >= 16) {
setImportantForAccessibility(2);
}
setScrollable(false);
if (i3 >= 17) {
getSettings().setMediaPlaybackRequiresUserGesture(false);
}
getSettings().setJavaScriptEnabled(true);
getSettings().setGeolocationEnabled(true);
o9 o9Var = this.l0;
String adType = getAdType();
if (Intrinsics.areEqual(adType, "banner")) {
AdConfig adConfig5 = this.p;
if (adConfig5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig4 = null;
} else {
adConfig4 = adConfig5;
}
otherNetworkLoadsLimit = adConfig4.getRendering().getBannerNetworkLoadsLimit();
} else if (Intrinsics.areEqual(adType, "audio")) {
AdConfig adConfig6 = this.p;
if (adConfig6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig3 = null;
} else {
adConfig3 = adConfig6;
}
otherNetworkLoadsLimit = adConfig3.getRendering().getAudioNetworkLoadsLimit();
} else {
AdConfig adConfig7 = this.p;
if (adConfig7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig2 = null;
} else {
adConfig2 = adConfig7;
}
otherNetworkLoadsLimit = adConfig2.getRendering().getOtherNetworkLoadsLimit();
}
o9Var.a = otherNetworkLoadsLimit;
setWebViewClient(this.l0);
setWebChromeClient(this.z0);
addJavascriptInterface(new n5(this, this.a), "sdkController");
this.m = new g6(this, getMarkupType());
this.n = new j6(this);
this.o = new i6(this);
this.s = new c4();
this.t = new u9(u9.DEFAULT_POSITION, true);
this.p0 = new d0(adConfig.getAdQuality());
}
public final void e(boolean z) {
e3 e3Var;
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processUseCustomCloseRequest ", this);
setUseCustomClose(z);
View rootView = getRootView();
if (rootView == null || (e3Var = (e3) rootView.findViewById(65532)) == null) {
return;
}
e3Var.setVisibility(this.y ? 8 : 0);
}
@Override
public boolean e() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (getRenderingConfig() != null) {
boolean z = getViewTouchTimestamp() != -1 && SystemClock.elapsedRealtime() - getViewTouchTimestamp() < getRenderingConfig().getUserTouchResetTime();
if (!getRenderingConfig().getAutoRedirectionEnforcement() || z) {
return true;
}
}
return false;
}
public final void c(String str) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("loadDataInWebView ", this);
this.H = false;
if (this.E.get()) {
return;
}
Intrinsics.checkNotNull(str);
loadDataWithBaseURL("", str, "text/html", "UTF-8", null);
}
public final void c(String str, String contentId, String url) {
String replace$default;
Intrinsics.checkNotNullParameter(contentId, "contentId");
Intrinsics.checkNotNullParameter(url, "url");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processSaveContentRequest ", this);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (!f("saveContent")) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("url", url);
jSONObject.put(IronSourceConstants.EVENTS_ERROR_REASON, 7);
} catch (JSONException unused) {
}
String jSONObject2 = jSONObject.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "result.toString()");
replace$default = StringsKt__StringsJVMKt.replace$default(jSONObject2, "\"", "\\\"", false, 4, (Object) null);
a(str, "sendSaveContentResult(\"saveContent_" + contentId + "\", 'failed', \"" + replace$default + "\");");
return;
}
HashSet hashSet = new HashSet();
hashSet.add(new l9((byte) -1, url));
String uuid = UUID.randomUUID().toString();
Intrinsics.checkNotNullExpressionValue(uuid, "randomUUID().toString()");
com.inmobi.media.e eVar = new com.inmobi.media.e(uuid, null, hashSet, this.A0, contentId);
eVar.c = str;
x0.a.a(eVar);
}
public static final void b(n9 this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.getListener().i();
}
public final void b(boolean z) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireNextAdShowComplete ", this);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
getCurrentRenderingPodAdIndex();
b("window.imraidview.broadcastEvent('adShowSuccess'," + z + ");");
}
@Override
public void a(byte b2, Map<String, String> map) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireEvent ", this);
}
@Override
public void a(String mraidApi) {
Intrinsics.checkNotNullParameter(mraidApi, "mraidApi");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("sendFraudBeaconAndTelemetryEvent ", this);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireDetectAutoRedirectFraud ", this);
b("window.mraidview.fireRedirectFraudBeacon('" + mraidApi + "')");
String adType = getAdType();
if (adType == null) {
adType = "banner";
}
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("sendTelemetryForAutoRedirectFraud ", this);
HashMap hashMap = new HashMap();
String creativeId = getCreativeId();
if (creativeId != null) {
hashMap.put("creativeId", creativeId);
}
hashMap.put("trigger", mraidApi);
String impressionId = getImpressionId();
if (impressionId != null) {
hashMap.put("impressionId", impressionId);
}
hashMap.put("adType", adType);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("processTelemetryEvent ", this);
getListener().b("BlockAutoRedirection", hashMap);
}
public final void a(boolean z) {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireNextAdLoadComplete ", this);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
getCurrentRenderingPodAdIndex();
b("window.imraidview.broadcastEvent('adLoadSuccess'," + z + ");");
}
public final void a(String str, String callback) {
Intrinsics.checkNotNullParameter(callback, "callback");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("fireJavaScriptCallback ", this);
if (str == null) {
return;
}
b(((Object) str) + '.' + callback);
}
public static final void a(n9 this$0, String js) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(js, "$js");
try {
if (!this$0.E.get()) {
String str = "javascript:try{" + js + "}catch(e){}";
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("Injecting javascript:", str);
if (Build.VERSION.SDK_INT < 19) {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("loadScript ", this$0);
this$0.loadUrl(str);
} else {
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("evaluateScript ", this$0);
this$0.evaluateJavascript(str, null);
}
}
} catch (Exception e2) {
Intrinsics.checkNotNullExpressionValue(C0, "TAG");
Intrinsics.stringPlus("SDK encountered an unexpected error injecting JavaScript in the Ad container; ", e2.getMessage());
}
}
@Override
public void a(v8 orientation) {
j6 j6Var;
Intrinsics.checkNotNullParameter(orientation, "orientation");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onOrientationUpdate ", this);
if (!Intrinsics.areEqual("Resized", this.l) || this.t == null || (j6Var = this.n) == null) {
return;
}
j6Var.a();
}
@Override
public void a(String jsCallbackNamespace, String callback, String blob) {
Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
Intrinsics.checkNotNullParameter(callback, "callback");
Intrinsics.checkNotNullParameter(blob, "blob");
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
a(jsCallbackNamespace, callback + '(' + blob + ");");
}
@Override
public void a() {
String TAG = C0;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
Intrinsics.stringPlus("onFailure ", this);
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
if (this.E.get()) {
return;
}
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public final void run() {
n9.a(n9.this);
}
});
}
public static final void a(n9 this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.getListener().h();
}
}