package com.bytedance.sdk.openadsdk.core.settings;

import android.text.TextUtils;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONObject;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;

/* JADX INFO: loaded from: classes2.dex */
public class ajl {
    public static final ajl fm = new ajl(null);
    public static String ro = "";
    public boolean ajl;
    public boolean jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    public String f7276lb;
    public boolean yz;

    public ajl(String str) {
        this.f7276lb = "https://lf-static.tiktokpangle-cdn-us.com/obj/ad-pattern-tx/3p_monitor.9db44671.js";
        this.yz = true;
        this.jnr = true;
        this.ajl = true;
        try {
            JSONObject jSONObjectOptJSONObject = new JSONObject(str).optJSONObject("performance_js");
            String strOptString = jSONObjectOptJSONObject.optString(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, "https://lf-static.tiktokpangle-cdn-us.com/obj/ad-pattern-tx/3p_monitor.9db44671.js");
            if (!TextUtils.isEmpty(strOptString)) {
                this.f7276lb = strOptString;
            }
            JSONArray jSONArrayOptJSONArray = jSONObjectOptJSONObject.optJSONArray("execute_time");
            ArrayList arrayList = new ArrayList();
            for (int i10 = 0; i10 < jSONArrayOptJSONArray.length(); i10++) {
                arrayList.add(jSONArrayOptJSONArray.optString(i10));
            }
            this.yz = arrayList.contains("load_finish");
            this.ajl = arrayList.contains("load_fail");
            this.jnr = arrayList.contains("load");
        } catch (Exception unused) {
        }
    }
}
