导航菜单

页面标题

页面副标题

Zepto v25.1.4 - C0293p5.java 源代码

正在查看: Zepto v25.1.4 应用的 C0293p5.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.inmobi.media;

import android.R;
import android.app.Activity;
import android.content.Context;
import android.media.AudioManager;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.webkit.JavascriptInterface;
import android.webkit.URLUtil;
import android.widget.FrameLayout;
import com.swmansion.reanimated.layoutReanimation.Snapshot;
import in.juspay.hyper.constants.LogSubCategory;
import in.juspay.hypersdk.core.PaymentConstants;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.MapsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.npci.upi.security.pinactivitycomponent.CLConstants;

public final class C0293p5 {
    public final S9 a;
    public final int b;
    public C0146e9 c;

    public A4 f1103d;

    public C0293p5(int i2, S9 mRenderView) {
        Intrinsics.checkNotNullParameter(mRenderView, "mRenderView");
        this.a = mRenderView;
        this.b = i2;
    }

    public static final void a(C0293p5 this$0, String str, String str2) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            this$0.a.e(str);
        } catch (Exception e2) {
            this$0.a.a(str2, "Unexpected error", "expand");
            Z5.a((byte) 1, "InMobi", "Failed to expand ad; SDK encountered an unexpected error");
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str3 = AbstractC0306q5.a;
                ((B4) a4).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling expand() request; ")));
            }
        }
    }

    public static final void b(C0293p5 this$0, String str, String str2) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        this$0.a.getLandingPageHandler().a("open", str, str2, true);
    }

    public static final void c(C0293p5 this$0, String str, String str2) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            this$0.a.getLandingPageHandler().e("openEmbedded", str, str2);
        } catch (Exception e2) {
            this$0.a.a(str, "Unexpected error", "openEmbedded");
            Z5.a((byte) 1, "InMobi", "Failed to open URL; SDK encountered unexpected error");
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str3 = AbstractC0306q5.a;
                ((B4) a4).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling openEmbedded() request from creative; ")));
            }
        }
    }

    public static final void d(C0293p5 this$0, String str, String str2) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        this$0.a.getLandingPageHandler().a("openWithoutTracker", str, str2, true);
    }

    public static final void e(C0293p5 this$0, String str, String str2) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            S9 s9 = this$0.a;
            int length = str2.length() - 1;
            int i2 = 0;
            boolean z = false;
            while (i2 <= length) {
                boolean z2 = Intrinsics.h(str2.charAt(!z ? i2 : length), 32) <= 0;
                if (z) {
                    if (!z2) {
                        break;
                    } else {
                        length--;
                    }
                } else if (z2) {
                    i2++;
                } else {
                    z = true;
                }
            }
            s9.b(str, str2.subSequence(i2, length + 1).toString());
        } catch (Exception e2) {
            this$0.a.a(str, "Unexpected error", "playVideo");
            Z5.a((byte) 1, "InMobi", "Error playing video; SDK encountered an unexpected error");
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str3 = AbstractC0306q5.a;
                ((B4) a4).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling playVideo() request from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void asyncPing(@Nullable String str, @NotNull String url) {
        Intrinsics.checkNotNullParameter(url, "url");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).a(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "asyncPing called: ", url));
        }
        if (!URLUtil.isValidUrl(url)) {
            this.a.a(str, "Invalid url", "asyncPing");
            return;
        }
        try {
            G8 g8 = new G8(url, this.f1103d);
            g8.x = false;
            g8.t = false;
            g8.u = false;
            g8.a(new Z0(new C0082a1(g8, new C0280o5(this))));
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "asyncPing");
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                ((B4) a42).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered internal error in handling asyncPing() request from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void cancelSaveContent(@Nullable String str, @NotNull String mediaId) {
        Intrinsics.checkNotNullParameter(mediaId, "mediaId");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).a(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "cancelSaveContent called. mediaId:", mediaId));
        }
    }

    @JavascriptInterface
    public final void close(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "close called");
        }
        new Handler(this.a.getContainerContext().getMainLooper()).post(new ye(this, str, 1));
    }

    @JavascriptInterface
    public final void closeAll(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "closeAll is called");
        }
        S9 s9 = this.a;
        A4 a42 = s9.f748j;
        if (a42 != null) {
            String str3 = S9.O0;
            ((B4) a42).a(str3, G9.a(s9, str3, "TAG", "closeAll "));
        }
        K k2 = s9.d0;
        if (k2 != null) {
            k2.b();
        }
        Activity activity = (Activity) s9.f751m.get();
        if (activity != null) {
            activity.finish();
        }
    }

    @JavascriptInterface
    public final void closeCustomExpand(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "closeCustomExpand called.");
        }
        if (this.b != 1) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                StringBuilder a = A5.a(str3, "access$getTAG$p(...)", "closeCustomExpand called in incorrect Ad type: ");
                a.append(this.b);
                ((B4) a42).b(str3, a.toString());
                return;
            }
            return;
        }
        if (this.a != null) {
            new Handler(this.a.getContainerContext().getMainLooper()).post(new af(this, 0));
            return;
        }
        A4 a43 = this.f1103d;
        if (a43 != null) {
            String str4 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
            ((B4) a43).b(str4, "Found a null instance of render view!");
        }
    }

    @JavascriptInterface
    public final void customExpand(@Nullable final String str, @Nullable final String str2, final int i2, final float f2, boolean z, final boolean z2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "customExpand called");
        }
        if (this.b != 1) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str4 = AbstractC0306q5.a;
                StringBuilder a = A5.a(str4, "access$getTAG$p(...)", "customExpand called in incorrect Ad type: ");
                a.append(this.b);
                ((B4) a42).b(str4, a.toString());
                return;
            }
            return;
        }
        if (str2 != null) {
            int length = str2.length() - 1;
            int i3 = 0;
            boolean z3 = false;
            while (i3 <= length) {
                boolean z4 = Intrinsics.h(str2.charAt(!z3 ? i3 : length), 32) <= 0;
                if (z3) {
                    if (!z4) {
                        break;
                    } else {
                        length--;
                    }
                } else if (z4) {
                    i3++;
                } else {
                    z3 = true;
                }
            }
            if (str2.subSequence(i3, length + 1).toString().length() != 0) {
                if (i2 < 0 || i2 >= EnumC0265n3.values().length) {
                    this.a.a(str, "Invalid inputType", "customExpand");
                    return;
                } else if (f2 < 0.0f || f2 > 1.0f) {
                    this.a.a(str, "Invalid screenPercentage", "customExpand");
                    return;
                } else {
                    this.a.getLandingPageHandler().a("clickStartCalled", MapsKt.j(new Pair("trigger", this.a.getLandingPageHandler().a(str2))));
                    new Handler(this.a.getContainerContext().getMainLooper()).post(new Runnable() {
                        @Override
                        public final void run() {
                            C0293p5.a(C0293p5.this, str2, i2, str, f2, z2);
                        }
                    });
                    return;
                }
            }
        }
        this.a.a(str, "Invalid " + i2, "customExpand");
    }

    @JavascriptInterface
    public final void disableBackButton(@Nullable String str, boolean z) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "disableBackButton called");
        }
        S9 s9 = this.a;
        if (s9 != null) {
            s9.setDisableBackButton(z);
            return;
        }
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a42).b(str3, "Found a null instance of render view!");
        }
    }

    @JavascriptInterface
    public final void disableCloseRegion(@Nullable String str, boolean z) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "disableCloseRegion called");
        }
        if (this.a != null) {
            new Handler(this.a.getContainerContext().getMainLooper()).post(new ze(this, z, str, 0));
            return;
        }
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a42).b(str3, "Found a null instance of render view!");
        }
    }

    @JavascriptInterface
    public final void expand(@Nullable String str, @Nullable String str2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "expand called");
        }
        if (this.b != 1) {
            S9 s9 = this.a;
            if (s9 == null) {
                A4 a42 = this.f1103d;
                if (a42 != null) {
                    String str4 = AbstractC0306q5.a;
                    Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                    ((B4) a42).b(str4, "Found a null instance of render view!");
                    return;
                }
                return;
            }
            if (!s9.k()) {
                this.a.a("expand");
                return;
            }
            A4 a43 = this.f1103d;
            if (a43 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a43).a(str5, AbstractC0422z5.a(str5, "access$getTAG$p(...)", "expand called. Url:", str2));
            }
            S9 s92 = this.a;
            if (s92.E != oc.c) {
                s92.a(str, "Creative is not visible. Ignoring request.", "expand");
                return;
            }
            if (str2 != null && str2.length() > 0 && !StringsKt.L(str2, "http", false)) {
                this.a.a(str, "Invalid URL", "expand");
                return;
            }
            if (URLUtil.isValidUrl(str2)) {
                this.a.i();
            }
            new Handler(this.a.getContainerContext().getMainLooper()).post(new xe(this, str2, str, 3));
        }
    }

    @JavascriptInterface
    public final void fireAdFailed(@Nullable String str) {
        try {
            A4 a4 = this.f1103d;
            if (a4 != null) {
                String str2 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
                ((B4) a4).a(str2, "fireAdFailed called.");
            }
            S9 s9 = this.a;
            Z9 z9 = s9.T;
            if (z9 != null) {
                Map a = z9.a();
                long j2 = z9.b;
                ScheduledExecutorService scheduledExecutorService = Vb.a;
                a.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j2));
                C0148eb c0148eb = C0148eb.a;
                C0148eb.b("FireAdFailed", a, EnumC0218jb.a);
            }
            s9.getListener().g(s9);
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "fireAdFailed");
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                ((B4) a42).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling fireAdFailed() signal from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void fireAdReady(@Nullable String str) {
        try {
            A4 a4 = this.f1103d;
            if (a4 != null) {
                String str2 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
                ((B4) a4).a(str2, "fireAdReady called.");
            }
            this.a.h();
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "fireAdReady");
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                ((B4) a42).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling fireAdReady() signal from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void fireComplete(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "fireComplete is called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        A4 a43 = s9.f748j;
        if (a43 != null) {
            String str4 = S9.O0;
            ((B4) a43).c(str4, G9.a(s9, str4, "TAG", "completeFromInterActive "));
        }
        A2 a2 = s9.H0;
        if (a2 != null && !a2.f494g.get()) {
            a2.f491d.f539i = 1;
            Intrinsics.e(a2.c);
        }
        A4 a44 = s9.f748j;
        if (a44 != null) {
            String TAG = S9.O0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            ((B4) a44).a(TAG, "completeFromInterActive");
        }
    }

    @JavascriptInterface
    public final void fireSkip(@Nullable String str) {
        A4 a4;
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a42).a(str2, "fireSkip is called");
        }
        if (this.a == null && (a4 = this.f1103d) != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).b(str3, "Found a null instance of render view!");
        }
        S9 s9 = this.a;
        A4 a43 = s9.f748j;
        if (a43 != null) {
            String str4 = S9.O0;
            ((B4) a43).c(str4, G9.a(s9, str4, "TAG", "skipFromInterActive "));
        }
        A2 a2 = s9.H0;
        if (a2 != null && !a2.f494g.get()) {
            a2.f491d.f538h = 1;
            Intrinsics.e(a2.c);
        }
        A4 a44 = s9.f748j;
        if (a44 != null) {
            String TAG = S9.O0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            ((B4) a44).a(TAG, "skipFromInterActive");
        }
    }

    @JavascriptInterface
    @Nullable
    public final String getAdContext(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getAdContext is called");
        }
        K adPodHandler = this.a.getAdPodHandler();
        if (adPodHandler != null) {
            return ((AbstractC0378w0) adPodHandler).K();
        }
        return null;
    }

    @JavascriptInterface
    public final void getBlob(@Nullable String str, @Nullable String str2) {
        F1 f1;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "getBlob is called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a42).b(str4, "Found a null instance of render view!");
                return;
            }
            return;
        }
        A4 a43 = s9.f748j;
        if (a43 != null) {
            String TAG = S9.O0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            ((B4) a43).a(TAG, "getBlob");
        }
        if (str == null || str2 == null || (f1 = s9.W) == null) {
            return;
        }
        ((AbstractC0378w0) f1).a(str, str2, s9, s9.getImpressionId());
    }

    @JavascriptInterface
    @NotNull
    public final String getCurrentPosition(@Nullable String str) {
        S9 s9;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getCurrentPosition called");
        }
        S9 s92 = this.a;
        if (s92 == null) {
            A4 a42 = this.f1103d;
            if (a42 == null) {
                return "";
            }
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a42).b(str3, "Found a null instance of render view!");
            return "";
        }
        synchronized (s92.getCurrentPositionMonitor()) {
            this.a.B = true;
            new Handler(this.a.getContainerContext().getMainLooper()).post(new af(this, 2));
            while (true) {
                s9 = this.a;
                if (s9.B) {
                    try {
                        s9.getCurrentPositionMonitor().wait();
                    } catch (InterruptedException unused) {
                    }
                } else {
                    Unit unit = Unit.a;
                }
            }
        }
        return s9.getCurrentPosition();
    }

    @JavascriptInterface
    public final int getCurrentRenderingIndex(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getCurrentRenderingIndex is called");
        }
        return this.a.getCurrentRenderingPodAdIndex();
    }

    @JavascriptInterface
    @NotNull
    public final String getDefaultPosition(@Nullable String str) {
        S9 s9;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getDefaultPosition called");
        }
        S9 s92 = this.a;
        if (s92 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
            }
            String jSONObject = new JSONObject().toString();
            Intrinsics.checkNotNullExpressionValue(jSONObject, "toString(...)");
            return jSONObject;
        }
        synchronized (s92.getDefaultPositionMonitor()) {
            this.a.A = true;
            new Handler(this.a.getContainerContext().getMainLooper()).post(new af(this, 1));
            while (true) {
                s9 = this.a;
                if (s9.A) {
                    try {
                        s9.getDefaultPositionMonitor().wait();
                    } catch (InterruptedException unused) {
                    }
                } else {
                    Unit unit = Unit.a;
                }
            }
        }
        return s9.getDefaultPosition();
    }

    @JavascriptInterface
    public final int getDeviceVolume(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getDeviceVolume called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
            }
            return -1;
        }
        try {
            C0410y6 mediaProcessor = s9.getMediaProcessor();
            if (mediaProcessor != null) {
                return mediaProcessor.a();
            }
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "getDeviceVolume");
            A4 a43 = this.f1103d;
            if (a43 != null) {
                String str4 = AbstractC0306q5.a;
                ((B4) a43).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling getDeviceVolume() request from creative; ")));
            }
        }
        return -1;
    }

    @JavascriptInterface
    @NotNull
    public final String getExpandProperties(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getExpandedProperties called");
        }
        S9 s9 = this.a;
        if (s9 != null) {
            I3 expandProperties = s9.getExpandProperties();
            Intrinsics.e(expandProperties);
            return expandProperties.b;
        }
        A4 a42 = this.f1103d;
        if (a42 == null) {
            return "";
        }
        String str3 = AbstractC0306q5.a;
        Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
        ((B4) a42).b(str3, "Found a null instance of render view!");
        return "";
    }

    @JavascriptInterface
    public final int getMaxDeviceVolume(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getMaxDeviceVolume called");
        }
        try {
            return C0098b3.a.m();
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "getMaxDeviceVolume");
            A4 a42 = this.f1103d;
            if (a42 == null) {
                return 0;
            }
            String str3 = AbstractC0306q5.a;
            ((B4) a42).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling getMaxDeviceVolume() request from creative; ")));
            return 0;
        }
    }

    @JavascriptInterface
    @NotNull
    public final String getMaxSize(@Nullable String str) {
        int i2;
        int i3;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getMaxSize called");
        }
        JSONObject jSONObject = new JSONObject();
        try {
            Activity fullScreenActivity = this.a.getFullScreenActivity();
            if (fullScreenActivity == null) {
                Context containerContext = this.a.getContainerContext();
                if ((containerContext instanceof Activity ? (Activity) containerContext : null) == null) {
                    return getScreenSize(str);
                }
                Context containerContext2 = this.a.getContainerContext();
                Intrinsics.f(containerContext2, "null cannot be cast to non-null type android.app.Activity");
                fullScreenActivity = (Activity) containerContext2;
            }
            FrameLayout frameLayout = (FrameLayout) fullScreenActivity.findViewById(R.id.content);
            int a = AbstractC0224k3.a(frameLayout.getWidth());
            int a2 = AbstractC0224k3.a(frameLayout.getHeight());
            if (this.a.getFullScreenActivity() != null && (a == 0 || a2 == 0)) {
                ViewTreeObserverOnGlobalLayoutListenerC0267n5 viewTreeObserverOnGlobalLayoutListenerC0267n5 = new ViewTreeObserverOnGlobalLayoutListenerC0267n5(frameLayout, this.f1103d);
                frameLayout.getViewTreeObserver().addOnGlobalLayoutListener(viewTreeObserverOnGlobalLayoutListenerC0267n5);
                Boolean bool = Boolean.FALSE;
                synchronized (bool) {
                    try {
                        bool.wait();
                    } catch (InterruptedException unused) {
                    }
                    i2 = viewTreeObserverOnGlobalLayoutListenerC0267n5.c;
                    i3 = viewTreeObserverOnGlobalLayoutListenerC0267n5.f1091d;
                    Unit unit = Unit.a;
                }
                a2 = i3;
                a = i2;
            }
            try {
                jSONObject.put(Snapshot.WIDTH, a);
                jSONObject.put(Snapshot.HEIGHT, a2);
            } catch (JSONException e2) {
                A4 a42 = this.f1103d;
                if (a42 != null) {
                    String str3 = AbstractC0306q5.a;
                    Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                    ((B4) a42).a(str3, "Error while creating max size Json.", e2);
                }
            }
            A4 a43 = this.f1103d;
            if (a43 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a43).a(str4, "getMaxSize called:" + jSONObject);
            }
        } catch (Exception e3) {
            this.a.a(str, "Unexpected error", "getMaxSize");
            A4 a44 = this.f1103d;
            if (a44 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a44).b(str5, Cc.a(e3, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling getMaxSize() request from creative; ")));
            }
        }
        String jSONObject2 = jSONObject.toString();
        Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString(...)");
        return jSONObject2;
    }

    @JavascriptInterface
    @NotNull
    public final String getOrientation(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getOrientation called");
        }
        byte g2 = AbstractC0224k3.g();
        return g2 == 1 ? "0" : g2 == 3 ? "90" : g2 == 2 ? "180" : g2 == 4 ? "270" : "-1";
    }

    @JavascriptInterface
    @NotNull
    public final String getOrientationProperties(@Nullable String str) {
        C0146e9 c0146e9 = this.c;
        String str2 = c0146e9 != null ? c0146e9.f926d : null;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            ((B4) a4).a(str3, AbstractC0422z5.a(str3, "access$getTAG$p(...)", "getOrientationProperties called: ", str2));
        }
        Intrinsics.e(str2);
        return str2;
    }

    @JavascriptInterface
    @NotNull
    public final String getPlacementType(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getPlacementType called");
        }
        return 1 == this.b ? "interstitial" : "inline";
    }

    @JavascriptInterface
    @NotNull
    public final String getPlatform(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 == null) {
            return LogSubCategory.LifeCycle.ANDROID;
        }
        String str2 = AbstractC0306q5.a;
        Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
        ((B4) a4).a(str2, "getPlatform. Platform:android");
        return LogSubCategory.LifeCycle.ANDROID;
    }

    @JavascriptInterface
    @NotNull
    public final String getPlatformVersion(@Nullable String str) {
        String valueOf = String.valueOf(Build.VERSION.SDK_INT);
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).a(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "getPlatformVersion. Version:", valueOf));
        }
        return valueOf;
    }

    @JavascriptInterface
    @NotNull
    public final String getRenderableAdIndexes(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getRenderableAdIndexes is called");
        }
        JSONArray renderableAdIndexes = this.a.getRenderableAdIndexes();
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a42).a(str3, "renderableAdIndexes called:" + renderableAdIndexes);
        }
        String jSONArray = renderableAdIndexes.toString();
        Intrinsics.checkNotNullExpressionValue(jSONArray, "toString(...)");
        return jSONArray;
    }

    @JavascriptInterface
    @NotNull
    public final String getResizeProperties(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getResizeProperties called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
            }
            return "";
        }
        C0245la resizeProperties = s9.getResizeProperties();
        if (resizeProperties == null) {
            return "";
        }
        JSONObject a = new C0254m5().a(resizeProperties);
        String jSONObject = a != null ? a.toString() : null;
        return jSONObject == null ? "" : jSONObject;
    }

    @JavascriptInterface
    @Nullable
    public final String getSafeArea(@Nullable String str) {
        S9 s9 = this.a;
        if (!s9.D0) {
            return null;
        }
        Integer navBarTypeViaSettings = s9.getNavBarTypeViaSettings();
        if (navBarTypeViaSettings == null) {
            navBarTypeViaSettings = this.a.getNavBarTypeViaInsets();
        }
        JSONObject jSONObject = this.a.getSafeArea().get(navBarTypeViaSettings);
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getSafeArea called:" + jSONObject);
        }
        if (jSONObject != null) {
            return jSONObject.toString();
        }
        return null;
    }

    @JavascriptInterface
    @NotNull
    public final String getScreenSize(@Nullable String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(Snapshot.WIDTH, AbstractC0224k3.h().a);
            jSONObject.put(Snapshot.HEIGHT, AbstractC0224k3.h().b);
        } catch (JSONException unused) {
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "getScreenSize");
            A4 a4 = this.f1103d;
            if (a4 != null) {
                String str2 = AbstractC0306q5.a;
                ((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered unexpected error while getting screen dimensions; ")));
            }
        }
        String jSONObject2 = jSONObject.toString();
        Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString(...)");
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str3 = AbstractC0306q5.a;
            ((B4) a42).a(str3, AbstractC0422z5.a(str3, "access$getTAG$p(...)", "getScreenSize called:", jSONObject2));
        }
        return jSONObject2;
    }

    @JavascriptInterface
    @NotNull
    public final String getSdkVersion(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 == null) {
            return "10.7.8";
        }
        String str2 = AbstractC0306q5.a;
        Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
        ((B4) a4).a(str2, "getSdkVersion called. Version:10.7.8");
        return "10.7.8";
    }

    @JavascriptInterface
    public final long getShowTimeStamp(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "getShowTimeStamp is called");
        }
        long showTimeStamp = this.a.getShowTimeStamp();
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a42).a(str3, "getShowTimeStamp is " + showTimeStamp);
        }
        return showTimeStamp;
    }

    @JavascriptInterface
    @NotNull
    public final String getState(@Nullable String str) {
        String viewState = this.a.getViewState();
        Locale locale = Locale.ENGLISH;
        String w = androidx.fragment.app.a.w(locale, "ENGLISH", viewState, locale, "this as java.lang.String).toLowerCase(locale)");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).c(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "getState called:", w));
        }
        return w;
    }

    @JavascriptInterface
    @NotNull
    public final String getVersion(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 == null) {
            return "2.0";
        }
        String str2 = AbstractC0306q5.a;
        Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
        ((B4) a4).a(str2, "getVersion called. Version:2.0");
        return "2.0";
    }

    @JavascriptInterface
    public final void impressionFired(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "impressionFired is called");
        }
        S9 s9 = this.a;
        A4 a42 = s9.f748j;
        if (a42 != null) {
            String str3 = S9.O0;
            ((B4) a42).a(str3, G9.a(s9, str3, "TAG", "onImpressionFired "));
        }
        A4 a43 = s9.f748j;
        if (a43 != null) {
            String str4 = S9.O0;
            ((B4) a43).a(str4, G9.a(s9, str4, "TAG", "recordContextualData "));
        }
        A2 a2 = s9.H0;
        if (a2 != null) {
            a2.a();
        }
        s9.getListener().a(s9.getTelemetryOnAdImpression());
    }

    @JavascriptInterface
    public final void incentCompleted(@Nullable String str, @Nullable String str2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            ((B4) a4).a(str3, AbstractC0422z5.a(str3, "access$getTAG$p(...)", "incentCompleted called. IncentData:", str2));
        }
        if (str2 == null) {
            try {
                this.a.getListener().b(new HashMap());
                return;
            } catch (Exception e2) {
                this.a.a(str, "Unexpected error", "incentCompleted");
                A4 a42 = this.f1103d;
                if (a42 != null) {
                    String str4 = AbstractC0306q5.a;
                    ((B4) a42).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling onUserInteraction() signal from creative; ")));
                    return;
                }
                return;
            }
        }
        try {
            JSONObject jSONObject = new JSONObject(str2);
            HashMap hashMap = new HashMap();
            Iterator<String> keys = jSONObject.keys();
            Intrinsics.checkNotNullExpressionValue(keys, "keys(...)");
            while (keys.hasNext()) {
                String next = keys.next();
                Intrinsics.f(next, "null cannot be cast to non-null type kotlin.String");
                String str5 = next;
                Object obj = jSONObject.get(str5);
                Intrinsics.e(obj);
                hashMap.put(str5, obj);
            }
            try {
                try {
                    this.a.getListener().b(hashMap);
                } catch (Exception e3) {
                    this.a.a(str, "Unexpected error", "incentCompleted");
                    A4 a43 = this.f1103d;
                    if (a43 != null) {
                        String str6 = AbstractC0306q5.a;
                        Intrinsics.checkNotNullExpressionValue(str6, "access$getTAG$p(...)");
                        ((B4) a43).b(str6, "SDK encountered unexpected error in handling onUserInteraction() signal from creative; " + e3.getMessage());
                    }
                }
            } catch (Exception e4) {
                this.a.a(str, "Unexpected error", "incentCompleted");
                A4 a44 = this.f1103d;
                if (a44 != null) {
                    String str7 = AbstractC0306q5.a;
                    ((B4) a44).b(str7, Cc.a(e4, A5.a(str7, "access$getTAG$p(...)", "SDK encountered unexpected error in handling onUserInteraction() signal from creative; ")));
                }
            }
        } catch (JSONException unused) {
            this.a.getListener().b(new HashMap());
        }
    }

    @JavascriptInterface
    public final boolean isBackButtonDisabled(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "isBackButtonDisabled called");
        }
        S9 s9 = this.a;
        if (s9 != null) {
            return s9.G;
        }
        A4 a42 = this.f1103d;
        if (a42 == null) {
            return false;
        }
        String str3 = AbstractC0306q5.a;
        Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
        ((B4) a42).b(str3, "Found a null instance of render view!");
        return false;
    }

    @JavascriptInterface
    @NotNull
    public final String isDeviceMuted(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "isDeviceMuted called");
        }
        if (this.a == null) {
            A4 a42 = this.f1103d;
            if (a42 == null) {
                return "false";
            }
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a42).b(str3, "Found a null instance of render view!");
            return "false";
        }
        A4 a43 = this.f1103d;
        if (a43 != null) {
            String str4 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
            ((B4) a43).a(str4, "JavaScript called: isDeviceMuted()");
        }
        boolean z = false;
        try {
            C0410y6 mediaProcessor = this.a.getMediaProcessor();
            Intrinsics.e(mediaProcessor);
            A4 a44 = mediaProcessor.b;
            if (a44 != null) {
                ((B4) a44).c("MraidMediaProcessor", "isVolumeMuted");
            }
            Context d2 = Ha.d();
            if (d2 != null) {
                Object systemService = d2.getSystemService("audio");
                AudioManager audioManager = systemService instanceof AudioManager ? (AudioManager) systemService : null;
                if (audioManager != null) {
                    if (2 != audioManager.getRingerMode()) {
                        z = true;
                    }
                }
            }
        } catch (Exception e2) {
            A4 a45 = this.f1103d;
            if (a45 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a45).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in checking if device is muted; ")));
            }
        }
        return String.valueOf(z);
    }

    @JavascriptInterface
    @NotNull
    public final String isHeadphonePlugged(@Nullable String str) {
        boolean z;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "isHeadphonePlugged called");
        }
        if (this.a == null) {
            A4 a42 = this.f1103d;
            if (a42 == null) {
                return "false";
            }
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a42).b(str3, "Found a null instance of render view!");
            return "false";
        }
        A4 a43 = this.f1103d;
        if (a43 != null) {
            String str4 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
            ((B4) a43).a(str4, "JavaScript called: isHeadphonePlugged()");
        }
        try {
            Intrinsics.e(this.a.getMediaProcessor());
            z = C0410y6.b();
        } catch (Exception e2) {
            A4 a44 = this.f1103d;
            if (a44 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in checking if headphones are plugged-in; ")));
            }
            z = false;
        }
        return String.valueOf(z);
    }

    @JavascriptInterface
    public final boolean isViewable(@Nullable String str) {
        String str2 = AbstractC0306q5.a;
        Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
        S9 s9 = this.a;
        if (s9 != null) {
            return s9.E == oc.c;
        }
        A4 a4 = this.f1103d;
        if (a4 != null) {
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).b(str2, "Found a null instance of render view!");
        }
        return false;
    }

    @JavascriptInterface
    public final void loadAd(@Nullable String str, int i2) {
        K k2;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "loadAd is called");
        }
        S9 s9 = this.a;
        A4 a42 = s9.f748j;
        if (a42 != null) {
            String str3 = S9.O0;
            ((B4) a42).a(str3, G9.a(s9, str3, "TAG", "loadPodAd "));
        }
        if (s9.E == oc.c && (k2 = s9.d0) != null) {
            k2.a(i2, s9);
            return;
        }
        A4 a43 = s9.f748j;
        if (a43 != null) {
            String TAG = S9.O0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            ((B4) a43).b(TAG, "Cannot load index pod ad as the current ad is not viewable");
        }
        s9.a(false);
    }

    @JavascriptInterface
    public final void log(@Nullable String str, @NotNull String message) {
        Intrinsics.checkNotNullParameter(message, "message");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).c(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "Log called. Message:", message));
        }
        S9 s9 = this.a;
        s9.getClass();
        K9 k9 = S9.M0;
        k9.getClass();
        if (!((Boolean) S9.P0.getValue(k9, K9.a[0])).booleanValue() || message == null) {
            return;
        }
        s9.getListener().a(message);
    }

    @android.webkit.JavascriptInterface
    public final void logTelemetryEvent(@org.jetbrains.annotations.Nullable java.lang.String r7, @org.jetbrains.annotations.Nullable java.lang.String r8, @org.jetbrains.annotations.Nullable java.lang.String r9) {
        throw new UnsupportedOperationException("Method not decompiled: com.inmobi.media.C0293p5.logTelemetryEvent(java.lang.String, java.lang.String, java.lang.String):void");
    }

    @JavascriptInterface
    public final void onAudioStateChanged(@Nullable String str, int i2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "onAudioStateChanged is called: " + i2);
        }
        EnumC0180h1.b.getClass();
        EnumC0180h1 enumC0180h1 = (EnumC0180h1) EnumC0180h1.c.get(i2);
        if (enumC0180h1 == null) {
            enumC0180h1 = EnumC0180h1.f970d;
        }
        if (enumC0180h1 != EnumC0180h1.f970d) {
            this.a.getListener().a(enumC0180h1);
        }
    }

    @JavascriptInterface
    public final void onOrientationChange(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, ">>> onOrientationChange() >>> This API is deprecated!");
        }
    }

    @JavascriptInterface
    public final void onUserAudioMuteInteraction(@Nullable String str, boolean z) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "onAudioMuteInteraction is called: " + z);
        }
        this.a.getListener().a(z);
    }

    @JavascriptInterface
    public final void onUserInteraction(@Nullable String str, @Nullable String str2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "onUserInteraction called");
        }
        S9 s9 = this.a;
        if (s9 != null && !s9.k()) {
            this.a.a("onUserInteraction");
            return;
        }
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str4 = AbstractC0306q5.a;
            ((B4) a42).a(str4, AbstractC0422z5.a(str4, "access$getTAG$p(...)", "onUserInteraction called. Params:", str2));
        }
        if (str2 == null) {
            try {
                this.a.getListener().a(new HashMap());
                return;
            } catch (Exception e2) {
                this.a.a(str, "Unexpected error", "onUserInteraction");
                A4 a43 = this.f1103d;
                if (a43 != null) {
                    String str5 = AbstractC0306q5.a;
                    ((B4) a43).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling onUserInteraction() signal from creative; ")));
                    return;
                }
                return;
            }
        }
        try {
            JSONObject jSONObject = new JSONObject(str2);
            HashMap hashMap = new HashMap();
            Iterator<String> keys = jSONObject.keys();
            Intrinsics.checkNotNullExpressionValue(keys, "keys(...)");
            while (keys.hasNext()) {
                String next = keys.next();
                Intrinsics.f(next, "null cannot be cast to non-null type kotlin.String");
                String str6 = next;
                Object obj = jSONObject.get(str6);
                Intrinsics.e(obj);
                hashMap.put(str6, obj);
            }
            try {
                try {
                    this.a.getListener().a(hashMap);
                } catch (Exception e3) {
                    this.a.a(str, "Unexpected error", "onUserInteraction");
                    A4 a44 = this.f1103d;
                    if (a44 != null) {
                        String str7 = AbstractC0306q5.a;
                        Intrinsics.checkNotNullExpressionValue(str7, "access$getTAG$p(...)");
                        ((B4) a44).b(str7, "SDK encountered unexpected error in handling onUserInteraction() signal from creative; " + e3.getMessage());
                    }
                }
            } catch (Exception e4) {
                this.a.a(str, "Unexpected error", "onUserInteraction");
                A4 a45 = this.f1103d;
                if (a45 != null) {
                    String str8 = AbstractC0306q5.a;
                    ((B4) a45).b(str8, Cc.a(e4, A5.a(str8, "access$getTAG$p(...)", "SDK encountered unexpected error in handling onUserInteraction() signal from creative; ")));
                }
            }
        } catch (JSONException unused) {
            this.a.getListener().a(new HashMap());
        }
    }

    @JavascriptInterface
    public final void open(@Nullable String str, @Nullable String str2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "open called");
        }
        String a = this.a.getLandingPageHandler().a(str2);
        this.a.getLandingPageHandler().a("clickStartCalled", MapsKt.j(new Pair("trigger", a)));
        if (this.a.k()) {
            this.a.i();
            AbstractC0106bb.a(new xe(this, str, str2, 1));
        } else {
            this.a.a("open");
            this.a.getLandingPageHandler().a("landingsStartFailed", MapsKt.j(new Pair(CLConstants.FIELD_ERROR_CODE, 8), new Pair("trigger", a)));
        }
    }

    @JavascriptInterface
    public final void openEmbedded(@Nullable String str, @Nullable String str2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "openEmbedded called");
        }
        if (!this.a.k()) {
            this.a.a("openEmbedded");
        } else {
            this.a.i();
            AbstractC0106bb.a(new xe(this, str, str2, 2));
        }
    }

    @JavascriptInterface
    public final void openExternal(@Nullable String str, @NotNull String url, @Nullable String str2) {
        Intrinsics.checkNotNullParameter(url, "url");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "open External");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a42).b(str4, "Found a null instance of render view!");
                return;
            }
            return;
        }
        if (!s9.k()) {
            this.a.a("openExternal");
            return;
        }
        this.a.i();
        A4 a43 = this.f1103d;
        if (a43 != null) {
            String str5 = AbstractC0306q5.a;
            ((B4) a43).a(str5, AbstractC0422z5.a(str5, "access$getTAG$p(...)", "openExternal called with url: ", url));
        }
        D5 landingPageHandler = this.a.getLandingPageHandler();
        landingPageHandler.getClass();
        Intrinsics.checkNotNullParameter("openExternal", "api");
        if (url != null) {
            landingPageHandler.f(str, url, str2);
            return;
        }
        if (str2 != null) {
            landingPageHandler.f(str, str2, null);
            return;
        }
        O9 o9 = landingPageHandler.f528d;
        if (o9 != null) {
            Intrinsics.checkNotNullParameter("Empty url and fallback url", "message");
            o9.a.a(str, "Empty url and fallback url", "openExternal");
        }
        A4 a44 = landingPageHandler.f531g;
        if (a44 != null) {
            Intrinsics.checkNotNullExpressionValue("D5", "TAG");
            ((B4) a44).b("D5", "Empty deeplink and fallback urls");
        }
    }

    @JavascriptInterface
    public final void openWithoutTracker(@Nullable String str, @Nullable String str2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "openWithoutTracker called");
        }
        String a = this.a.getLandingPageHandler().a(str2);
        this.a.getLandingPageHandler().a("clickStartCalled", new HashMap());
        S9 s9 = this.a;
        if (s9 != null) {
            if (s9.k()) {
                AbstractC0106bb.a(new xe(this, str, str2, 0));
                return;
            } else {
                this.a.a("openWithoutTracker");
                this.a.getLandingPageHandler().a("landingsStartFailed", MapsKt.j(new Pair(CLConstants.FIELD_ERROR_CODE, 8), new Pair("trigger", a)));
                return;
            }
        }
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str4 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
            ((B4) a42).b(str4, "Found a null instance of render view!");
        }
        this.a.getLandingPageHandler().a("landingsStartFailed", MapsKt.j(new Pair(CLConstants.FIELD_ERROR_CODE, 11), new Pair("trigger", a)));
    }

    @JavascriptInterface
    public final void ping(@Nullable String str, @Nullable String str2, boolean z) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "ping called");
        }
        if (this.a == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a42).b(str4, "Found a null instance of render view!");
                return;
            }
            return;
        }
        if (str2 != null) {
            int length = str2.length() - 1;
            int i2 = 0;
            boolean z2 = false;
            while (i2 <= length) {
                boolean z3 = Intrinsics.h(str2.charAt(!z2 ? i2 : length), 32) <= 0;
                if (z2) {
                    if (!z3) {
                        break;
                    } else {
                        length--;
                    }
                } else if (z3) {
                    i2++;
                } else {
                    z2 = true;
                }
            }
            if (str2.subSequence(i2, length + 1).toString().length() != 0 && URLUtil.isValidUrl(str2)) {
                A4 a43 = this.f1103d;
                if (a43 != null) {
                    String str5 = AbstractC0306q5.a;
                    Intrinsics.checkNotNullExpressionValue(str5, "access$getTAG$p(...)");
                    ((B4) a43).a(str5, "JavaScript called ping() URL: >>> " + str2 + " <<<");
                }
                try {
                    Y1.a.a(str2, z, this.f1103d);
                    return;
                } catch (Exception e2) {
                    this.a.a(str, "Unexpected error", "ping");
                    Z5.a((byte) 1, "InMobi", "Failed to fire ping; SDK encountered unexpected error");
                    A4 a44 = this.f1103d;
                    if (a44 != null) {
                        String str6 = AbstractC0306q5.a;
                        ((B4) a44).b(str6, Cc.a(e2, A5.a(str6, "access$getTAG$p(...)", "SDK encountered unexpected error in handling ping() request from creative; ")));
                        return;
                    }
                    return;
                }
            }
        }
        this.a.a(str, "Invalid URL:" + str2, "ping");
    }

    @JavascriptInterface
    public final void pingInWebView(@Nullable String str, @Nullable String str2, boolean z) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "openInWebView called");
        }
        if (this.a == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a42).b(str4, "Found a null instance of render view!");
                return;
            }
            return;
        }
        if (str2 != null) {
            int length = str2.length() - 1;
            int i2 = 0;
            boolean z2 = false;
            while (i2 <= length) {
                boolean z3 = Intrinsics.h(str2.charAt(!z2 ? i2 : length), 32) <= 0;
                if (z2) {
                    if (!z3) {
                        break;
                    } else {
                        length--;
                    }
                } else if (z3) {
                    i2++;
                } else {
                    z2 = true;
                }
            }
            if (str2.subSequence(i2, length + 1).toString().length() != 0 && URLUtil.isValidUrl(str2)) {
                A4 a43 = this.f1103d;
                if (a43 != null) {
                    String str5 = AbstractC0306q5.a;
                    Intrinsics.checkNotNullExpressionValue(str5, "access$getTAG$p(...)");
                    ((B4) a43).a(str5, "JavaScript called pingInWebView() URL: >>> " + str2 + " <<<");
                }
                try {
                    Y1.a.b(str2, z, this.f1103d);
                    return;
                } catch (Exception e2) {
                    this.a.a(str, "Unexpected error", "pingInWebView");
                    Z5.a((byte) 1, "InMobi", "Failed to fire ping; SDK encountered unexpected error");
                    A4 a44 = this.f1103d;
                    if (a44 != null) {
                        String str6 = AbstractC0306q5.a;
                        ((B4) a44).b(str6, Cc.a(e2, A5.a(str6, "access$getTAG$p(...)", "SDK encountered unexpected error in handling pingInWebView() request from creative; ")));
                        return;
                    }
                    return;
                }
            }
        }
        this.a.a(str, "Invalid URL:" + str2, "pingInWebView");
    }

    @JavascriptInterface
    public final void playVideo(@Nullable String str, @Nullable String str2) {
        if (this.a == null) {
            A4 a4 = this.f1103d;
            if (a4 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a4).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        if (str2 != null) {
            int length = str2.length() - 1;
            int i2 = 0;
            boolean z = false;
            while (i2 <= length) {
                boolean z2 = Intrinsics.h(str2.charAt(!z ? i2 : length), 32) <= 0;
                if (z) {
                    if (!z2) {
                        break;
                    } else {
                        length--;
                    }
                } else if (z2) {
                    i2++;
                } else {
                    z = true;
                }
            }
            if (str2.subSequence(i2, length + 1).toString().length() != 0 && StringsKt.L(str2, "http", false) && (StringsKt.p(str2, "mp4", false) || StringsKt.p(str2, "avi", false) || StringsKt.p(str2, "m4v", false))) {
                A4 a42 = this.f1103d;
                if (a42 != null) {
                    String str4 = AbstractC0306q5.a;
                    Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                    ((B4) a42).a(str4, "JavaScript called: playVideo (" + str2 + ')');
                }
                new Handler(this.a.getContainerContext().getMainLooper()).post(new xe(this, str, str2, 4));
                return;
            }
        }
        this.a.a(str, "Null or empty or invalid media playback URL supplied", "playVideo");
    }

    @JavascriptInterface
    public final void registerBackButtonPressedEventListener(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "registerBackButtonPressedEventListener called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        try {
            A4 a43 = s9.f748j;
            if (a43 != null) {
                String TAG = S9.O0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                ((B4) a43).a(TAG, "registerBackButtonPressedEventListener " + s9);
            }
            s9.H = str;
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "registerBackButtonPressedEventListener");
            A4 a44 = this.f1103d;
            if (a44 != null) {
                String str4 = AbstractC0306q5.a;
                ((B4) a44).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling registerBackButtonPressedEventListener() request from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void registerDeviceMuteEventListener(@Nullable String jsCallbackNamespace) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
            ((B4) a4).a(str, "registerDeviceMuteEventListener called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str2 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
                ((B4) a42).b(str2, "Found a null instance of render view!");
                return;
            }
            return;
        }
        if (jsCallbackNamespace != null) {
            try {
                C0410y6 mediaProcessor = s9.getMediaProcessor();
                if (mediaProcessor != null) {
                    Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
                    if (mediaProcessor.f1249d == null) {
                        C0213j6 c0213j6 = new C0213j6(new C0371v6(mediaProcessor, jsCallbackNamespace));
                        mediaProcessor.f1249d = c0213j6;
                        c0213j6.b();
                    }
                }
            } catch (Exception e2) {
                this.a.a(jsCallbackNamespace, "Unexpected error", "registerDeviceMuteEventListener");
                A4 a43 = this.f1103d;
                if (a43 != null) {
                    String str3 = AbstractC0306q5.a;
                    ((B4) a43).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling registerDeviceMuteEventListener() request from creative; ")));
                }
            }
        }
    }

    @JavascriptInterface
    public final void registerDeviceVolumeChangeEventListener(@Nullable String jsCallbackNamespace) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
            ((B4) a4).a(str, "registerDeviceVolumeChangeEventListener called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str2 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
                ((B4) a42).b(str2, "Found a null instance of render view!");
                return;
            }
            return;
        }
        if (jsCallbackNamespace != null) {
            try {
                C0410y6 mediaProcessor = s9.getMediaProcessor();
                if (mediaProcessor != null) {
                    Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
                    Context d2 = Ha.d();
                    if (d2 != null && mediaProcessor.f1250e == null) {
                        C0213j6 c0213j6 = new C0213j6(new C0384w6(mediaProcessor, jsCallbackNamespace, d2, new Handler(Looper.getMainLooper())));
                        mediaProcessor.f1250e = c0213j6;
                        c0213j6.b();
                    }
                }
            } catch (Exception e2) {
                this.a.a(jsCallbackNamespace, "Unexpected error", "registerDeviceVolumeChangeEventListener");
                A4 a43 = this.f1103d;
                if (a43 != null) {
                    String str3 = AbstractC0306q5.a;
                    ((B4) a43).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling registerDeviceVolumeChangeEventListener() request from creative; ")));
                }
            }
        }
    }

    @JavascriptInterface
    public final void registerHeadphonePluggedEventListener(@Nullable String jsCallbackNamespace) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
            ((B4) a4).a(str, "registerHeadphonePluggedEventListener called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str2 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
                ((B4) a42).b(str2, "Found a null instance of render view!");
                return;
            }
            return;
        }
        if (jsCallbackNamespace != null) {
            try {
                C0410y6 mediaProcessor = s9.getMediaProcessor();
                if (mediaProcessor != null) {
                    Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
                    if (mediaProcessor.f1251f == null) {
                        C0213j6 c0213j6 = new C0213j6(new C0358u6(mediaProcessor, jsCallbackNamespace));
                        mediaProcessor.f1251f = c0213j6;
                        c0213j6.b();
                    }
                }
            } catch (Exception e2) {
                this.a.a(jsCallbackNamespace, "Unexpected error", "registerHeadphonePluggedEventListener");
                A4 a43 = this.f1103d;
                if (a43 != null) {
                    String str3 = AbstractC0306q5.a;
                    ((B4) a43).b(str3, Cc.a(e2, A5.a(str3, "access$getTAG$p(...)", "SDK encountered unexpected error in handling registerHeadphonePluggedEventListener() request from creative; ")));
                }
            }
        }
    }

    @JavascriptInterface
    public final void resize(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "resize called");
        }
        if (this.b != 1) {
            if (this.a != null) {
                new Handler(Looper.getMainLooper()).post(new ye(this, str, 0));
                return;
            }
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
            }
        }
    }

    @JavascriptInterface
    public final void saveBlob(@Nullable String str, @Nullable String str2) {
        F1 f1;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "saveBlob is called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a42).b(str4, "Found a null instance of render view!");
                return;
            }
            return;
        }
        A4 a43 = s9.f748j;
        if (a43 != null) {
            String TAG = S9.O0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            ((B4) a43).a(TAG, "saveBlob");
        }
        if (str2 == null || (f1 = s9.W) == null) {
            return;
        }
        ((AbstractC0378w0) f1).a(str2, s9.getImpressionId());
    }

    @JavascriptInterface
    public final void saveContent(@Nullable String str, @Nullable String str2, @Nullable String str3) {
        if (str2 != null && str2.length() != 0 && str3 != null && str3.length() != 0) {
            try {
                this.a.b(str, str2, str3);
                return;
            } catch (Exception e2) {
                this.a.a(str, "Unexpected error", "saveContent");
                A4 a4 = this.f1103d;
                if (a4 != null) {
                    String str4 = AbstractC0306q5.a;
                    ((B4) a4).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling saveContent() request from creative; ")));
                    return;
                }
                return;
            }
        }
        A4 a42 = this.f1103d;
        if (a42 != null) {
            String str5 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str5, "access$getTAG$p(...)");
            ((B4) a42).a(str5, "saveContent called with invalid parameters");
        }
        JSONObject jSONObject = new JSONObject();
        if (str3 == null) {
            str3 = "";
        }
        try {
            jSONObject.put(PaymentConstants.URL, str3);
            jSONObject.put("reason", 8);
        } catch (JSONException unused) {
        }
        String jSONObject2 = jSONObject.toString();
        Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString(...)");
        String H = StringsKt.H(jSONObject2, "\"", "\\\"");
        StringBuilder sb = new StringBuilder("sendSaveContentResult(\"saveContent_");
        if (str2 == null) {
            str2 = "";
        }
        sb.append(str2);
        sb.append("\", 'failed', \"");
        sb.append(H);
        sb.append("\");");
        this.a.a(str, sb.toString());
    }

    @JavascriptInterface
    public final void setAdContext(@Nullable String str, @NotNull String podAdContext) {
        Intrinsics.checkNotNullParameter(podAdContext, "podAdContext");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).a(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "setAdContext is called ", podAdContext));
        }
        K adPodHandler = this.a.getAdPodHandler();
        if (adPodHandler != null) {
            ((AbstractC0378w0) adPodHandler).d(podAdContext);
        }
    }

    @JavascriptInterface
    public final void setCloseEndCardTracker(@Nullable String str, @Nullable String str2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "setCloseEndCardTracker is called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a42).b(str4, "Found a null instance of render view!");
                return;
            }
            return;
        }
        try {
            s9.setCloseEndCardTracker(str2);
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "getDownloadStatus");
            A4 a43 = this.f1103d;
            if (a43 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a43).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling getDownloadStatus() request from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void setExpandProperties(@Nullable String str, @NotNull String expandPropertiesString) {
        Intrinsics.checkNotNullParameter(expandPropertiesString, "expandPropertiesString");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).a(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "setExpandProperties called. Params:", expandPropertiesString));
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        if (Intrinsics.c("Expanded", s9.getViewState())) {
            A4 a43 = this.f1103d;
            if (a43 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a43).b(str4, "setExpandProperties can't be called on an already expanded ad.");
                return;
            }
            return;
        }
        try {
            this.a.setExpandProperties(H3.a(expandPropertiesString));
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "setExpandProperties");
            A4 a44 = this.f1103d;
            if (a44 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in setExpandProperties(); ")));
            }
        }
    }

    @JavascriptInterface
    public final void setOrientationProperties(@Nullable String str, @NotNull String orientationPropertiesString) {
        Intrinsics.checkNotNullParameter(orientationPropertiesString, "orientationPropertiesString");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).a(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "setOrientationProperties called: ", orientationPropertiesString));
        }
        new Handler(this.a.getContainerContext().getMainLooper()).post(new ye(this, orientationPropertiesString, 2));
    }

    @android.webkit.JavascriptInterface
    public final void setResizeProperties(@org.jetbrains.annotations.Nullable java.lang.String r5, @org.jetbrains.annotations.NotNull java.lang.String r6) {
        throw new UnsupportedOperationException("Method not decompiled: com.inmobi.media.C0293p5.setResizeProperties(java.lang.String, java.lang.String):void");
    }

    @JavascriptInterface
    public final void showAd(@Nullable String str, int i2) {
        K k2;
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "showAd is called");
        }
        S9 s9 = this.a;
        A4 a42 = s9.f748j;
        if (a42 != null) {
            String TAG = S9.O0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            ((B4) a42).a(TAG, "showPodAdAtIndex " + s9 + ' ' + i2);
        }
        if (s9.E == oc.c && (k2 = s9.d0) != null) {
            k2.a(i2, s9, s9.getFullScreenActivity());
            return;
        }
        A4 a43 = s9.f748j;
        if (a43 != null) {
            String TAG2 = S9.O0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            ((B4) a43).b(TAG2, "Cannot show index pod ad as the current ad is not viewable");
        }
        s9.b(false);
    }

    @JavascriptInterface
    public final void showAlert(@Nullable String str, @NotNull String alert) {
        Intrinsics.checkNotNullParameter(alert, "alert");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).a(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "showAlert: ", alert));
        }
    }

    @JavascriptInterface
    public final void showEndCard(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "showEndCard is called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        A4 a43 = s9.f748j;
        if (a43 != null) {
            String TAG = S9.O0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            ((B4) a43).a(TAG, "showEndCardFromInterActive");
        }
        r referenceContainer = s9.getReferenceContainer();
        if (referenceContainer instanceof M6) {
            ((M6) referenceContainer).p();
        }
    }

    @JavascriptInterface
    public final void storePicture(@Nullable String str, @Nullable String str2) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str3 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
            ((B4) a4).a(str3, "storePicture is deprecated and no-op. ");
        }
    }

    @JavascriptInterface
    public final void submitAdReport(@Nullable String str, @NotNull String adQualityUrl, @NotNull String enableUserAdReportScreenshot, @NotNull String templateInfo) {
        Intrinsics.checkNotNullParameter(adQualityUrl, "adQualityUrl");
        Intrinsics.checkNotNullParameter(enableUserAdReportScreenshot, "enableUserAdReportScreenshot");
        Intrinsics.checkNotNullParameter(templateInfo, "templateInfo");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "submitAdReport called");
        }
        this.a.a(adQualityUrl, templateInfo, Intrinsics.c(enableUserAdReportScreenshot, "1"));
    }

    @JavascriptInterface
    @NotNull
    public final String supports(@Nullable String str, @NotNull String feature) {
        Intrinsics.checkNotNullParameter(feature, "feature");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            ((B4) a4).a(str2, AbstractC0422z5.a(str2, "access$getTAG$p(...)", "Checking support for: ", feature));
        }
        return String.valueOf(this.a.f(feature));
    }

    @JavascriptInterface
    public final long timeSinceShow(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "timeSinceShow is called");
        }
        S9 s9 = this.a;
        A4 a42 = s9.f748j;
        if (a42 != null) {
            String str3 = S9.O0;
            ((B4) a42).c(str3, G9.a(s9, str3, "TAG", "timeSincePodShow "));
        }
        K k2 = s9.d0;
        if (k2 != null) {
            return ((AbstractC0378w0) k2).A0();
        }
        return 0L;
    }

    @JavascriptInterface
    public final void unregisterBackButtonPressedEventListener(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "unregisterBackButtonPressedEventListener called");
        }
        S9 s9 = this.a;
        if (s9 == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        try {
            A4 a43 = s9.f748j;
            if (a43 != null) {
                String TAG = S9.O0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                ((B4) a43).a(TAG, "unregisterBackButtonPressedEventListener " + s9);
            }
            s9.H = null;
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "unregisterBackButtonPressedEventListener");
            A4 a44 = this.f1103d;
            if (a44 != null) {
                String str4 = AbstractC0306q5.a;
                ((B4) a44).b(str4, Cc.a(e2, A5.a(str4, "access$getTAG$p(...)", "SDK encountered unexpected error in handling unregisterBackButtonPressedEventListener() request from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void unregisterDeviceMuteEventListener(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "unregisterDeviceMuteEventListener called");
        }
        if (this.a == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        A4 a43 = this.f1103d;
        if (a43 != null) {
            String str4 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
            ((B4) a43).a(str4, "Unregister device mute event listener ...");
        }
        try {
            C0410y6 mediaProcessor = this.a.getMediaProcessor();
            if (mediaProcessor != null) {
                C0213j6 c0213j6 = mediaProcessor.f1249d;
                if (c0213j6 != null) {
                    c0213j6.a();
                }
                mediaProcessor.f1249d = null;
            }
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "unRegisterDeviceMuteEventListener");
            A4 a44 = this.f1103d;
            if (a44 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling unregisterDeviceMuteEventListener() request from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void unregisterDeviceVolumeChangeEventListener(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "unregisterDeviceVolumeChangeEventListener called");
        }
        if (this.a == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        A4 a43 = this.f1103d;
        if (a43 != null) {
            String str4 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
            ((B4) a43).a(str4, "Unregister device volume change listener ...");
        }
        try {
            C0410y6 mediaProcessor = this.a.getMediaProcessor();
            if (mediaProcessor != null) {
                C0213j6 c0213j6 = mediaProcessor.f1250e;
                if (c0213j6 != null) {
                    c0213j6.a();
                }
                mediaProcessor.f1250e = null;
            }
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "unregisterDeviceVolumeChangeEventListener");
            A4 a44 = this.f1103d;
            if (a44 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling unregisterDeviceVolumeChangeEventListener() request from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void unregisterHeadphonePluggedEventListener(@Nullable String str) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "unregisterHeadphonePluggedEventListener called");
        }
        if (this.a == null) {
            A4 a42 = this.f1103d;
            if (a42 != null) {
                String str3 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                ((B4) a42).b(str3, "Found a null instance of render view!");
                return;
            }
            return;
        }
        A4 a43 = this.f1103d;
        if (a43 != null) {
            String str4 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
            ((B4) a43).a(str4, "Unregister headphone plugged event listener ...");
        }
        try {
            C0410y6 mediaProcessor = this.a.getMediaProcessor();
            if (mediaProcessor != null) {
                C0213j6 c0213j6 = mediaProcessor.f1251f;
                if (c0213j6 != null) {
                    c0213j6.a();
                }
                mediaProcessor.f1251f = null;
            }
        } catch (Exception e2) {
            this.a.a(str, "Unexpected error", "unregisterHeadphonePluggedEventListener");
            A4 a44 = this.f1103d;
            if (a44 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a44).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling unregisterHeadphonePluggedEventListener() request from creative; ")));
            }
        }
    }

    @JavascriptInterface
    public final void useCustomClose(@Nullable String str, boolean z) {
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            ((B4) a4).a(str2, "useCustomClose called:" + z);
        }
        new Handler(this.a.getContainerContext().getMainLooper()).post(new ze(this, z, str, 1));
    }

    @JavascriptInterface
    public final void zoom(@NotNull String jsCallbackNamespace, int i2) {
        Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
        A4 a4 = this.f1103d;
        if (a4 != null) {
            String str = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
            ((B4) a4).a(str, "zoom is called " + jsCallbackNamespace + ' ' + i2);
        }
        AbstractC0106bb.a(new androidx.core.content.res.b(this, i2, 6));
    }

    public static final void b(C0293p5 this$0) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            this$0.a.n();
        } catch (Exception e2) {
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str = AbstractC0306q5.a;
                ((B4) a4).b(str, Cc.a(e2, A5.a(str, "access$getTAG$p(...)", "SDK encountered unexpected error in getting/setting current position; ")));
            }
        }
    }

    public static final void a(C0293p5 this$0, String str, int i2, String str2, float f2, boolean z) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            if (this$0.a.getEmbeddedBrowserJSCallbacks() == null) {
                A4 a4 = this$0.f1103d;
                if (a4 != null) {
                    String str3 = AbstractC0306q5.a;
                    Intrinsics.checkNotNullExpressionValue(str3, "access$getTAG$p(...)");
                    ((B4) a4).b(str3, "Found a null instance of EmbeddedBrowserJSCallback instance to customExpand");
                    return;
                }
                return;
            }
            A4 a42 = this$0.f1103d;
            if (a42 != null) {
                String str4 = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str4, "access$getTAG$p(...)");
                ((B4) a42).a(str4, "Custom expand called. Url: " + str);
            }
            EnumC0265n3 enumC0265n3 = EnumC0265n3.values()[i2];
            if (enumC0265n3 == EnumC0265n3.a) {
                if (this$0.a.getLandingPageHandler().a(str2, str) == 3) {
                    InterfaceC0278o3 embeddedBrowserJSCallbacks = this$0.a.getEmbeddedBrowserJSCallbacks();
                    if (embeddedBrowserJSCallbacks != null) {
                        ((C0211j4) embeddedBrowserJSCallbacks).a(str, enumC0265n3, f2, z, this$0.a.getViewTouchTimestamp(), this$0.a.m());
                        return;
                    }
                    return;
                }
                InterfaceC0278o3 embeddedBrowserJSCallbacks2 = this$0.a.getEmbeddedBrowserJSCallbacks();
                if (embeddedBrowserJSCallbacks2 != null) {
                    C0239l4.a(((C0211j4) embeddedBrowserJSCallbacks2).a);
                    return;
                }
                return;
            }
            InterfaceC0278o3 embeddedBrowserJSCallbacks3 = this$0.a.getEmbeddedBrowserJSCallbacks();
            if (embeddedBrowserJSCallbacks3 != null) {
                ((C0211j4) embeddedBrowserJSCallbacks3).a(str, enumC0265n3, f2, z, this$0.a.getViewTouchTimestamp(), this$0.a.m());
            }
        } catch (Exception e2) {
            this$0.a.a(str2, "Unexpected error", "customExpand");
            Z5.a((byte) 1, "InMobi", "Failed to custom expand ad; SDK encountered an unexpected error");
            A4 a43 = this$0.f1103d;
            if (a43 != null) {
                String str5 = AbstractC0306q5.a;
                ((B4) a43).b(str5, Cc.a(e2, A5.a(str5, "access$getTAG$p(...)", "SDK encountered unexpected error in handling customExpand() request; ")));
            }
        }
    }

    public static final void b(C0293p5 this$0, String str) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            this$0.a.l();
        } catch (Exception e2) {
            this$0.a.a(str, "Unexpected error", "resize");
            String str2 = AbstractC0306q5.a;
            Intrinsics.checkNotNullExpressionValue(str2, "access$getTAG$p(...)");
            Z5.a((byte) 1, str2, "Could not resize ad; SDK encountered an unexpected error");
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                ((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered an unexpected error in handling resize() request; ")));
            }
        }
    }

    public static final void c(C0293p5 this$0) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            this$0.a.o();
        } catch (Exception e2) {
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str = AbstractC0306q5.a;
                ((B4) a4).b(str, Cc.a(e2, A5.a(str, "access$getTAG$p(...)", "SDK encountered unexpected error in getting/setting default position; ")));
            }
        }
    }

    public static final void c(C0293p5 this$0, String json) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        Intrinsics.checkNotNullParameter(json, "$orientationPropertiesString");
        C0146e9 op = this$0.a.getOrientationProperties();
        if (op != null) {
            Intrinsics.checkNotNullParameter(json, "json");
            Intrinsics.checkNotNullParameter(op, "op");
            C0146e9 c0146e9 = new C0146e9();
            c0146e9.f926d = json;
            try {
                JSONObject jSONObject = new JSONObject(json);
                String optString = jSONObject.optString("forceOrientation", op.b);
                Intrinsics.checkNotNullExpressionValue(optString, "optString(...)");
                Intrinsics.checkNotNullParameter(optString, "<set-?>");
                c0146e9.b = optString;
                c0146e9.a = jSONObject.optBoolean("allowOrientationChange", op.a);
                String optString2 = jSONObject.optString("direction", op.c);
                Intrinsics.checkNotNullExpressionValue(optString2, "optString(...)");
                Intrinsics.checkNotNullParameter(optString2, "<set-?>");
                c0146e9.c = optString2;
                if (!Intrinsics.c(c0146e9.b, "portrait") && !Intrinsics.c(c0146e9.b, "landscape")) {
                    Intrinsics.checkNotNullParameter("none", "<set-?>");
                    c0146e9.b = "none";
                }
                if (!Intrinsics.c(c0146e9.c, "left") && !Intrinsics.c(c0146e9.c, "right")) {
                    Intrinsics.checkNotNullParameter("right", "<set-?>");
                    c0146e9.c = "right";
                }
            } catch (JSONException unused) {
                c0146e9 = null;
            }
            this$0.c = c0146e9;
        }
        C0146e9 c0146e92 = this$0.c;
        if (c0146e92 != null) {
            this$0.a.setOrientationProperties(c0146e92);
        }
    }

    public static final void b(C0293p5 this$0, boolean z, String str) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            this$0.a.e(z);
        } catch (Exception e2) {
            this$0.a.a(str, "Unexpected error", "useCustomClose");
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str2 = AbstractC0306q5.a;
                ((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered internal error in handling useCustomClose() request from creative; ")));
            }
        }
    }

    public static final void a(C0293p5 this$0) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        if (this$0.a.getEmbeddedBrowserJSCallbacks() == null) {
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str = AbstractC0306q5.a;
                Intrinsics.checkNotNullExpressionValue(str, "access$getTAG$p(...)");
                ((B4) a4).b(str, "Found a null instance of EmbeddedBrowserJSCallback instance to closeCustomExpand");
                return;
            }
            return;
        }
        InterfaceC0278o3 embeddedBrowserJSCallbacks = this$0.a.getEmbeddedBrowserJSCallbacks();
        if (embeddedBrowserJSCallbacks != null) {
            C0239l4.a(((C0211j4) embeddedBrowserJSCallbacks).a);
        }
    }

    public static final void a(C0293p5 this$0, String str) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            r referenceContainer = this$0.a.getReferenceContainer();
            if (referenceContainer != null) {
                referenceContainer.a();
            }
        } catch (Exception e2) {
            this$0.a.a(str, "Unexpected error", "close");
            Z5.a((byte) 1, "InMobi", "Failed to close ad; SDK encountered an unexpected error");
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str2 = AbstractC0306q5.a;
                ((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered an expected error in handling the close() request from creative; ")));
            }
        }
    }

    public static final void a(C0293p5 this$0, boolean z, String str) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            this$0.a.d(z);
        } catch (Exception e2) {
            this$0.a.a(str, "Unexpected error", "disableCloseRegion");
            A4 a4 = this$0.f1103d;
            if (a4 != null) {
                String str2 = AbstractC0306q5.a;
                ((B4) a4).b(str2, Cc.a(e2, A5.a(str2, "access$getTAG$p(...)", "SDK encountered unexpected error in handling disableCloseRegion() request from creative; ")));
            }
        }
    }

    public static final void a(C0293p5 this$0, int i2) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        this$0.a.setInitialScale(i2);
    }
}