Perfume Of Love v2.14.9版本的 MD5 值为:16011aefc5a55805771706ce3b259b4e

以下内容为反编译后的 h.java 源代码,内容仅作参考


package com.chartboost.sdk.impl;

import com.chartboost.sdk.impl.i1;
import com.chartboost.sdk.internal.Model.CBError;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import java.util.Arrays;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.StringCompanionObject;
import org.json.JSONObject;
@Metadata(bv = {}, d1 = {"\u0000\u008e\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u00012\u00020\u0002B7\u0012\u0006\u0010#\u001a\u00020\"\u0012\u0006\u0010%\u001a\u00020$\u0012\u0006\u0010'\u001a\u00020&\u0012\u0006\u0010)\u001a\u00020(\u0012\u0006\u0010+\u001a\u00020*\u0012\u0006\u0010-\u001a\u00020,¢\u0006\u0004\b.\u0010/J3\u0010\f\u001a\u00020\n2\u0006\u0010\u0004\u001a\u00020\u00032!\u0010\u000b\u001a\u001d\u0012\u0013\u0012\u00110\u0006¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\t\u0012\u0004\u0012\u00020\n0\u0005H\u0016J\u001c\u0010\f\u001a\u00020\n2\b\u0010\u000e\u001a\u0004\u0018\u00010\r2\b\u0010\u0010\u001a\u0004\u0018\u00010\u000fH\u0016J\u001c\u0010\f\u001a\u00020\n2\b\u0010\u000e\u001a\u0004\u0018\u00010\r2\b\u0010\u0012\u001a\u0004\u0018\u00010\u0011H\u0016J\"\u0010\f\u001a\u0004\u0018\u00010\u00172\u0006\u0010\u0014\u001a\u00020\u00132\u0006\u0010\u0010\u001a\u00020\u000f2\u0006\u0010\u0016\u001a\u00020\u0015H\u0002J8\u0010\f\u001a\u00020\r2\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u0019\u001a\u00020\u00182\u0006\u0010\u001a\u001a\u00020\u00182\u0006\u0010\u001c\u001a\u00020\u001b2\u0006\u0010\u0014\u001a\u00020\u00132\u0006\u0010\u000b\u001a\u00020\u0002H\u0002J0\u0010\f\u001a\u00020\u001e2\u0006\u0010\u000b\u001a\u00020\u00022\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u001d\u001a\u00020\u00182\u0006\u0010\u001c\u001a\u00020\u001b2\u0006\u0010\u0014\u001a\u00020\u0013H\u0002J8\u0010\f\u001a\u00020\u001f2\u0006\u0010\u000b\u001a\u00020\u00022\u0006\u0010\u0019\u001a\u00020\u00182\u0006\u0010\u001a\u001a\u00020\u00182\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u001d\u001a\u00020\u00182\u0006\u0010\u0014\u001a\u00020\u0013H\u0002J\u0018\u0010\f\u001a\u00020\n2\u0006\u0010 \u001a\u00020\u00172\u0006\u0010\u000e\u001a\u00020\rH\u0002J\u0010\u0010\f\u001a\u00020\n2\u0006\u0010!\u001a\u00020\u0015H\u0002¨\u00060"}, d2 = {"Lcom/chartboost/sdk/impl/h;", "Lcom/chartboost/sdk/impl/g;", "Lcom/chartboost/sdk/impl/i1$a;", "Lcom/chartboost/sdk/impl/q3;", "params", "Lkotlin/Function1;", "Lcom/chartboost/sdk/impl/r3;", "Lkotlin/ParameterName;", "name", IronSourceConstants.EVENTS_RESULT, "", "callback", "a", "Lcom/chartboost/sdk/impl/i1;", "request", "Lorg/json/JSONObject;", "response", "Lcom/chartboost/sdk/internal/Model/CBError;", "error", "Lcom/chartboost/sdk/impl/w4;", "requestBodyFields", "", FirebaseAnalytics.Param.LOCATION, "Lcom/chartboost/sdk/impl/k;", "", "height", "width", "", "isCacheRequest", "impressionCounter", "Lcom/chartboost/sdk/impl/u1;", "Lcom/chartboost/sdk/impl/a4;", "adUnit", "errorMsg", "Lcom/chartboost/sdk/impl/j;", "adTraits", "Lcom/chartboost/sdk/impl/y2;", "fileCache", "Lcom/chartboost/sdk/impl/u4;", "requestBodyBuilder", "Lcom/chartboost/sdk/impl/g1;", "networkService", "Lcom/chartboost/sdk/impl/q;", "adUnitParser", "Lcom/chartboost/sdk/impl/z3;", "openRTBAdUnitParser", "<init>", "(Lcom/chartboost/sdk/impl/j;Lcom/chartboost/sdk/impl/y2;Lcom/chartboost/sdk/impl/u4;Lcom/chartboost/sdk/impl/g1;Lcom/chartboost/sdk/impl/q;Lcom/chartboost/sdk/impl/z3;)V", "Chartboost-9.2.0_productionRelease"}, k = 1, mv = {1, 6, 0})
public final class h implements g, i1.a {
    public final j a;
    public final y2 b;
    public final u4 c;
    public final g1 d;
    public final q e;
    public final z3 f;
    public w4 g;
    public q3 h;
    public Function1<? super r3, Unit> i;

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    public class a {
        public static final int[] a;

        static {
            int[] iArr = new int[h3.values().length];
            iArr[h3.REWARDED_VIDEO.ordinal()] = 1;
            iArr[h3.INTERSTITIAL.ordinal()] = 2;
            a = iArr;
        }
    }

    public h(j adTraits, y2 fileCache, u4 requestBodyBuilder, g1 networkService, q adUnitParser, z3 openRTBAdUnitParser) {
        Intrinsics.checkNotNullParameter(adTraits, "adTraits");
        Intrinsics.checkNotNullParameter(fileCache, "fileCache");
        Intrinsics.checkNotNullParameter(requestBodyBuilder, "requestBodyBuilder");
        Intrinsics.checkNotNullParameter(networkService, "networkService");
        Intrinsics.checkNotNullParameter(adUnitParser, "adUnitParser");
        Intrinsics.checkNotNullParameter(openRTBAdUnitParser, "openRTBAdUnitParser");
        this.a = adTraits;
        this.b = fileCache;
        this.c = requestBodyBuilder;
        this.d = networkService;
        this.e = adUnitParser;
        this.f = openRTBAdUnitParser;
    }

    @Override
    public void a(q3 params, Function1<? super r3, Unit> callback) {
        Intrinsics.checkNotNullParameter(params, "params");
        Intrinsics.checkNotNullParameter(callback, "callback");
        this.h = params;
        this.i = callback;
        this.g = this.c.a();
        String d = params.a().d();
        Integer b = params.b();
        int intValue = b != null ? b.intValue() : 0;
        Integer c = params.c();
        int intValue2 = c != null ? c.intValue() : 0;
        boolean d2 = params.d();
        w4 w4Var = this.g;
        if (w4Var == null) {
            Intrinsics.throwUninitializedPropertyAccessException("requestBodyFields");
            w4Var = null;
        }
        i1 a2 = a(d, intValue, intValue2, d2, w4Var, this);
        a2.i = 1;
        this.d.a(a2);
    }

    public final k a(w4 w4Var, JSONObject jSONObject, String str) {
        k a2;
        try {
            h3 h3Var = this.a.a;
            h3 h3Var2 = h3.BANNER;
            if (h3Var == h3Var2) {
                a2 = this.f.a(h3Var2, jSONObject);
            } else if (!w4Var.a().b()) {
                return null;
            } else {
                a2 = this.e.a(jSONObject);
            }
            return a2;
        } catch (Exception e) {
            s2.d(new i2("cache_get_response_parsing_error", e.getMessage(), this.a.b(), str));
            return null;
        }
    }

    public final i1 a(String str, int i, int i2, boolean z, w4 w4Var, i1.a aVar) {
        int e;
        h3 h3Var = this.a.a;
        int i3 = h3Var == null ? -1 : a.a[h3Var.ordinal()];
        if (i3 == 1) {
            e = w4Var.h().e();
        } else if (i3 != 2) {
            e = w4Var.h().a();
        } else {
            e = w4Var.h().d();
        }
        return this.a.a == h3.BANNER ? a(aVar, i, i2, str, e, w4Var) : a(aVar, str, e, z, w4Var);
    }

    public final u1 a(i1.a aVar, String str, int i, boolean z, w4 w4Var) {
        StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
        String str2 = this.a.c;
        Intrinsics.checkNotNullExpressionValue(str2, "adTraits.webViewGetEndpointFormat");
        String format = String.format(str2, Arrays.copyOf(new Object[]{w4Var.a().c()}, 1));
        Intrinsics.checkNotNullExpressionValue(format, "format(format, *args)");
        u1 u1Var = new u1(format, w4Var, h4.NORMAL, aVar);
        JSONObject f = this.b.f();
        Intrinsics.checkNotNullExpressionValue(f, "fileCache.webViewCacheAssets");
        u1Var.b("cache_assets", f);
        u1Var.b(FirebaseAnalytics.Param.LOCATION, str);
        u1Var.b("imp_depth", Integer.valueOf(i));
        u1Var.b("cache", Boolean.valueOf(z));
        u1Var.n = true;
        return u1Var;
    }

    public final a4 a(i1.a aVar, int i, int i2, String str, int i3, w4 w4Var) {
        return new a4(new x3("https://da.chartboost.com", this.a.c, w4Var, h4.NORMAL, aVar), new i(this.a.a, Integer.valueOf(i), Integer.valueOf(i2), str, i3));
    }

    @Override
    public void a(i1 i1Var, JSONObject jSONObject) {
        if (i1Var != null && jSONObject != null) {
            w4 w4Var = this.g;
            Unit unit = null;
            if (w4Var == null) {
                Intrinsics.throwUninitializedPropertyAccessException("requestBodyFields");
                w4Var = null;
            }
            q3 q3Var = this.h;
            if (q3Var == null) {
                Intrinsics.throwUninitializedPropertyAccessException("params");
                q3Var = null;
            }
            k a2 = a(w4Var, jSONObject, q3Var.a().d());
            if (a2 != null) {
                a(a2, i1Var);
                unit = Unit.INSTANCE;
            }
            if (unit == null) {
                a("Error parsing response");
                return;
            }
            return;
        }
        a("Unexpected response");
    }

    public final void a(k kVar, i1 i1Var) {
        Function1<? super r3, Unit> function1 = this.i;
        q3 q3Var = null;
        if (function1 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("callback");
            function1 = null;
        }
        q3 q3Var2 = this.h;
        if (q3Var2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("params");
        } else {
            q3Var = q3Var2;
        }
        function1.invoke(new r3(q3Var.a(), kVar, null, i1Var.h, i1Var.g));
    }

    public final void a(String str) {
        Function1<? super r3, Unit> function1 = this.i;
        q3 q3Var = null;
        if (function1 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("callback");
            function1 = null;
        }
        q3 q3Var2 = this.h;
        if (q3Var2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("params");
        } else {
            q3Var = q3Var2;
        }
        function1.invoke(new r3(q3Var.a(), null, new CBError(CBError.b.UNEXPECTED_RESPONSE, str), 0L, 0L, 26, null));
    }

    @Override
    public void a(i1 i1Var, CBError cBError) {
        Function1<? super r3, Unit> function1 = this.i;
        q3 q3Var = null;
        if (function1 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("callback");
            function1 = null;
        }
        q3 q3Var2 = this.h;
        if (q3Var2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("params");
        } else {
            q3Var = q3Var2;
        }
        h0 a2 = q3Var.a();
        if (cBError == null) {
            cBError = new CBError(CBError.b.INVALID_RESPONSE, "Error parsing response");
        }
        function1.invoke(new r3(a2, null, cBError, 0L, 0L, 26, null));
    }
}