package com.mbridge.msdk.c; import android.content.Context; import android.net.Uri; import android.text.TextUtils; import com.facebook.share.internal.ShareConstants; import com.ironsource.mediationsdk.utils.IronSourceConstants; import com.mbridge.msdk.MBridgeConstans; import com.mbridge.msdk.foundation.tools.s; import com.mbridge.msdk.foundation.tools.x; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /* loaded from: classes4.dex */ public class b { public static int a = 1500; private long G; private ArrayList I; private d J; private C0189b K; private HashMap P; private String Q; private int V; private String Y; private Map Z; private boolean aE; private JSONArray aG; private JSONObject aH; private long aJ; private long aO; private boolean aP; private String aV; private int ai; private String al; private String am; private int ap; private int aq; private int ar; private int as; private long av; private long aw; private int bb; private String bc; private int m; private List o; private long q; private com.mbridge.msdk.c.a r; private String s; private Map t; private boolean u; private int v; private boolean b = false; private JSONArray c = new JSONArray(); private JSONArray d = new JSONArray(); private String e = ""; private int f = 0; private int g = 0; private int h = 2; private int i = 0; private String j = ""; private String k = ""; private String l = ""; private int n = 0; private int p = 0; private int w = 1; private boolean x = false; private String y = ""; private String z = ""; private String A = ""; private String B = ""; private String C = ""; private int D = 120; private String E = com.mbridge.msdk.foundation.same.net.e.d.f().h; private String F = com.mbridge.msdk.foundation.same.net.e.d.f().l; private int H = a; private int L = 0; private long M = 86400; private int N = 0; private int O = 3; private boolean R = true; private int S = 0; private boolean T = false; private boolean U = false; private int W = 0; private int X = 0; private String aa = "1.0"; private int ab = 30; private int ac = 9377; private int ad = 0; private int ae = 5; private int af = 1; private int ag = 8000; private String ah = ""; private int aj = 10; private int ak = 120; private String an = ""; private String ao = ""; private String at = ""; private String au = ""; private List ax = new ArrayList(); private int ay = 3; private int az = 0; private int aA = 3; private int aB = 0; private int aC = 10; private int aD = 600; private int aF = 0; private String aI = ""; private int aK = 8000; private int aL = 1; private long aM = 10; private int aN = 3; private int aQ = 1; private int aR = 1; private int aS = 1; private int aT = 1; private String aU = ""; private int aW = IronSourceConstants.RV_AUCTION_REQUEST; private int aX = 0; private int aY = 0; private long aZ = 3600; private String ba = ""; public final int A() { return this.D; } public final String B() { return this.E; } public final String C() { return this.F; } public final long D() { return this.G; } public final ArrayList E() { return this.I; } public final d F() { return this.J; } public final C0189b G() { return this.K; } public final long H() { return this.M; } public final int I() { return this.O; } public final HashMap J() { return this.P; } public final int K() { return this.S; } public final int L() { return this.V; } public final int M() { return this.W; } public final JSONArray N() { return this.c; } public final JSONArray O() { return this.d; } public final String P() { return this.aa; } public final int Q() { return this.af; } public final int R() { return this.ag; } public final int S() { return this.ai; } public final int T() { return this.ak; } public final String U() { return this.al; } public final String V() { return this.am; } public final String W() { return this.an; } public final String X() { return this.ao; } public final int Y() { return this.ap; } public final int Z() { return this.aq; } public final int a() { return this.bb; } public final void a(int i) { this.bb = i; } public final void a(long j) { this.aZ = j; } public final void a(String str) { this.Q = str; } public final void a(boolean z) { this.u = z; } public final int aA() { return this.aW; } public final int aB() { return this.aX; } public final int aC() { return this.aY; } public final boolean aD() { return this.R; } public final boolean aE() { return this.u; } public final boolean aF() { return this.x; } public final boolean aG() { return this.T; } public final boolean aH() { return this.b; } public final boolean aI() { return this.U; } public final boolean aJ() { return this.aE; } public final boolean aK() { return this.aP; } public final int aa() { return this.ar; } public final int ab() { return this.as; } public final long ac() { return this.av; } public final long ad() { if (this.aw <= 0) { this.aw = 7200L; } return this.aw; } public final int ae() { return this.ay; } public final int af() { return this.az; } public final int ag() { return this.aA; } public final int ah() { return this.aB; } public final int ai() { return this.aC; } public final int aj() { return this.aD; } public final int ak() { return this.aF; } public final JSONArray al() { return this.aG; } public final JSONObject am() { return this.aH; } public final String an() { return this.aI; } public final long ao() { return this.aJ; } public final int ap() { return this.aK; } public final int aq() { return this.aL; } public final long ar() { return this.aM * 1000; } public final int as() { return this.aN; } public final long at() { return this.aO; } public final int au() { return this.aQ; } public final int av() { return this.aR; } public final int aw() { return this.aS; } public final int ax() { return this.aT; } public final String ay() { return this.aU; } public final String az() { return this.aV; } public final String b() { return this.ba; } public final void b(int i) { this.f = i; } public final void b(long j) { this.q = j; } public final void b(String str) { this.am = str; } public final void b(boolean z) { this.x = z; } public final long c() { return this.aZ; } public final void c(int i) { this.g = i; } public final void c(long j) { this.av = j; } public final void c(String str) { this.an = str; } public final void c(boolean z) { this.T = z; } public final String d() { return this.e; } public final void d(int i) { this.h = i; } public final void d(long j) { this.aw = j; } public final void d(String str) { this.ao = str; } public final void d(boolean z) { this.b = z; } public final int e() { return this.f; } public final void e(int i) { this.i = i; } public final void e(long j) { this.aJ = j; } public final void e(boolean z) { this.aE = z; } public final int f() { return this.g; } public final void f(int i) { this.m = i; } public final void f(long j) { this.aM = j; } public final void f(boolean z) { this.aP = z; } public final int g() { return this.h; } public final void g(int i) { this.n = i; } public final int h() { return this.i; } public final void h(int i) { this.p = i; } public final String i() { return this.j; } public final void i(int i) { this.v = i; } public final String j() { return this.k; } public final void j(int i) { this.w = i; } public final String k() { return this.l; } public final void k(int i) { this.D = i; } public final int l() { return this.m; } public final void l(int i) { this.O = i; } public final int m() { return this.n; } public final void m(int i) { this.S = i; } public final List n() { return this.o; } public final void n(int i) { this.V = i; } public final int o() { return this.p; } public final void o(int i) { this.W = i; } public final long p() { return this.q; } public final void p(int i) { if (i > 0) { this.aj = i; } } public final com.mbridge.msdk.c.a q() { return this.r; } public final void q(int i) { this.ai = i; } public final String r() { return this.s; } public final void r(int i) { this.ak = i; } public final Map s() { return this.t; } public final void s(int i) { this.aF = i; } public final int t() { return this.v; } public final void t(int i) { this.aL = i; } public final int u() { return this.w; } public final void u(int i) { this.aN = i; } public final String v() { return this.y; } public final void v(int i) { this.aQ = i; } public final String w() { return this.z; } public final void w(int i) { this.aR = i; } public final String x() { return this.A; } public final void x(int i) { this.aS = i; } public final String y() { return this.B; } public final void y(int i) { this.aT = i; } public final String z() { return this.C; } public static String a(Context context, String str) { try { g b = h.a().b(com.mbridge.msdk.foundation.controller.c.m().k()); if (b != null && ((b) b).Z != null) { String host = Uri.parse(str).getHost(); Iterator> it = ((b) b).Z.entrySet().iterator(); while (it.hasNext()) { String key = it.next().getKey(); if (!TextUtils.isEmpty(host) && host.contains(key)) { String str2 = ((b) b).Z.get(key); return TextUtils.isEmpty(str2) ? "" : str2.replace("{gaid}", com.mbridge.msdk.foundation.tools.f.c()); } } return ""; } return ""; } catch (Throwable unused) { return ""; } } /* JADX WARN: Removed duplicated region for block: B:177:0x06bc A[Catch: Exception -> 0x0241, TryCatch #16 {Exception -> 0x0241, blocks: (B:9:0x0017, B:12:0x0064, B:16:0x00af, B:35:0x0153, B:37:0x0235, B:38:0x0245, B:40:0x025b, B:41:0x0294, B:44:0x02b0, B:46:0x02ca, B:48:0x02d0, B:49:0x02d6, B:51:0x02dc, B:53:0x02e2, B:55:0x02e9, B:58:0x02ec, B:60:0x02f2, B:61:0x02fc, B:63:0x0360, B:65:0x0368, B:68:0x036f, B:70:0x0375, B:71:0x037d, B:73:0x0383, B:76:0x038f, B:79:0x0395, B:99:0x0454, B:108:0x049a, B:129:0x053b, B:135:0x055c, B:137:0x056a, B:139:0x057a, B:140:0x0583, B:175:0x06b0, B:177:0x06bc, B:178:0x06c6, B:180:0x06d2, B:214:0x06ad, B:217:0x05a6, B:219:0x0596, B:222:0x055a, B:230:0x0491, B:258:0x0357, B:260:0x0260, B:262:0x026a, B:264:0x0270, B:265:0x0276, B:267:0x027c, B:269:0x0292, B:273:0x0150, B:274:0x00aa, B:275:0x0060, B:101:0x046c, B:104:0x047e, B:107:0x0489, B:233:0x0308, B:234:0x031a, B:236:0x0320, B:239:0x032c, B:242:0x0336, B:245:0x0344, B:252:0x034e, B:254:0x0354, B:152:0x05a8, B:210:0x0625, B:186:0x06a9, B:158:0x062d, B:160:0x0637, B:162:0x0641, B:164:0x0649, B:166:0x065e, B:167:0x0671, B:169:0x067b, B:171:0x0683, B:173:0x0698, B:188:0x05ca, B:190:0x05d4, B:192:0x05de, B:194:0x05e6, B:199:0x05fd, B:201:0x0607, B:203:0x060f, B:131:0x054c, B:134:0x0557, B:147:0x0598, B:150:0x05a3, B:18:0x0105, B:20:0x010d, B:22:0x0113, B:23:0x0119, B:25:0x011f, B:27:0x0129, B:29:0x0145, B:33:0x014d), top: B:8:0x0017, inners: #1, #3, #4, #13, #14, #15 }] */ /* JADX WARN: Removed duplicated region for block: B:180:0x06d2 A[Catch: Exception -> 0x0241, TRY_LEAVE, TryCatch #16 {Exception -> 0x0241, blocks: (B:9:0x0017, B:12:0x0064, B:16:0x00af, B:35:0x0153, B:37:0x0235, B:38:0x0245, B:40:0x025b, B:41:0x0294, B:44:0x02b0, B:46:0x02ca, B:48:0x02d0, B:49:0x02d6, B:51:0x02dc, B:53:0x02e2, B:55:0x02e9, B:58:0x02ec, B:60:0x02f2, B:61:0x02fc, B:63:0x0360, B:65:0x0368, B:68:0x036f, B:70:0x0375, B:71:0x037d, B:73:0x0383, B:76:0x038f, B:79:0x0395, B:99:0x0454, B:108:0x049a, B:129:0x053b, B:135:0x055c, B:137:0x056a, B:139:0x057a, B:140:0x0583, B:175:0x06b0, B:177:0x06bc, B:178:0x06c6, B:180:0x06d2, B:214:0x06ad, B:217:0x05a6, B:219:0x0596, B:222:0x055a, B:230:0x0491, B:258:0x0357, B:260:0x0260, B:262:0x026a, B:264:0x0270, B:265:0x0276, B:267:0x027c, B:269:0x0292, B:273:0x0150, B:274:0x00aa, B:275:0x0060, B:101:0x046c, B:104:0x047e, B:107:0x0489, B:233:0x0308, B:234:0x031a, B:236:0x0320, B:239:0x032c, B:242:0x0336, B:245:0x0344, B:252:0x034e, B:254:0x0354, B:152:0x05a8, B:210:0x0625, B:186:0x06a9, B:158:0x062d, B:160:0x0637, B:162:0x0641, B:164:0x0649, B:166:0x065e, B:167:0x0671, B:169:0x067b, B:171:0x0683, B:173:0x0698, B:188:0x05ca, B:190:0x05d4, B:192:0x05de, B:194:0x05e6, B:199:0x05fd, B:201:0x0607, B:203:0x060f, B:131:0x054c, B:134:0x0557, B:147:0x0598, B:150:0x05a3, B:18:0x0105, B:20:0x010d, B:22:0x0113, B:23:0x0119, B:25:0x011f, B:27:0x0129, B:29:0x0145, B:33:0x014d), top: B:8:0x0017, inners: #1, #3, #4, #13, #14, #15 }] */ /* JADX WARN: Unreachable blocks removed: 1, instructions: 1 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static com.mbridge.msdk.c.g a(org.json.JSONObject r18) { /* Method dump skipped, instructions count: 1766 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.c.b.a(org.json.JSONObject):com.mbridge.msdk.c.g"); } private static Map e(String str) { try { if (TextUtils.isEmpty(str)) { return null; } HashMap hashMap = new HashMap(); JSONObject jSONObject = new JSONObject(str); Iterator keys = jSONObject.keys(); while (keys.hasNext()) { String next = keys.next(); a aVar = new a(); JSONObject optJSONObject = jSONObject.optJSONObject(next); if (optJSONObject != null) { aVar.a(optJSONObject); } hashMap.put(next, aVar); } return hashMap; } catch (JSONException e) { if (MBridgeConstans.DEBUG) { e.printStackTrace(); } return null; } catch (Exception e2) { if (MBridgeConstans.DEBUG) { e2.printStackTrace(); } return null; } } public final boolean z(int i) { return this.ax.contains(Integer.valueOf(i)); } public String toString() { return " cfc=" + this.v + " getpf=" + this.M + " rurl=" + this.aE; } public final void aL() { String language = Locale.getDefault().getLanguage(); if (TextUtils.isEmpty(this.C) || TextUtils.isEmpty(this.A) || TextUtils.isEmpty(this.B) || TextUtils.isEmpty(this.z)) { if (TextUtils.isEmpty(language) || !language.equals("zh")) { this.C = "Confirm to close? "; this.A = "You will not be rewarded after closing the window"; this.B = "Close it"; this.z = "Continue"; } else { this.C = "确认关闭?"; this.A = "关闭后您将不会获得任何奖励噢~ "; this.B = "确认关闭"; this.z = "继续观看"; } } if (TextUtils.isEmpty(this.C) || TextUtils.isEmpty(this.A) || TextUtils.isEmpty(this.B) || TextUtils.isEmpty(this.y)) { if (TextUtils.isEmpty(language) || !language.equals("zh")) { this.C = "Confirm to close? "; this.A = "You will not be rewarded after closing the window"; this.B = "Close it"; this.y = "Continue"; return; } this.C = "确认关闭?"; this.A = "关闭后您将不会获得任何奖励噢~ "; this.B = "确认关闭"; this.y = "继续试玩"; } } public static class a { private List a; private List b; private List c; private List d; public final List a() { return this.a; } public final List b() { return this.b; } public final List c() { return this.c; } public final List d() { return this.d; } public final void a(JSONObject jSONObject) { try { JSONArray optJSONArray = jSONObject.optJSONArray("x"); if (optJSONArray != null) { this.c = s.a(optJSONArray); } JSONArray optJSONArray2 = jSONObject.optJSONArray("y"); if (optJSONArray2 != null) { this.d = s.a(optJSONArray2); } JSONArray optJSONArray3 = jSONObject.optJSONArray("width"); if (optJSONArray3 != null) { this.b = s.a(optJSONArray3); } JSONArray optJSONArray4 = jSONObject.optJSONArray("height"); if (optJSONArray4 != null) { this.a = s.a(optJSONArray4); } } catch (Exception e) { if (MBridgeConstans.DEBUG) { e.printStackTrace(); } } } } /* renamed from: com.mbridge.msdk.c.b$b, reason: collision with other inner class name */ public static class C0189b { private String a; private JSONArray b; private String c; private String d; private String e; private String f; public final String a() { return this.a; } public final JSONArray b() { return this.b; } public final String c() { return this.c; } public final String d() { return this.d; } public final String e() { return this.e; } public final String f() { return this.f; } public static C0189b a(JSONObject jSONObject) { if (jSONObject == null) { jSONObject = new JSONObject(); } C0189b c0189b = new C0189b(); Context c = com.mbridge.msdk.foundation.controller.c.m().c(); c0189b.f = jSONObject.optString("title", c.getString(x.a(c, "mbridge_cm_feedback_dialog_title", "string"))); c0189b.a = jSONObject.optString("cancel", c.getString(x.a(c, "mbridge_cm_feedback_dialog_close_close", "string"))); c0189b.d = jSONObject.optString("submit", c.getString(x.a(c, "mbridge_cm_feedback_dialog_close_submit", "string"))); c0189b.e = jSONObject.optString("submit_notice", c.getString(x.a(c, "mbridge_cm_feedback_dialog_submit_notice", "string"))); c0189b.c = jSONObject.optString(ShareConstants.WEB_DIALOG_PARAM_PRIVACY, c.getString(x.a(c, "mbridge_cm_feedback_dialog_privacy_des", "string"))); JSONArray optJSONArray = jSONObject.optJSONArray("content"); c0189b.b = optJSONArray; if (optJSONArray == null) { JSONArray jSONArray = new JSONArray(); c0189b.b = jSONArray; jSONArray.put(c.getString(x.a(c, "mbridge_cm_feedback_dialog_content_not_play", "string"))); c0189b.b.put(c.getString(x.a(c, "mbridge_cm_feedback_dialog_content_sound_problems", "string"))); c0189b.b.put(c.getString(x.a(c, "mbridge_cm_feedback_dialog_content_misleading", "string"))); c0189b.b.put(c.getString(x.a(c, "mbridge_cm_feedback_dialog_content_fraud", "string"))); c0189b.b.put(c.getString(x.a(c, "mbridge_cm_feedback_dialog_content_por_violence", "string"))); c0189b.b.put(c.getString(x.a(c, "mbridge_cm_feedback_dialog_content_other", "string"))); } return c0189b; } } }