Step Record v1.1.5版本的 MD5 值为:5797275f89198878d2f00ee92d534382

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


package com.chartboost.sdk.impl;

import com.chartboost.heliumsdk.impl.ttHtzKt;
import com.chartboost.sdk.impl.j2;
import com.chartboost.sdk.impl.l;
import com.chartboost.sdk.impl.u;
import com.chartboost.sdk.internal.Model.CBError;
import com.vungle.ads.internal.ui.SKHKzK;
import java.net.URL;
import java.util.Arrays;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.StringCompanionObject;
import org.json.JSONObject;

@Metadata(d1 = {"\u0000\u0096\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\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\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u000e\b\u0000\u0018\u00002\u00020\u00012\u00020\u0002B?\u0012\u0006\u0010#\u001a\u00020!\u0012\u0006\u0010)\u001a\u00020$\u0012\u0006\u0010/\u001a\u00020*\u0012\u0006\u00105\u001a\u000200\u0012\u0006\u00109\u001a\u000206\u0012\u0006\u0010=\u001a\u00020:\u0012\u0006\u0010\u001b\u001a\u00020\u001a¢\u0006\u0004\bF\u0010GJ$\u0010\t\u001a\u00020\u00072\u0006\u0010\u0004\u001a\u00020\u00032\u0012\u0010\b\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005H\u0016J\u001c\u0010\t\u001a\u00020\u00072\b\u0010\u000b\u001a\u0004\u0018\u00010\n2\b\u0010\r\u001a\u0004\u0018\u00010\fH\u0016J\u001c\u0010\t\u001a\u00020\u00072\b\u0010\u000b\u001a\u0004\u0018\u00010\n2\b\u0010\u000f\u001a\u0004\u0018\u00010\u000eH\u0016J\"\u0010\t\u001a\u0004\u0018\u00010\u00142\u0006\u0010\u0011\u001a\u00020\u00102\u0006\u0010\r\u001a\u00020\f2\u0006\u0010\u0013\u001a\u00020\u0012H\u0002J@\u0010\t\u001a\u00020\n2\u0006\u0010\u0013\u001a\u00020\u00122\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u0017\u001a\u00020\u00152\u0006\u0010\u0019\u001a\u00020\u00182\u0006\u0010\u0011\u001a\u00020\u00102\u0006\u0010\b\u001a\u00020\u00022\u0006\u0010\u001b\u001a\u00020\u001aH\u0002J8\u0010\t\u001a\u00020\u001d2\u0006\u0010\b\u001a\u00020\u00022\u0006\u0010\u0013\u001a\u00020\u00122\u0006\u0010\u001c\u001a\u00020\u00152\u0006\u0010\u0019\u001a\u00020\u00182\u0006\u0010\u0011\u001a\u00020\u00102\u0006\u0010\u001b\u001a\u00020\u001aH\u0002J@\u0010\t\u001a\u00020\u001e2\u0006\u0010\b\u001a\u00020\u00022\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u0017\u001a\u00020\u00152\u0006\u0010\u0013\u001a\u00020\u00122\u0006\u0010\u001c\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00102\u0006\u0010\u001b\u001a\u00020\u001aH\u0002J\u0018\u0010\t\u001a\u00020\u00072\u0006\u0010\u001f\u001a\u00020\u00142\u0006\u0010\u000b\u001a\u00020\nH\u0002J\u0010\u0010\t\u001a\u00020\u00072\u0006\u0010 \u001a\u00020\u0012H\u0002R\u0014\u0010#\u001a\u00020!8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\t\u0010\"R\u0017\u0010)\u001a\u00020$8\u0006¢\u0006\f\n\u0004\b%\u0010&\u001a\u0004\b'\u0010(R\u0017\u0010/\u001a\u00020*8\u0006¢\u0006\f\n\u0004\b+\u0010,\u001a\u0004\b-\u0010.R\u0017\u00105\u001a\u0002008\u0006¢\u0006\f\n\u0004\b1\u00102\u001a\u0004\b3\u00104R\u0014\u00109\u001a\u0002068\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b7\u00108R\u0014\u0010=\u001a\u00020:8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b;\u0010<R\u0014\u0010\u001b\u001a\u00020\u001a8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b>\u0010?R\u0016\u0010\u0011\u001a\u00020\u00108\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b@\u0010AR\u0016\u0010\u0004\u001a\u00020\u00038\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bB\u0010CR\"\u0010\b\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u00058\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bD\u0010E¨\u0006H"}, d2 = {"Lcom/chartboost/sdk/impl/m;", "Lcom/chartboost/sdk/impl/l;", "Lcom/chartboost/sdk/impl/j2$a;", "Lcom/chartboost/sdk/impl/x6;", "params", "Lkotlin/Function1;", "Lcom/chartboost/sdk/impl/y6;", "", "callback", "a", "Lcom/chartboost/sdk/impl/j2;", SKHKzK.REQUEST_KEY_EXTRA, "Lorg/json/JSONObject;", "response", "Lcom/chartboost/sdk/internal/Model/CBError;", "error", "Lcom/chartboost/sdk/impl/f9;", "requestBodyFields", "", "location", "Lcom/chartboost/sdk/impl/v;", "", "height", "width", "", "isCacheRequest", "Lcom/chartboost/sdk/impl/s7;", "openMeasurementManager", "impressionCounter", "Lcom/chartboost/sdk/impl/r2;", "Lcom/chartboost/sdk/impl/a8;", "adUnit", "errorMsg", "Lcom/chartboost/sdk/impl/u;", "Lcom/chartboost/sdk/impl/u;", "adTraits", "Lcom/chartboost/sdk/impl/f5;", "b", "Lcom/chartboost/sdk/impl/f5;", "getFileCache", "()Lcom/chartboost/sdk/impl/f5;", "fileCache", "Lcom/chartboost/sdk/impl/d9;", "c", "Lcom/chartboost/sdk/impl/d9;", "getRequestBodyBuilder", "()Lcom/chartboost/sdk/impl/d9;", "requestBodyBuilder", "Lcom/chartboost/sdk/impl/g2;", "d", "Lcom/chartboost/sdk/impl/g2;", "getNetworkService", "()Lcom/chartboost/sdk/impl/g2;", "networkService", "Lcom/chartboost/sdk/impl/e0;", "e", "Lcom/chartboost/sdk/impl/e0;", "adUnitParser", "Lcom/chartboost/sdk/impl/z7;", "f", "Lcom/chartboost/sdk/impl/z7;", "openRTBAdUnitParser", "g", "Lcom/chartboost/sdk/impl/s7;", "h", "Lcom/chartboost/sdk/impl/f9;", "i", "Lcom/chartboost/sdk/impl/x6;", "j", "Lkotlin/jvm/functions/Function1;", "<init>", "(Lcom/chartboost/sdk/impl/u;Lcom/chartboost/sdk/impl/f5;Lcom/chartboost/sdk/impl/d9;Lcom/chartboost/sdk/impl/g2;Lcom/chartboost/sdk/impl/e0;Lcom/chartboost/sdk/impl/z7;Lcom/chartboost/sdk/impl/s7;)V", "Chartboost-9.5.0_productionRelease"}, k = 1, mv = {1, 8, 0})
public final class m implements l, j2.a {

    public final u adTraits;

    public final f5 fileCache;

    public final d9 requestBodyBuilder;

    public final g2 networkService;

    public final e0 adUnitParser;

    public final z7 openRTBAdUnitParser;

    public final s7 openMeasurementManager;

    public f9 requestBodyFields;

    public x6 params;

    public Function1<? super y6, Unit> callback;

    public m(u uVar, f5 f5Var, d9 d9Var, g2 g2Var, e0 e0Var, z7 z7Var, s7 s7Var) {
        ttHtzKt.tzttS1SS1(uVar, "adTraits");
        ttHtzKt.tzttS1SS1(f5Var, "fileCache");
        ttHtzKt.tzttS1SS1(d9Var, "requestBodyBuilder");
        ttHtzKt.tzttS1SS1(g2Var, "networkService");
        ttHtzKt.tzttS1SS1(e0Var, "adUnitParser");
        ttHtzKt.tzttS1SS1(z7Var, "openRTBAdUnitParser");
        ttHtzKt.tzttS1SS1(s7Var, "openMeasurementManager");
        this.adTraits = uVar;
        this.fileCache = f5Var;
        this.requestBodyBuilder = d9Var;
        this.networkService = g2Var;
        this.adUnitParser = e0Var;
        this.openRTBAdUnitParser = z7Var;
        this.openMeasurementManager = s7Var;
    }

    public String a(JSONObject jSONObject, String str, String str2) {
        return l.a.a(this, jSONObject, str, str2);
    }

    @Override
    public void a(x6 params, Function1<? super y6, Unit> callback) {
        ttHtzKt.tzttS1SS1(params, "params");
        ttHtzKt.tzttS1SS1(callback, "callback");
        this.params = params;
        this.callback = callback;
        this.requestBodyFields = this.requestBodyBuilder.build();
        String location = params.getAppRequest().getLocation();
        Integer bannerHeight = params.getBannerHeight();
        int intValue = bannerHeight != null ? bannerHeight.intValue() : 0;
        Integer bannerWidth = params.getBannerWidth();
        int intValue2 = bannerWidth != null ? bannerWidth.intValue() : 0;
        boolean isCacheRequest = params.getIsCacheRequest();
        f9 f9Var = this.requestBodyFields;
        if (f9Var != null) {
            j2 a = a(location, intValue, intValue2, isCacheRequest, f9Var, this, this.openMeasurementManager);
            a.dispatch = 1;
            this.networkService.a(a);
            return;
        }
        ttHtzKt.HzHtt1("requestBodyFields");
        throw null;
    }

    public final v a(f9 requestBodyFields, JSONObject response, String location) {
        v a;
        try {
            u uVar = this.adTraits;
            u.a aVar = u.a.g;
            if (ttHtzKt.SKHKzK(uVar, aVar)) {
                a = this.openRTBAdUnitParser.a(aVar, response);
            } else {
                if (!requestBodyFields.a().getWebViewEnabled()) {
                    return null;
                }
                a = this.adUnitParser.a(response);
            }
            return a;
        } catch (Exception e) {
            JSONObject jSONObject = new JSONObject();
            String message = e.getMessage();
            if (message == null) {
                message = "no message";
            }
            String jSONObject2 = response.toString();
            ttHtzKt.tz(jSONObject2, "response.toString()");
            qa.a(new t3("cache_get_response_parsing_error", a(jSONObject, message, jSONObject2), this.adTraits.getName(), location, null, null, 48, null));
            return null;
        }
    }

    public final j2 a(String location, int height, int width, boolean isCacheRequest, f9 requestBodyFields, j2.a callback, s7 openMeasurementManager) {
        int interstitialImpressionCounter;
        u uVar = this.adTraits;
        if (ttHtzKt.SKHKzK(uVar, u.c.g)) {
            interstitialImpressionCounter = requestBodyFields.h().getRewardedImpressionCounter();
        } else {
            interstitialImpressionCounter = ttHtzKt.SKHKzK(uVar, u.b.g) ? requestBodyFields.h().getInterstitialImpressionCounter() : requestBodyFields.h().getBannerImpressionCounter();
        }
        int i = interstitialImpressionCounter;
        return ttHtzKt.SKHKzK(this.adTraits, u.a.g) ? a(callback, height, width, location, i, requestBodyFields, openMeasurementManager) : a(callback, location, i, isCacheRequest, requestBodyFields, openMeasurementManager);
    }

    public final r2 a(j2.a callback, String location, int impressionCounter, boolean isCacheRequest, f9 requestBodyFields, s7 openMeasurementManager) {
        r2 r2Var;
        g8 c;
        StringCompanionObject stringCompanionObject = StringCompanionObject.SKHKzK;
        String format = String.format(this.adTraits.getWebViewGetEndpointFormat(), Arrays.copyOf(new Object[]{requestBodyFields.a().getWebViewVersion()}, 1));
        ttHtzKt.tz(format, "format(format, *args)");
        l9 l9Var = l9.a;
        if (l9Var.e()) {
            String c2 = l9Var.c();
            if (!(c2 == null || c2.length() == 0)) {
                URL url = new URL(l9Var.c());
                r2Var = new r2("POST", url.getProtocol() + "://" + url.getHost(), url.getPath(), requestBodyFields, k8.NORMAL, null, callback);
                JSONObject f = this.fileCache.f();
                ttHtzKt.tz(f, "fileCache.webViewCacheAssets");
                r2Var.b("cache_assets", f);
                r2Var.b("location", location);
                r2Var.b("imp_depth", Integer.valueOf(impressionCounter));
                if (openMeasurementManager.g() && (c = openMeasurementManager.c()) != null) {
                    r2Var.c("omidpn", c.a());
                    r2Var.c("omidpv", c.b());
                }
                r2Var.b("cache", Boolean.valueOf(isCacheRequest));
                r2Var.p = true;
                return r2Var;
            }
        }
        r2Var = new r2(format, requestBodyFields, k8.NORMAL, callback);
        JSONObject f2 = this.fileCache.f();
        ttHtzKt.tz(f2, "fileCache.webViewCacheAssets");
        r2Var.b("cache_assets", f2);
        r2Var.b("location", location);
        r2Var.b("imp_depth", Integer.valueOf(impressionCounter));
        if (openMeasurementManager.g()) {
            r2Var.c("omidpn", c.a());
            r2Var.c("omidpv", c.b());
        }
        r2Var.b("cache", Boolean.valueOf(isCacheRequest));
        r2Var.p = true;
        return r2Var;
    }

    public final a8 a(j2.a callback, int height, int width, String location, int impressionCounter, f9 requestBodyFields, s7 openMeasurementManager) {
        i7 i7Var;
        l9 l9Var = l9.a;
        if (l9Var.e()) {
            String c = l9Var.c();
            if (!(c == null || c.length() == 0)) {
                URL url = new URL(l9Var.c());
                i7Var = new i7("POST", url.getProtocol() + "://" + url.getHost(), url.getPath(), requestBodyFields, k8.NORMAL, callback);
                return new a8(i7Var, new o(this.adTraits, Integer.valueOf(height), Integer.valueOf(width), location, impressionCounter), openMeasurementManager);
            }
        }
        i7Var = new i7("https://da.chartboost.com", this.adTraits.getWebViewGetEndpointFormat(), requestBodyFields, k8.NORMAL, callback);
        return new a8(i7Var, new o(this.adTraits, Integer.valueOf(height), Integer.valueOf(width), location, impressionCounter), openMeasurementManager);
    }

    @Override
    public void a(j2 request, JSONObject response) {
        if (request != null && response != null) {
            f9 f9Var = this.requestBodyFields;
            Unit unit = null;
            if (f9Var != null) {
                x6 x6Var = this.params;
                if (x6Var != null) {
                    JSONObject a = x6Var.getInterceptor().a(response);
                    x6 x6Var2 = this.params;
                    if (x6Var2 != null) {
                        v a2 = a(f9Var, a, x6Var2.getAppRequest().getLocation());
                        if (a2 != null) {
                            a(a2, request);
                            unit = Unit.SKHKzK;
                        }
                        if (unit == null) {
                            a("Error parsing response");
                            return;
                        }
                        return;
                    }
                    ttHtzKt.HzHtt1("params");
                    throw null;
                }
                ttHtzKt.HzHtt1("params");
                throw null;
            }
            ttHtzKt.HzHtt1("requestBodyFields");
            throw null;
        }
        a("Unexpected response");
    }

    public final void a(v adUnit, j2 request) {
        Function1<? super y6, Unit> function1 = this.callback;
        if (function1 != null) {
            x6 x6Var = this.params;
            if (x6Var != null) {
                function1.invoke(new y6(x6Var.getAppRequest(), adUnit, null, request.readDataNs, request.getResponseCodeNs));
                return;
            } else {
                ttHtzKt.HzHtt1("params");
                throw null;
            }
        }
        ttHtzKt.HzHtt1("callback");
        throw null;
    }

    public final void a(String errorMsg) {
        Function1<? super y6, Unit> function1 = this.callback;
        if (function1 != null) {
            x6 x6Var = this.params;
            if (x6Var != null) {
                function1.invoke(new y6(x6Var.getAppRequest(), null, new CBError(CBError.a.UNEXPECTED_RESPONSE, errorMsg), 0L, 0L, 26, null));
                return;
            } else {
                ttHtzKt.HzHtt1("params");
                throw null;
            }
        }
        ttHtzKt.HzHtt1("callback");
        throw null;
    }

    @Override
    public void a(j2 request, CBError error) {
        Function1<? super y6, Unit> function1 = this.callback;
        if (function1 != null) {
            x6 x6Var = this.params;
            if (x6Var != null) {
                z0 appRequest = x6Var.getAppRequest();
                if (error == null) {
                    error = new CBError(CBError.a.INVALID_RESPONSE, "Error parsing response");
                }
                function1.invoke(new y6(appRequest, null, error, 0L, 0L, 26, null));
                return;
            }
            ttHtzKt.HzHtt1("params");
            throw null;
        }
        ttHtzKt.HzHtt1("callback");
        throw null;
    }
}