package l7;

import androidx.compose.foundation.FocusableKt;
import ca.canadapost.core.data.model.CarouselEvent;
import ca.canadapost.core.data.model.CpcErrorCarouselItem;
import ca.canadapost.core.data.model.CpcInfoCarouselItem;
import ca.canadapost.core.data.model.CpcPrimaryCarouselItem;
import ca.canadapost.core.data.model.CpcSuccessCarouselItem;
import ca.canadapost.core.data.model.CpcWarningCarouselItem;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import h0.c0;
import h2.a1;
import h2.d0;
import h2.e0;
import h2.f0;
import h2.g0;
import h2.p0;
import h2.y0;
import j2.g;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import l1.c;
import l1.i;
import rm.n0;
import rm.y;
import sm.p0;
import sm.q0;
import tp.m0;
import v0.z1;
import y0.d4;
import y0.e3;
import y0.l2;
import y0.m;
import y0.q1;
import y0.s3;
import y0.x2;
import y0.y3;
import z.a0;

/* loaded from: classes.dex */
public abstract class h {

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class a extends kotlin.jvm.internal.v implements dn.r {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ dn.q f27612p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(dn.q qVar) {
            super(4);
            this.f27612p = qVar;
        }

        public final void a(h0.v HorizontalPager, int i10, y0.m mVar, int i11) {
            kotlin.jvm.internal.t.g(HorizontalPager, "$this$HorizontalPager");
            if (y0.p.H()) {
                y0.p.Q(-1483866065, i11, -1, "ca.canadapost.core.common.compose.components.CpcCarousel.<anonymous>.<anonymous> (CpcCarousel.kt:68)");
            }
            this.f27612p.invoke(Integer.valueOf(i10), mVar, Integer.valueOf((i11 >> 3) & 14));
            if (y0.p.H()) {
                y0.p.P();
            }
        }

        @Override // dn.r
        public /* bridge */ /* synthetic */ Object j(Object obj, Object obj2, Object obj3, Object obj4) {
            a((h0.v) obj, ((Number) obj2).intValue(), (y0.m) obj3, ((Number) obj4).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class b extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ c0 f27613p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ dn.q f27614q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ int f27615r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        b(c0 c0Var, dn.q qVar, int i10) {
            super(2);
            this.f27613p = c0Var;
            this.f27614q = qVar;
            this.f27615r = i10;
        }

        public final void a(y0.m mVar, int i10) {
            h.d(this.f27613p, this.f27614q, mVar, l2.a(this.f27615r | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class c extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ CpcPrimaryCarouselItem f27616p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(CpcPrimaryCarouselItem cpcPrimaryCarouselItem) {
            super(1);
            this.f27616p = cpcPrimaryCarouselItem;
        }

        public final void a(o2.u semantics) {
            kotlin.jvm.internal.t.g(semantics, "$this$semantics");
            o2.s.Y(semantics, this.f27616p.getTitle() + this.f27616p.getDescription());
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((o2.u) obj);
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class d extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ float f27617p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        d(float f10) {
            super(1);
            this.f27617p = f10;
        }

        public final void a(androidx.compose.ui.graphics.c graphicsLayer) {
            float j10;
            kotlin.jvm.internal.t.g(graphicsLayer, "$this$graphicsLayer");
            float t10 = c3.h.t(0.7f);
            float t11 = c3.h.t(1.0f);
            j10 = jn.o.j(Math.abs(this.f27617p), BitmapDescriptorFactory.HUE_RED, 1.0f);
            float c10 = c3.i.c(t10, t11, 1.0f - j10);
            graphicsLayer.i(c10);
            graphicsLayer.f(c10);
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((androidx.compose.ui.graphics.c) obj);
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class e extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        public static final e f27618p = new e();

        e() {
            super(1);
        }

        public final void a(o2.u semantics) {
            kotlin.jvm.internal.t.g(semantics, "$this$semantics");
            o2.s.v(semantics);
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((o2.u) obj);
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class f extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        public static final f f27619p = new f();

        f() {
            super(1);
        }

        public final void a(o2.u semantics) {
            kotlin.jvm.internal.t.g(semantics, "$this$semantics");
            o2.s.v(semantics);
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((o2.u) obj);
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class g extends kotlin.jvm.internal.v implements dn.a {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ d9.f f27620p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ CpcPrimaryCarouselItem f27621q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ dn.l f27622r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        g(d9.f fVar, CpcPrimaryCarouselItem cpcPrimaryCarouselItem, dn.l lVar) {
            super(0);
            this.f27620p = fVar;
            this.f27621q = cpcPrimaryCarouselItem;
            this.f27622r = lVar;
        }

        @Override // dn.a
        public /* bridge */ /* synthetic */ Object invoke() {
            m322invoke();
            return n0.f34904a;
        }

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m322invoke() {
            Map e10;
            d9.a.f15931a.f("Consumer_home");
            d9.f fVar = this.f27620p;
            if (fVar != null) {
                String bannerLinkAttribution = this.f27621q.getEvents().getBannerLinkAttribution();
                e10 = p0.e(rm.c0.a("e.Var88", this.f27621q.getEvents().getLocation() + " | " + this.f27621q.getEvents().getCampaign() + " | " + this.f27621q.getEvents().getCustomerType() + " | " + this.f27621q.getEvents().getAdvertiserType() + " | " + this.f27621q.getBannerID()));
                fVar.b(bannerLinkAttribution, e10);
            }
            this.f27622r.invoke(this.f27621q.getLinkURL());
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* renamed from: l7.h$h, reason: collision with other inner class name */
    /* loaded from: classes.dex */
    public static final class C0615h extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ CpcPrimaryCarouselItem f27623p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ float f27624q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ d9.f f27625r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ float f27626s;

        /* renamed from: t, reason: collision with root package name */
        final /* synthetic */ dn.l f27627t;

        /* renamed from: u, reason: collision with root package name */
        final /* synthetic */ int f27628u;

        /* renamed from: v, reason: collision with root package name */
        final /* synthetic */ int f27629v;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        C0615h(CpcPrimaryCarouselItem cpcPrimaryCarouselItem, float f10, d9.f fVar, float f11, dn.l lVar, int i10, int i11) {
            super(2);
            this.f27623p = cpcPrimaryCarouselItem;
            this.f27624q = f10;
            this.f27625r = fVar;
            this.f27626s = f11;
            this.f27627t = lVar;
            this.f27628u = i10;
            this.f27629v = i11;
        }

        public final void a(y0.m mVar, int i10) {
            h.e(this.f27623p, this.f27624q, this.f27625r, this.f27626s, this.f27627t, mVar, l2.a(this.f27628u | 1), this.f27629v);
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class i extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ List f27630p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ d9.f f27631q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ dn.l f27632r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ int f27633s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        i(List list, d9.f fVar, dn.l lVar, int i10) {
            super(2);
            this.f27630p = list;
            this.f27631q = fVar;
            this.f27632r = lVar;
            this.f27633s = i10;
        }

        public final void a(y0.m mVar, int i10) {
            h.f(this.f27630p, this.f27631q, this.f27632r, mVar, l2.a(this.f27633s | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class j extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ CpcPrimaryCarouselItem f27634p;

        /* JADX INFO: Access modifiers changed from: package-private */
        /* loaded from: classes.dex */
        public static final class a extends kotlin.jvm.internal.v implements dn.l {

            /* renamed from: p, reason: collision with root package name */
            public static final a f27635p = new a();

            a() {
                super(1);
            }

            public final void a(String CpcCarouselItemComposable) {
                kotlin.jvm.internal.t.g(CpcCarouselItemComposable, "$this$CpcCarouselItemComposable");
            }

            @Override // dn.l
            public /* bridge */ /* synthetic */ Object invoke(Object obj) {
                a((String) obj);
                return n0.f34904a;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        j(CpcPrimaryCarouselItem cpcPrimaryCarouselItem) {
            super(2);
            this.f27634p = cpcPrimaryCarouselItem;
        }

        public final void a(y0.m mVar, int i10) {
            if ((i10 & 11) == 2 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(497057353, i10, -1, "ca.canadapost.core.common.compose.components.CpcPrimaryCarousel.<anonymous>.<anonymous> (CpcCarousel.kt:89)");
            }
            h.e(this.f27634p, BitmapDescriptorFactory.HUE_RED, null, c3.h.t(0), a.f27635p, mVar, 27656, 6);
            if (y0.p.H()) {
                y0.p.P();
            }
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class k extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ q1 f27636p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        k(q1 q1Var) {
            super(1);
            this.f27636p = q1Var;
        }

        public final void a(float f10) {
            if (c3.h.s(f10, h.g(this.f27636p)) > 0) {
                h.h(this.f27636p, f10);
            }
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a(((c3.h) obj).y());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class l extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ List f27637p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ d9.f f27638q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ dn.l f27639r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ int f27640s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        l(List list, d9.f fVar, dn.l lVar, int i10) {
            super(2);
            this.f27637p = list;
            this.f27638q = fVar;
            this.f27639r = lVar;
            this.f27640s = i10;
        }

        public final void a(y0.m mVar, int i10) {
            h.f(this.f27637p, this.f27638q, this.f27639r, mVar, l2.a(this.f27640s | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class m extends kotlin.coroutines.jvm.internal.l implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        int f27641p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ c0 f27642q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ List f27643r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ d9.f f27644s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        m(c0 c0Var, List list, d9.f fVar, vm.d dVar) {
            super(2, dVar);
            this.f27642q = c0Var;
            this.f27643r = list;
            this.f27644s = fVar;
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final vm.d create(Object obj, vm.d dVar) {
            return new m(this.f27642q, this.f27643r, this.f27644s, dVar);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Map l10;
            wm.d.f();
            if (this.f27641p != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            y.b(obj);
            if (this.f27642q.F() == 0) {
                return n0.f34904a;
            }
            CarouselEvent events = ((CpcPrimaryCarouselItem) this.f27643r.get(this.f27642q.v())).getEvents();
            d9.f fVar = this.f27644s;
            List list = this.f27643r;
            c0 c0Var = this.f27642q;
            if (fVar != null) {
                String bannerViewAttribution = events.getBannerViewAttribution();
                l10 = q0.l(rm.c0.a("e.Var88", events.getLocation() + " | " + events.getCampaign() + " | " + events.getCustomerType() + " | " + events.getAdvertiserType() + " | " + ((CpcPrimaryCarouselItem) list.get(c0Var.v())).getBannerID()), rm.c0.a("s.events", "21"), rm.c0.a("e.Var3", "Consumer_home"));
                fVar.c(bannerViewAttribution, l10);
            }
            return n0.f34904a;
        }

        @Override // dn.p
        public final Object invoke(m0 m0Var, vm.d dVar) {
            return ((m) create(m0Var, dVar)).invokeSuspend(n0.f34904a);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class n extends kotlin.jvm.internal.v implements dn.q {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ List f27645p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ c0 f27646q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ d9.f f27647r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ float f27648s;

        /* renamed from: t, reason: collision with root package name */
        final /* synthetic */ dn.l f27649t;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        n(List list, c0 c0Var, d9.f fVar, float f10, dn.l lVar) {
            super(3);
            this.f27645p = list;
            this.f27646q = c0Var;
            this.f27647r = fVar;
            this.f27648s = f10;
            this.f27649t = lVar;
        }

        public final void a(int i10, y0.m mVar, int i11) {
            if ((i11 & 14) == 0) {
                i11 |= mVar.i(i10) ? 4 : 2;
            }
            if ((i11 & 91) == 18 && mVar.v()) {
                mVar.A();
                return;
            }
            if (y0.p.H()) {
                y0.p.Q(780514718, i11, -1, "ca.canadapost.core.common.compose.components.DrawCarousel.<anonymous> (CpcCarousel.kt:140)");
            }
            h.e((CpcPrimaryCarouselItem) this.f27645p.get(i10), (this.f27646q.v() - i10) + this.f27646q.w(), this.f27647r, this.f27648s, this.f27649t, mVar, 520, 0);
            if (y0.p.H()) {
                y0.p.P();
            }
        }

        @Override // dn.q
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
            a(((Number) obj).intValue(), (y0.m) obj2, ((Number) obj3).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class o extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ List f27650p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ d9.f f27651q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ float f27652r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ dn.l f27653s;

        /* renamed from: t, reason: collision with root package name */
        final /* synthetic */ int f27654t;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        o(List list, d9.f fVar, float f10, dn.l lVar, int i10) {
            super(2);
            this.f27650p = list;
            this.f27651q = fVar;
            this.f27652r = f10;
            this.f27653s = lVar;
            this.f27654t = i10;
        }

        public final void a(y0.m mVar, int i10) {
            h.i(this.f27650p, this.f27651q, this.f27652r, this.f27653s, mVar, l2.a(this.f27654t | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class p extends kotlin.jvm.internal.v implements dn.a {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ List f27655p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        p(List list) {
            super(0);
            this.f27655p = list;
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final Integer invoke() {
            return Integer.valueOf(e3.a(this.f27655p.size()).d());
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class q extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ boolean f27656p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ l1.i f27657q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ int f27658r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        q(boolean z10, l1.i iVar, int i10) {
            super(2);
            this.f27656p = z10;
            this.f27657q = iVar;
            this.f27658r = i10;
        }

        public final void a(y0.m mVar, int i10) {
            h.j(this.f27656p, this.f27657q, mVar, l2.a(this.f27658r | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class r extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ List f27659p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ dn.l f27660q;

        /* JADX INFO: Access modifiers changed from: package-private */
        /* loaded from: classes.dex */
        public static final class a extends kotlin.jvm.internal.v implements dn.p {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ dn.p f27661p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(dn.p pVar) {
                super(2);
                this.f27661p = pVar;
            }

            public final void a(y0.m mVar, int i10) {
                if ((i10 & 11) == 2 && mVar.v()) {
                    mVar.A();
                    return;
                }
                if (y0.p.H()) {
                    y0.p.Q(1860406554, i10, -1, "ca.canadapost.core.common.compose.components.MeasureTallestPage.<anonymous>.<anonymous>.<anonymous> (CpcCarousel.kt:157)");
                }
                l1.i w10 = androidx.compose.foundation.layout.o.w(l1.i.f27362a, null, false, 3, null);
                dn.p pVar = this.f27661p;
                e0 h10 = androidx.compose.foundation.layout.b.h(l1.c.f27332a.o(), false);
                int a10 = y0.j.a(mVar, 0);
                y0.y D = mVar.D();
                l1.i e10 = l1.h.e(mVar, w10);
                g.a aVar = j2.g.f23616d;
                dn.a a11 = aVar.a();
                if (!(mVar.w() instanceof y0.f)) {
                    y0.j.c();
                }
                mVar.u();
                if (mVar.n()) {
                    mVar.o(a11);
                } else {
                    mVar.F();
                }
                y0.m a12 = d4.a(mVar);
                d4.b(a12, h10, aVar.c());
                d4.b(a12, D, aVar.e());
                dn.p b10 = aVar.b();
                if (a12.n() || !kotlin.jvm.internal.t.b(a12.f(), Integer.valueOf(a10))) {
                    a12.I(Integer.valueOf(a10));
                    a12.l(Integer.valueOf(a10), b10);
                }
                d4.b(a12, e10, aVar.d());
                androidx.compose.foundation.layout.d dVar = androidx.compose.foundation.layout.d.f1828a;
                pVar.invoke(mVar, 0);
                mVar.O();
                if (y0.p.H()) {
                    y0.p.P();
                }
            }

            @Override // dn.p
            public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
                a((y0.m) obj, ((Number) obj2).intValue());
                return n0.f34904a;
            }
        }

        /* JADX INFO: Access modifiers changed from: package-private */
        /* loaded from: classes.dex */
        public static final class b extends kotlin.jvm.internal.v implements dn.l {

            /* renamed from: p, reason: collision with root package name */
            public static final b f27662p = new b();

            b() {
                super(1);
            }

            public final void a(p0.a layout) {
                kotlin.jvm.internal.t.g(layout, "$this$layout");
            }

            @Override // dn.l
            public /* bridge */ /* synthetic */ Object invoke(Object obj) {
                a((p0.a) obj);
                return n0.f34904a;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        r(List list, dn.l lVar) {
            super(2);
            this.f27659p = list;
            this.f27660q = lVar;
        }

        public final f0 a(a1 SubcomposeLayout, long j10) {
            int v10;
            Integer num;
            kotlin.jvm.internal.t.g(SubcomposeLayout, "$this$SubcomposeLayout");
            int i10 = 0;
            for (dn.p pVar : this.f27659p) {
                List e12 = SubcomposeLayout.e1(pVar, g1.c.c(1860406554, true, new a(pVar)));
                v10 = sm.v.v(e12, 10);
                ArrayList arrayList = new ArrayList(v10);
                Iterator it = e12.iterator();
                while (it.hasNext()) {
                    arrayList.add(((d0) it.next()).Y(j10));
                }
                Iterator it2 = arrayList.iterator();
                if (it2.hasNext()) {
                    Integer valueOf = Integer.valueOf(((h2.p0) it2.next()).F0());
                    while (it2.hasNext()) {
                        Integer valueOf2 = Integer.valueOf(((h2.p0) it2.next()).F0());
                        if (valueOf.compareTo(valueOf2) < 0) {
                            valueOf = valueOf2;
                        }
                    }
                    num = valueOf;
                } else {
                    num = null;
                }
                Integer num2 = num;
                int intValue = num2 != null ? num2.intValue() : 0;
                if (intValue > i10) {
                    i10 = intValue;
                }
            }
            this.f27660q.invoke(c3.h.m(SubcomposeLayout.w(i10)));
            return g0.j0(SubcomposeLayout, 0, 0, null, b.f27662p, 4, null);
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            return a((a1) obj, ((c3.b) obj2).r());
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class s extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ List f27663p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ dn.l f27664q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ int f27665r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        s(List list, dn.l lVar, int i10) {
            super(2);
            this.f27663p = list;
            this.f27664q = lVar;
            this.f27665r = i10;
        }

        public final void a(y0.m mVar, int i10) {
            h.k(this.f27663p, this.f27664q, mVar, l2.a(this.f27665r | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class t extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ int f27666p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ int f27667q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ l1.i f27668r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ int f27669s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        t(int i10, int i11, l1.i iVar, int i12) {
            super(2);
            this.f27666p = i10;
            this.f27667q = i11;
            this.f27668r = iVar;
            this.f27669s = i12;
        }

        public final void a(y0.m mVar, int i10) {
            h.l(this.f27666p, this.f27667q, this.f27668r, mVar, l2.a(this.f27669s | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class u extends kotlin.jvm.internal.v implements dn.l {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ String f27670p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        u(String str) {
            super(1);
            this.f27670p = str;
        }

        public final void a(o2.u clearAndSetSemantics) {
            kotlin.jvm.internal.t.g(clearAndSetSemantics, "$this$clearAndSetSemantics");
            o2.s.Y(clearAndSetSemantics, this.f27670p);
        }

        @Override // dn.l
        public /* bridge */ /* synthetic */ Object invoke(Object obj) {
            a((o2.u) obj);
            return n0.f34904a;
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class v extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ int f27671p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ int f27672q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ l1.i f27673r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ int f27674s;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        v(int i10, int i11, l1.i iVar, int i12) {
            super(2);
            this.f27671p = i10;
            this.f27672q = i11;
            this.f27673r = iVar;
            this.f27674s = i12;
        }

        public final void a(y0.m mVar, int i10) {
            h.l(this.f27671p, this.f27672q, this.f27673r, mVar, l2.a(this.f27674s | 1));
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    private static final long a(CpcPrimaryCarouselItem cpcPrimaryCarouselItem, y0.m mVar, int i10) {
        long a10;
        mVar.e(1077688379);
        if (y0.p.H()) {
            y0.p.Q(1077688379, i10, -1, "ca.canadapost.core.common.compose.components.ChooseBackground (CpcCarousel.kt:354)");
        }
        if (cpcPrimaryCarouselItem instanceof CpcSuccessCarouselItem) {
            mVar.e(2143948328);
            a10 = n7.a.f29827a.a(mVar, 6).a().c().c();
            mVar.N();
        } else if (cpcPrimaryCarouselItem instanceof CpcInfoCarouselItem) {
            mVar.e(2143948417);
            a10 = n7.a.f29827a.a(mVar, 6).a().c().b();
            mVar.N();
        } else if (cpcPrimaryCarouselItem instanceof CpcWarningCarouselItem) {
            mVar.e(2143948506);
            a10 = n7.a.f29827a.a(mVar, 6).a().c().d();
            mVar.N();
        } else {
            if (!(cpcPrimaryCarouselItem instanceof CpcErrorCarouselItem)) {
                mVar.e(2143936034);
                mVar.N();
                throw new rm.t();
            }
            mVar.e(2143948596);
            a10 = n7.a.f29827a.a(mVar, 6).a().c().a();
            mVar.N();
        }
        if (y0.p.H()) {
            y0.p.P();
        }
        mVar.N();
        return a10;
    }

    private static final int b(CpcPrimaryCarouselItem cpcPrimaryCarouselItem, y0.m mVar, int i10) {
        int i11;
        mVar.e(-1513016454);
        if (y0.p.H()) {
            y0.p.Q(-1513016454, i10, -1, "ca.canadapost.core.common.compose.components.ChooseIcon (CpcCarousel.kt:372)");
        }
        if (cpcPrimaryCarouselItem instanceof CpcSuccessCarouselItem) {
            i11 = h7.h.f21025v;
        } else if (cpcPrimaryCarouselItem instanceof CpcInfoCarouselItem) {
            i11 = h7.h.G;
        } else if (cpcPrimaryCarouselItem instanceof CpcWarningCarouselItem) {
            i11 = h7.h.H;
        } else {
            if (!(cpcPrimaryCarouselItem instanceof CpcErrorCarouselItem)) {
                throw new rm.t();
            }
            i11 = h7.h.f21018r0;
        }
        if (y0.p.H()) {
            y0.p.P();
        }
        mVar.N();
        return i11;
    }

    private static final long c(CpcPrimaryCarouselItem cpcPrimaryCarouselItem, y0.m mVar, int i10) {
        long j10;
        mVar.e(-1952175911);
        if (y0.p.H()) {
            y0.p.Q(-1952175911, i10, -1, "ca.canadapost.core.common.compose.components.ChooseTextColor (CpcCarousel.kt:363)");
        }
        if (cpcPrimaryCarouselItem instanceof CpcSuccessCarouselItem) {
            mVar.e(712165021);
            j10 = n7.a.f29827a.a(mVar, 6).f().i();
            mVar.N();
        } else if (cpcPrimaryCarouselItem instanceof CpcInfoCarouselItem) {
            mVar.e(712165087);
            j10 = n7.a.f29827a.a(mVar, 6).f().b();
            mVar.N();
        } else if (cpcPrimaryCarouselItem instanceof CpcWarningCarouselItem) {
            mVar.e(712165156);
            j10 = n7.a.f29827a.a(mVar, 6).f().g();
            mVar.N();
        } else {
            if (!(cpcPrimaryCarouselItem instanceof CpcErrorCarouselItem)) {
                mVar.e(712152280);
                mVar.N();
                throw new rm.t();
            }
            mVar.e(712165224);
            j10 = n7.a.f29827a.a(mVar, 6).f().j();
            mVar.N();
        }
        if (y0.p.H()) {
            y0.p.P();
        }
        mVar.N();
        return j10;
    }

    public static final void d(c0 state, dn.q content, y0.m mVar, int i10) {
        int i11;
        y0.m mVar2;
        kotlin.jvm.internal.t.g(state, "state");
        kotlin.jvm.internal.t.g(content, "content");
        y0.m r10 = mVar.r(-1541375657);
        if ((i10 & 14) == 0) {
            i11 = (r10.R(state) ? 4 : 2) | i10;
        } else {
            i11 = i10;
        }
        if ((i10 & 112) == 0) {
            i11 |= r10.m(content) ? 32 : 16;
        }
        int i12 = i11;
        if ((i12 & 91) == 18 && r10.v()) {
            r10.A();
            mVar2 = r10;
        } else {
            if (y0.p.H()) {
                y0.p.Q(-1541375657, i12, -1, "ca.canadapost.core.common.compose.components.CpcCarousel (CpcCarousel.kt:60)");
            }
            i.a aVar = l1.i.f27362a;
            l1.i a10 = FocusableKt.a(aVar);
            c.a aVar2 = l1.c.f27332a;
            e0 h10 = androidx.compose.foundation.layout.b.h(aVar2.o(), false);
            int a11 = y0.j.a(r10, 0);
            y0.y D = r10.D();
            l1.i e10 = l1.h.e(r10, a10);
            g.a aVar3 = j2.g.f23616d;
            dn.a a12 = aVar3.a();
            if (!(r10.w() instanceof y0.f)) {
                y0.j.c();
            }
            r10.u();
            if (r10.n()) {
                r10.o(a12);
            } else {
                r10.F();
            }
            y0.m a13 = d4.a(r10);
            d4.b(a13, h10, aVar3.c());
            d4.b(a13, D, aVar3.e());
            dn.p b10 = aVar3.b();
            if (a13.n() || !kotlin.jvm.internal.t.b(a13.f(), Integer.valueOf(a11))) {
                a13.I(Integer.valueOf(a11));
                a13.l(Integer.valueOf(a11), b10);
            }
            d4.b(a13, e10, aVar3.d());
            androidx.compose.foundation.layout.d dVar = androidx.compose.foundation.layout.d.f1828a;
            h0.m.a(state, FocusableKt.a(aVar), null, null, 0, BitmapDescriptorFactory.HUE_RED, aVar2.l(), null, false, false, null, null, null, g1.c.b(r10, -1483866065, true, new a(content)), r10, 1572912 | (i12 & 14), 3072, 8124);
            mVar2 = r10;
            l(state.F(), state.v(), dVar.a(aVar, aVar2.b()), mVar2, 0);
            mVar2.O();
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        x2 y10 = mVar2.y();
        if (y10 != null) {
            y10.a(new b(state, content, i10));
        }
    }

    public static final void e(CpcPrimaryCarouselItem item, float f10, d9.f fVar, float f11, dn.l onClick, y0.m mVar, int i10, int i11) {
        kotlin.jvm.internal.t.g(item, "item");
        kotlin.jvm.internal.t.g(onClick, "onClick");
        y0.m r10 = mVar.r(-810530362);
        float f12 = (i11 & 2) != 0 ? 0.0f : f10;
        d9.f fVar2 = (i11 & 4) != 0 ? null : fVar;
        if (y0.p.H()) {
            y0.p.Q(-810530362, i10, -1, "ca.canadapost.core.common.compose.components.CpcCarouselItemComposable (CpcCarousel.kt:191)");
        }
        i.a aVar = l1.i.f27362a;
        l1.i c10 = o2.l.c(androidx.compose.foundation.b.d(p(androidx.compose.foundation.layout.o.h(aVar, BitmapDescriptorFactory.HUE_RED, 1, null), f11), a(item, r10, 8), null, 2, null), true, new c(item));
        n7.a aVar2 = n7.a.f29827a;
        l1.i m10 = androidx.compose.foundation.layout.l.m(androidx.compose.foundation.layout.l.i(c10, aVar2.b(r10, 6).H()), BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, aVar2.b(r10, 6).L(), 7, null);
        r10.e(-1037182264);
        boolean h10 = r10.h(f12);
        Object f13 = r10.f();
        if (h10 || f13 == y0.m.f51621a.a()) {
            f13 = new d(f12);
            r10.I(f13);
        }
        r10.N();
        l1.i a10 = androidx.compose.ui.graphics.b.a(m10, (dn.l) f13);
        c.a aVar3 = l1.c.f27332a;
        e0 h11 = androidx.compose.foundation.layout.b.h(aVar3.o(), false);
        int a11 = y0.j.a(r10, 0);
        y0.y D = r10.D();
        l1.i e10 = l1.h.e(r10, a10);
        g.a aVar4 = j2.g.f23616d;
        dn.a a12 = aVar4.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a12);
        } else {
            r10.F();
        }
        y0.m a13 = d4.a(r10);
        d4.b(a13, h11, aVar4.c());
        d4.b(a13, D, aVar4.e());
        dn.p b10 = aVar4.b();
        if (a13.n() || !kotlin.jvm.internal.t.b(a13.f(), Integer.valueOf(a11))) {
            a13.I(Integer.valueOf(a11));
            a13.l(Integer.valueOf(a11), b10);
        }
        d4.b(a13, e10, aVar4.d());
        androidx.compose.foundation.layout.d dVar = androidx.compose.foundation.layout.d.f1828a;
        c.b k10 = aVar3.k();
        e0.b bVar = e0.b.f16607a;
        e0 a14 = e0.d.a(bVar.h(), k10, r10, 48);
        int a15 = y0.j.a(r10, 0);
        y0.y D2 = r10.D();
        l1.i e11 = l1.h.e(r10, aVar);
        dn.a a16 = aVar4.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a16);
        } else {
            r10.F();
        }
        y0.m a17 = d4.a(r10);
        d4.b(a17, a14, aVar4.c());
        d4.b(a17, D2, aVar4.e());
        dn.p b11 = aVar4.b();
        if (a17.n() || !kotlin.jvm.internal.t.b(a17.f(), Integer.valueOf(a15))) {
            a17.I(Integer.valueOf(a15));
            a17.l(Integer.valueOf(a15), b11);
        }
        d4.b(a17, e11, aVar4.d());
        e0.g gVar = e0.g.f16653a;
        e0 b12 = e0.c0.b(bVar.g(), aVar3.l(), r10, 48);
        int a18 = y0.j.a(r10, 0);
        y0.y D3 = r10.D();
        l1.i e12 = l1.h.e(r10, aVar);
        dn.a a19 = aVar4.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a19);
        } else {
            r10.F();
        }
        y0.m a20 = d4.a(r10);
        d4.b(a20, b12, aVar4.c());
        d4.b(a20, D3, aVar4.e());
        dn.p b13 = aVar4.b();
        if (a20.n() || !kotlin.jvm.internal.t.b(a20.f(), Integer.valueOf(a18))) {
            a20.I(Integer.valueOf(a18));
            a20.l(Integer.valueOf(a18), b13);
        }
        d4.b(a20, e12, aVar4.d());
        e0.f0 f0Var = e0.f0.f16652a;
        d9.f fVar3 = fVar2;
        float f14 = f12;
        a0.a(m2.e.c(b(item, r10, 8), r10, 0), null, androidx.compose.foundation.layout.o.o(aVar, aVar2.b(r10, 6).h()), null, null, BitmapDescriptorFactory.HUE_RED, null, r10, 56, 120);
        float r11 = aVar2.b(r10, 6).r();
        l7.o oVar = l7.o.Horizontal;
        l7.n.a(r11, oVar, r10, 48);
        z1.b(item.getTitle(), o2.l.d(f0Var.c(aVar, aVar3.i()), false, e.f27618p, 1, null), c(item, r10, 8), 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar2.c(r10, 6).t(), r10, 0, 0, 65528);
        r10.O();
        float t10 = aVar2.b(r10, 6).t();
        l7.o oVar2 = l7.o.Vertical;
        l7.n.a(t10, oVar2, r10, 48);
        e0 b14 = e0.c0.b(bVar.g(), aVar3.i(), r10, 48);
        int a21 = y0.j.a(r10, 0);
        y0.y D4 = r10.D();
        l1.i e13 = l1.h.e(r10, aVar);
        dn.a a22 = aVar4.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a22);
        } else {
            r10.F();
        }
        y0.m a23 = d4.a(r10);
        d4.b(a23, b14, aVar4.c());
        d4.b(a23, D4, aVar4.e());
        dn.p b15 = aVar4.b();
        if (a23.n() || !kotlin.jvm.internal.t.b(a23.f(), Integer.valueOf(a21))) {
            a23.I(Integer.valueOf(a21));
            a23.l(Integer.valueOf(a21), b15);
        }
        d4.b(a23, e13, aVar4.d());
        l7.n.a(aVar2.b(r10, 6).C(), oVar, r10, 48);
        z1.b(item.getDescription(), o2.l.d(f0Var.c(aVar, aVar3.i()), false, f.f27619p, 1, null), 0L, 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar2.c(r10, 6).b(), r10, 0, 0, 65532);
        r10.O();
        l7.n.a(aVar2.b(r10, 6).t(), oVar2, r10, 48);
        e0 b16 = e0.c0.b(bVar.g(), aVar3.i(), r10, 48);
        int a24 = y0.j.a(r10, 0);
        y0.y D5 = r10.D();
        l1.i e14 = l1.h.e(r10, aVar);
        dn.a a25 = aVar4.a();
        if (!(r10.w() instanceof y0.f)) {
            y0.j.c();
        }
        r10.u();
        if (r10.n()) {
            r10.o(a25);
        } else {
            r10.F();
        }
        y0.m a26 = d4.a(r10);
        d4.b(a26, b16, aVar4.c());
        d4.b(a26, D5, aVar4.e());
        dn.p b17 = aVar4.b();
        if (a26.n() || !kotlin.jvm.internal.t.b(a26.f(), Integer.valueOf(a24))) {
            a26.I(Integer.valueOf(a24));
            a26.l(Integer.valueOf(a24), b17);
        }
        d4.b(a26, e14, aVar4.d());
        l7.n.a(aVar2.b(r10, 6).C(), oVar, r10, 48);
        z1.b(item.getLinkText(), androidx.compose.foundation.d.d(f0Var.c(aVar, aVar3.i()), false, null, null, new g(fVar3, item, onClick), 7, null), aVar2.a(r10, 6).f().b(), 0L, null, null, null, 0L, null, null, 0L, 0, false, 0, 0, null, aVar2.c(r10, 6).p(), r10, 0, 0, 65528);
        r10.O();
        r10.O();
        r10.O();
        if (y0.p.H()) {
            y0.p.P();
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new C0615h(item, f14, fVar3, f11, onClick, i10, i11));
        }
    }

    public static final void f(List carouselData, d9.f fVar, dn.l onClick, y0.m mVar, int i10) {
        kotlin.jvm.internal.t.g(carouselData, "carouselData");
        kotlin.jvm.internal.t.g(onClick, "onClick");
        y0.m r10 = mVar.r(-1457607647);
        if (y0.p.H()) {
            y0.p.Q(-1457607647, i10, -1, "ca.canadapost.core.common.compose.components.CpcPrimaryCarousel (CpcCarousel.kt:84)");
        }
        if (carouselData.isEmpty()) {
            if (y0.p.H()) {
                y0.p.P();
            }
            x2 y10 = r10.y();
            if (y10 != null) {
                y10.a(new i(carouselData, fVar, onClick, i10));
                return;
            }
            return;
        }
        ArrayList arrayList = new ArrayList();
        Iterator it = carouselData.iterator();
        while (it.hasNext()) {
            arrayList.add(g1.c.b(r10, 497057353, true, new j((CpcPrimaryCarouselItem) it.next())));
        }
        Object f10 = r10.f();
        m.a aVar = y0.m.f51621a;
        if (f10 == aVar.a()) {
            f10 = s3.d(c3.h.m(c3.h.t(0)), null, 2, null);
            r10.I(f10);
        }
        q1 q1Var = (q1) f10;
        r10.e(-1037185420);
        boolean R = r10.R(q1Var);
        Object f11 = r10.f();
        if (R || f11 == aVar.a()) {
            f11 = new k(q1Var);
            r10.I(f11);
        }
        r10.N();
        k(arrayList, (dn.l) f11, r10, 8);
        i(carouselData, fVar, g(q1Var), onClick, r10, ((i10 << 3) & 7168) | 72);
        if (y0.p.H()) {
            y0.p.P();
        }
        x2 y11 = r10.y();
        if (y11 != null) {
            y11.a(new l(carouselData, fVar, onClick, i10));
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final float g(q1 q1Var) {
        return ((c3.h) q1Var.getValue()).y();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void h(q1 q1Var, float f10) {
        q1Var.setValue(c3.h.m(f10));
    }

    public static final void i(List carouselData, d9.f fVar, float f10, dn.l onClick, y0.m mVar, int i10) {
        kotlin.jvm.internal.t.g(carouselData, "carouselData");
        kotlin.jvm.internal.t.g(onClick, "onClick");
        y0.m r10 = mVar.r(1638960449);
        if (y0.p.H()) {
            y0.p.Q(1638960449, i10, -1, "ca.canadapost.core.common.compose.components.DrawCarousel (CpcCarousel.kt:115)");
        }
        c0 k10 = h0.d0.k(0, BitmapDescriptorFactory.HUE_RED, new p(carouselData), r10, 0, 3);
        y0.p0.e(Integer.valueOf(k10.v()), Integer.valueOf(k10.F()), new m(k10, carouselData, fVar, null), r10, 512);
        d(k10, g1.c.b(r10, 780514718, true, new n(carouselData, k10, fVar, f10, onClick)), r10, 48);
        if (y0.p.H()) {
            y0.p.P();
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new o(carouselData, fVar, f10, onClick, i10));
        }
    }

    public static final void j(boolean z10, l1.i modifier, y0.m mVar, int i10) {
        int i11;
        float f10;
        w1.b c10;
        kotlin.jvm.internal.t.g(modifier, "modifier");
        y0.m r10 = mVar.r(-420847101);
        if ((i10 & 14) == 0) {
            i11 = (r10.c(z10) ? 4 : 2) | i10;
        } else {
            i11 = i10;
        }
        if ((i10 & 112) == 0) {
            i11 |= r10.R(modifier) ? 32 : 16;
        }
        if ((i11 & 91) == 18 && r10.v()) {
            r10.A();
        } else {
            if (y0.p.H()) {
                y0.p.Q(-420847101, i11, -1, "ca.canadapost.core.common.compose.components.IndicatorComponent (CpcCarousel.kt:327)");
            }
            if (z10) {
                r10.e(-1863116511);
                f10 = n7.a.f29827a.b(r10, 6).i();
                r10.N();
            } else {
                r10.e(-1863116449);
                f10 = n7.a.f29827a.b(r10, 6).f();
                r10.N();
            }
            y3 c11 = y.c.c(f10, null, "selected", null, r10, 384, 10);
            l1.i o10 = androidx.compose.foundation.layout.o.o(modifier, n7.a.f29827a.b(r10, 6).i());
            c.a aVar = l1.c.f27332a;
            e0 h10 = androidx.compose.foundation.layout.b.h(aVar.o(), false);
            int a10 = y0.j.a(r10, 0);
            y0.y D = r10.D();
            l1.i e10 = l1.h.e(r10, o10);
            g.a aVar2 = j2.g.f23616d;
            dn.a a11 = aVar2.a();
            if (!(r10.w() instanceof y0.f)) {
                y0.j.c();
            }
            r10.u();
            if (r10.n()) {
                r10.o(a11);
            } else {
                r10.F();
            }
            y0.m a12 = d4.a(r10);
            d4.b(a12, h10, aVar2.c());
            d4.b(a12, D, aVar2.e());
            dn.p b10 = aVar2.b();
            if (a12.n() || !kotlin.jvm.internal.t.b(a12.f(), Integer.valueOf(a10))) {
                a12.I(Integer.valueOf(a10));
                a12.l(Integer.valueOf(a10), b10);
            }
            d4.b(a12, e10, aVar2.d());
            l1.i o11 = androidx.compose.foundation.layout.o.o(androidx.compose.foundation.layout.d.f1828a.a(l1.i.f27362a, aVar.e()), ((c3.h) c11.getValue()).y());
            if (z10) {
                r10.e(1117230539);
                c10 = m2.e.c(h7.h.f21019s, r10, 0);
                r10.N();
            } else {
                r10.e(1117230644);
                c10 = m2.e.c(h7.h.f21017r, r10, 0);
                r10.N();
            }
            a0.a(c10, null, o11, null, null, BitmapDescriptorFactory.HUE_RED, null, r10, 56, 120);
            r10.O();
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new q(z10, modifier, i10));
        }
    }

    public static final void k(List pages, dn.l onTallestCalculated, y0.m mVar, int i10) {
        kotlin.jvm.internal.t.g(pages, "pages");
        kotlin.jvm.internal.t.g(onTallestCalculated, "onTallestCalculated");
        y0.m r10 = mVar.r(1337588791);
        if (y0.p.H()) {
            y0.p.Q(1337588791, i10, -1, "ca.canadapost.core.common.compose.components.MeasureTallestPage (CpcCarousel.kt:151)");
        }
        y0.b(null, new r(pages, onTallestCalculated), r10, 0, 1);
        if (y0.p.H()) {
            y0.p.P();
        }
        x2 y10 = r10.y();
        if (y10 != null) {
            y10.a(new s(pages, onTallestCalculated, i10));
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void l(int i10, int i11, l1.i iVar, y0.m mVar, int i12) {
        int i13;
        y0.m r10 = mVar.r(1041569315);
        if ((i12 & 14) == 0) {
            i13 = (r10.i(i10) ? 4 : 2) | i12;
        } else {
            i13 = i12;
        }
        if ((i12 & 112) == 0) {
            i13 |= r10.i(i11) ? 32 : 16;
        }
        if ((i12 & 896) == 0) {
            i13 |= r10.R(iVar) ? 256 : 128;
        }
        if ((i13 & 731) == 146 && r10.v()) {
            r10.A();
        } else {
            if (y0.p.H()) {
                y0.p.Q(1041569315, i13, -1, "ca.canadapost.core.common.compose.components.PageIndicator (CpcCarousel.kt:304)");
            }
            if (i10 == 1) {
                if (y0.p.H()) {
                    y0.p.P();
                }
                x2 y10 = r10.y();
                if (y10 != null) {
                    y10.a(new t(i10, i11, iVar, i12));
                    return;
                }
                return;
            }
            String c10 = m2.j.c(h7.l.I, new Object[]{Integer.valueOf(i11 + 1), Integer.valueOf(i10)}, r10, 64);
            l1.i m10 = androidx.compose.foundation.layout.l.m(iVar, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, n7.a.f29827a.b(r10, 6).H(), 7, null);
            r10.e(-1037178062);
            boolean R = r10.R(c10);
            Object f10 = r10.f();
            if (R || f10 == y0.m.f51621a.a()) {
                f10 = new u(c10);
                r10.I(f10);
            }
            r10.N();
            l1.i a10 = o2.l.a(m10, (dn.l) f10);
            e0 b10 = e0.c0.b(e0.b.f16607a.g(), l1.c.f27332a.l(), r10, 0);
            int a11 = y0.j.a(r10, 0);
            y0.y D = r10.D();
            l1.i e10 = l1.h.e(r10, a10);
            g.a aVar = j2.g.f23616d;
            dn.a a12 = aVar.a();
            if (!(r10.w() instanceof y0.f)) {
                y0.j.c();
            }
            r10.u();
            if (r10.n()) {
                r10.o(a12);
            } else {
                r10.F();
            }
            y0.m a13 = d4.a(r10);
            d4.b(a13, b10, aVar.c());
            d4.b(a13, D, aVar.e());
            dn.p b11 = aVar.b();
            if (a13.n() || !kotlin.jvm.internal.t.b(a13.f(), Integer.valueOf(a11))) {
                a13.I(Integer.valueOf(a11));
                a13.l(Integer.valueOf(a11), b11);
            }
            d4.b(a13, e10, aVar.d());
            e0.f0 f0Var = e0.f0.f16652a;
            r10.e(1583134786);
            int i14 = 0;
            while (i14 < i10) {
                j(i14 == i11, iVar, r10, (i13 >> 3) & 112);
                i14++;
            }
            r10.N();
            r10.O();
            if (y0.p.H()) {
                y0.p.P();
            }
        }
        x2 y11 = r10.y();
        if (y11 != null) {
            y11.a(new v(i10, i11, iVar, i12));
        }
    }

    public static final l1.i p(l1.i setHeightOrWrap, float f10) {
        kotlin.jvm.internal.t.g(setHeightOrWrap, "$this$setHeightOrWrap");
        return !c3.h.v(f10, c3.h.t((float) 0)) ? androidx.compose.foundation.layout.o.i(setHeightOrWrap, f10) : androidx.compose.foundation.layout.o.w(setHeightOrWrap, null, false, 3, null);
    }
}
