package com.chartboost.sdk.impl;

import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public abstract class ka {

    /* renamed from: a  reason: collision with root package name */
    public static final List f1742a = CollectionsKt.emptyList();

    public static final List a() {
        return f1742a;
    }

    public static final ja b(JSONObject jSONObject) {
        Intrinsics.checkNotNullParameter(jSONObject, "<this>");
        JSONObject optJSONObject = jSONObject.optJSONObject("tracking");
        if (optJSONObject != null) {
            boolean optBoolean = optJSONObject.optBoolean("enabled", false);
            String optString = optJSONObject.optString(com.ironsource.rb.r, "https://ssp-events.chartboost.com/track/sdk");
            int optInt = optJSONObject.optInt("eventLimit", 10);
            int optInt2 = optJSONObject.optInt("windowDuration", 60);
            boolean optBoolean2 = optJSONObject.optBoolean("persistenceEnabled", true);
            int optInt3 = optJSONObject.optInt("persistenceMaxEvents", 100);
            List a2 = a(optJSONObject);
            Intrinsics.checkNotNull(optString);
            return new ja(optBoolean, a2, optString, optInt, optInt2, optBoolean2, optInt3);
        }
        return new ja(false, null, null, 0, 0, false, 0, 127, null);
    }

    public static final List a(JSONObject jSONObject) {
        List asList;
        List a2;
        JSONArray optJSONArray = jSONObject.optJSONArray("blacklist");
        return (optJSONArray == null || (asList = c5.asList(optJSONArray)) == null || (a2 = oa.a(asList)) == null) ? f1742a : a2;
    }
}
