package com.ironsource; import com.ironsource.mediationsdk.model.NetworkSettings; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import kotlin.Pair; import kotlin.TuplesKt; import kotlin.collections.CollectionsKt__IterablesKt; import kotlin.collections.MapsKt__MapsJVMKt; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.SourceDebugExtension; import kotlin.ranges.RangesKt___RangesKt; @SourceDebugExtension({"SMAP\nAdUnitPerformance.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AdUnitPerformance.kt\ncom/unity3d/mediation/internal/services/AdUnitPerformance\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,31:1\n1179#2,2:32\n1253#2,4:34\n1179#2,2:38\n1253#2,4:40\n1#3:44\n215#4,2:45\n*S KotlinDebug\n*F\n+ 1 AdUnitPerformance.kt\ncom/unity3d/mediation/internal/services/AdUnitPerformance\n*L\n12#1:32,2\n12#1:34,4\n16#1:38,2\n16#1:40,4\n26#1:45,2\n*E\n"}) /* loaded from: classes2.dex */ public final class k2 extends com.ironsource.mediationsdk.h { private final Map e; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public k2(List providers, int i) { super(providers, i); int mapCapacity; int coerceAtLeast; Intrinsics.checkNotNullParameter(providers, "providers"); mapCapacity = MapsKt__MapsJVMKt.mapCapacity(CollectionsKt__IterablesKt.collectionSizeOrDefault(providers, 10)); coerceAtLeast = RangesKt___RangesKt.coerceAtLeast(mapCapacity, 16); LinkedHashMap linkedHashMap = new LinkedHashMap(coerceAtLeast); Iterator it = providers.iterator(); while (it.hasNext()) { Pair pair = TuplesKt.to(((NetworkSettings) it.next()).getProviderName(), new g0(i)); linkedHashMap.put(pair.getFirst(), pair.getSecond()); } this.e = linkedHashMap; } private final void a(Map map) { for (Map.Entry entry : this.e.entrySet()) { entry.getValue().a(map.get(entry.getKey())); } } @Override // com.ironsource.mediationsdk.h public String a(String instanceName) { String d; Intrinsics.checkNotNullParameter(instanceName, "instanceName"); g0 g0Var = this.e.get(instanceName); return (g0Var == null || (d = g0Var.d()) == null) ? "" : d; } public final void a(nu waterfallInstances) { int mapCapacity; int coerceAtLeast; Intrinsics.checkNotNullParameter(waterfallInstances, "waterfallInstances"); List b = waterfallInstances.b(); mapCapacity = MapsKt__MapsJVMKt.mapCapacity(CollectionsKt__IterablesKt.collectionSizeOrDefault(b, 10)); coerceAtLeast = RangesKt___RangesKt.coerceAtLeast(mapCapacity, 16); LinkedHashMap linkedHashMap = new LinkedHashMap(coerceAtLeast); for (x xVar : b) { Pair pair = TuplesKt.to(xVar.n(), xVar.q()); linkedHashMap.put(pair.getFirst(), pair.getSecond()); } a(linkedHashMap); } }