Perfume Of Love v2.14.9版本的 MD5 值为:16011aefc5a55805771706ce3b259b4e
以下内容为反编译后的 q.java 源代码,内容仅作参考
package com.inmobi.media;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
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.WebChromeClient;
import android.webkit.WebView;
import android.widget.AbsoluteLayout;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import androidx.browser.trusted.sharing.ShareTarget;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import androidx.core.view.ViewCompat;
import com.inmobi.ads.rendering.InMobiAdActivity;
import com.inmobi.commons.core.configs.AdConfig;
import com.inmobi.media.aa;
import com.inmobi.media.ex;
import com.inmobi.media.j;
import com.inmobi.media.kd;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.onesignal.influence.OSInfluenceConstants;
import com.smaato.sdk.richmedia.mraid.bridge.MraidJsMethods;
import java.io.UnsupportedEncodingException;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class q extends WebView implements GestureDetector.OnDoubleTapListener, GestureDetector.OnGestureListener, aa.a, da, j, kd.a, l {
public final en A;
public final bk B;
private Map<String, hl> C;
private byte E;
private q F;
private WeakReference<ViewGroup> G;
private s H;
private AdConfig I;
private boolean J;
private db K;
private di L;
private JSONObject M;
private JSONObject N;
private boolean O;
private u P;
private final Object Q;
private final Object R;
private boolean S;
private View T;
private WebChromeClient.CustomViewCallback U;
private int V;
private String W;
private final j.a aA;
private final WebChromeClient aB;
private String aa;
private j ab;
private boolean ac;
private long ad;
private String ae;
private final Set<dy> af;
private ea ag;
private boolean ah;
private boolean ai;
private boolean aj;
private int ak;
private int al;
private String am;
private int[] an;
private int ao;
private int ap;
private int aq;
private final aa ar;
private final GestureDetector as;
private m at;
private dh au;
private final r av;
private x aw;
private String ax;
private final f ay;
private final hu az;
public WeakReference<Activity> b;
boolean c;
public String d;
public byte e;
public dd f;
public dg g;
public df h;
public boolean i;
public boolean j;
public boolean k;
public boolean l;
public boolean m;
public boolean n;
public String o;
public final AtomicBoolean p;
public boolean q;
public long r;
public String s;
public al t;
public boolean u;
public k v;
public long w;
public js x;
public boolean y;
public String z;
public static final s a = new s() {
@Override
public final void a(hq hqVar) {
}
@Override
public final ke c_() {
return ke.a();
}
};
private static final String D = q.class.getSimpleName();
@Override
public final Object getDataModel() {
return null;
}
@Override
public final View getVideoContainerView() {
return null;
}
@Override
public final boolean onDoubleTapEvent(MotionEvent motionEvent) {
return false;
}
@Override
public final boolean onDown(MotionEvent motionEvent) {
return false;
}
@Override
public final boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
return false;
}
@Override
public final boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
return false;
}
@Override
public final void onShowPress(MotionEvent motionEvent) {
}
static boolean f(q qVar) {
qVar.q = false;
return false;
}
@Override
public final void a(aa aaVar) {
if (getRenderingConfig().gestures.contains(2)) {
aaVar.h.length();
d("window.imraidview.onGestureDetected('2', '" + aaVar.h.toString() + "');");
}
}
@Override
public final void a(MotionEvent motionEvent) {
if (getRenderingConfig().gestures.contains(4)) {
JSONArray jSONArray = new JSONArray();
jSONArray.put(new JSONArray((Collection) Arrays.asList(Float.valueOf((motionEvent.getX() + motionEvent.getX(1)) / 2.0f), Float.valueOf((motionEvent.getY() + motionEvent.getY(1)) / 2.0f))));
d("window.imraidview.onGestureDetected('4', '" + jSONArray.toString() + "');");
}
}
@Override
public final void a(MotionEvent motionEvent, MotionEvent motionEvent2) {
if (getRenderingConfig().gestures.contains(3)) {
JSONArray jSONArray = new JSONArray();
jSONArray.put(new JSONArray((Collection) Arrays.asList(Float.valueOf(motionEvent.getX()), Float.valueOf(motionEvent.getY()))));
jSONArray.put(new JSONArray((Collection) Arrays.asList(Float.valueOf(motionEvent.getX(1)), Float.valueOf(motionEvent.getY(1)))));
jSONArray.put(new JSONArray((Collection) Arrays.asList(Float.valueOf(motionEvent2.getX()), Float.valueOf(motionEvent2.getY()))));
jSONArray.put(new JSONArray((Collection) Arrays.asList(Float.valueOf(motionEvent2.getX(1)), Float.valueOf(motionEvent2.getY(1)))));
d("window.imraidview.onGestureDetected('3', '" + jSONArray.toString() + "');");
}
}
@Override
public final boolean onSingleTapUp(MotionEvent motionEvent) {
this.ad = SystemClock.elapsedRealtime();
return false;
}
@Override
public final void onLongPress(MotionEvent motionEvent) {
if (getRenderingConfig().gestures.contains(5)) {
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(motionEvent.getX());
jSONArray.put(motionEvent.getY());
} catch (JSONException unused) {
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
d("window.imraidview.onGestureDetected('5', '" + jSONArray2.toString() + "');");
}
}
@Override
public final boolean onSingleTapConfirmed(MotionEvent motionEvent) {
if (getRenderingConfig().gestures.contains(0)) {
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(motionEvent.getX());
jSONArray.put(motionEvent.getY());
} catch (JSONException unused) {
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
d("window.imraidview.onGestureDetected('0', '" + jSONArray2.toString() + "');");
return false;
}
return false;
}
@Override
public final boolean onDoubleTap(MotionEvent motionEvent) {
if (getRenderingConfig().gestures.contains(1)) {
this.ad = SystemClock.elapsedRealtime();
if (motionEvent.getAction() == 1) {
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(motionEvent.getX());
jSONArray.put(motionEvent.getY());
} catch (JSONException unused) {
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
d("window.imraidview.onGestureDetected('1', '" + jSONArray2.toString() + "');");
}
return false;
}
return false;
}
public q(Context context, byte b, Set<dy> set, String str, Boolean bool, String str2) {
super(context.getApplicationContext());
this.E = (byte) 0;
this.b = new WeakReference<>(null);
this.c = false;
this.d = "Default";
this.j = true;
this.k = true;
this.l = false;
this.O = true;
this.P = u.UNKNOWN;
this.m = false;
this.n = false;
this.o = null;
this.p = new AtomicBoolean(false);
this.Q = new Object();
this.R = new Object();
this.S = true;
this.V = -1;
this.r = Long.MIN_VALUE;
this.ac = false;
this.ad = -1L;
this.ae = "html";
this.aj = true;
this.ap = Integer.MIN_VALUE;
this.aq = Integer.MIN_VALUE;
this.x = null;
this.y = false;
this.av = new r();
this.ay = new f() {
@Override
public final void a(String str3) {
q.this.at.a(str3);
}
@Override
public final void a() {
String unused = q.D;
q.this.getListener().a_(q.this);
q.this.c(null, null, null);
}
@Override
public final void b() {
String unused = q.D;
q.this.getListener().b_(q.this);
}
};
this.az = new hu() {
@Override
public final void a() {
q.this.getListener().a_();
}
@Override
public final void a(String str3, String str4, String str5) {
q.this.b(str3, str4, str5);
}
@Override
public final void b(String str3, String str4, String str5) {
q.this.c(str3, str4, str5);
}
@Override
public final void b() {
if (q.this.p.get()) {
return;
}
q.this.getListener().b(new HashMap<>());
}
@Override
public final void c(String str3, String str4, String str5) {
if (q.this.p.get()) {
return;
}
a(str3, str4, str5);
}
@Override
public final void a(Intent intent) {
InMobiAdActivity.a(q.this);
ic.a(q.this.getContainerContext(), intent);
}
};
this.A = new en() {
@Override
public final void onViewVisibilityChanged(View view, boolean z) {
q.this.a(view, z);
}
};
this.aA = new j.a() {
@Override
public final void a() {
String unused = q.D;
q.this.getListener().a();
}
@Override
public final void a(Object obj) {
String unused = q.D;
if (q.this.e == 0) {
if (q.this.F != null) {
q.this.F.setAndUpdateViewState("Expanded");
} else {
q.this.setAndUpdateViewState("Expanded");
}
q.f(q.this);
}
q.this.getListener().a_(q.this);
}
@Override
public final void b(Object obj) {
String unused = q.D;
if (q.this.e != 0) {
if ("Default".equals(q.this.d)) {
q.this.setAndUpdateViewState("Hidden");
}
} else {
q.this.setAndUpdateViewState("Default");
if (q.this.F != null) {
q.this.F.setAndUpdateViewState("Default");
}
}
q.this.getListener().b_(q.this);
}
};
this.aB = new WebChromeClient() {
@Override
public final boolean onJsAlert(WebView webView, String str3, String str4, final JsResult jsResult) {
String unused = q.D;
if (q.a(q.this, jsResult)) {
Activity fullScreenActivity = q.this.getFullScreenActivity();
if (fullScreenActivity != null) {
new AlertDialog.Builder(fullScreenActivity).setMessage(str4).setTitle(str3).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
jsResult.confirm();
}
}).setCancelable(false).create().show();
return true;
}
jsResult.cancel();
return true;
}
return true;
}
@Override
public final boolean onJsConfirm(WebView webView, String str3, String str4, final JsResult jsResult) {
String unused = q.D;
if (q.a(q.this, jsResult)) {
Activity fullScreenActivity = q.this.getFullScreenActivity();
if (fullScreenActivity != null) {
new AlertDialog.Builder(fullScreenActivity).setMessage(str4).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
jsResult.confirm();
}
}).setNegativeButton(17039360, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
jsResult.cancel();
}
}).create().show();
return true;
}
jsResult.cancel();
return true;
}
return true;
}
@Override
public final boolean onJsPrompt(WebView webView, String str3, String str4, String str5, JsPromptResult jsPromptResult) {
String unused = q.D;
if (q.a(q.this, jsPromptResult)) {
if (q.this.getFullScreenActivity() == null) {
jsPromptResult.cancel();
return true;
}
return false;
}
return true;
}
@Override
public final void onShowCustomView(View view, WebChromeClient.CustomViewCallback customViewCallback) {
if (q.this.b == null || q.this.b.get() == null) {
return;
}
q.this.T = view;
q.this.U = customViewCallback;
q.this.T.setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view2, MotionEvent motionEvent) {
return true;
}
});
q.this.T.setBackgroundColor(ViewCompat.MEASURED_STATE_MASK);
((FrameLayout) ((Activity) q.this.b.get()).findViewById(16908290)).addView(q.this.T, new AbsoluteLayout.LayoutParams(-1, -1, 0, 0));
q.this.T.requestFocus();
View view2 = q.this.T;
view2.setOnKeyListener(new View.OnKeyListener() {
@Override
public final boolean onKey(View view3, int i, KeyEvent keyEvent) {
if (4 == keyEvent.getKeyCode() && keyEvent.getAction() == 0) {
String unused = q.D;
a();
return true;
}
return false;
}
});
view2.setFocusable(true);
view2.setFocusableInTouchMode(true);
view2.requestFocus();
}
@Override
public final void onHideCustomView() {
a();
super.onHideCustomView();
}
public void a() {
if (q.this.T == null) {
return;
}
if (q.this.U != null) {
q.this.U.onCustomViewHidden();
q.this.U = null;
}
if (q.this.T == null || q.this.T.getParent() == null) {
return;
}
((ViewGroup) q.this.T.getParent()).removeView(q.this.T);
q.this.T = null;
}
@Override
public final void onGeolocationPermissionsShowPrompt(final String str3, final GeolocationPermissions.Callback callback) {
if (q.this.b != null && q.this.b.get() != null) {
new AlertDialog.Builder((Context) q.this.b.get()).setTitle("Location Permission").setMessage("Allow location access").setPositiveButton(17039370, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
callback.invoke(str3, true, false);
}
}).setNegativeButton(17039360, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
callback.invoke(str3, false, false);
}
}).create().show();
}
super.onGeolocationPermissionsShowPrompt(str3, callback);
}
@Override
public final boolean onConsoleMessage(ConsoleMessage consoleMessage) {
consoleMessage.message();
consoleMessage.lineNumber();
consoleMessage.sourceId();
String unused = q.D;
return true;
}
};
this.B = new bk() {
@Override
public final void a(az azVar, byte b2) {
if (azVar.f == null || azVar.a.size() <= 0) {
return;
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("url", azVar.a.get(0).d);
jSONObject.put(IronSourceConstants.EVENTS_ERROR_REASON, (int) azVar.a.get(0).l);
} catch (JSONException unused) {
}
String unused2 = q.D;
q.this.a(azVar.f, "sendSaveContentResult(\"saveContent_" + azVar.g + "\", 'failed', \"" + jSONObject.toString().replace("\"", "\\\"") + "\");");
}
@Override
public final void a(az azVar) {
if (azVar.f == null || azVar.a.size() <= 0) {
return;
}
String unused = q.D;
q.this.a(azVar.f, "sendSaveContentResult(\"saveContent_" + azVar.g + "\", 'success', \"" + azVar.a.get(0).k + "\");");
}
};
this.F = null;
this.e = b;
this.q = false;
this.af = set;
this.s = str;
setReferenceContainer(this);
this.ab = this;
this.ai = true;
this.c = bool.booleanValue();
this.ax = str2;
this.ar = new aa(this);
GestureDetector gestureDetector = new GestureDetector(context, this);
this.as = gestureDetector;
gestureDetector.setOnDoubleTapListener(this);
gestureDetector.setIsLongpressEnabled(b == 1);
this.au = new dh();
}
public final void setAdPodHandler(k kVar) {
this.v = kVar;
}
public final k getAdPodHandler() {
return this.v;
}
public final void setAdSize(String str) {
this.W = str;
this.al = is.a(Integer.parseInt(str.split("x")[0]));
int a2 = is.a(Integer.parseInt(str.split("x")[1]));
this.ak = a2;
this.w = a2 * this.al;
}
public final void setIsPreload(boolean z) {
this.u = z;
}
public final void setPlacementId(long j) {
this.r = j;
}
public final void setImpressionId(String str) {
this.s = str;
}
public final void setCreativeId(String str) {
this.aa = str;
}
public final void setAllowAutoRedirection(boolean z) {
this.ac = z;
}
public final void setBlobProvider(al alVar) {
this.t = alVar;
}
public final String getImpressionId() {
return this.s;
}
public final String getCreativeId() {
return this.aa;
}
public final long getPlacementId() {
return this.r;
}
public final boolean getAllowAutoRedirection() {
return this.ac;
}
public final void setOriginalRenderView(q qVar) {
this.F = qVar;
}
public final q getOriginalRenderView() {
return this.F;
}
@Override
public final j.a getFullScreenEventsListener() {
return this.aA;
}
@Override
public final byte getPlacementType() {
return this.e;
}
public final String getState() {
return this.d;
}
public final boolean d() {
return this.P == u.VISIBLE;
}
public final long getTotalViewArea() {
return this.w;
}
public final int getMinimumPixelsPainted() {
return this.ao;
}
public final Object getDefaultPositionMonitor() {
return this.Q;
}
public final Object getCurrentPositionMonitor() {
return this.R;
}
public final void setShouldFireRenderBeacon(boolean z) {
this.aj = z;
}
public final String getContentUrl() {
return this.am;
}
public final void setContentUrl(String str) {
this.am = str;
}
public final Context getContainerContext() {
WeakReference<Activity> weakReference = this.b;
if (weakReference != null && weakReference.get() != null) {
return this.b.get();
}
return getContext();
}
public final hq getTelemetryOnAdImpression() {
Map<String, hl> telemetryManagerMap = getTelemetryManagerMap();
return new hq(telemetryManagerMap != null ? telemetryManagerMap.get("AdImpressionSuccessful") : null, getCreativeId(), getMarkupType());
}
public final Map<String, hl> getTelemetryManagerMap() {
return this.C;
}
public final void setTelemetryManagerMap(Map<String, hl> map) {
this.C = map;
}
public final void e() {
int[] iArr = new int[2];
this.M = new JSONObject();
if (this.G == null) {
this.G = new WeakReference<>((ViewGroup) getParent());
}
try {
if (this.G.get() != null) {
this.G.get().getLocationOnScreen(iArr);
this.M.put("x", is.b(iArr[0]));
this.M.put("y", is.b(iArr[1]));
int b = is.b(this.G.get().getWidth());
int b2 = is.b(this.G.get().getHeight());
this.M.put("width", b);
this.M.put("height", b2);
} else {
this.M.put("x", 0);
this.M.put("y", 0);
this.M.put("width", 0);
this.M.put("height", 0);
}
} catch (JSONException unused) {
}
synchronized (this.Q) {
this.j = false;
this.Q.notifyAll();
}
}
public final String getDefaultPosition() {
JSONObject jSONObject = this.M;
return jSONObject == null ? "" : jSONObject.toString();
}
public final void f() {
this.N = new JSONObject();
int[] iArr = new int[2];
getLocationOnScreen(iArr);
try {
this.N.put("x", is.b(iArr[0]));
this.N.put("y", is.b(iArr[1]));
int b = is.b(getWidth());
int b2 = is.b(getHeight());
this.N.put("width", b);
this.N.put("height", b2);
} catch (JSONException unused) {
}
synchronized (this.R) {
this.k = false;
this.R.notifyAll();
}
}
public final String getCurrentPosition() {
JSONObject jSONObject = this.N;
return jSONObject == null ? "" : jSONObject.toString();
}
@Override
public final void setFullScreenActivityContext(Activity activity) {
this.b = new WeakReference<>(activity);
p();
}
private void p() {
Activity activity = this.b.get();
if (activity instanceof InMobiAdActivity) {
((InMobiAdActivity) activity).a(this.au);
}
}
public final void setEmbeddedBrowserJSCallbacks(x xVar) {
this.aw = xVar;
}
@Override
public final void a(dj djVar) {
if (!"Resized".equals(this.d) || getResizeProperties() == null) {
return;
}
this.g.a();
}
public final Activity getFullScreenActivity() {
WeakReference<Activity> weakReference = this.b;
if (weakReference == null) {
return null;
}
return weakReference.get();
}
public final AdConfig.i getRenderingConfig() {
return this.I.rendering;
}
public final AdConfig.g getMraidConfig() {
return this.I.mraid;
}
@Override
protected final void onSizeChanged(int i, int i2, int i3, int i4) {
super.onSizeChanged(i, i2, i3, i4);
if (i == 0 || i2 == 0) {
return;
}
int b = is.b(i);
int b2 = is.b(i2);
d("window.mraidview.broadcastEvent('sizeChange'," + b + "," + b2 + ");");
}
@Override
public final void onWindowVisibilityChanged(int i) {
super.onWindowVisibilityChanged(i);
boolean z = true;
boolean z2 = i == 0;
if (z2) {
z2 = (isShown() && ef.h.a(this, this, this.aq, null) && ef.h.a(this, this, this.aq)) ? false : false;
}
e(z2);
}
@Override
public final void onWindowFocusChanged(boolean z) {
super.onWindowFocusChanged(z);
if (z) {
z = isShown() && ef.h.a(this, this, this.aq, null) && ef.h.a(this, this, this.aq);
}
if (Build.VERSION.SDK_INT <= 23 || getFullScreenActivity() == null || !getFullScreenActivity().isInMultiWindowMode()) {
e(z);
}
}
private void e(boolean z) {
u uVar = z ? u.VISIBLE : u.HIDDEN;
if ((this.P.equals(u.UNKNOWN) || !this.P.equals(uVar)) && !this.q) {
this.P = uVar;
if (z) {
getListener().f(this);
}
f(z);
}
}
@Override
public final void onAttachedToWindow() {
super.onAttachedToWindow();
this.J = isHardwareAccelerated();
if (this.G == null) {
this.G = new WeakReference<>((ViewGroup) getParent());
}
if (this.aj && this.ah) {
final kd kdVar = new kd(this, this);
final long b = getListener().c_().b();
final TimerTask timerTask = new TimerTask() {
@Override
public final void run() {
a aVar = (a) kdVar.c.get();
if (kdVar.e) {
return;
}
kd.c(kdVar);
if (aVar != null) {
aVar.l();
}
}
};
View view = kdVar.a.get();
if (view != null) {
view.post(new Runnable() {
@Override
public final void run() {
final a aVar = (a) kdVar.c.get();
final Timer timer = new Timer(kd.b);
timer.schedule(timerTask, b);
new Thread(new Runnable() {
{
AnonymousClass2.this = this;
}
@Override
public final void run() {
do {
try {
try {
View view2 = (View) kdVar.a.get();
if (view2 != null) {
Bitmap b2 = kd.b(view2);
if (b2 != null) {
int width = b2.getWidth() * b2.getHeight();
int[] iArr = new int[width];
b2.getPixels(iArr, 0, b2.getWidth(), 0, 0, b2.getWidth(), b2.getHeight());
int i = 0;
while (true) {
if (i >= width) {
break;
}
int i2 = iArr[i];
if (i2 <= -16777216 || i2 >= 0) {
i++;
} else {
String unused = kd.b;
kd.e(kdVar);
timer.cancel();
a aVar2 = aVar;
if (aVar2 != null) {
aVar2.k();
}
}
}
if (!kdVar.e) {
Thread.sleep(200L);
}
}
} else {
String unused2 = kd.b;
timer.cancel();
a aVar3 = aVar;
if (aVar3 != null) {
aVar3.l();
}
}
} catch (IllegalStateException unused3) {
a aVar4 = aVar;
if (aVar4 != null) {
aVar4.l();
}
}
if (kdVar.d) {
return;
}
} catch (InterruptedException unused4) {
a aVar5 = aVar;
if (aVar5 != null) {
aVar5.l();
return;
}
return;
}
} while (!kdVar.e);
}
}).start();
}
});
}
}
}
@Override
public final boolean onTouchEvent(MotionEvent motionEvent) {
float f;
float f2;
float f3;
float f4;
if (this.e == 1) {
aa aaVar = this.ar;
int actionMasked = motionEvent.getActionMasked();
if (actionMasked == 0) {
aaVar.e = motionEvent.getPointerId(motionEvent.getActionIndex());
aaVar.h = new JSONArray();
aaVar.h.put(new JSONArray((Collection) Arrays.asList(Float.valueOf(motionEvent.getX()), Float.valueOf(motionEvent.getY()))));
} else if (actionMasked == 1) {
aaVar.e = -1;
if (aaVar.h.length() > 5) {
aaVar.k.a(aaVar);
aaVar.h = new JSONArray();
}
} else if (actionMasked != 2) {
if (actionMasked == 3) {
aaVar.e = -1;
aaVar.f = -1;
} else if (actionMasked == 5) {
aaVar.f = motionEvent.getPointerId(motionEvent.getActionIndex());
aaVar.i = MotionEvent.obtain(motionEvent);
int findPointerIndex = motionEvent.findPointerIndex(aaVar.e);
int findPointerIndex2 = motionEvent.findPointerIndex(aaVar.f);
if (findPointerIndex >= 0) {
aaVar.c = motionEvent.getX(findPointerIndex);
aaVar.d = motionEvent.getY(findPointerIndex);
} else {
gl a2 = gl.a();
a2.a(new hm(new IllegalArgumentException("Index for mPtrID1=" + aaVar.e + " is" + findPointerIndex + " | Pointer count=" + motionEvent.getPointerCount())));
}
if (findPointerIndex2 >= 0) {
aaVar.a = motionEvent.getX(findPointerIndex2);
aaVar.b = motionEvent.getY(findPointerIndex2);
} else {
gl a3 = gl.a();
a3.a(new hm(new IllegalArgumentException("Index for mPtrID2=" + aaVar.f + " is" + findPointerIndex2 + " | Pointer count=" + motionEvent.getPointerCount())));
}
aaVar.j = aa.a(aaVar.c, aaVar.a, aaVar.d, aaVar.b);
} else if (actionMasked == 6) {
aaVar.f = -1;
if (aaVar.g > 30.0f) {
aaVar.k.a(aaVar.i, motionEvent);
aaVar.g = 0.0f;
}
if (Math.abs(aa.a(motionEvent.getX(), motionEvent.getX(1), motionEvent.getY(), motionEvent.getY(1)) - aaVar.j) > 500) {
aaVar.k.a(motionEvent);
aaVar.j = Integer.MAX_VALUE;
}
}
} else if (aaVar.e != -1 && aaVar.f != -1) {
int findPointerIndex3 = motionEvent.findPointerIndex(aaVar.e);
int findPointerIndex4 = motionEvent.findPointerIndex(aaVar.f);
if (findPointerIndex3 >= 0) {
float x = motionEvent.getX(findPointerIndex3);
f2 = motionEvent.getY(findPointerIndex3);
f = x;
} else {
gl a4 = gl.a();
a4.a(new hm(new IllegalArgumentException("Index for mPtrID1=" + aaVar.e + " is" + findPointerIndex3 + " | Pointer count=" + motionEvent.getPointerCount())));
f = 0.0f;
f2 = 0.0f;
}
if (findPointerIndex4 >= 0) {
float x2 = motionEvent.getX(findPointerIndex4);
f4 = motionEvent.getY(findPointerIndex4);
f3 = x2;
} else {
gl a5 = gl.a();
a5.a(new hm(new IllegalArgumentException("Index for mPtrID1=" + aaVar.f + " is" + findPointerIndex4 + " | Pointer count=" + motionEvent.getPointerCount())));
f3 = 0.0f;
f4 = 0.0f;
}
aaVar.g = Math.abs(aa.a(aaVar.a, aaVar.b, aaVar.c, aaVar.d, f3, f4, f, f2));
} else if (aaVar.e != -1 && aaVar.h.length() > 0 && aaVar.h.length() < 50) {
try {
float x3 = motionEvent.getX();
float y = motionEvent.getY();
JSONArray jSONArray = aaVar.h.getJSONArray(aaVar.h.length() - 1);
JSONArray jSONArray2 = new JSONArray((Collection) Arrays.asList(Float.valueOf(x3), Float.valueOf(y)));
if (aa.a(jSONArray.getInt(0), jSONArray2.getInt(0), jSONArray.getInt(1), jSONArray2.getInt(1)) > 100) {
aaVar.h.put(jSONArray2);
}
} catch (JSONException unused) {
}
}
}
this.as.onTouchEvent(motionEvent);
return super.onTouchEvent(motionEvent);
}
@Override
public final void onDetachedFromWindow() {
this.av.a();
getMediaProcessor().b();
getMediaProcessor().c();
getMediaProcessor().e();
try {
super.onDetachedFromWindow();
} catch (IllegalArgumentException unused) {
}
}
private void q() {
t();
s();
r();
}
private void r() {
byte b;
if (this.W != null) {
b = this.I.viewability.banner.impressionType;
} else {
b = this.I.viewability.interstitial.impressionType;
}
this.E = b;
}
private void s() {
if ("video".equals(this.z)) {
this.aq = this.I.viewability.video.impressionMinPercentageViewed;
} else {
this.aq = this.I.viewability.web.impressionMinPercentageViewed;
}
}
private void t() {
if ("video".equals(this.z)) {
this.ap = this.I.viewability.video.impressionMinTimeViewed;
} else {
this.ap = this.I.viewability.web.impressionMinTimeViewed;
}
}
public final byte getImpressionType() {
return this.E;
}
public void a(View view, boolean z) {
if (view instanceof q) {
if (hasWindowFocus()) {
e(z);
} else {
e(false);
}
}
}
public final void a(s sVar, AdConfig adConfig, boolean z, boolean z2) {
if (Build.VERSION.SDK_INT >= 21 && this.ae.equals("htmlUrl")) {
getSettings().setMixedContentMode(2);
}
this.I = adConfig;
if (this.af == null) {
q();
} else {
try {
q();
for (dy dyVar : this.af) {
if (dyVar.a == 2) {
if (dyVar.b.containsKey("type")) {
this.E = (byte) ((Integer) dyVar.b.get("type")).intValue();
} else {
r();
}
if (dyVar.b.containsKey(OSInfluenceConstants.TIME)) {
this.ap = ((Integer) dyVar.b.get(OSInfluenceConstants.TIME)).intValue();
} else {
t();
}
if (dyVar.b.containsKey("view")) {
this.aq = ((Integer) dyVar.b.get("view")).intValue();
} else {
s();
}
if (getImpressionType() == 2) {
if (dyVar.b.containsKey("pixel")) {
this.ao = ((Integer) dyVar.b.get("pixel")).intValue();
} else {
r();
}
if (dyVar.b.containsKey(TypedValues.Attributes.S_FRAME)) {
JSONArray jSONArray = (JSONArray) dyVar.b.get(TypedValues.Attributes.S_FRAME);
this.an = new int[jSONArray.length()];
for (int i = 0; i < jSONArray.length(); i++) {
this.an[i] = ((Integer) jSONArray.get(i)).intValue();
}
} else {
r();
}
}
}
}
} catch (JSONException unused) {
q();
} catch (Exception unused2) {
q();
}
}
this.at = new m(getContext(), new hv(this.c, this.ax, this.I.cctEnabled), this.ay, this.az);
this.H = sVar;
this.ah = z;
this.G = new WeakReference<>((ViewGroup) getParent());
this.aj = z2;
if (getRenderingConfig() != null) {
setBackgroundColor(getRenderingConfig().a());
}
if (getMraidConfig() != null) {
final de deVar = new de(getMraidConfig().url, getMraidConfig().maxRetries, getMraidConfig().retryInterval, getMraidConfig().expiry);
if (deVar.a != null) {
deVar.b = new hc(ShareTarget.METHOD_GET, deVar.a);
deVar.b.o = false;
deVar.b.t = false;
HashMap hashMap = new HashMap();
hashMap.put("Accept-Encoding", "gzip");
deVar.b.a(hashMap);
new Thread(new Runnable() {
@Override
public final void run() {
if (de.a(deVar)) {
int i2 = 0;
while (i2 <= deVar.d) {
String unused3 = de.c;
long elapsedRealtime = SystemClock.elapsedRealtime();
hd a2 = new hf(deVar.b).a();
try {
jl.a().a(deVar.b.g());
jl.a().b(a2.d());
jl.a().c(SystemClock.elapsedRealtime() - elapsedRealtime);
} catch (Exception unused4) {
String unused5 = de.c;
}
Context c = ic.c();
if (a2.a()) {
String unused6 = de.c;
i2++;
if (i2 > deVar.d) {
return;
}
try {
Thread.sleep(deVar.e * 1000);
} catch (InterruptedException unused7) {
String unused8 = de.c;
}
} else if (c != null) {
im imVar = new im(c, "mraid_js_store");
List<String> list = a2.c.get("Content-Encoding");
if (list != null && list.get(0).equals("gzip")) {
String unused9 = de.c;
byte[] a3 = ik.a(a2.c());
if (a3 != null) {
try {
imVar.b("mraid_js_string", new String(a3, C.UTF8_NAME));
String unused10 = de.c;
return;
} catch (UnsupportedEncodingException unused11) {
String unused12 = de.c;
String unused13 = de.c;
return;
}
}
return;
}
imVar.b("mraid_js_string", a2.b());
String unused14 = de.c;
return;
}
}
}
}
}).start();
}
}
if (Build.VERSION.SDK_INT >= 16) {
setImportantForAccessibility(2);
}
setScrollable(false);
if (Build.VERSION.SDK_INT >= 17) {
getSettings().setMediaPlaybackRequiresUserGesture(false);
}
getSettings().setJavaScriptEnabled(true);
getSettings().setGeolocationEnabled(true);
this.av.a = (short) (this.e == 0 ? this.I.rendering.bannerNetworkLoadsLimit : this.I.rendering.otherNetworkLoadsLimit);
setWebViewClient(this.av);
setWebChromeClient(this.aB);
addJavascriptInterface(new cu(this, this.e), "sdkController");
this.f = new dd(this, this.ae);
this.g = new dg(this);
this.h = new df(this);
this.K = new db();
this.L = new di(di.DEFAULT_POSITION, Boolean.TRUE);
}
public final int[] getViewableFrameArray() {
return this.an;
}
public final void setScrollable(boolean z) {
setScrollContainer(z);
setVerticalScrollBarEnabled(z);
setHorizontalScrollBarEnabled(z);
}
@Override
public final boolean c() {
return this.p.get();
}
public final void g() {
super.destroy();
}
@Override
public final void destroy() {
if (this.p.get()) {
return;
}
if (!this.O) {
this.O = true;
return;
}
this.p.set(true);
js jsVar = this.x;
if (jsVar != null) {
jsVar.e();
}
this.q = true;
this.V = -1;
removeJavascriptInterface("sdkController");
WeakReference<Activity> weakReference = this.b;
if (weakReference != null) {
weakReference.clear();
}
WeakReference<ViewGroup> weakReference2 = this.G;
if (weakReference2 != null) {
weakReference2.clear();
}
ea eaVar = this.ag;
if (eaVar != null) {
eaVar.d();
this.ag.e();
}
this.aw = null;
this.H = null;
this.v = null;
this.ab = null;
ViewParent parent = getParent();
if (parent != null) {
((ViewGroup) parent).removeView(this);
removeAllViews();
}
AdConfig.h hVar = this.I.viewability.omidConfig;
if (this.ai && hVar.omidEnabled && ex.a.a.a()) {
final fs fsVar = new fs(this, hVar.webViewRetainTime);
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
fv fvVar = fsVar;
fvVar.a(fvVar.a);
fsVar.a = null;
}
}, fsVar.b);
return;
}
super.destroy();
}
@Override
public final void a(byte b, Map<String, String> map) {
if (b != 2) {
return;
}
d("inmobi.recordEvent(120,null);");
}
public final x getEmbeddedBrowserJSCallbacks() {
return this.aw;
}
public final void setOrientationProperties(dh dhVar) {
this.au = dhVar;
p();
}
public final dh getOrientationProperties() {
return this.au;
}
public final void setReferenceContainer(j jVar) {
this.ab = jVar;
}
public final j getReferenceContainer() {
return this.ab;
}
@Override
public final AdConfig getAdConfig() {
return this.I;
}
@Override
public final ea getViewableAd() {
if (this.ag == null) {
this.ag = new ei(this, new eb(this), new ef(getImpressionType(), this.z, this.ap, this.aq));
Set<dy> set = this.af;
if (set != null) {
for (dy dyVar : set) {
try {
if (dyVar.a == 3) {
eq eqVar = (eq) dyVar.b.get("omidAdSession");
boolean z = dyVar.b.containsKey("deferred") && ((Boolean) dyVar.b.get("deferred")).booleanValue();
String str = (String) dyVar.b.get("customReferenceData");
if (z) {
eqVar.a(eu.a(this, getContentUrl(), str));
}
if (eqVar != null) {
this.ag = new eu(this, this.ag, eqVar);
}
}
} catch (Exception unused) {
}
}
}
}
return this.ag;
}
@Override
public final String getMarkupType() {
return this.ae;
}
public final void setMarkupType(String str) {
this.ae = str;
}
public final void a(String str) {
this.q = false;
if (this.p.get()) {
return;
}
loadDataWithBaseURL("", str, "text/html", C.UTF8_NAME, null);
}
public final void b(String str) {
this.q = false;
if (this.p.get()) {
return;
}
loadUrl(str);
}
@Override
public final void stopLoading() {
if (this.p.get()) {
return;
}
super.stopLoading();
}
public final void a(boolean z) {
d("window.imraidview.broadcastEvent('adLoadSuccess'," + z + ");");
}
public final void h() {
HashMap hashMap = new HashMap();
hashMap.put("creativeId", this.aa);
hashMap.put("impressionId", getImpressionId());
a("NetworkLoadLimitExceeded", hashMap);
}
private void f(boolean z) {
d("window.mraidview.broadcastEvent('viewableChange'," + z + ");");
}
public final void i() {
if ("video".equals(this.z) || "audio".equals(this.z)) {
return;
}
m();
d("window.imraidview.impressionRendered();");
getListener().i(this);
}
public final void b(String str, String str2, String str3) {
if (str == null || str3 == null) {
return;
}
a(str, "broadcastEvent('error',\"" + str2 + "\", \"" + str3 + "\")");
}
public final void a(String str, String str2) {
if (str == null) {
return;
}
d(str + "." + str2);
}
private void a(String str, Map<String, Object> map) {
getListener().a(str, map);
}
public final void d(final String str) {
new Handler(getContainerContext().getMainLooper()).postAtFrontOfQueue(new Runnable() {
@Override
public final void run() {
try {
if (q.this.p.get()) {
return;
}
String str2 = "javascript:try{" + str + "}catch(e){}";
String unused = q.D;
if (Build.VERSION.SDK_INT < 19) {
q.this.loadUrl(str2);
} else {
q.this.evaluateJavascript(str2, null);
}
} catch (Exception unused2) {
String unused3 = q.D;
}
}
});
}
public final void setUseCustomClose(boolean z) {
this.l = z;
}
public final void setCloseRegionDisabled(boolean z) {
this.m = z;
}
public final void setDisableBackButton(boolean z) {
this.n = z;
}
public final void b(boolean z) {
ct ctVar;
setCloseRegionDisabled(z);
View rootView = getRootView();
if (rootView == null || (ctVar = (ct) rootView.findViewById(i.e)) == null) {
return;
}
ctVar.setVisibility(this.m ? 8 : 0);
}
public final void c(boolean z) {
ct ctVar;
setUseCustomClose(z);
View rootView = getRootView();
if (rootView == null || (ctVar = (ct) rootView.findViewById(i.d)) == null) {
return;
}
ctVar.setVisibility(this.l ? 8 : 0);
}
@Override
public final void b() {
View rootView;
df dfVar = this.h;
if (dfVar.b != null) {
dfVar.b.a();
dfVar.b = null;
}
if (!"Expanded".equals(this.d)) {
if (!"Resized".equals(this.d)) {
if ("Default".equals(this.d)) {
setAndUpdateViewState("Hidden");
ViewParent parent = getParent();
if (1 == this.e) {
u();
} else if (parent instanceof ViewGroup) {
((ViewGroup) parent).removeAllViews();
}
}
} else if (!"Default".equals(this.d)) {
this.q = true;
dg dgVar = this.g;
ViewGroup viewGroup = dgVar.a.getParent() instanceof ViewGroup ? (ViewGroup) dgVar.a.getParent() : null;
View rootView2 = viewGroup == null ? null : viewGroup.getRootView();
View findViewById = rootView2 == null ? null : rootView2.findViewById(i.b);
View rootView3 = dgVar.b == null ? null : dgVar.b.getRootView();
View findViewById2 = rootView3 == null ? null : rootView3.findViewById(i.a);
ViewGroup viewGroup2 = findViewById2 == null ? null : (ViewGroup) findViewById2.getParent();
r2 = findViewById != null ? (ViewGroup) findViewById.getParent() : null;
if (r2 != null) {
r2.removeView(findViewById);
}
if (viewGroup2 != null) {
viewGroup2.removeView(findViewById2);
}
if (viewGroup != null) {
viewGroup.removeView(dgVar.a);
}
if (dgVar.b != null) {
dgVar.b.addView(dgVar.a, dgVar.c, new RelativeLayout.LayoutParams(dgVar.b.getWidth(), dgVar.b.getHeight()));
}
dgVar.a.v();
setAndUpdateViewState("Default");
getListener().b_(this);
this.q = false;
}
} else {
if (!"Default".equals(this.d)) {
this.q = true;
dd ddVar = this.f;
if (ddVar.a.getOriginalRenderView() == null && ddVar.c != null && (rootView = ddVar.c.getRootView()) != null) {
View findViewById3 = rootView.findViewById(i.a);
((ViewGroup) ddVar.a.getParent()).removeView(ddVar.a);
if (findViewById3 != null && (findViewById3.getParent() instanceof ViewGroup)) {
r2 = (ViewGroup) findViewById3.getParent();
}
if (r2 != null) {
r2.removeView(findViewById3);
}
ddVar.c.addView(ddVar.a, ddVar.d, new RelativeLayout.LayoutParams(ddVar.c.getWidth(), ddVar.c.getHeight()));
ddVar.a.v();
}
u();
this.q = false;
}
this.O = false;
}
if (this.v != null && d()) {
this.v.a(this, this.b.get());
}
this.av.a();
}
private void u() {
InMobiAdActivity.a((Object) this);
Activity fullScreenActivity = getFullScreenActivity();
if (fullScreenActivity != null) {
k kVar = this.v;
if (kVar == null || !kVar.b(this)) {
((InMobiAdActivity) fullScreenActivity).b = true;
fullScreenActivity.finish();
int i = this.V;
if (i != -1) {
fullScreenActivity.overridePendingTransition(0, i);
return;
}
return;
}
return;
}
if (this.e == 0) {
setAndUpdateViewState("Default");
q qVar = this.F;
if (qVar != null) {
qVar.setAndUpdateViewState("Default");
}
} else if ("Default".equals(this.d)) {
setAndUpdateViewState("Hidden");
}
getListener().b_(this);
}
public final void setExitAnimation(int i) {
this.V = i;
}
public final void setRenderViewEventListener(s sVar) {
this.H = sVar;
}
public final s getListener() {
s sVar = this.H;
if (sVar == null) {
s sVar2 = a;
this.H = sVar2;
return sVar2;
}
return sVar;
}
public final String getViewState() {
return this.d;
}
public final df getMediaProcessor() {
return this.h;
}
public final db getExpandProperties() {
return this.K;
}
public final di getResizeProperties() {
return this.L;
}
public final void setResizeProperties(di diVar) {
this.L = diVar;
}
public final void setAndUpdateViewState(String str) {
this.d = str;
String lowerCase = str.toLowerCase(Locale.ENGLISH);
d("window.mraidview.broadcastEvent('stateChange','" + lowerCase + "');");
}
private void v() {
setVisibility(0);
requestLayout();
}
public final String getMraidJsString() {
String b = new im(getContext(), "mraid_js_store").b("mraid_js_string");
return b == null ? "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.getSdkVersion().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}}})();\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_\"+\nc,g),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.dismissSKOverlay=b.dismissSKOverlay;a.supports=function(a){return b.supports(a)};a.isDeviceMuted=function(){return!imIsObjValid(a.listeners.deviceMuted)?\n-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=b.showAd;a.timeSinceShow=b.timeSinceShow;a.closeAll=\nb.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;a.openWithoutTracker=b.openWithoutTracker;a.impressionRendered=\nb.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})();\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" : b;
}
@Override
public final void a() {
this.S = false;
try {
getClass().getMethod("setLayerType", Integer.TYPE, Paint.class).invoke(this, 1, null);
} catch (IllegalAccessException | IllegalArgumentException | NoSuchMethodException | InvocationTargetException unused) {
}
}
public final boolean e(String str) {
str.hashCode();
char c = 65535;
switch (str.hashCode()) {
case -1886160473:
if (str.equals(MraidJsMethods.PLAY_VIDEO)) {
c = 0;
break;
}
break;
case -1647691422:
if (str.equals("inlineVideo")) {
c = 1;
break;
}
break;
case 1509574865:
if (str.equals("html5video")) {
c = 2;
break;
}
break;
case 1642189884:
if (str.equals("saveContent")) {
c = 3;
break;
}
break;
}
switch (c) {
case 0:
case 3:
return true;
case 1:
case 2:
return this.J && this.S;
default:
return false;
}
}
public final boolean j() {
AdConfig.i renderingConfig = getRenderingConfig();
if (renderingConfig == null) {
return false;
}
return !renderingConfig.autoRedirectionEnforcement || this.ac || ((this.ad > (-1L) ? 1 : (this.ad == (-1L) ? 0 : -1)) != 0 && ((SystemClock.elapsedRealtime() - this.ad) > (renderingConfig.userTouchResetTime * 1000) ? 1 : ((SystemClock.elapsedRealtime() - this.ad) == (renderingConfig.userTouchResetTime * 1000) ? 0 : -1)) < 0);
}
@Override
public final void a(String str, String str2, String str3) {
a(str, str2 + "(" + str3 + ");");
}
public final void setCloseEndCardTracker(String str) {
fq fqVar;
ck ckVar;
j referenceContainer = getReferenceContainer();
if (!(referenceContainer instanceof o) || (fqVar = (fq) ((o) referenceContainer).getVideoContainerView()) == null || (ckVar = (ck) fqVar.getVideoView().getTag()) == null || ckVar.b() == null || ckVar.b().f() == null) {
return;
}
ckVar.b().f().a(new cj(str, 0, "closeEndCard", null));
}
@Override
public final void k() {
if (this.p.get()) {
return;
}
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public final void run() {
q.this.getListener().f();
}
});
}
@Override
public final void l() {
if (this.p.get()) {
return;
}
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public final void run() {
q.this.getListener().g();
}
});
}
public final int getCurrentRenderingPodAdIndex() {
k kVar = this.v;
if (kVar != null) {
return kVar.a(this);
}
return 0;
}
public final JSONArray getRenderableAdIndexes() {
k kVar = this.v;
if (kVar != null) {
return kVar.c();
}
return new JSONArray();
}
public final void m() {
js jsVar = this.x;
if (jsVar != null) {
jsVar.a();
}
}
public final long getShowTimeStamp() {
k kVar = this.v;
if (kVar != null) {
return kVar.d();
}
return 0L;
}
public final void d(boolean z) {
getCurrentRenderingPodAdIndex();
d("window.imraidview.broadcastEvent('adShowSuccess'," + z + ");");
}
public final void n() {
js jsVar = this.x;
if (jsVar != null) {
jsVar.b();
}
d("window.mraidview.onUserInteraction();");
getListener().h(this);
}
public final String getLandingScheme() {
return this.ax;
}
public final m getLandingPageHandler() {
return this.at;
}
public final void c(String str, String str2, String str3) {
d("window.imraid.broadcastEvent('onUserLandingCompleted');");
if (str2 == null) {
return;
}
a(str2, "broadcastEvent('" + str + "Successful','" + str3 + "');");
}
public final void c(String str) {
d("window.mraidview.fireRedirectFraudBeacon('" + str + "')");
String str2 = this.W != null ? "banner" : "int";
HashMap hashMap = new HashMap();
hashMap.put("creativeId", this.aa);
hashMap.put("trigger", str);
hashMap.put("impressionId", getImpressionId());
hashMap.put("adType", str2);
a("BlockAutoRedirection", hashMap);
}
public final void setExpandProperties(db dbVar) {
if (dbVar.b) {
setUseCustomClose(dbVar.a);
}
this.K = dbVar;
}
static boolean a(q qVar, JsResult jsResult) {
AdConfig.i renderingConfig = qVar.getRenderingConfig();
if (renderingConfig == null || !renderingConfig.shouldRenderPopup) {
jsResult.cancel();
qVar.d("window.mraidview.popupBlocked('popupBlocked')");
return false;
}
return true;
}
}