Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 k.java 源代码,内容仅作参考
package com.ironsource.mediationsdk.utils;
import android.content.Context;
import android.text.TextUtils;
import com.google.android.exoplayer2.C;
import com.google.android.gms.nearby.messages.Strategy;
import com.ironsource.environment.StringUtils;
import com.ironsource.mediationsdk.InitConfig;
import com.ironsource.mediationsdk.adunit.data.DataKeys;
import com.ironsource.mediationsdk.model.ApplicationAuctionSettings;
import com.ironsource.mediationsdk.model.ApplicationExternalSettings;
import com.ironsource.mediationsdk.model.BannerPlacement;
import com.ironsource.mediationsdk.model.InterstitialPlacement;
import com.ironsource.mediationsdk.model.NativeAdConfigurations;
import com.ironsource.mediationsdk.model.NativeAdPlacement;
import com.ironsource.mediationsdk.model.NetworkSettings;
import com.ironsource.mediationsdk.model.OfferwallPlacement;
import com.ironsource.mediationsdk.model.Placement;
import com.ironsource.mediationsdk.model.TestSuiteSettings;
import com.ironsource.mediationsdk.model.m;
import com.ironsource.mediationsdk.model.p;
import com.ironsource.mediationsdk.model.q;
import com.ironsource.mediationsdk.model.r;
import com.ironsource.sdk.controller.x;
import com.kidoz.sdk.api.general.UniquePlacement.UniquePlacementId;
import com.kidoz.sdk.api.players.web_player.WebPreferenceConstants;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.vungle.warren.model.ReportDBAdapter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class k {
private final int A;
private final int B;
private final int C;
private final boolean D;
private final String E;
private final String F;
private final String G;
private final String H;
private final String I;
private final String J;
private final String K;
private final String L;
private final String M;
private final String N;
private final String O;
private final String P;
private final String Q;
private final String R;
private final String S;
private final String T;
private final String U;
private final String V;
private final String W;
private final String X;
private final String Y;
private final String Z;
public com.ironsource.mediationsdk.model.o f5556a;
private final String aA;
private final String aB;
private final String aC;
private final String aD;
private final String aE;
private final String aF;
private final String aG;
private final String aH;
private final String aI;
private final String aJ;
private final String aK;
private final String aL;
private final String aM;
private final String aN;
private final String aO;
private final String aP;
private final String aQ;
private final String aR;
private final String aS;
private final String aT;
private final String aU;
private final String aV;
private final String aW;
private final String aX;
private final String aY;
private final String aZ;
private final String aa;
private final String ab;
private final String ac;
private final String ad;
private final String ae;
private final String af;
private final String ag;
private final String ah;
private final String ai;
private final String aj;
private final String ak;
private final String al;
private final String am;
private final String an;
private final String ao;
private final String ap;
private final String aq;
private final String ar;
private final String as;
private final String at;
private final String au;
private final String av;
private final String aw;
private final String ax;
private final String ay;
private final String az;
public p b;
private final String bA;
private final String bB;
private final String bC;
private final String bD;
private final String bE;
private String bF;
private String bG;
private Context bH;
private final String ba;
private final String bb;
private final String bc;
private final String bd;
private final String be;
private final String bf;
private final String bg;
private final String bh;
private final String bi;
private final String bj;
private final String bk;
private final String bl;
private final String bm;
private final String bn;
private final String bo;
private final String bp;
private final String bq;
private final String br;
private final String bs;
private final String bt;
private final String bu;
private final String bv;
private final String bw;
private final String bx;
private final String by;
private final String bz;
public com.ironsource.mediationsdk.model.f c;
public JSONObject d;
public int e;
private final String f;
private final int g;
private final int h;
private final int i;
private final int j;
private final int k;
private final int l;
private final int m;
private final int n;
private final int o;
private final int p;
private final int q;
private final int r;
private final int s;
private final int t;
private final long u;
private final int v;
private final boolean w;
private final boolean x;
private final long y;
private final int z;
public static final class a {
public static final int f5557a = 1;
public static final int b = 2;
public static final int c = 3;
private static final int[] d = {1, 2, 3};
}
public k(Context context, String str, String str2, String str3) {
this.f = CampaignEx.JSON_NATIVE_VIDEO_ERROR;
this.g = 3;
this.h = 2;
this.i = 60;
this.j = 10000;
this.k = 10000;
this.l = -1;
this.m = 5000;
this.n = Strategy.TTL_SECONDS_DEFAULT;
this.o = 3;
this.p = 3;
this.q = 3;
this.r = 0;
this.s = 2;
this.t = 15;
this.u = 10000L;
this.v = 0;
this.w = false;
this.x = false;
this.y = C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
this.z = 30000;
this.A = -1;
this.B = 5000;
this.C = 1;
this.D = false;
this.E = "providerOrder";
this.F = "providerSettings";
this.G = "configurations";
this.H = IronSourceConstants.EVENTS_GENERIC_PARAMS;
this.I = "adUnits";
this.J = "providerLoadName";
this.K = "application";
this.L = "rewardedVideo";
this.M = IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE;
this.N = "offerwall";
this.O = "banner";
this.P = "nativeAd";
this.Q = "integration";
this.R = "loggers";
this.S = "segment";
this.T = "events";
this.U = "crashReporter";
this.V = "token";
this.W = "external";
this.X = "mediationTypes";
this.Y = "providerDefaultInstance";
this.Z = "testSuite";
this.aa = "controllerUrl";
this.ab = WebPreferenceConstants.PREFERENCES;
this.ac = "collectBiddingDataTimeout";
this.ad = "collectBiddingDataAsyncEnabled";
this.ae = "maxNumOfAdaptersToLoadOnStart";
this.af = "advancedLoading";
this.ag = "adapterTimeOutInSeconds";
this.ah = "atim";
this.ai = "bannerInterval";
this.aj = "isOneFlow";
this.ak = "loadRVInterval";
this.al = "expiredDurationInMinutes";
this.am = "server";
this.an = "publisher";
this.ao = "console";
this.ap = "sendUltraEvents";
this.aq = "sendEventsToggle";
this.ar = "eventsCompression";
this.as = "eventsCompressionLevel";
this.at = "serverEventsURL";
this.au = "serverEventsType";
this.av = "backupThreshold";
this.aw = "maxNumberOfEvents";
this.ax = "maxEventsPerBatch";
this.ay = "optOut";
this.az = "optIn";
this.aA = "triggerEvents";
this.aB = "nonConnectivityEvents";
this.aC = "shouldSendPublisherLogsOnUIThread";
this.aD = "pixel";
this.aE = "pixelEventsUrl";
this.aF = "pixelEventsEnabled";
this.aG = "placements";
this.aH = ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID;
this.aI = "placementName";
this.aJ = "delivery";
this.aK = "isDefault";
this.aL = "capping";
this.aM = "pacing";
this.aN = "enabled";
this.aO = "maxImpressions";
this.aP = "numOfSeconds";
this.aQ = "unit";
this.aR = "virtualItemName";
this.aS = "virtualItemCount";
this.aT = "uuidEnabled";
this.aU = "abt";
this.aV = "delayLoadFailure";
this.aW = "keysToInclude";
this.aX = "reporterURL";
this.aY = "reporterKeyword";
this.aZ = "includeANR";
this.ba = "timeout";
this.bb = "setIgnoreDebugger";
this.bc = "adSourceName";
this.bd = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
this.be = "mpis";
this.bf = "auction";
this.bg = "auctionData";
this.bh = "auctioneerURL";
this.bi = "extAuctioneerURL";
this.bj = IronSourceConstants.EVENTS_PROGRAMMATIC;
this.bk = "objectPerWaterfall";
this.bl = "minTimeBeforeFirstAuction";
this.bm = "timeToWaitBeforeAuction";
this.bn = "timeToWaitBeforeLoad";
this.bo = "auctionRetryInterval";
this.bp = "isAuctionOnShowStart";
this.bq = "isLoadWhileShow";
this.br = IronSourceConstants.AUCTION_TRIALS;
this.bs = "auctionTimeout";
this.bt = "auctionSavedHistory";
this.bu = "disableLoadWhileShowSupportFor";
this.bv = "timeToDeleteOldWaterfallAfterAuction";
this.bw = "compressAuctionRequest";
this.bx = "compressAuctionResponse";
this.by = "encryptionVersion";
this.bz = "shouldSendBannerBURLFromImpression";
this.bA = "optInKeys";
this.bB = "tokenGenericParams";
this.bC = "oneToken";
this.bD = "compressToken";
this.bE = "compressExternalToken";
this.e = a.f5557a;
this.bH = context;
try {
this.d = TextUtils.isEmpty(str3) ? new JSONObject() : new JSONObject(str3);
h();
i();
g();
this.bF = TextUtils.isEmpty(str) ? "" : str;
this.bG = TextUtils.isEmpty(str2) ? "" : str2;
} catch (JSONException e) {
e.printStackTrace();
e();
}
}
public k(k kVar) {
this.f = CampaignEx.JSON_NATIVE_VIDEO_ERROR;
this.g = 3;
this.h = 2;
this.i = 60;
this.j = 10000;
this.k = 10000;
this.l = -1;
this.m = 5000;
this.n = Strategy.TTL_SECONDS_DEFAULT;
this.o = 3;
this.p = 3;
this.q = 3;
this.r = 0;
this.s = 2;
this.t = 15;
this.u = 10000L;
this.v = 0;
this.w = false;
this.x = false;
this.y = C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
this.z = 30000;
this.A = -1;
this.B = 5000;
this.C = 1;
this.D = false;
this.E = "providerOrder";
this.F = "providerSettings";
this.G = "configurations";
this.H = IronSourceConstants.EVENTS_GENERIC_PARAMS;
this.I = "adUnits";
this.J = "providerLoadName";
this.K = "application";
this.L = "rewardedVideo";
this.M = IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE;
this.N = "offerwall";
this.O = "banner";
this.P = "nativeAd";
this.Q = "integration";
this.R = "loggers";
this.S = "segment";
this.T = "events";
this.U = "crashReporter";
this.V = "token";
this.W = "external";
this.X = "mediationTypes";
this.Y = "providerDefaultInstance";
this.Z = "testSuite";
this.aa = "controllerUrl";
this.ab = WebPreferenceConstants.PREFERENCES;
this.ac = "collectBiddingDataTimeout";
this.ad = "collectBiddingDataAsyncEnabled";
this.ae = "maxNumOfAdaptersToLoadOnStart";
this.af = "advancedLoading";
this.ag = "adapterTimeOutInSeconds";
this.ah = "atim";
this.ai = "bannerInterval";
this.aj = "isOneFlow";
this.ak = "loadRVInterval";
this.al = "expiredDurationInMinutes";
this.am = "server";
this.an = "publisher";
this.ao = "console";
this.ap = "sendUltraEvents";
this.aq = "sendEventsToggle";
this.ar = "eventsCompression";
this.as = "eventsCompressionLevel";
this.at = "serverEventsURL";
this.au = "serverEventsType";
this.av = "backupThreshold";
this.aw = "maxNumberOfEvents";
this.ax = "maxEventsPerBatch";
this.ay = "optOut";
this.az = "optIn";
this.aA = "triggerEvents";
this.aB = "nonConnectivityEvents";
this.aC = "shouldSendPublisherLogsOnUIThread";
this.aD = "pixel";
this.aE = "pixelEventsUrl";
this.aF = "pixelEventsEnabled";
this.aG = "placements";
this.aH = ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID;
this.aI = "placementName";
this.aJ = "delivery";
this.aK = "isDefault";
this.aL = "capping";
this.aM = "pacing";
this.aN = "enabled";
this.aO = "maxImpressions";
this.aP = "numOfSeconds";
this.aQ = "unit";
this.aR = "virtualItemName";
this.aS = "virtualItemCount";
this.aT = "uuidEnabled";
this.aU = "abt";
this.aV = "delayLoadFailure";
this.aW = "keysToInclude";
this.aX = "reporterURL";
this.aY = "reporterKeyword";
this.aZ = "includeANR";
this.ba = "timeout";
this.bb = "setIgnoreDebugger";
this.bc = "adSourceName";
this.bd = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
this.be = "mpis";
this.bf = "auction";
this.bg = "auctionData";
this.bh = "auctioneerURL";
this.bi = "extAuctioneerURL";
this.bj = IronSourceConstants.EVENTS_PROGRAMMATIC;
this.bk = "objectPerWaterfall";
this.bl = "minTimeBeforeFirstAuction";
this.bm = "timeToWaitBeforeAuction";
this.bn = "timeToWaitBeforeLoad";
this.bo = "auctionRetryInterval";
this.bp = "isAuctionOnShowStart";
this.bq = "isLoadWhileShow";
this.br = IronSourceConstants.AUCTION_TRIALS;
this.bs = "auctionTimeout";
this.bt = "auctionSavedHistory";
this.bu = "disableLoadWhileShowSupportFor";
this.bv = "timeToDeleteOldWaterfallAfterAuction";
this.bw = "compressAuctionRequest";
this.bx = "compressAuctionResponse";
this.by = "encryptionVersion";
this.bz = "shouldSendBannerBURLFromImpression";
this.bA = "optInKeys";
this.bB = "tokenGenericParams";
this.bC = "oneToken";
this.bD = "compressToken";
this.bE = "compressExternalToken";
this.e = a.f5557a;
try {
this.bH = kVar.bH;
this.d = new JSONObject(kVar.d.toString());
this.bF = kVar.bF;
this.bG = kVar.bG;
this.f5556a = kVar.f5556a;
this.b = kVar.b;
this.c = kVar.c;
this.e = kVar.e;
} catch (Exception unused) {
e();
}
}
private static int a(JSONObject jSONObject, JSONObject jSONObject2, String str, int i) {
int i2 = 0;
if (jSONObject.has(str)) {
i2 = jSONObject.optInt(str, 0);
} else if (jSONObject2.has(str)) {
i2 = jSONObject2.optInt(str, 0);
}
return i2 == 0 ? i : i2;
}
private static long a(JSONObject jSONObject, JSONObject jSONObject2, String str, long j) {
long optLong = jSONObject.has(str) ? jSONObject.optLong(str, 0L) : jSONObject2.has(str) ? jSONObject2.optLong(str, 0L) : 0L;
if (optLong == 0) {
return 10000L;
}
return optLong;
}
private static com.ironsource.mediationsdk.model.m a(JSONObject jSONObject) {
com.ironsource.mediationsdk.model.n nVar = null;
if (jSONObject == null) {
return null;
}
m.a aVar = new m.a();
aVar.f5467a = jSONObject.optBoolean("delivery", true);
JSONObject optJSONObject = jSONObject.optJSONObject("capping");
if (optJSONObject != null) {
String optString = optJSONObject.optString("unit");
if (!TextUtils.isEmpty(optString)) {
if (com.ironsource.mediationsdk.model.n.PER_DAY.toString().equals(optString)) {
nVar = com.ironsource.mediationsdk.model.n.PER_DAY;
} else if (com.ironsource.mediationsdk.model.n.PER_HOUR.toString().equals(optString)) {
nVar = com.ironsource.mediationsdk.model.n.PER_HOUR;
}
}
int optInt = optJSONObject.optInt("maxImpressions", 0);
aVar.a(optJSONObject.optBoolean("enabled", false) && optInt > 0, nVar, optInt);
}
JSONObject optJSONObject2 = jSONObject.optJSONObject("pacing");
if (optJSONObject2 != null) {
int optInt2 = optJSONObject2.optInt("numOfSeconds", 0);
aVar.a(optJSONObject2.optBoolean("enabled", false) && optInt2 > 0, optInt2);
}
return aVar.a();
}
private static int[] a(JSONObject jSONObject, String str) {
JSONArray optJSONArray = jSONObject.optJSONArray(str);
if (optJSONArray == null) {
return null;
}
int[] iArr = new int[optJSONArray.length()];
for (int i = 0; i < optJSONArray.length(); i++) {
iArr[i] = optJSONArray.optInt(i);
}
return iArr;
}
private static JSONObject b(JSONObject jSONObject, String str) {
if (jSONObject != null) {
return jSONObject.optJSONObject(str);
}
return null;
}
private void e() {
this.d = new JSONObject();
this.bF = "";
this.bG = "";
this.f5556a = new com.ironsource.mediationsdk.model.o();
this.b = p.a();
this.c = new com.ironsource.mediationsdk.model.f();
}
private boolean f() {
JSONObject b;
JSONArray optJSONArray;
JSONObject b2 = b(this.d, "providerOrder");
JSONArray names = b2.names();
if (names == null) {
return true;
}
JSONObject b3 = b(b(this.d, "configurations"), "adUnits");
for (int i = 0; i < names.length(); i++) {
String optString = names.optString(i);
JSONArray optJSONArray2 = b2.optJSONArray(optString);
if (optJSONArray2 != null && optJSONArray2.length() != 0 && (b = b(b3, optString)) != null && ((optJSONArray = b.optJSONArray("placements")) == null || optJSONArray.length() == 0)) {
return false;
}
}
return true;
}
private void g() {
try {
JSONObject b = b(this.d, "providerOrder");
JSONArray optJSONArray = b.optJSONArray("rewardedVideo");
JSONArray optJSONArray2 = b.optJSONArray(IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE);
JSONArray optJSONArray3 = b.optJSONArray("banner");
JSONArray optJSONArray4 = b.optJSONArray("nativeAd");
this.f5556a = new com.ironsource.mediationsdk.model.o();
if (optJSONArray != null && this.c != null && this.c.f5462a != null) {
for (int i = 0; i < optJSONArray.length(); i++) {
String optString = optJSONArray.optString(i);
com.ironsource.mediationsdk.model.o oVar = this.f5556a;
if (!TextUtils.isEmpty(optString)) {
oVar.f5469a.add(optString);
}
NetworkSettings a2 = p.a().a(optString);
if (a2 != null) {
a2.setRewardedVideoPriority(i);
}
}
}
if (optJSONArray2 != null && this.c != null && this.c.b != null) {
for (int i2 = 0; i2 < optJSONArray2.length(); i2++) {
String optString2 = optJSONArray2.optString(i2);
com.ironsource.mediationsdk.model.o oVar2 = this.f5556a;
if (!TextUtils.isEmpty(optString2)) {
oVar2.b.add(optString2);
}
NetworkSettings a3 = p.a().a(optString2);
if (a3 != null) {
a3.setInterstitialPriority(i2);
}
}
}
if (optJSONArray3 != null) {
for (int i3 = 0; i3 < optJSONArray3.length(); i3++) {
String optString3 = optJSONArray3.optString(i3);
com.ironsource.mediationsdk.model.o oVar3 = this.f5556a;
if (!TextUtils.isEmpty(optString3)) {
oVar3.c.add(optString3);
}
NetworkSettings a4 = p.a().a(optString3);
if (a4 != null) {
a4.setBannerPriority(i3);
}
}
}
if (optJSONArray4 != null) {
for (int i4 = 0; i4 < optJSONArray4.length(); i4++) {
String optString4 = optJSONArray4.optString(i4);
com.ironsource.mediationsdk.model.o oVar4 = this.f5556a;
if (!TextUtils.isEmpty(optString4)) {
oVar4.d.add(optString4);
}
NetworkSettings a5 = p.a().a(optString4);
if (a5 != null) {
a5.setNativeAdPriority(i4);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void h() {
String str;
JSONObject jSONObject;
Iterator<String> it;
NetworkSettings networkSettings;
p pVar;
String str2 = "Mediation";
try {
this.b = p.a();
JSONObject b = b(this.d, "providerSettings");
Iterator<String> keys = b.keys();
while (keys.hasNext()) {
String next = keys.next();
JSONObject optJSONObject = b.optJSONObject(next);
if (optJSONObject != null) {
boolean optBoolean = optJSONObject.optBoolean("mpis", false);
String optString = optJSONObject.optString(IronSourceConstants.EVENTS_SUB_PROVIDER_ID, "0");
String optString2 = optJSONObject.optString("adSourceName", null);
String optString3 = optJSONObject.optString("providerLoadName", next);
String optString4 = optJSONObject.optString("providerDefaultInstance", optString3);
JSONObject b2 = b(optJSONObject, "adUnits");
JSONObject b3 = b(optJSONObject, "application");
JSONObject b4 = b(b2, "rewardedVideo");
JSONObject b5 = b(b2, IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE);
JSONObject b6 = b(b2, "banner");
JSONObject b7 = b(b2, "nativeAd");
JSONObject mergeJsons = IronSourceUtils.mergeJsons(b4, b3);
JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(b5, b3);
JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(b6, b3);
JSONObject mergeJsons4 = IronSourceUtils.mergeJsons(b7, b3);
if (this.b.b(next)) {
NetworkSettings a2 = this.b.a(next);
JSONObject rewardedVideoSettings = a2.getRewardedVideoSettings();
JSONObject interstitialSettings = a2.getInterstitialSettings();
JSONObject bannerSettings = a2.getBannerSettings();
JSONObject nativeAdSettings = a2.getNativeAdSettings();
a2.setRewardedVideoSettings(IronSourceUtils.mergeJsons(rewardedVideoSettings, mergeJsons));
a2.setInterstitialSettings(IronSourceUtils.mergeJsons(interstitialSettings, mergeJsons2));
a2.setBannerSettings(IronSourceUtils.mergeJsons(bannerSettings, mergeJsons3));
a2.setNativeAdSettings(IronSourceUtils.mergeJsons(nativeAdSettings, mergeJsons4));
a2.setIsMultipleInstances(optBoolean);
a2.setSubProviderId(optString);
a2.setAdSourceNameForEvents(optString2);
} else {
String lowerCase = StringUtils.toLowerCase(optString3);
jSONObject = b;
if (this.b.b(str2) && (StringUtils.toLowerCase(IronSourceConstants.SUPERSONIC_CONFIG_NAME).equals(lowerCase) || StringUtils.toLowerCase(IronSourceConstants.IRONSOURCE_CONFIG_NAME).equals(lowerCase))) {
NetworkSettings a3 = this.b.a(str2);
str = str2;
it = keys;
networkSettings = new NetworkSettings(next, optString3, optString4, b3, IronSourceUtils.mergeJsons(new JSONObject(a3.getRewardedVideoSettings().toString()), mergeJsons), IronSourceUtils.mergeJsons(new JSONObject(a3.getInterstitialSettings().toString()), mergeJsons2), IronSourceUtils.mergeJsons(new JSONObject(a3.getBannerSettings().toString()), mergeJsons3), IronSourceUtils.mergeJsons(new JSONObject(a3.getNativeAdSettings().toString()), mergeJsons4));
networkSettings.setIsMultipleInstances(optBoolean);
networkSettings.setSubProviderId(optString);
networkSettings.setAdSourceNameForEvents(optString2);
pVar = this.b;
} else {
str = str2;
it = keys;
networkSettings = new NetworkSettings(next, optString3, optString4, b3, mergeJsons, mergeJsons2, mergeJsons3, mergeJsons4);
networkSettings.setIsMultipleInstances(optBoolean);
networkSettings.setSubProviderId(optString);
networkSettings.setAdSourceNameForEvents(optString2);
pVar = this.b;
}
pVar.a(networkSettings);
}
} else {
str = str2;
jSONObject = b;
it = keys;
}
b = jSONObject;
str2 = str;
keys = it;
}
this.b.b();
} catch (Exception e) {
e.printStackTrace();
}
}
private void i() {
Exception exc;
JSONObject jSONObject;
JSONObject jSONObject2;
String str;
String str2;
int i;
boolean z;
String str3;
String str4;
int[] iArr;
int[] iArr2;
int[] iArr3;
int[] iArr4;
String str5;
String str6;
String str7;
String str8;
c cVar;
k kVar;
q qVar;
Placement placement;
k kVar2;
String str9;
String str10;
String str11;
JSONObject jSONObject3;
String str12;
com.ironsource.mediationsdk.model.h hVar;
String str13;
k kVar3;
String str14;
String str15;
String str16;
com.ironsource.mediationsdk.model.d dVar;
String str17;
JSONObject jSONObject4;
k kVar4;
String str18;
JSONObject jSONObject5;
NativeAdConfigurations nativeAdConfigurations;
String str19;
String str20;
com.ironsource.mediationsdk.model.k kVar5;
boolean z2;
JSONObject b;
int[] iArr5;
int[] iArr6;
int[] iArr7;
int[] iArr8;
JSONArray jSONArray;
OfferwallPlacement offerwallPlacement;
int[] iArr9;
int[] iArr10;
int[] iArr11;
int[] iArr12;
JSONObject jSONObject6;
c cVar2;
c cVar3;
JSONObject jSONObject7;
JSONArray jSONArray2;
String str21;
NativeAdPlacement nativeAdPlacement;
boolean z3;
boolean z4;
boolean optBoolean;
JSONArray optJSONArray;
int[] iArr13;
JSONArray optJSONArray2;
int[] iArr14;
JSONArray optJSONArray3;
int[] iArr15;
JSONArray optJSONArray4;
int[] iArr16;
String str22;
JSONObject jSONObject8;
c cVar4;
JSONObject jSONObject9;
JSONArray jSONArray3;
String str23;
BannerPlacement bannerPlacement;
int i2;
boolean z5;
int[] iArr17;
int[] iArr18;
int[] iArr19;
int[] iArr20;
String str24;
JSONObject jSONObject10;
c cVar5;
JSONArray jSONArray4;
JSONObject jSONObject11;
String str25;
InterstitialPlacement interstitialPlacement;
try {
JSONObject b2 = b(this.d, "configurations");
JSONObject b3 = b(b2, "adUnits");
JSONObject b4 = b(b2, "application");
JSONObject b5 = b(b3, "rewardedVideo");
JSONObject b6 = b(b3, IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE);
JSONObject b7 = b(b3, "offerwall");
JSONObject b8 = b(b3, "banner");
JSONObject b9 = b(b3, "nativeAd");
JSONObject b10 = b(b4, "events");
JSONObject b11 = b(b4, "loggers");
JSONObject b12 = b(b4, "token");
JSONObject b13 = b(b4, "segment");
JSONObject b14 = b(b4, "auction");
JSONObject b15 = b(b4, "crashReporter");
JSONObject b16 = b(b4, WebPreferenceConstants.PREFERENCES);
JSONObject b17 = b(b4, "external");
JSONObject b18 = b(b10, "pixel");
if (b4 != null) {
jSONObject2 = b15;
jSONObject = b11;
IronSourceUtils.saveBooleanToSharedPrefs(this.bH, "uuidEnabled", b4.optBoolean("uuidEnabled", true));
} else {
jSONObject = b11;
jSONObject2 = b15;
}
if (b10 != null) {
String optString = b10.optString("abt");
if (!TextUtils.isEmpty(optString)) {
com.ironsource.mediationsdk.events.e.d().q = optString;
com.ironsource.mediationsdk.events.i.d().q = optString;
}
}
JSONObject jSONObject12 = b14;
String str26 = "triggerEvents";
String str27 = "optIn";
if (b5 != null) {
try {
JSONArray optJSONArray5 = b5.optJSONArray("placements");
str = "placements";
JSONObject b19 = b(b5, "events");
str2 = "events";
JSONArray jSONArray5 = optJSONArray5;
boolean optBoolean2 = b5.optBoolean("collectBiddingDataAsyncEnabled", false);
long optLong = b5.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
int a2 = a(b5, b4, "maxNumOfAdaptersToLoadOnStart", 2);
int a3 = a(b5, b4, "advancedLoading", 0);
if (a3 > 0) {
i = a3;
z = true;
} else {
i = a2;
z = false;
}
int a4 = a(b5, b4, "adapterTimeOutInSeconds", 60);
int a5 = a(b5, b4, "loadRVInterval", Strategy.TTL_SECONDS_DEFAULT);
int a6 = a(b5, b4, "expiredDurationInMinutes", -1);
int a7 = a(b5, b4, "delayLoadFailure", 3);
JSONObject mergeJsons = IronSourceUtils.mergeJsons(b19, b10);
boolean optBoolean3 = mergeJsons.optBoolean("sendUltraEvents", false);
boolean optBoolean4 = mergeJsons.optBoolean("sendEventsToggle", false);
boolean optBoolean5 = mergeJsons.optBoolean("eventsCompression", false);
int optInt = mergeJsons.optInt("eventsCompressionLevel", -1);
String optString2 = mergeJsons.optString("serverEventsURL", "");
String optString3 = mergeJsons.optString("serverEventsType", "");
int optInt2 = mergeJsons.optInt("backupThreshold", -1);
int optInt3 = mergeJsons.optInt("maxNumberOfEvents", -1);
int optInt4 = mergeJsons.optInt("maxEventsPerBatch", 5000);
JSONArray optJSONArray6 = mergeJsons.optJSONArray("optOut");
if (optJSONArray6 != null) {
int[] iArr21 = new int[optJSONArray6.length()];
str3 = "optOut";
str4 = "maxEventsPerBatch";
for (int i3 = 0; i3 < optJSONArray6.length(); i3++) {
iArr21[i3] = optJSONArray6.optInt(i3);
}
iArr = iArr21;
} else {
str3 = "optOut";
str4 = "maxEventsPerBatch";
iArr = null;
}
JSONArray optJSONArray7 = mergeJsons.optJSONArray(str27);
if (optJSONArray7 != null) {
int[] iArr22 = new int[optJSONArray7.length()];
str27 = str27;
for (int i4 = 0; i4 < optJSONArray7.length(); i4++) {
iArr22[i4] = optJSONArray7.optInt(i4);
}
iArr2 = iArr22;
} else {
str27 = str27;
iArr2 = null;
}
JSONArray optJSONArray8 = mergeJsons.optJSONArray(str26);
if (optJSONArray8 != null) {
int[] iArr23 = new int[optJSONArray8.length()];
str26 = str26;
for (int i5 = 0; i5 < optJSONArray8.length(); i5++) {
iArr23[i5] = optJSONArray8.optInt(i5);
}
iArr3 = iArr23;
} else {
str26 = str26;
iArr3 = null;
}
JSONArray optJSONArray9 = mergeJsons.optJSONArray("nonConnectivityEvents");
if (optJSONArray9 != null) {
int[] iArr24 = new int[optJSONArray9.length()];
for (int i6 = 0; i6 < optJSONArray9.length(); i6++) {
iArr24[i6] = optJSONArray9.optInt(i6);
}
iArr4 = iArr24;
} else {
iArr4 = null;
}
x xVar = new x(optBoolean3, optBoolean4, optBoolean5, optInt, optString2, optString3, optInt2, optInt3, optInt4, iArr, iArr2, iArr3, iArr4);
if (jSONObject12 != null) {
JSONObject b20 = b(jSONObject12, "rewardedVideo");
String optString4 = jSONObject12.optString("auctionData", "");
String optString5 = jSONObject12.optString("auctioneerURL", "");
String optString6 = jSONObject12.optString("extAuctioneerURL", "");
int optInt5 = jSONObject12.optInt(IronSourceConstants.AUCTION_TRIALS, 2);
str6 = "serverEventsType";
long optLong2 = jSONObject12.optLong("auctionTimeout", 10000L);
int optInt6 = jSONObject12.optInt("auctionSavedHistory", 15);
boolean optBoolean6 = jSONObject12.optBoolean("compressAuctionRequest", false);
boolean optBoolean7 = jSONObject12.optBoolean("compressAuctionResponse", false);
int optInt7 = jSONObject12.optInt("encryptionVersion", 1);
jSONObject12 = jSONObject12;
str7 = "maxNumberOfEvents";
str5 = "backupThreshold";
str8 = "serverEventsURL";
c cVar6 = new c(optString4, optString5, optString6, optInt5, optInt6, optLong2, b20.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b20.optInt("minTimeBeforeFirstAuction", 2000), b20.optInt("auctionRetryInterval", 30000), b20.optInt("timeToWaitBeforeAuction", 5000), b20.optInt("timeToWaitBeforeLoad", 50), b20.optBoolean("isAuctionOnShowStart", false), b20.optBoolean("isLoadWhileShow", false), b20.optInt("timeToDeleteOldWaterfallAfterAuction", 30000), optBoolean6, optBoolean7, b20.optBoolean("objectPerWaterfall", false), optInt7, false);
JSONArray optJSONArray10 = b20.optJSONArray("disableLoadWhileShowSupportFor");
if (optJSONArray10 != null) {
for (int i7 = 0; i7 < optJSONArray10.length(); i7++) {
String optString7 = optJSONArray10.optString(i7);
if (!TextUtils.isEmpty(optString7)) {
cVar6.o.add(optString7);
}
}
}
cVar = cVar6;
} else {
str5 = "backupThreshold";
str6 = "serverEventsType";
str7 = "maxNumberOfEvents";
str8 = "serverEventsURL";
cVar = new c();
}
q qVar2 = new q(i, z, a4, a5, a6, xVar, cVar, a7, optBoolean2, optLong);
if (jSONArray5 != null) {
int i8 = 0;
while (i8 < jSONArray5.length()) {
JSONArray jSONArray6 = jSONArray5;
JSONObject optJSONObject = jSONArray6.optJSONObject(i8);
if (optJSONObject != null) {
int optInt8 = optJSONObject.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString8 = optJSONObject.optString("placementName", "");
boolean optBoolean8 = optJSONObject.optBoolean("isDefault", false);
String optString9 = optJSONObject.optString("virtualItemName", "");
int optInt9 = optJSONObject.optInt("virtualItemCount", -1);
com.ironsource.mediationsdk.model.m a8 = a(optJSONObject);
if (optInt8 >= 0 && !TextUtils.isEmpty(optString8) && !TextUtils.isEmpty(optString9) && optInt9 > 0) {
placement = new Placement(optInt8, optString8, optBoolean8, optString9, optInt9, a8);
if (a8 != null) {
kVar = this;
try {
j.a(kVar.bH, placement);
} catch (Exception e) {
exc = e;
exc.printStackTrace();
return;
}
}
if (placement != null && placement != null) {
qVar2.f5471a.add(placement);
if (qVar2.j != null && !placement.isPlacementId(0)) {
}
qVar2.j = placement;
}
i8++;
jSONArray5 = jSONArray6;
}
}
placement = null;
if (placement != null) {
qVar2.f5471a.add(placement);
if (qVar2.j != null) {
}
qVar2.j = placement;
}
i8++;
jSONArray5 = jSONArray6;
}
}
kVar = this;
qVar = qVar2;
} catch (Exception e2) {
e = e2;
exc = e;
exc.printStackTrace();
return;
}
} else {
kVar = this;
str2 = "events";
str5 = "backupThreshold";
str = "placements";
str4 = "maxEventsPerBatch";
str7 = "maxNumberOfEvents";
str6 = "serverEventsType";
str3 = "optOut";
str8 = "serverEventsURL";
qVar = null;
}
if (b6 != null) {
str11 = str;
JSONArray optJSONArray11 = b6.optJSONArray(str11);
String str28 = str2;
JSONObject b21 = b(b6, str28);
String str29 = str8;
boolean optBoolean9 = b6.optBoolean("collectBiddingDataAsyncEnabled", false);
str2 = str28;
long optLong3 = b6.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
int a9 = a(b6, b4, "maxNumOfAdaptersToLoadOnStart", 2);
int a10 = a(b6, b4, "advancedLoading", 0);
if (a10 > 0) {
i2 = a10;
z5 = true;
} else {
i2 = a9;
z5 = false;
}
int a11 = a(b6, b4, "adapterTimeOutInSeconds", 60);
int a12 = a(b6, b4, "delayLoadFailure", 3);
JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(b21, b10);
boolean optBoolean10 = mergeJsons2.optBoolean("sendEventsToggle", false);
boolean optBoolean11 = mergeJsons2.optBoolean("eventsCompression", false);
int optInt10 = mergeJsons2.optInt("eventsCompressionLevel", -1);
str10 = str29;
String optString10 = mergeJsons2.optString(str10, "");
String optString11 = mergeJsons2.optString(str6, "");
String str30 = str5;
int optInt11 = mergeJsons2.optInt(str30, -1);
String str31 = str7;
int optInt12 = mergeJsons2.optInt(str31, -1);
String str32 = str4;
int optInt13 = mergeJsons2.optInt(str32, 5000);
str4 = str32;
String str33 = str3;
JSONArray optJSONArray12 = mergeJsons2.optJSONArray(str33);
if (optJSONArray12 != null) {
str3 = str33;
int[] iArr25 = new int[optJSONArray12.length()];
str5 = str30;
str7 = str31;
for (int i9 = 0; i9 < optJSONArray12.length(); i9++) {
iArr25[i9] = optJSONArray12.optInt(i9);
}
iArr17 = iArr25;
} else {
str5 = str30;
str7 = str31;
str3 = str33;
iArr17 = null;
}
String str34 = str27;
JSONArray optJSONArray13 = mergeJsons2.optJSONArray(str34);
if (optJSONArray13 != null) {
int[] iArr26 = new int[optJSONArray13.length()];
str27 = str34;
for (int i10 = 0; i10 < optJSONArray13.length(); i10++) {
iArr26[i10] = optJSONArray13.optInt(i10);
}
iArr18 = iArr26;
} else {
str27 = str34;
iArr18 = null;
}
String str35 = str26;
JSONArray optJSONArray14 = mergeJsons2.optJSONArray(str35);
if (optJSONArray14 != null) {
int[] iArr27 = new int[optJSONArray14.length()];
str26 = str35;
for (int i11 = 0; i11 < optJSONArray14.length(); i11++) {
iArr27[i11] = optJSONArray14.optInt(i11);
}
iArr19 = iArr27;
} else {
str26 = str35;
iArr19 = null;
}
JSONArray optJSONArray15 = mergeJsons2.optJSONArray("nonConnectivityEvents");
if (optJSONArray15 != null) {
int[] iArr28 = new int[optJSONArray15.length()];
for (int i12 = 0; i12 < optJSONArray15.length(); i12++) {
iArr28[i12] = optJSONArray15.optInt(i12);
}
iArr20 = iArr28;
} else {
iArr20 = null;
}
x xVar2 = new x(false, optBoolean10, optBoolean11, optInt10, optString10, optString11, optInt11, optInt12, optInt13, iArr17, iArr18, iArr19, iArr20);
if (jSONObject12 != null) {
jSONObject10 = jSONObject12;
JSONObject b22 = b(jSONObject10, IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE);
str24 = str6;
str9 = "eventsCompressionLevel";
cVar5 = new c(jSONObject10.optString("auctionData", ""), jSONObject10.optString("auctioneerURL", ""), jSONObject10.optString("extAuctioneerURL", ""), jSONObject10.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject10.optInt("auctionSavedHistory", 15), jSONObject10.optLong("auctionTimeout", 10000L), b22.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b22.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, true, 0, jSONObject10.optBoolean("compressAuctionRequest", false), jSONObject10.optBoolean("compressAuctionResponse", false), b22.optBoolean("objectPerWaterfall", false), jSONObject10.optInt("encryptionVersion", 1), false);
} else {
str24 = str6;
str9 = "eventsCompressionLevel";
jSONObject10 = jSONObject12;
cVar5 = new c();
}
com.ironsource.mediationsdk.model.h hVar2 = new com.ironsource.mediationsdk.model.h(i2, z5, a11, xVar2, cVar5, a12, optBoolean9, optLong3);
if (optJSONArray11 != null) {
int i13 = 0;
while (i13 < optJSONArray11.length()) {
JSONObject optJSONObject2 = optJSONArray11.optJSONObject(i13);
if (optJSONObject2 != null) {
jSONArray4 = optJSONArray11;
int optInt14 = optJSONObject2.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString12 = optJSONObject2.optString("placementName", "");
str25 = str24;
jSONObject11 = jSONObject10;
boolean optBoolean12 = optJSONObject2.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.m a13 = a(optJSONObject2);
if (optInt14 >= 0 && !TextUtils.isEmpty(optString12)) {
interstitialPlacement = new InterstitialPlacement(optInt14, optString12, optBoolean12, a13);
if (a13 != null) {
try {
j.a(this.bH, interstitialPlacement);
} catch (Exception e3) {
e = e3;
exc = e;
exc.printStackTrace();
return;
}
}
if (interstitialPlacement != null && interstitialPlacement != null) {
hVar2.f5463a.add(interstitialPlacement);
if (hVar2.j != null && !interstitialPlacement.isPlacementId(0)) {
}
hVar2.j = interstitialPlacement;
}
i13++;
optJSONArray11 = jSONArray4;
str24 = str25;
jSONObject10 = jSONObject11;
}
} else {
jSONArray4 = optJSONArray11;
jSONObject11 = jSONObject10;
str25 = str24;
}
interstitialPlacement = null;
if (interstitialPlacement != null) {
hVar2.f5463a.add(interstitialPlacement);
if (hVar2.j != null) {
}
hVar2.j = interstitialPlacement;
}
i13++;
optJSONArray11 = jSONArray4;
str24 = str25;
jSONObject10 = jSONObject11;
}
}
kVar2 = this;
jSONObject3 = jSONObject10;
str12 = str24;
hVar = hVar2;
} else {
kVar2 = kVar;
str9 = "eventsCompressionLevel";
str10 = str8;
str11 = str;
jSONObject3 = jSONObject12;
str12 = str6;
hVar = null;
}
if (b8 != null) {
JSONArray optJSONArray16 = b8.optJSONArray(str11);
str15 = str2;
JSONObject b23 = b(b8, str15);
int a14 = a(b8, b4, "maxNumOfAdaptersToLoadOnStart", 1);
String str36 = str11;
long a15 = a(b8, b4, "atim", 10000L);
int a16 = a(b8, b4, "delayLoadFailure", 3);
int a17 = a(b8, b4, "bannerInterval", 60);
if (b8.has("isOneFlow")) {
z3 = false;
optBoolean = b8.optBoolean("isOneFlow", false);
} else {
z3 = false;
if (b4.has("isOneFlow")) {
optBoolean = b4.optBoolean("isOneFlow", false);
} else {
z4 = false;
boolean optBoolean13 = b8.optBoolean("collectBiddingDataAsyncEnabled", z3);
long optLong4 = b8.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(b23, b10);
boolean optBoolean14 = mergeJsons3.optBoolean("sendEventsToggle", false);
boolean optBoolean15 = mergeJsons3.optBoolean("eventsCompression", false);
int optInt15 = mergeJsons3.optInt(str9, -1);
String optString13 = mergeJsons3.optString(str10, "");
str14 = str12;
String optString14 = mergeJsons3.optString(str14, "");
String str37 = str5;
int optInt16 = mergeJsons3.optInt(str37, -1);
String str38 = str7;
int optInt17 = mergeJsons3.optInt(str38, -1);
str13 = str36;
String str39 = str4;
int optInt18 = mergeJsons3.optInt(str39, 5000);
str4 = str39;
String str40 = str3;
optJSONArray = mergeJsons3.optJSONArray(str40);
if (optJSONArray == null) {
str3 = str40;
int[] iArr29 = new int[optJSONArray.length()];
str5 = str37;
str7 = str38;
for (int i14 = 0; i14 < optJSONArray.length(); i14++) {
iArr29[i14] = optJSONArray.optInt(i14);
}
iArr13 = iArr29;
} else {
str5 = str37;
str7 = str38;
str3 = str40;
iArr13 = null;
}
String str41 = str27;
optJSONArray2 = mergeJsons3.optJSONArray(str41);
if (optJSONArray2 == null) {
int[] iArr30 = new int[optJSONArray2.length()];
str27 = str41;
for (int i15 = 0; i15 < optJSONArray2.length(); i15++) {
iArr30[i15] = optJSONArray2.optInt(i15);
}
iArr14 = iArr30;
} else {
str27 = str41;
iArr14 = null;
}
String str42 = str26;
optJSONArray3 = mergeJsons3.optJSONArray(str42);
if (optJSONArray3 == null) {
int[] iArr31 = new int[optJSONArray3.length()];
str26 = str42;
for (int i16 = 0; i16 < optJSONArray3.length(); i16++) {
iArr31[i16] = optJSONArray3.optInt(i16);
}
iArr15 = iArr31;
} else {
str26 = str42;
iArr15 = null;
}
optJSONArray4 = mergeJsons3.optJSONArray("nonConnectivityEvents");
if (optJSONArray4 == null) {
int[] iArr32 = new int[optJSONArray4.length()];
for (int i17 = 0; i17 < optJSONArray4.length(); i17++) {
iArr32[i17] = optJSONArray4.optInt(i17);
}
iArr16 = iArr32;
} else {
iArr16 = null;
}
x xVar3 = new x(false, optBoolean14, optBoolean15, optInt15, optString13, optString14, optInt16, optInt17, optInt18, iArr13, iArr14, iArr15, iArr16);
if (jSONObject3 == null) {
jSONObject8 = jSONObject3;
JSONObject b24 = b(jSONObject8, "banner");
if (b24 != null) {
str22 = "sendEventsToggle";
cVar4 = new c(jSONObject8.optString("auctionData", ""), jSONObject8.optString("auctioneerURL", ""), jSONObject8.optString("extAuctioneerURL", ""), jSONObject8.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject8.optInt("auctionSavedHistory", 15), jSONObject8.optLong("auctionTimeout", 10000L), b24.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b24.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, true, 0, jSONObject8.optBoolean("compressAuctionRequest", false), jSONObject8.optBoolean("compressAuctionResponse", false), b24.optBoolean("objectPerWaterfall", false), jSONObject8.optInt("encryptionVersion", 1), b24.optBoolean("shouldSendBannerBURLFromImpression", true));
} else {
str22 = "sendEventsToggle";
cVar4 = new c();
}
} else {
str22 = "sendEventsToggle";
jSONObject8 = jSONObject3;
cVar4 = new c();
}
com.ironsource.mediationsdk.model.d dVar2 = new com.ironsource.mediationsdk.model.d(a14, a15, xVar3, a17, cVar4, a16, z4, optBoolean13, optLong4);
if (optJSONArray16 != null) {
int i18 = 0;
while (i18 < optJSONArray16.length()) {
JSONObject optJSONObject3 = optJSONArray16.optJSONObject(i18);
if (optJSONObject3 != null) {
jSONArray3 = optJSONArray16;
int optInt19 = optJSONObject3.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString15 = optJSONObject3.optString("placementName", "");
str23 = str22;
jSONObject9 = jSONObject8;
boolean optBoolean16 = optJSONObject3.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.m a18 = a(optJSONObject3);
if (optInt19 >= 0 && !TextUtils.isEmpty(optString15)) {
bannerPlacement = new BannerPlacement(optInt19, optString15, optBoolean16, a18);
if (a18 != null) {
try {
j.a(this.bH, bannerPlacement);
} catch (Exception e4) {
exc = e4;
exc.printStackTrace();
return;
}
}
if (bannerPlacement != null && bannerPlacement != null) {
dVar2.d.add(bannerPlacement);
if (dVar2.e == null || bannerPlacement.isPlacementId(0)) {
dVar2.e = bannerPlacement;
}
}
i18++;
optJSONArray16 = jSONArray3;
str22 = str23;
jSONObject8 = jSONObject9;
}
} else {
jSONObject9 = jSONObject8;
jSONArray3 = optJSONArray16;
str23 = str22;
}
bannerPlacement = null;
if (bannerPlacement != null) {
dVar2.d.add(bannerPlacement);
if (dVar2.e == null) {
}
dVar2.e = bannerPlacement;
}
i18++;
optJSONArray16 = jSONArray3;
str22 = str23;
jSONObject8 = jSONObject9;
}
}
jSONObject3 = jSONObject8;
str16 = str22;
kVar3 = this;
dVar = dVar2;
}
}
z4 = optBoolean;
boolean optBoolean132 = b8.optBoolean("collectBiddingDataAsyncEnabled", z3);
long optLong42 = b8.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
JSONObject mergeJsons32 = IronSourceUtils.mergeJsons(b23, b10);
boolean optBoolean142 = mergeJsons32.optBoolean("sendEventsToggle", false);
boolean optBoolean152 = mergeJsons32.optBoolean("eventsCompression", false);
int optInt152 = mergeJsons32.optInt(str9, -1);
String optString132 = mergeJsons32.optString(str10, "");
str14 = str12;
String optString142 = mergeJsons32.optString(str14, "");
String str372 = str5;
int optInt162 = mergeJsons32.optInt(str372, -1);
String str382 = str7;
int optInt172 = mergeJsons32.optInt(str382, -1);
str13 = str36;
String str392 = str4;
int optInt182 = mergeJsons32.optInt(str392, 5000);
str4 = str392;
String str402 = str3;
optJSONArray = mergeJsons32.optJSONArray(str402);
if (optJSONArray == null) {
}
String str412 = str27;
optJSONArray2 = mergeJsons32.optJSONArray(str412);
if (optJSONArray2 == null) {
}
String str422 = str26;
optJSONArray3 = mergeJsons32.optJSONArray(str422);
if (optJSONArray3 == null) {
}
optJSONArray4 = mergeJsons32.optJSONArray("nonConnectivityEvents");
if (optJSONArray4 == null) {
}
x xVar32 = new x(false, optBoolean142, optBoolean152, optInt152, optString132, optString142, optInt162, optInt172, optInt182, iArr13, iArr14, iArr15, iArr16);
if (jSONObject3 == null) {
}
com.ironsource.mediationsdk.model.d dVar22 = new com.ironsource.mediationsdk.model.d(a14, a15, xVar32, a17, cVar4, a16, z4, optBoolean132, optLong42);
if (optJSONArray16 != null) {
}
jSONObject3 = jSONObject8;
str16 = str22;
kVar3 = this;
dVar = dVar22;
} else {
str13 = str11;
kVar3 = kVar2;
str14 = str12;
str15 = str2;
str16 = "sendEventsToggle";
dVar = null;
}
if (b9 != null) {
String str43 = str13;
try {
JSONArray optJSONArray17 = b9.optJSONArray(str43);
JSONObject b25 = b(b9, str15);
int a19 = a(b9, b4, "maxNumOfAdaptersToLoadOnStart", 1);
String str44 = str14;
long a20 = a(b9, b4, "atim", 10000L);
int a21 = a(b9, b4, "delayLoadFailure", 0);
boolean optBoolean17 = b9.optBoolean("collectBiddingDataAsyncEnabled", false);
str13 = str43;
long optLong5 = b9.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
JSONObject mergeJsons4 = IronSourceUtils.mergeJsons(b25, b10);
str18 = str16;
boolean optBoolean18 = mergeJsons4.optBoolean(str18, false);
boolean optBoolean19 = mergeJsons4.optBoolean("eventsCompression", false);
int optInt20 = mergeJsons4.optInt(str9, -1);
String optString16 = mergeJsons4.optString(str10, "");
str17 = str44;
String optString17 = mergeJsons4.optString(str17, "");
String str45 = str5;
int optInt21 = mergeJsons4.optInt(str45, -1);
String str46 = str7;
int optInt22 = mergeJsons4.optInt(str46, -1);
String str47 = str4;
int optInt23 = mergeJsons4.optInt(str47, 5000);
jSONObject4 = b4;
String str48 = str3;
JSONArray optJSONArray18 = mergeJsons4.optJSONArray(str48);
if (optJSONArray18 != null) {
str3 = str48;
int[] iArr33 = new int[optJSONArray18.length()];
str4 = str47;
str7 = str46;
for (int i19 = 0; i19 < optJSONArray18.length(); i19++) {
iArr33[i19] = optJSONArray18.optInt(i19);
}
iArr9 = iArr33;
} else {
str4 = str47;
str7 = str46;
str3 = str48;
iArr9 = null;
}
String str49 = str27;
JSONArray optJSONArray19 = mergeJsons4.optJSONArray(str49);
if (optJSONArray19 != null) {
int[] iArr34 = new int[optJSONArray19.length()];
str27 = str49;
for (int i20 = 0; i20 < optJSONArray19.length(); i20++) {
iArr34[i20] = optJSONArray19.optInt(i20);
}
iArr10 = iArr34;
} else {
str27 = str49;
iArr10 = null;
}
String str50 = str26;
JSONArray optJSONArray20 = mergeJsons4.optJSONArray(str50);
if (optJSONArray20 != null) {
int[] iArr35 = new int[optJSONArray20.length()];
str26 = str50;
for (int i21 = 0; i21 < optJSONArray20.length(); i21++) {
iArr35[i21] = optJSONArray20.optInt(i21);
}
iArr11 = iArr35;
} else {
str26 = str50;
iArr11 = null;
}
JSONArray optJSONArray21 = mergeJsons4.optJSONArray("nonConnectivityEvents");
if (optJSONArray21 != null) {
int[] iArr36 = new int[optJSONArray21.length()];
for (int i22 = 0; i22 < optJSONArray21.length(); i22++) {
iArr36[i22] = optJSONArray21.optInt(i22);
}
iArr12 = iArr36;
} else {
iArr12 = null;
}
x xVar4 = new x(false, optBoolean18, optBoolean19, optInt20, optString16, optString17, optInt21, optInt22, optInt23, iArr9, iArr10, iArr11, iArr12);
if (jSONObject3 != null) {
jSONObject6 = jSONObject3;
if (b(jSONObject6, "nativeAd") != null) {
cVar3 = new c(jSONObject6.optString("auctionData", ""), jSONObject6.optString("auctioneerURL", ""), jSONObject6.optString("extAuctioneerURL", ""), jSONObject6.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject6.optInt("auctionSavedHistory", 15), jSONObject6.optLong("auctionTimeout", 10000L), true, r1.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, true, 0, jSONObject6.optBoolean("compressAuctionRequest", false), jSONObject6.optBoolean("compressAuctionResponse", false), true, jSONObject6.optInt("encryptionVersion", 1), false);
NativeAdConfigurations nativeAdConfigurations2 = new NativeAdConfigurations(a19, a20, xVar4, cVar3, a21, optBoolean17, optLong5);
if (optJSONArray17 != null) {
int i23 = 0;
while (i23 < optJSONArray17.length()) {
JSONObject optJSONObject4 = optJSONArray17.optJSONObject(i23);
if (optJSONObject4 != null) {
jSONArray2 = optJSONArray17;
int optInt24 = optJSONObject4.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString18 = optJSONObject4.optString("placementName", "");
jSONObject7 = jSONObject6;
str21 = str45;
boolean optBoolean20 = optJSONObject4.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.m a22 = a(optJSONObject4);
if (optInt24 >= 0 && !TextUtils.isEmpty(optString18)) {
nativeAdPlacement = new NativeAdPlacement(optInt24, optString18, optBoolean20, a22);
if (a22 != null) {
j.a(this.bH, nativeAdPlacement);
}
if (nativeAdPlacement == null) {
nativeAdConfigurations2.a(nativeAdPlacement);
}
i23++;
optJSONArray17 = jSONArray2;
jSONObject6 = jSONObject7;
str45 = str21;
}
} else {
jSONObject7 = jSONObject6;
jSONArray2 = optJSONArray17;
str21 = str45;
}
nativeAdPlacement = null;
if (nativeAdPlacement == null) {
}
i23++;
optJSONArray17 = jSONArray2;
jSONObject6 = jSONObject7;
str45 = str21;
}
}
jSONObject5 = jSONObject6;
str5 = str45;
kVar4 = this;
nativeAdConfigurations = nativeAdConfigurations2;
} else {
cVar2 = new c();
}
} else {
jSONObject6 = jSONObject3;
cVar2 = new c();
}
cVar3 = cVar2;
NativeAdConfigurations nativeAdConfigurations22 = new NativeAdConfigurations(a19, a20, xVar4, cVar3, a21, optBoolean17, optLong5);
if (optJSONArray17 != null) {
}
jSONObject5 = jSONObject6;
str5 = str45;
kVar4 = this;
nativeAdConfigurations = nativeAdConfigurations22;
} catch (Exception e5) {
e = e5;
exc = e;
exc.printStackTrace();
return;
}
} else {
str17 = str14;
jSONObject4 = b4;
kVar4 = kVar3;
str18 = str16;
jSONObject5 = jSONObject3;
nativeAdConfigurations = null;
}
if (b7 != null) {
JSONObject mergeJsons5 = IronSourceUtils.mergeJsons(b(b7, str15), b10);
boolean optBoolean21 = mergeJsons5.optBoolean(str18, false);
boolean optBoolean22 = mergeJsons5.optBoolean("eventsCompression", false);
int optInt25 = mergeJsons5.optInt(str9, -1);
String optString19 = mergeJsons5.optString(str10, "");
String optString20 = mergeJsons5.optString(str17, "");
int optInt26 = mergeJsons5.optInt(str5, -1);
int optInt27 = mergeJsons5.optInt(str7, -1);
int optInt28 = mergeJsons5.optInt(str4, 5000);
str19 = str3;
JSONArray optJSONArray22 = mergeJsons5.optJSONArray(str19);
if (optJSONArray22 != null) {
int[] iArr37 = new int[optJSONArray22.length()];
for (int i24 = 0; i24 < optJSONArray22.length(); i24++) {
iArr37[i24] = optJSONArray22.optInt(i24);
}
iArr5 = iArr37;
} else {
iArr5 = null;
}
str20 = str27;
JSONArray optJSONArray23 = mergeJsons5.optJSONArray(str20);
if (optJSONArray23 != null) {
int[] iArr38 = new int[optJSONArray23.length()];
for (int i25 = 0; i25 < optJSONArray23.length(); i25++) {
iArr38[i25] = optJSONArray23.optInt(i25);
}
iArr6 = iArr38;
} else {
iArr6 = null;
}
JSONArray optJSONArray24 = mergeJsons5.optJSONArray(str26);
if (optJSONArray24 != null) {
int[] iArr39 = new int[optJSONArray24.length()];
for (int i26 = 0; i26 < optJSONArray24.length(); i26++) {
iArr39[i26] = optJSONArray24.optInt(i26);
}
iArr7 = iArr39;
} else {
iArr7 = null;
}
JSONArray optJSONArray25 = mergeJsons5.optJSONArray("nonConnectivityEvents");
if (optJSONArray25 != null) {
int[] iArr40 = new int[optJSONArray25.length()];
for (int i27 = 0; i27 < optJSONArray25.length(); i27++) {
iArr40[i27] = optJSONArray25.optInt(i27);
}
iArr8 = iArr40;
} else {
iArr8 = null;
}
com.ironsource.mediationsdk.model.k kVar6 = new com.ironsource.mediationsdk.model.k(new x(false, optBoolean21, optBoolean22, optInt25, optString19, optString20, optInt26, optInt27, optInt28, iArr5, iArr6, iArr7, iArr8));
kVar6.d = b7;
JSONArray optJSONArray26 = b7.optJSONArray(str13);
if (optJSONArray26 != null) {
int i28 = 0;
while (i28 < optJSONArray26.length()) {
JSONObject optJSONObject5 = optJSONArray26.optJSONObject(i28);
if (optJSONObject5 != null) {
int optInt29 = optJSONObject5.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString21 = optJSONObject5.optString("placementName", "");
jSONArray = optJSONArray26;
boolean optBoolean23 = optJSONObject5.optBoolean("isDefault", false);
if (optInt29 >= 0 && !TextUtils.isEmpty(optString21)) {
offerwallPlacement = new OfferwallPlacement(optInt29, optString21, optBoolean23);
if (offerwallPlacement != null && offerwallPlacement != null) {
kVar6.f5465a.add(offerwallPlacement);
if (kVar6.b != null && !offerwallPlacement.isPlacementId(0)) {
}
kVar6.b = offerwallPlacement;
}
i28++;
optJSONArray26 = jSONArray;
}
} else {
jSONArray = optJSONArray26;
}
offerwallPlacement = null;
if (offerwallPlacement != null) {
kVar6.f5465a.add(offerwallPlacement);
if (kVar6.b != null) {
}
kVar6.b = offerwallPlacement;
}
i28++;
optJSONArray26 = jSONArray;
}
}
kVar5 = kVar6;
} else {
str19 = str3;
str20 = str27;
kVar5 = null;
}
o oVar = new o();
if (b12 != null) {
JSONArray optJSONArray27 = b12.optJSONArray("optInKeys");
if (optJSONArray27 != null) {
for (int i29 = 0; i29 < optJSONArray27.length(); i29++) {
String optString22 = optJSONArray27.optString(i29);
if (!TextUtils.isEmpty(optString22)) {
oVar.f5562a.add(optString22);
}
}
}
JSONObject optJSONObject6 = b12.optJSONObject("tokenGenericParams");
if (optJSONObject6 != null) {
oVar.c = optJSONObject6;
}
oVar.d = b12.optBoolean("oneToken", false);
oVar.e = b12.optBoolean("compressToken", true);
}
PixelSettings pixelSettings = new PixelSettings();
if (b18 != null) {
String optString23 = b18.optString("pixelEventsUrl", "https://outcome-ssp.supersonicads.com/mediation?adUnit=3");
z2 = b18.optBoolean("pixelEventsEnabled", true);
pixelSettings.a(optString23);
} else {
z2 = true;
}
pixelSettings.a(z2);
if (z2) {
pixelSettings.a(a(b10, str19));
pixelSettings.b(a(b10, str20));
pixelSettings.b(b10.optBoolean("eventsCompression", false));
pixelSettings.a(b10.optInt(str9, -1));
}
JSONObject jSONObject13 = jSONObject;
com.ironsource.sdk.g.d dVar3 = new com.ironsource.sdk.g.d(jSONObject13.optInt("server", 3), jSONObject13.optInt("publisher", 3), jSONObject13.optInt("console", 3), jSONObject13.optBoolean("shouldSendPublisherLogsOnUIThread", false));
com.ironsource.sdk.f.a aVar = new com.ironsource.sdk.f.a();
if (jSONObject2 != null) {
JSONObject jSONObject14 = jSONObject2;
aVar.a(jSONObject14.optBoolean("enabled", false));
aVar.b(jSONObject14.optString("reporterURL", ""));
aVar.c(jSONObject14.optString("reporterKeyword", ""));
aVar.b(jSONObject14.optBoolean("includeANR", false));
aVar.a(jSONObject14.optInt("timeout", 5000));
aVar.c(jSONObject14.optBoolean("setIgnoreDebugger", false));
JSONArray optJSONArray28 = jSONObject14.optJSONArray("keysToInclude");
if (optJSONArray28 != null) {
for (int i30 = 0; i30 < optJSONArray28.length(); i30++) {
aVar.a(optJSONArray28.optString(i30));
}
}
}
r rVar = b13 != null ? new r(b13.optString("name", ""), b13.optString("id", UniquePlacementId.NO_ID), b13.optJSONObject("custom")) : null;
ApplicationGeneralSettings applicationGeneralSettings = new ApplicationGeneralSettings(b16 != null ? b16 : new JSONObject());
ApplicationExternalSettings applicationExternalSettings = new ApplicationExternalSettings();
if (b17 != null) {
JSONObject optJSONObject7 = b17.optJSONObject("mediationTypes");
Map hashMap = new HashMap();
if (optJSONObject7 != null) {
hashMap = IronSourceUtils.parseJsonToStringMap(optJSONObject7);
}
b17.optBoolean("compressExternalToken", false);
applicationExternalSettings = new ApplicationExternalSettings(hashMap);
}
com.ironsource.sdk.a.e eVar = new com.ironsource.sdk.a.e(dVar3, rVar, oVar, jSONObject4.optBoolean("integration", false), aVar, applicationGeneralSettings, applicationExternalSettings, pixelSettings, jSONObject5 != null ? new ApplicationAuctionSettings(jSONObject5.optString("auctionData")) : new ApplicationAuctionSettings());
TestSuiteSettings testSuiteSettings = new TestSuiteSettings();
JSONObject b26 = b(b2, "testSuite");
if (b26 != null) {
testSuiteSettings.a(b26.optString("controllerUrl"));
}
kVar4.c = new com.ironsource.mediationsdk.model.f(qVar, hVar, kVar5, dVar, nativeAdConfigurations, eVar, testSuiteSettings);
JSONObject b27 = b(b10, IronSourceConstants.EVENTS_GENERIC_PARAMS);
if (b27 != null && (b = b(b27, str15)) != null) {
b27.remove(str15);
Map<String, String> parseJsonToStringMap = IronSourceUtils.parseJsonToStringMap(b);
com.ironsource.mediationsdk.events.i.d().b(parseJsonToStringMap);
com.ironsource.mediationsdk.events.e.d().b(parseJsonToStringMap);
}
if (b27 != null) {
Map<String, String> parseJsonToStringMap2 = IronSourceUtils.parseJsonToStringMap(b27);
com.ironsource.mediationsdk.events.i.d().a(parseJsonToStringMap2);
com.ironsource.mediationsdk.events.e.d().a(parseJsonToStringMap2);
}
} catch (Exception e6) {
e = e6;
}
}
public final InitConfig a() {
return new InitConfig(this.bF, this.bG);
}
public final boolean b() {
return (((((this.d != null) && !this.d.has(CampaignEx.JSON_NATIVE_VIDEO_ERROR)) && this.f5556a != null) && this.b != null) && this.c != null) && f();
}
public final boolean c() {
return !TextUtils.isEmpty(this.c.g.getF5473a());
}
public final boolean d() {
return this.c.f.c().d;
}
public final String toString() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("appKey", this.bF);
jSONObject.put(DataKeys.USER_ID, this.bG);
jSONObject.put("response", this.d);
} catch (JSONException e) {
e.printStackTrace();
}
return jSONObject.toString();
}
}