最右.apk(点击下载) / a.java


package com.tencent.klevin.config.b;

import android.text.TextUtils;
import cn.xiaochuankeji.xcad.sdk.tracker.ActionsKt;
import com.tencent.smtt.sdk.TbsDownloadConfig;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class a {

    /* renamed from: a  reason: collision with root package name */
    private long f22868a;

    /* renamed from: b  reason: collision with root package name */
    private final b f22869b;
    private final c c;
    private final List<d> d;

    public static class b {

        /* renamed from: a  reason: collision with root package name */
        public String f22870a;

        /* renamed from: b  reason: collision with root package name */
        public int f22871b;
        public long c;
        public int d;
        public int e;
        public int f;
        public int g;
        public int h;
        public int i;
        public int j;
        public int k;
        public String l;
        public int m;
        public int n;
        public int o;
        public int p;

        private b() {
            this.f22871b = 1;
            this.c = 10800;
            this.d = 4;
            this.e = 1;
            this.f = 500;
            this.g = 500;
            this.h = 5000;
            this.i = 1;
            this.j = 30;
            this.k = 0;
            this.l = "https://static.yky.qq.com/bridge-h5/latest/dist/js-bridge-h5.umd.js";
            this.m = 0;
            this.n = 0;
            this.o = 0;
            this.p = 0;
        }
    }

    public static class c {

        /* renamed from: a  reason: collision with root package name */
        public int f22872a;

        /* renamed from: b  reason: collision with root package name */
        public int f22873b;
        public int c;
        public int d;
        public int e;
        public int f;

        private c() {
            this.f22872a = 1;
            this.f22873b = 1;
            this.c = 1;
            this.d = 1;
            this.e = 0;
            this.f = 1;
        }
    }

    public static class d {

        /* renamed from: a  reason: collision with root package name */
        public List<Long> f22874a;

        /* renamed from: b  reason: collision with root package name */
        public int f22875b;
        public int c;
        public int d;
        public String e;
        public int f;
        public int g;
        public int h;
        public int i;
        public int j;
        public Map<Long, String> k;
        public Map<Long, String> l;

        private d() {
            this.f22874a = new ArrayList();
            this.f22875b = 5;
            this.c = 0;
            this.d = 0;
            this.e = "点击跳转至详情页 >";
            this.f = 0;
            this.g = 1;
            this.h = 0;
            this.i = 0;
            this.j = 0;
            this.k = new LinkedHashMap();
            this.l = new LinkedHashMap();
        }
    }

    public static class e {

        /* renamed from: a  reason: collision with root package name */
        private static final a f22876a = new a();
    }

    public static a b() {
        return e.f22876a;
    }

    public long a() {
        return this.f22868a;
    }

    public long c(String str) {
        str.hashCode();
        if (!str.equals("ad_expire_time")) {
            return 0;
        }
        return this.f22869b.c;
    }

    public String d(String str) {
        str.hashCode();
        if (!str.equals("jsbridge_url")) {
            return null;
        }
        return this.f22869b.l;
    }

    public boolean e(String str) {
        try {
            JSONObject jSONObject = new JSONObject(str);
            this.f22868a = jSONObject.optLong("request_interval", TbsDownloadConfig.DEFAULT_RETRY_INTERVAL_SEC);
            JSONObject optJSONObject = jSONObject.optJSONObject("klevinsdk");
            if (optJSONObject != null) {
                this.f22869b.f22870a = optJSONObject.optString("config_ver");
                this.f22869b.f22871b = optJSONObject.optInt("ad_total_status", 1);
                this.f22869b.c = optJSONObject.optLong("ad_expire_time", 10800);
                this.f22869b.d = optJSONObject.optInt("file_log_level", 4);
                this.f22869b.e = optJSONObject.optInt("x5_enable", 1);
                this.f22869b.f = optJSONObject.optInt("interactive_vibrate_time", 500);
                this.f22869b.g = optJSONObject.optInt("interactive_vibrate_interval_time", 500);
                this.f22869b.h = optJSONObject.optInt("ad_imp_end_countdown", 5000);
                this.f22869b.i = optJSONObject.optInt("webp_status", 1);
                this.f22869b.j = optJSONObject.optInt("ssp_report_interval", 30);
                this.f22869b.k = optJSONObject.optInt("interstitial_web_enable", 0);
                this.f22869b.l = optJSONObject.optString("jsbridge_url", "https://static.yky.qq.com/bridge-h5/latest/dist/js-bridge-h5.umd.js");
                this.f22869b.m = optJSONObject.optInt("webview_pool", 0);
                this.f22869b.n = optJSONObject.optInt("endCard_web_enable", 0);
                this.f22869b.o = optJSONObject.optInt("disable_report_privacy", 0);
                this.f22869b.p = optJSONObject.optInt("disable_webview_share", 0);
            }
            JSONObject optJSONObject2 = jSONObject.optJSONObject("ad_site_status");
            if (optJSONObject2 != null) {
                this.c.f22873b = optJSONObject2.optInt(ActionsKt.ACTION_AD_REWARD_VERIFY, 1);
                this.c.c = optJSONObject2.optInt("ad_interstial", 1);
                this.c.d = optJSONObject2.optInt("ad_native", 1);
                this.c.e = optJSONObject2.optInt("ad_download_diog", 0);
                this.c.f = optJSONObject2.optInt("ad_template", 1);
                this.c.f22872a = optJSONObject2.optInt("ad_newSplash", 1);
            }
            JSONArray optJSONArray = jSONObject.optJSONArray("ad_strategy");
            this.d.clear();
            if (optJSONArray != null && optJSONArray.length() > 0) {
                for (int i = 0; i < optJSONArray.length(); i++) {
                    JSONObject optJSONObject3 = optJSONArray.optJSONObject(i);
                    if (optJSONObject3 != null) {
                        d dVar = new d();
                        JSONArray optJSONArray2 = optJSONObject3.optJSONArray("teamplate");
                        if (optJSONArray2 != null && optJSONArray2.length() > 0) {
                            for (int i2 = 0; i2 < optJSONArray2.length(); i2++) {
                                dVar.f22874a.add(Long.valueOf(optJSONArray2.getLong(i2)));
                            }
                        }
                        dVar.c = optJSONObject3.optInt("skip_show_time", 0);
                        dVar.e = optJSONObject3.optString("click_info_text", "点击跳转至详情页 >");
                        dVar.f = optJSONObject3.optInt("click_type", 0);
                        dVar.d = optJSONObject3.optInt("click_area", 0);
                        dVar.g = optJSONObject3.optInt("disable_stream_video", 1);
                        dVar.h = optJSONObject3.optInt("ad_download_diog", 0);
                        dVar.i = optJSONObject3.optInt("interactive_auto_play", 0);
                        dVar.j = optJSONObject3.optInt("auto_download", 0);
                        dVar.f22875b = optJSONObject3.optInt("splash_skip_time", 5);
                        JSONArray optJSONArray3 = optJSONObject3.optJSONArray("template_list");
                        if (optJSONArray3 != null && optJSONArray3.length() > 0) {
                            for (int i3 = 0; i3 < optJSONArray3.length(); i3++) {
                                JSONObject jSONObject2 = optJSONArray3.getJSONObject(i3);
                                long optLong = jSONObject2.optLong("template_id");
                                String optString = jSONObject2.optString("template_url", "");
                                String optString2 = jSONObject2.optString("template_url_endCard", "");
                                if (!TextUtils.isEmpty(optString)) {
                                    dVar.k.put(Long.valueOf(optLong), optString);
                                }
                                if (!TextUtils.isEmpty(optString2)) {
                                    dVar.l.put(Long.valueOf(optLong), optString2);
                                }
                            }
                        }
                        this.d.add(dVar);
                    }
                }
            }
            return true;
        } catch (JSONException e2) {
            e2.printStackTrace();
            return false;
        } catch (Exception e3) {
            e3.printStackTrace();
            return false;
        }
    }

    private a() {
        this.f22868a = TbsDownloadConfig.DEFAULT_RETRY_INTERVAL_SEC;
        this.f22869b = new b();
        this.c = new c();
        this.d = new ArrayList();
    }

    private d a(long j) {
        for (d dVar : this.d) {
            if (dVar.f22874a.contains(Long.valueOf(j))) {
                return dVar;
            }
        }
        return null;
    }

    public int b(String str) {
        str.hashCode();
        char c2 = 65535;
        switch (str.hashCode()) {
            case -1917518374:
                if (str.equals("interactive_vibrate_time")) {
                    c2 = 0;
                    break;
                }
                break;
            case -1499967679:
                if (str.equals("ssp_report_interval")) {
                    c2 = 1;
                    break;
                }
                break;
            case -665982082:
                if (str.equals("ad_imp_end_countdown")) {
                    c2 = 2;
                    break;
                }
                break;
            case -495530598:
                if (str.equals("interactive_vibrate_interval_time")) {
                    c2 = 3;
                    break;
                }
                break;
            case -18193466:
                if (str.equals("file_log_level")) {
                    c2 = 4;
                    break;
                }
                break;
        }
        switch (c2) {
            case 0:
                return this.f22869b.f;
            case 1:
                return this.f22869b.j;
            case 2:
                return this.f22869b.h;
            case 3:
                return this.f22869b.g;
            case 4:
                return this.f22869b.d;
            default:
                return 0;
        }
    }

    public String c(String str, long j) {
        Map<Long, String> map;
        Map<Long, String> map2;
        d a2 = a(j);
        str.hashCode();
        char c2 = 65535;
        switch (str.hashCode()) {
            case -975637462:
                if (str.equals("template_url")) {
                    c2 = 0;
                    break;
                }
                break;
            case 52218919:
                if (str.equals("click_info_text")) {
                    c2 = 1;
                    break;
                }
                break;
            case 664429430:
                if (str.equals("template_url_endCard")) {
                    c2 = 2;
                    break;
                }
                break;
        }
        switch (c2) {
            case 0:
                if (a2 == null || (map = a2.k) == null || !map.containsKey(Long.valueOf(j))) {
                    return "";
                }
                return a2.k.get(Long.valueOf(j));
            case 1:
                return (a2 == null || TextUtils.isEmpty(a2.e)) ? "点击跳转至详情页 >" : a2.e;
            case 2:
                if (a2 == null || (map2 = a2.l) == null || !map2.containsKey(Long.valueOf(j))) {
                    return "";
                }
                return a2.l.get(Long.valueOf(j));
            default:
                return null;
        }
    }

    public boolean a(String str) {
        str.hashCode();
        char c2 = 65535;
        switch (str.hashCode()) {
            case -1913132778:
                if (str.equals("ad_template")) {
                    c2 = 0;
                    break;
                }
                break;
            case -1758888181:
                if (str.equals("ad_newSplash")) {
                    c2 = 1;
                    break;
                }
                break;
            case -1470820606:
                if (str.equals("disable_webview_share")) {
                    c2 = 2;
                    break;
                }
                break;
            case -1453282367:
                if (str.equals("interstitial_web_enable")) {
                    c2 = 3;
                    break;
                }
                break;
            case 183762690:
                if (str.equals("endCard_web_enable")) {
                    c2 = 4;
                    break;
                }
                break;
            case 613802931:
                if (str.equals("ad_native")) {
                    c2 = 5;
                    break;
                }
                break;
            case 732095179:
                if (str.equals(ActionsKt.ACTION_AD_REWARD_VERIFY)) {
                    c2 = 6;
                    break;
                }
                break;
            case 943498741:
                if (str.equals("webp_status")) {
                    c2 = 7;
                    break;
                }
                break;
            case 1130400403:
                if (str.equals("ad_interstial")) {
                    c2 = '\b';
                    break;
                }
                break;
            case 1438086469:
                if (str.equals("x5_enable")) {
                    c2 = '\t';
                    break;
                }
                break;
            case 1570097588:
                if (str.equals("disable_report_privacy")) {
                    c2 = '\n';
                    break;
                }
                break;
            case 2015864994:
                if (str.equals("webview_pool")) {
                    c2 = 11;
                    break;
                }
                break;
        }
        switch (c2) {
            case 0:
                if (this.f22869b.f22871b != 0) {
                    c cVar = this.c;
                    if (cVar.d == 0 || cVar.f == 0) {
                        return false;
                    }
                    return true;
                }
                return false;
            case 1:
                if (this.f22869b.f22871b == 0 || this.c.f22872a == 0) {
                    return false;
                }
                return true;
            case 2:
                if (this.f22869b.p != 0) {
                    return true;
                }
                return false;
            case 3:
                if (this.f22869b.k != 0) {
                    return true;
                }
                return false;
            case 4:
                if (this.f22869b.n != 0) {
                    return true;
                }
                return false;
            case 5:
                if (this.f22869b.f22871b == 0 || this.c.d == 0) {
                    return false;
                }
                return true;
            case 6:
                if (this.f22869b.f22871b == 0 || this.c.f22873b == 0) {
                    return false;
                }
                return true;
            case 7:
                if (this.f22869b.i != 0) {
                    return true;
                }
                return false;
            case '\b':
                if (this.f22869b.f22871b == 0 || this.c.c == 0) {
                    return false;
                }
                return true;
            case '\t':
                if (this.f22869b.e != 0) {
                    return true;
                }
                return false;
            case '\n':
                if (this.f22869b.o != 0) {
                    return true;
                }
                return false;
            case 11:
                if (this.f22869b.m != 0) {
                    return true;
                }
                return false;
            default:
                return false;
        }
    }

    public int b(String str, long j) {
        int i;
        int i2;
        int i3;
        d a2 = a(j);
        str.hashCode();
        char c2 = 65535;
        switch (str.hashCode()) {
            case -1457597425:
                if (str.equals("skip_show_time")) {
                    c2 = 0;
                    break;
                }
                break;
            case -777455388:
                if (str.equals("click_area")) {
                    c2 = 1;
                    break;
                }
                break;
            case -776882287:
                if (str.equals("click_type")) {
                    c2 = 2;
                    break;
                }
                break;
            case 1670139317:
                if (str.equals("splash_skip_time")) {
                    c2 = 3;
                    break;
                }
                break;
        }
        switch (c2) {
            case 0:
                if (a2 == null || (i = a2.c) < 0) {
                    return 0;
                }
                return i;
            case 1:
                if (a2 == null || (i2 = a2.d) < 0 || i2 > 1) {
                    return 0;
                }
                return i2;
            case 2:
                if (a2 != null) {
                    return a2.f;
                }
                return 0;
            case 3:
                if (a2 == null || (i3 = a2.f22875b) <= 0) {
                    return 5;
                }
                return i3;
            default:
                return 0;
        }
    }

    public boolean a(String str, long j) {
        d a2 = a(j);
        str.hashCode();
        char c2 = 65535;
        switch (str.hashCode()) {
            case -1580265192:
                if (str.equals("auto_download")) {
                    c2 = 0;
                    break;
                }
                break;
            case 359379623:
                if (str.equals("interactive_auto_play")) {
                    c2 = 1;
                    break;
                }
                break;
            case 1422878451:
                if (str.equals("disable_stream_video")) {
                    c2 = 2;
                    break;
                }
                break;
            case 1697085272:
                if (str.equals("ad_download_diog")) {
                    c2 = 3;
                    break;
                }
                break;
        }
        switch (c2) {
            case 0:
                if (a2 == null || a2.j != 1) {
                    return false;
                }
                return true;
            case 1:
                if (a2 == null || a2.i == 0) {
                    return true;
                }
                return false;
            case 2:
                if (a2 == null || a2.g == 1) {
                    return true;
                }
                return false;
            case 3:
                if (a2 != null) {
                    if (this.c.e == 0 || a2.h == 0) {
                        return false;
                    }
                    return true;
                } else if (this.c.e != 0) {
                    return true;
                } else {
                    return false;
                }
            default:
                return false;
        }
    }
}