package ca.canadapost.module.flex;

import a9.b;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import androidx.lifecycle.a0;
import androidx.lifecycle.a1;
import androidx.lifecycle.b0;
import androidx.lifecycle.d0;
import androidx.lifecycle.f0;
import androidx.lifecycle.g0;
import androidx.lifecycle.y0;
import ca.canadapost.core.data.addresscomplete.webservice.AddressCompleteFindItem;
import ca.canadapost.core.data.auth.model.ProofingState;
import ca.canadapost.core.data.auth.model.UserProfile;
import ca.canadapost.core.data.flex.model.AdditionalStepBeforeAddLocation;
import ca.canadapost.core.data.flex.model.FlexLocation;
import ca.canadapost.core.data.flex.model.LocationServiceType;
import ca.canadapost.core.data.flex.model.MapLocation;
import ca.canadapost.core.data.model.Event;
import ca.canadapost.core.data.model.RepositoryError;
import ca.canadapost.core.data.model.ResultWrapper;
import ca.canadapost.module.flex.d;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import d9.f;
import dn.p;
import gc.e2;
import gc.x0;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
import kotlin.jvm.internal.p0;
import n8.a;
import rm.c0;
import rm.n0;
import tp.m0;
import v9.d;
import w8.q0;
import w8.r0;

/* loaded from: classes4.dex */
public final class d extends androidx.lifecycle.b implements l8.c {
    private static final MapLocation W;
    private static final c8.d X;
    private final a0 A;
    private final a0 B;
    private final g0 C;
    private final d0 D;
    private final a0 E;
    private final a0 F;
    private final a0 G;
    private final f0 H;
    private final a0 I;
    private boolean J;
    private f0 K;
    private final a0 L;
    private final f0 M;
    private final a0 N;
    private final f0 O;
    private final a0 P;
    private f0 Q;
    private Boolean R;
    private final a0 S;
    private final a0 T;

    /* renamed from: c, reason: collision with root package name */
    private final v9.d f9429c;

    /* renamed from: d, reason: collision with root package name */
    private final g9.d f9430d;

    /* renamed from: e, reason: collision with root package name */
    private final a9.b f9431e;

    /* renamed from: f, reason: collision with root package name */
    private final t7.c f9432f;

    /* renamed from: g, reason: collision with root package name */
    private final d9.f f9433g;

    /* renamed from: h, reason: collision with root package name */
    private final aa.a f9434h;

    /* renamed from: i, reason: collision with root package name */
    private final /* synthetic */ l8.d f9435i;

    /* renamed from: j, reason: collision with root package name */
    private final f0 f9436j;

    /* renamed from: k, reason: collision with root package name */
    private final a0 f9437k;

    /* renamed from: l, reason: collision with root package name */
    private final l8.e f9438l;

    /* renamed from: m, reason: collision with root package name */
    private final f0 f9439m;

    /* renamed from: n, reason: collision with root package name */
    private final a0 f9440n;

    /* renamed from: o, reason: collision with root package name */
    private final f0 f9441o;

    /* renamed from: p, reason: collision with root package name */
    private final a0 f9442p;

    /* renamed from: q, reason: collision with root package name */
    private final a0 f9443q;

    /* renamed from: r, reason: collision with root package name */
    private final a0 f9444r;

    /* renamed from: s, reason: collision with root package name */
    private final a0 f9445s;

    /* renamed from: t, reason: collision with root package name */
    private final f0 f9446t;

    /* renamed from: u, reason: collision with root package name */
    private final a0 f9447u;

    /* renamed from: v, reason: collision with root package name */
    private final l8.g f9448v;

    /* renamed from: w, reason: collision with root package name */
    private final a0 f9449w;

    /* renamed from: x, reason: collision with root package name */
    private final f0 f9450x;

    /* renamed from: y, reason: collision with root package name */
    private final a0 f9451y;

    /* renamed from: z, reason: collision with root package name */
    private final f0 f9452z;
    static final /* synthetic */ kn.l[] V = {p0.h(new kotlin.jvm.internal.g0(d.class, "doubleClickGuard", "getDoubleClickGuard()Z", 0))};
    public static final c U = new c(null);

    /* loaded from: classes4.dex */
    static final class a extends kotlin.jvm.internal.v implements dn.l {
        a() {
            super(1);
        }

        public final void a(e eVar) {
            MapLocation g10 = eVar.b().g();
            c8.d dVar = (c8.d) d.this.q0().f();
            if (kotlin.jvm.internal.t.b(g10, dVar != null ? dVar.c() : null)) {
                d.this.D.q(d.this.q0().f());
                return;
            }
            if (!eVar.a()) {
                d.this.j0();
            }
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            linkedHashMap.put(eVar.b().g(), eVar.b());
            d.this.D.q(c8.c.NONE == eVar.b().c() ? new c8.d(c8.e.CAMERA_MOVED, linkedHashMap, eVar.b().g(), eVar.c()) : new c8.d(c8.e.LOCATION_SEARCH, linkedHashMap, eVar.b().g(), eVar.c()));
            d dVar2 = d.this;
            kotlin.jvm.internal.t.d(eVar);
            dVar2.M0(eVar);
        }

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

    /* loaded from: classes4.dex */
    static final class b extends kotlin.jvm.internal.v implements dn.l {

        /* JADX INFO: Access modifiers changed from: package-private */
        /* loaded from: classes4.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 */ Map f9455p;

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

            public final void a(MapLocation mapLocation, c8.a locationMarker) {
                kotlin.jvm.internal.t.g(mapLocation, "mapLocation");
                kotlin.jvm.internal.t.g(locationMarker, "locationMarker");
                this.f9455p.put(mapLocation, locationMarker);
            }

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

        b() {
            super(1);
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static final void c(dn.p tmp0, Object obj, Object obj2) {
            kotlin.jvm.internal.t.g(tmp0, "$tmp0");
            tmp0.invoke(obj, obj2);
        }

        public final void b(Map map) {
            Map d10;
            if (d.this.D.f() == null) {
                return;
            }
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            c8.d dVar = (c8.d) d.this.D.f();
            if (dVar != null && (d10 = dVar.d()) != null) {
                final a aVar = new a(linkedHashMap);
                d10.forEach(new BiConsumer() { // from class: ca.canadapost.module.flex.e
                    @Override // java.util.function.BiConsumer
                    public final void accept(Object obj, Object obj2) {
                        d.b.c(p.this, obj, obj2);
                    }
                });
            }
            kotlin.jvm.internal.t.d(map);
            for (Map.Entry entry : map.entrySet()) {
                linkedHashMap.put((MapLocation) entry.getKey(), new c8.a((FlexLocation.FlexLocationItem) entry.getValue()));
            }
            Object f10 = d.this.D.f();
            kotlin.jvm.internal.t.d(f10);
            d.this.D.q(c8.d.b((c8.d) f10, null, linkedHashMap, null, 0, 13, null));
        }

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

    /* loaded from: classes4.dex */
    public static final class c {
        private c() {
        }

        public /* synthetic */ c(kotlin.jvm.internal.k kVar) {
            this();
        }
    }

    /* renamed from: ca.canadapost.module.flex.d$d, reason: collision with other inner class name */
    /* loaded from: classes4.dex */
    public final class C0258d {

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

        /* renamed from: b, reason: collision with root package name */
        public String f9457b;

        /* renamed from: c, reason: collision with root package name */
        public String f9458c;

        /* renamed from: d, reason: collision with root package name */
        public c8.c f9459d;

        /* renamed from: e, reason: collision with root package name */
        private String f9460e;

        /* renamed from: f, reason: collision with root package name */
        private String f9461f;

        /* renamed from: g, reason: collision with root package name */
        private String f9462g;

        /* renamed from: h, reason: collision with root package name */
        private boolean f9463h;

        /* renamed from: ca.canadapost.module.flex.d$d$a */
        /* loaded from: classes4.dex */
        static final class a extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

            a(vm.d dVar) {
                super(2, dVar);
            }

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

            @Override // kotlin.coroutines.jvm.internal.a
            public final Object invokeSuspend(Object obj) {
                Object f10;
                f10 = wm.d.f();
                int i10 = this.f9465p;
                if (i10 == 0) {
                    rm.y.b(obj);
                    C0258d c0258d = C0258d.this;
                    String i11 = c0258d.i();
                    String c10 = C0258d.this.c();
                    this.f9465p = 1;
                    if (c0258d.k(i11, c10, this) == f10) {
                        return f10;
                    }
                } else {
                    if (i10 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    rm.y.b(obj);
                }
                return n0.f34904a;
            }

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

        /* JADX INFO: Access modifiers changed from: package-private */
        /* renamed from: ca.canadapost.module.flex.d$d$b */
        /* loaded from: classes4.dex */
        public static final class b extends kotlin.coroutines.jvm.internal.d {

            /* renamed from: p, reason: collision with root package name */
            Object f9467p;

            /* renamed from: q, reason: collision with root package name */
            /* synthetic */ Object f9468q;

            /* renamed from: s, reason: collision with root package name */
            int f9470s;

            b(vm.d dVar) {
                super(dVar);
            }

            @Override // kotlin.coroutines.jvm.internal.a
            public final Object invokeSuspend(Object obj) {
                this.f9468q = obj;
                this.f9470s |= Integer.MIN_VALUE;
                return C0258d.this.k(null, null, this);
            }
        }

        public C0258d() {
        }

        /* JADX INFO: Access modifiers changed from: private */
        /* JADX WARN: Removed duplicated region for block: B:14:0x0099 A[Catch: all -> 0x00e4, TryCatch #0 {all -> 0x00e4, blocks: (B:11:0x002c, B:12:0x0093, B:14:0x0099, B:18:0x00ba, B:22:0x003b), top: B:7:0x0024 }] */
        /* JADX WARN: Removed duplicated region for block: B:18:0x00ba A[Catch: all -> 0x00e4, TRY_LEAVE, TryCatch #0 {all -> 0x00e4, blocks: (B:11:0x002c, B:12:0x0093, B:14:0x0099, B:18:0x00ba, B:22:0x003b), top: B:7:0x0024 }] */
        /* JADX WARN: Removed duplicated region for block: B:21:0x0038  */
        /* JADX WARN: Removed duplicated region for block: B:9:0x0026  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public final Object k(String str, String str2, vm.d dVar) {
            b bVar;
            Object obj;
            Object f10;
            int i10;
            Map l10;
            try {
                if (dVar instanceof b) {
                    bVar = (b) dVar;
                    int i11 = bVar.f9470s;
                    if ((i11 & Integer.MIN_VALUE) != 0) {
                        bVar.f9470s = i11 - Integer.MIN_VALUE;
                        b bVar2 = bVar;
                        obj = bVar2.f9468q;
                        f10 = wm.d.f();
                        i10 = bVar2.f9470s;
                        if (i10 != 0) {
                            rm.y.b(obj);
                            d.this.M.n(new Event(new r0(q0.ON, d.this.f9432f.getString(e2.f19622c))));
                            d9.f fVar = d.this.f9433g;
                            l10 = sm.q0.l(c0.a("e.Var148", str2), c0.a("s.prop68", str2));
                            fVar.b("Flex_Delete_Address_Adobe", l10);
                            v9.d dVar2 = d.this.f9429c;
                            bVar2.f9467p = this;
                            bVar2.f9470s = 1;
                            obj = d.a.a(dVar2, str, null, bVar2, 2, null);
                            if (obj == f10) {
                                return f10;
                            }
                        } else {
                            if (i10 != 1) {
                                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                            }
                            this = (C0258d) bVar2.f9467p;
                            rm.y.b(obj);
                        }
                        if (((ResultWrapper) obj) instanceof ResultWrapper.Success) {
                            d.this.f9441o.q(new Event(kotlin.coroutines.jvm.internal.b.a(true)));
                        } else {
                            d.this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                            f.a.a(d.this.f9433g, "Flex_Remove_a_post_office_Adobe", null, 2, null);
                        }
                        d.this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                        return n0.f34904a;
                    }
                }
                if (i10 != 0) {
                }
                if (((ResultWrapper) obj) instanceof ResultWrapper.Success) {
                }
                d.this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                return n0.f34904a;
            } catch (Throwable th2) {
                d.this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                throw th2;
            }
            bVar = new b(dVar);
            b bVar22 = bVar;
            obj = bVar22.f9468q;
            f10 = wm.d.f();
            i10 = bVar22.f9470s;
        }

        public final void b() {
            tp.k.d(a1.a(d.this), null, null, new a(null), 3, null);
        }

        public final String c() {
            String str = this.f9458c;
            if (str != null) {
                return str;
            }
            kotlin.jvm.internal.t.y("costCenterId");
            return null;
        }

        public final c8.c d() {
            c8.c cVar = this.f9459d;
            if (cVar != null) {
                return cVar;
            }
            kotlin.jvm.internal.t.y("icon");
            return null;
        }

        public final String e() {
            String str = this.f9456a;
            if (str != null) {
                return str;
            }
            kotlin.jvm.internal.t.y("line1");
            return null;
        }

        public final String f() {
            return this.f9460e;
        }

        public final String g() {
            return this.f9461f;
        }

        public final String h() {
            return this.f9462g;
        }

        public final String i() {
            String str = this.f9457b;
            if (str != null) {
                return str;
            }
            kotlin.jvm.internal.t.y("orderPostalCode");
            return null;
        }

        public final boolean j() {
            return this.f9463h;
        }

        public final void l(String str) {
            kotlin.jvm.internal.t.g(str, "<set-?>");
            this.f9458c = str;
        }

        public final void m(c8.c cVar) {
            kotlin.jvm.internal.t.g(cVar, "<set-?>");
            this.f9459d = cVar;
        }

        public final void n(String str) {
            kotlin.jvm.internal.t.g(str, "<set-?>");
            this.f9456a = str;
        }

        public final void o(String str) {
            this.f9460e = str;
        }

        public final void p(String str) {
            this.f9461f = str;
        }

        public final void q(String str) {
            this.f9462g = str;
        }

        public final void r(String str) {
            kotlin.jvm.internal.t.g(str, "<set-?>");
            this.f9457b = str;
        }

        public final void s(boolean z10) {
            this.f9463h = z10;
        }

        public final void t() {
            d.this.P0(true);
            d.this.Y0(i());
        }
    }

    /* loaded from: classes4.dex */
    static final class f extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ FlexLocation.FlexLocationItem.Flex f9476r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        f(FlexLocation.FlexLocationItem.Flex flex, vm.d dVar) {
            super(2, dVar);
            this.f9476r = flex;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f9474p;
            if (i10 == 0) {
                rm.y.b(obj);
                d dVar = d.this;
                FlexLocation.FlexLocationItem.Flex flex = this.f9476r;
                this.f9474p = 1;
                if (dVar.f0(flex, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return n0.f34904a;
        }

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

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class g extends kotlin.coroutines.jvm.internal.d {

        /* renamed from: p, reason: collision with root package name */
        Object f9477p;

        /* renamed from: q, reason: collision with root package name */
        /* synthetic */ Object f9478q;

        /* renamed from: s, reason: collision with root package name */
        int f9480s;

        g(vm.d dVar) {
            super(dVar);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            this.f9478q = obj;
            this.f9480s |= Integer.MIN_VALUE;
            return d.this.f0(null, this);
        }
    }

    /* loaded from: classes4.dex */
    static final class h extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ FlexLocation.FlexLocationItem.Apl f9483r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        h(FlexLocation.FlexLocationItem.Apl apl, vm.d dVar) {
            super(2, dVar);
            this.f9483r = apl;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f9481p;
            if (i10 == 0) {
                rm.y.b(obj);
                d dVar = d.this;
                FlexLocation.FlexLocationItem.Apl apl = this.f9483r;
                this.f9481p = 1;
                if (dVar.f0(apl, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return n0.f34904a;
        }

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

    /* loaded from: classes4.dex */
    static final class i extends kotlin.jvm.internal.v implements dn.l {

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

        i() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final a0 invoke(Map it) {
            kotlin.jvm.internal.t.g(it, "it");
            Iterator it2 = it.entrySet().iterator();
            while (it2.hasNext()) {
                if (((FlexLocation.FlexLocationItem) ((Map.Entry) it2.next()).getValue()).getApl() != null) {
                    return new f0(new Event(Boolean.TRUE));
                }
            }
            return new f0(new Event(Boolean.FALSE));
        }
    }

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        j(C0258d c0258d) {
            super(0);
            this.f9485p = c0258d;
        }

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m146invoke() {
            this.f9485p.t();
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class k extends kotlin.jvm.internal.v implements dn.a {
        k() {
            super(0);
        }

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

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m147invoke() {
            d.this.f9448v.s();
        }
    }

    /* loaded from: classes4.dex */
    static final class l extends kotlin.jvm.internal.v implements dn.l {

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

        l() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final Integer invoke(Map map) {
            if (map == null) {
                return 0;
            }
            return Integer.valueOf(map.size());
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes4.dex */
    public static final class m extends kotlin.coroutines.jvm.internal.d {

        /* renamed from: p, reason: collision with root package name */
        /* synthetic */ Object f9488p;

        /* renamed from: r, reason: collision with root package name */
        int f9490r;

        m(vm.d dVar) {
            super(dVar);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            this.f9488p = obj;
            this.f9490r |= Integer.MIN_VALUE;
            return d.this.p0(null, this);
        }
    }

    /* loaded from: classes4.dex */
    static final class n extends kotlin.jvm.internal.v implements dn.l {

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

        n() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final Boolean invoke(MapLocation mapLocation) {
            return Boolean.valueOf(mapLocation != null);
        }
    }

    /* loaded from: classes4.dex */
    static final class o extends kotlin.jvm.internal.v implements dn.l {

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

        o() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final a0 invoke(AdditionalStepBeforeAddLocation additionalStepBeforeAddLocation) {
            return new f0(new Event(additionalStepBeforeAddLocation));
        }
    }

    /* loaded from: classes4.dex */
    static final class p extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        p(AdditionalStepBeforeAddLocation additionalStepBeforeAddLocation, vm.d dVar) {
            super(2, dVar);
            this.f9495r = additionalStepBeforeAddLocation;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f9493p;
            if (i10 == 0) {
                rm.y.b(obj);
                d dVar = d.this;
                FlexLocation.FlexLocationItem.FlexOrApl location = ((AdditionalStepBeforeAddLocation.LOGIN) this.f9495r).getLocation();
                this.f9493p = 1;
                if (dVar.f0(location, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return n0.f34904a;
        }

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

    /* loaded from: classes4.dex */
    static final class q extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        q(AdditionalStepBeforeAddLocation additionalStepBeforeAddLocation, vm.d dVar) {
            super(2, dVar);
            this.f9498r = additionalStepBeforeAddLocation;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f9496p;
            if (i10 == 0) {
                rm.y.b(obj);
                v9.d dVar = d.this.f9429c;
                this.f9496p = 1;
                obj = dVar.s(this);
                if (obj == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    if (i10 != 2) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    rm.y.b(obj);
                    return n0.f34904a;
                }
                rm.y.b(obj);
            }
            ProofingState proofingState = (ProofingState) obj;
            if (!(proofingState != null && proofingState.isL1Authenticated())) {
                f.a.a(d.this.f9433g, "Flex - Add_Cancelled at L1Authentication_Adobe", null, 2, null);
                return n0.f34904a;
            }
            d dVar2 = d.this;
            FlexLocation.FlexLocationItem.FlexOrApl location = ((AdditionalStepBeforeAddLocation.L1AUTH) this.f9498r).getLocation();
            this.f9496p = 2;
            if (dVar2.f0(location, this) == f10) {
                return f10;
            }
            return n0.f34904a;
        }

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

    /* loaded from: classes4.dex */
    static final class r extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        r(AdditionalStepBeforeAddLocation additionalStepBeforeAddLocation, vm.d dVar) {
            super(2, dVar);
            this.f9501r = additionalStepBeforeAddLocation;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f9499p;
            if (i10 == 0) {
                rm.y.b(obj);
                d dVar = d.this;
                FlexLocation.FlexLocationItem.FlexOrApl location = ((AdditionalStepBeforeAddLocation.TANDC) this.f9501r).getLocation();
                this.f9499p = 1;
                if (dVar.f0(location, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return n0.f34904a;
        }

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

    /* loaded from: classes4.dex */
    static final class s implements g0, kotlin.jvm.internal.n {

        /* renamed from: a, reason: collision with root package name */
        private final /* synthetic */ dn.l f9502a;

        s(dn.l function) {
            kotlin.jvm.internal.t.g(function, "function");
            this.f9502a = function;
        }

        @Override // kotlin.jvm.internal.n
        public final rm.i b() {
            return this.f9502a;
        }

        @Override // androidx.lifecycle.g0
        public final /* synthetic */ void d(Object obj) {
            this.f9502a.invoke(obj);
        }

        public final boolean equals(Object obj) {
            if ((obj instanceof g0) && (obj instanceof kotlin.jvm.internal.n)) {
                return kotlin.jvm.internal.t.b(b(), ((kotlin.jvm.internal.n) obj).b());
            }
            return false;
        }

        public final int hashCode() {
            return b().hashCode();
        }
    }

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        t(e eVar, vm.d dVar) {
            super(2, dVar);
            this.f9505r = eVar;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f9503p;
            if (i10 == 0) {
                rm.y.b(obj);
                v9.d dVar = d.this.f9429c;
                MapLocation g10 = this.f9505r.b().g();
                boolean a10 = this.f9505r.a();
                this.f9503p = 1;
                obj = dVar.c(g10, a10, this);
                if (obj == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            if (((ResultWrapper) obj) instanceof ResultWrapper.Error) {
                d.this.K.q(new Event(d.this.f9432f.getString(e2.f19620b)));
            }
            return n0.f34904a;
        }

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

    /* loaded from: classes4.dex */
    static final class u extends kotlin.jvm.internal.v implements dn.l {

        /* loaded from: classes4.dex */
        public /* synthetic */ class a {

            /* renamed from: a, reason: collision with root package name */
            public static final /* synthetic */ int[] f9507a;

            static {
                int[] iArr = new int[LocationServiceType.values().length];
                try {
                    iArr[LocationServiceType.LOCKER.ordinal()] = 1;
                } catch (NoSuchFieldError unused) {
                }
                try {
                    iArr[LocationServiceType.APL_AND_FLEX.ordinal()] = 2;
                } catch (NoSuchFieldError unused2) {
                }
                f9507a = iArr;
            }
        }

        u() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final String invoke(FlexLocation.FlexLocationItem flexLocationItem) {
            if (flexLocationItem == null) {
                return null;
            }
            d dVar = d.this;
            int i10 = a.f9507a[flexLocationItem.getServiceType().ordinal()];
            return i10 != 1 ? i10 != 2 ? dVar.f9432f.getString(e2.Q) : dVar.f9432f.getString(e2.f19624d) : dVar.f9432f.getString(e2.f19629f0);
        }
    }

    /* loaded from: classes4.dex */
    static final class v extends kotlin.jvm.internal.v implements dn.l {

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

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

            /* renamed from: q, reason: collision with root package name */
            private /* synthetic */ Object f9510q;

            /* renamed from: r, reason: collision with root package name */
            final /* synthetic */ AddressCompleteFindItem.AddressCompleteRetrieveItem f9511r;

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(AddressCompleteFindItem.AddressCompleteRetrieveItem addressCompleteRetrieveItem, d dVar, vm.d dVar2) {
                super(2, dVar2);
                this.f9511r = addressCompleteRetrieveItem;
                this.f9512s = dVar;
            }

            @Override // dn.p
            /* renamed from: b, reason: merged with bridge method [inline-methods] */
            public final Object invoke(b0 b0Var, vm.d dVar) {
                return ((a) create(b0Var, dVar)).invokeSuspend(n0.f34904a);
            }

            @Override // kotlin.coroutines.jvm.internal.a
            public final vm.d create(Object obj, vm.d dVar) {
                a aVar = new a(this.f9511r, this.f9512s, dVar);
                aVar.f9510q = obj;
                return aVar;
            }

            /* JADX WARN: Removed duplicated region for block: B:20:0x00ab A[RETURN] */
            @Override // kotlin.coroutines.jvm.internal.a
            /*
                Code decompiled incorrectly, please refer to instructions dump.
            */
            public final Object invokeSuspend(Object obj) {
                Object f10;
                b0 b0Var;
                Event event;
                f10 = wm.d.f();
                int i10 = this.f9509p;
                if (i10 == 0) {
                    rm.y.b(obj);
                    b0Var = (b0) this.f9510q;
                    AddressCompleteFindItem.AddressCompleteRetrieveItem addressCompleteRetrieveItem = this.f9511r;
                    if (addressCompleteRetrieveItem == null) {
                        Event event2 = new Event(null);
                        this.f9509p = 1;
                        if (b0Var.emit(event2, this) == f10) {
                            return f10;
                        }
                        return n0.f34904a;
                    }
                    Double lat = addressCompleteRetrieveItem.lat;
                    if (lat != null && addressCompleteRetrieveItem.lng != null) {
                        kotlin.jvm.internal.t.f(lat, "lat");
                        double doubleValue = lat.doubleValue();
                        Double lng = this.f9511r.lng;
                        kotlin.jvm.internal.t.f(lng, "lng");
                        Event event3 = new Event(new MapLocation(doubleValue, lng.doubleValue()));
                        this.f9509p = 2;
                        if (b0Var.emit(event3, this) == f10) {
                            return f10;
                        }
                        return n0.f34904a;
                    }
                    String str = addressCompleteRetrieveItem.Label;
                    if (str == null) {
                        Event event4 = new Event(null);
                        this.f9509p = 5;
                        if (b0Var.emit(event4, this) == f10) {
                            return f10;
                        }
                        return n0.f34904a;
                    }
                    d dVar = this.f9512s;
                    this.f9510q = b0Var;
                    this.f9509p = 3;
                    obj = dVar.p0(str, this);
                    if (obj == f10) {
                        return f10;
                    }
                    event = new Event(obj);
                    this.f9510q = null;
                    this.f9509p = 4;
                    if (b0Var.emit(event, this) == f10) {
                    }
                } else {
                    if (i10 == 1) {
                        rm.y.b(obj);
                        return n0.f34904a;
                    }
                    if (i10 == 2) {
                        rm.y.b(obj);
                        return n0.f34904a;
                    }
                    if (i10 == 3) {
                        b0Var = (b0) this.f9510q;
                        rm.y.b(obj);
                        event = new Event(obj);
                        this.f9510q = null;
                        this.f9509p = 4;
                        if (b0Var.emit(event, this) == f10) {
                            return f10;
                        }
                    } else {
                        if (i10 != 4) {
                            if (i10 != 5) {
                                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                            }
                            rm.y.b(obj);
                            return n0.f34904a;
                        }
                        rm.y.b(obj);
                    }
                }
                return n0.f34904a;
            }
        }

        v() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final a0 invoke(AddressCompleteFindItem.AddressCompleteRetrieveItem addressCompleteRetrieveItem) {
            a0 b10 = androidx.lifecycle.g.b(a1.a(d.this).getCoroutineContext(), 0L, new a(addressCompleteRetrieveItem, d.this, null), 2, null);
            kotlin.jvm.internal.t.e(b10, "null cannot be cast to non-null type androidx.lifecycle.LiveData<ca.canadapost.core.data.model.Event<ca.canadapost.core.data.flex.model.MapLocation>>");
            return b10;
        }
    }

    /* loaded from: classes4.dex */
    static final class w extends kotlin.jvm.internal.v implements dn.l {

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

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

            /* renamed from: q, reason: collision with root package name */
            private /* synthetic */ Object f9515q;

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(UserProfile userProfile, d dVar, vm.d dVar2) {
                super(2, dVar2);
                this.f9516r = userProfile;
                this.f9517s = dVar;
            }

            @Override // dn.p
            /* renamed from: b, reason: merged with bridge method [inline-methods] */
            public final Object invoke(b0 b0Var, vm.d dVar) {
                return ((a) create(b0Var, dVar)).invokeSuspend(n0.f34904a);
            }

            @Override // kotlin.coroutines.jvm.internal.a
            public final vm.d create(Object obj, vm.d dVar) {
                a aVar = new a(this.f9516r, this.f9517s, dVar);
                aVar.f9515q = obj;
                return aVar;
            }

            /* JADX WARN: Removed duplicated region for block: B:15:0x011e A[RETURN] */
            /* JADX WARN: Removed duplicated region for block: B:27:0x004e  */
            /* JADX WARN: Removed duplicated region for block: B:34:0x006d  */
            /* JADX WARN: Removed duplicated region for block: B:37:0x008d  */
            /* JADX WARN: Removed duplicated region for block: B:41:0x0099  */
            /* JADX WARN: Removed duplicated region for block: B:44:0x00b9  */
            /* JADX WARN: Removed duplicated region for block: B:48:0x00c5  */
            /* JADX WARN: Removed duplicated region for block: B:51:0x00e5  */
            /* JADX WARN: Removed duplicated region for block: B:55:0x00ef  */
            /* JADX WARN: Removed duplicated region for block: B:58:0x0113 A[RETURN] */
            @Override // kotlin.coroutines.jvm.internal.a
            /*
                Code decompiled incorrectly, please refer to instructions dump.
            */
            public final Object invokeSuspend(Object obj) {
                Object f10;
                b0 b0Var;
                boolean z10;
                boolean z11;
                String city;
                boolean z12;
                String region;
                boolean z13;
                String postalZip;
                boolean C;
                boolean C2;
                boolean C3;
                boolean C4;
                boolean C5;
                f10 = wm.d.f();
                int i10 = this.f9514p;
                boolean z14 = true;
                if (i10 == 0) {
                    rm.y.b(obj);
                    b0Var = (b0) this.f9515q;
                    UserProfile userProfile = this.f9516r;
                    if (userProfile != null) {
                        String addressLine1 = userProfile.getAddressLine1();
                        if (addressLine1 != null) {
                            C5 = kotlin.text.y.C(addressLine1);
                            if (!C5) {
                                z10 = false;
                                if (!z10) {
                                    String addressLine12 = this.f9516r.getAddressLine1();
                                    kotlin.jvm.internal.t.d(addressLine12);
                                    String addressLine2 = this.f9516r.getAddressLine2();
                                    if (addressLine2 != null) {
                                        C4 = kotlin.text.y.C(addressLine2);
                                        if (!C4) {
                                            z11 = false;
                                            if (!z11) {
                                                addressLine12 = addressLine12 + ", " + this.f9516r.getAddressLine2();
                                            }
                                            city = this.f9516r.getCity();
                                            if (city != null) {
                                                C3 = kotlin.text.y.C(city);
                                                if (!C3) {
                                                    z12 = false;
                                                    if (!z12) {
                                                        addressLine12 = addressLine12 + ", " + this.f9516r.getCity();
                                                    }
                                                    region = this.f9516r.getRegion();
                                                    if (region != null) {
                                                        C2 = kotlin.text.y.C(region);
                                                        if (!C2) {
                                                            z13 = false;
                                                            if (!z13) {
                                                                addressLine12 = addressLine12 + ", " + this.f9516r.getRegion();
                                                            }
                                                            postalZip = this.f9516r.getPostalZip();
                                                            if (postalZip != null) {
                                                                C = kotlin.text.y.C(postalZip);
                                                                if (!C) {
                                                                    z14 = false;
                                                                }
                                                            }
                                                            if (!z14) {
                                                                addressLine12 = addressLine12 + ", " + this.f9516r.getPostalZip();
                                                            }
                                                            d dVar = this.f9517s;
                                                            this.f9515q = b0Var;
                                                            this.f9514p = 2;
                                                            obj = dVar.p0(addressLine12, this);
                                                            if (obj == f10) {
                                                                return f10;
                                                            }
                                                            this.f9515q = null;
                                                            this.f9514p = 3;
                                                            if (b0Var.emit(obj, this) == f10) {
                                                            }
                                                        }
                                                    }
                                                    z13 = true;
                                                    if (!z13) {
                                                    }
                                                    postalZip = this.f9516r.getPostalZip();
                                                    if (postalZip != null) {
                                                    }
                                                    if (!z14) {
                                                    }
                                                    d dVar2 = this.f9517s;
                                                    this.f9515q = b0Var;
                                                    this.f9514p = 2;
                                                    obj = dVar2.p0(addressLine12, this);
                                                    if (obj == f10) {
                                                    }
                                                    this.f9515q = null;
                                                    this.f9514p = 3;
                                                    if (b0Var.emit(obj, this) == f10) {
                                                    }
                                                }
                                            }
                                            z12 = true;
                                            if (!z12) {
                                            }
                                            region = this.f9516r.getRegion();
                                            if (region != null) {
                                            }
                                            z13 = true;
                                            if (!z13) {
                                            }
                                            postalZip = this.f9516r.getPostalZip();
                                            if (postalZip != null) {
                                            }
                                            if (!z14) {
                                            }
                                            d dVar22 = this.f9517s;
                                            this.f9515q = b0Var;
                                            this.f9514p = 2;
                                            obj = dVar22.p0(addressLine12, this);
                                            if (obj == f10) {
                                            }
                                            this.f9515q = null;
                                            this.f9514p = 3;
                                            if (b0Var.emit(obj, this) == f10) {
                                            }
                                        }
                                    }
                                    z11 = true;
                                    if (!z11) {
                                    }
                                    city = this.f9516r.getCity();
                                    if (city != null) {
                                    }
                                    z12 = true;
                                    if (!z12) {
                                    }
                                    region = this.f9516r.getRegion();
                                    if (region != null) {
                                    }
                                    z13 = true;
                                    if (!z13) {
                                    }
                                    postalZip = this.f9516r.getPostalZip();
                                    if (postalZip != null) {
                                    }
                                    if (!z14) {
                                    }
                                    d dVar222 = this.f9517s;
                                    this.f9515q = b0Var;
                                    this.f9514p = 2;
                                    obj = dVar222.p0(addressLine12, this);
                                    if (obj == f10) {
                                    }
                                    this.f9515q = null;
                                    this.f9514p = 3;
                                    if (b0Var.emit(obj, this) == f10) {
                                    }
                                }
                            }
                        }
                        z10 = true;
                        if (!z10) {
                        }
                    }
                    this.f9514p = 1;
                    if (b0Var.emit(null, this) == f10) {
                        return f10;
                    }
                    return n0.f34904a;
                }
                if (i10 == 1) {
                    rm.y.b(obj);
                    return n0.f34904a;
                }
                if (i10 == 2) {
                    b0Var = (b0) this.f9515q;
                    rm.y.b(obj);
                    this.f9515q = null;
                    this.f9514p = 3;
                    if (b0Var.emit(obj, this) == f10) {
                        return f10;
                    }
                } else {
                    if (i10 != 3) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    rm.y.b(obj);
                }
                return n0.f34904a;
            }
        }

        w() {
            super(1);
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final a0 invoke(UserProfile userProfile) {
            return androidx.lifecycle.g.b(a1.a(d.this).getCoroutineContext(), 0L, new a(userProfile, d.this, null), 2, null);
        }
    }

    /* loaded from: classes4.dex */
    static final class x extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ FlexLocation.FlexLocationItem f9520r;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        x(FlexLocation.FlexLocationItem flexLocationItem, vm.d dVar) {
            super(2, dVar);
            this.f9520r = flexLocationItem;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f9518p;
            if (i10 == 0) {
                rm.y.b(obj);
                d.this.M.n(new Event(new r0(q0.ON, d.this.f9432f.getString(e2.f19622c))));
                v9.d dVar = d.this.f9429c;
                String costCentreId = this.f9520r.getCostCentreId();
                this.f9518p = 1;
                obj = dVar.u(costCentreId, this);
                if (obj == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            if (((ResultWrapper) obj) instanceof ResultWrapper.Success) {
                f.a.a(d.this.f9433g, "FPO_Additional_Details_Adobe", null, 2, null);
                d.this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                d.this.f9439m.q(new Event(kotlin.coroutines.jvm.internal.b.a(true)));
            } else {
                d.this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                d.this.C0(new ResultWrapper.Error(null, null, RepositoryError.ServiceError, null, 8, null), true);
            }
            return n0.f34904a;
        }

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

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

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

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

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        y(String str, vm.d dVar) {
            super(2, dVar);
            this.f9523r = str;
        }

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f9521p;
            if (i10 == 0) {
                rm.y.b(obj);
                d.this.M.n(new Event(new r0(q0.ON, d.this.f9432f.getString(e2.f19622c))));
                v9.d dVar = d.this.f9429c;
                String str = this.f9523r;
                this.f9521p = 1;
                obj = dVar.j(str, this);
                if (obj == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            if (((ResultWrapper) obj) instanceof ResultWrapper.Success) {
                d.this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                d.this.H.q(new Event(kotlin.coroutines.jvm.internal.b.a(true)));
            } else {
                d.this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                d.this.C0(new ResultWrapper.Error(null, null, RepositoryError.ServiceError, null, 8, null), true);
            }
            return n0.f34904a;
        }

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

    static {
        MapLocation mapLocation = new MapLocation(53.0d, -95.0d);
        W = mapLocation;
        X = new c8.d(c8.e.LOCATION_SEARCH, new LinkedHashMap(), mapLocation, 5);
    }

    /* JADX WARN: Illegal instructions before constructor call */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public d(v9.d flexRepository, g9.d sessionRepository, a9.b addressSearch, t7.c contextService, ka.b userProfileRepository, d9.f analyticsService, aa.a iInAppReviewRepositoryService) {
        super((Application) r0);
        kotlin.jvm.internal.t.g(flexRepository, "flexRepository");
        kotlin.jvm.internal.t.g(sessionRepository, "sessionRepository");
        kotlin.jvm.internal.t.g(addressSearch, "addressSearch");
        kotlin.jvm.internal.t.g(contextService, "contextService");
        kotlin.jvm.internal.t.g(userProfileRepository, "userProfileRepository");
        kotlin.jvm.internal.t.g(analyticsService, "analyticsService");
        kotlin.jvm.internal.t.g(iInAppReviewRepositoryService, "iInAppReviewRepositoryService");
        Context a10 = contextService.a();
        kotlin.jvm.internal.t.e(a10, "null cannot be cast to non-null type android.app.Application");
        this.f9429c = flexRepository;
        this.f9430d = sessionRepository;
        this.f9431e = addressSearch;
        this.f9432f = contextService;
        this.f9433g = analyticsService;
        this.f9434h = iInAppReviewRepositoryService;
        this.f9435i = new l8.d();
        f0 f0Var = new f0();
        this.f9436j = f0Var;
        this.f9437k = f0Var;
        this.f9438l = new l8.e(false, 0L, 3, null);
        Boolean bool = Boolean.FALSE;
        f0 f0Var2 = new f0(new Event(bool));
        this.f9439m = f0Var2;
        this.f9440n = f0Var2;
        f0 f0Var3 = new f0(new Event(bool));
        this.f9441o = f0Var3;
        this.f9442p = f0Var3;
        a0 b10 = y0.b(userProfileRepository.a(), new w());
        this.f9443q = b10;
        this.f9444r = y0.a(b10, n.f9491p);
        this.f9445s = y0.b(addressSearch.g(), new v());
        f0 f0Var4 = new f0(Boolean.TRUE);
        this.f9446t = f0Var4;
        this.f9447u = f0Var4;
        l8.g gVar = new l8.g();
        this.f9448v = gVar;
        this.f9449w = gVar;
        f0 f0Var5 = new f0();
        this.f9450x = f0Var5;
        this.f9451y = f0Var5;
        f0 f0Var6 = new f0();
        this.f9452z = f0Var6;
        this.A = f0Var6;
        this.B = y0.a(flexRepository.p(), l.f9487p);
        g0 g0Var = new g0() { // from class: gc.h0
            @Override // androidx.lifecycle.g0
            public final void d(Object obj) {
                ca.canadapost.module.flex.d.h0(ca.canadapost.module.flex.d.this, (Map) obj);
            }
        };
        flexRepository.p().k(g0Var);
        this.C = g0Var;
        d0 d0Var = new d0();
        d0Var.q(X);
        this.D = d0Var;
        this.E = d0Var;
        a0 n10 = flexRepository.n();
        this.F = n10;
        this.G = y0.a(n10, new u());
        f0 f0Var7 = new f0();
        this.H = f0Var7;
        this.I = f0Var7;
        f0 f0Var8 = new f0();
        this.K = f0Var8;
        this.L = f0Var8;
        f0 f0Var9 = new f0();
        this.M = f0Var9;
        this.N = f0Var9;
        f0 f0Var10 = new f0();
        this.O = f0Var10;
        this.P = y0.b(f0Var10, o.f9492p);
        this.Q = new f0();
        this.S = y0.b(flexRepository.e(), i.f9484p);
        this.T = sessionRepository.i();
        d0Var.r(this.Q, new s(new a()));
        d0Var.r(flexRepository.e(), new s(new b()));
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final void Y0(String str) {
        tp.k.d(a1.a(this), null, null, new y(str, null), 3, null);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void h0(d this$0, Map map) {
        kotlin.jvm.internal.t.g(this$0, "this$0");
        ArrayList arrayList = new ArrayList();
        if (map == null || map.isEmpty()) {
            arrayList.add(new x0());
            this$0.f9436j.q(arrayList);
            return;
        }
        Iterator it = map.entrySet().iterator();
        while (it.hasNext()) {
            FlexLocation.FlexLocationItem.FlexOrApl flexOrApl = (FlexLocation.FlexLocationItem.FlexOrApl) ((Map.Entry) it.next()).getValue();
            C0258d c0258d = new C0258d();
            String alias = flexOrApl.getAlias();
            if (alias == null) {
                alias = flexOrApl.getName();
            }
            c0258d.n(alias);
            c0258d.o(flexOrApl.getMailingAddress().getAddressLine1());
            c0258d.p(flexOrApl.getMailingAddress().getAddressLine2());
            c0258d.q(flexOrApl.getMailingAddress().getAddressLine3());
            c0258d.r(flexOrApl.getPostalCode());
            c0258d.l(flexOrApl.getCostCentreId());
            c0258d.s(!kotlin.jvm.internal.t.b(flexOrApl.getStatus(), "ACTIVE"));
            if (flexOrApl instanceof FlexLocation.FlexLocationItem.Apl) {
                c0258d.m(kotlin.jvm.internal.t.b(flexOrApl.getStatus(), "ACTIVE") ? c8.c.APL_ADDRESS_ADDED : c8.c.CLOSED);
            } else if (flexOrApl instanceof FlexLocation.FlexLocationItem.Flex) {
                c0258d.m(kotlin.jvm.internal.t.b(flexOrApl.getStatus(), "ACTIVE") ? c8.c.FLEX_ADDRESS_ADDED : c8.c.CLOSED);
            }
            arrayList.add(new ca.canadapost.module.flex.f(c0258d, new j(c0258d), new k()));
        }
        this$0.f9436j.q(arrayList);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final void j0() {
        this.f9450x.q(new Event(Boolean.TRUE));
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX WARN: Removed duplicated region for block: B:12:0x004c  */
    /* JADX WARN: Removed duplicated region for block: B:28:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:31:0x0032  */
    /* JADX WARN: Removed duplicated region for block: B:8:0x0024  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p0(String str, vm.d dVar) {
        m mVar;
        Object f10;
        int i10;
        ResultWrapper resultWrapper;
        if (dVar instanceof m) {
            mVar = (m) dVar;
            int i11 = mVar.f9490r;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                mVar.f9490r = i11 - Integer.MIN_VALUE;
                m mVar2 = mVar;
                Object obj = mVar2.f9488p;
                f10 = wm.d.f();
                i10 = mVar2.f9490r;
                boolean z10 = true;
                if (i10 != 0) {
                    rm.y.b(obj);
                    a9.b bVar = this.f9431e;
                    mVar2.f9490r = 1;
                    obj = b.a.a(bVar, str, null, null, mVar2, 6, null);
                    if (obj == f10) {
                        return f10;
                    }
                } else {
                    if (i10 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    rm.y.b(obj);
                }
                resultWrapper = (ResultWrapper) obj;
                if (resultWrapper instanceof ResultWrapper.Success) {
                    return null;
                }
                ResultWrapper.Success success = (ResultWrapper.Success) resultWrapper;
                Collection collection = (Collection) success.getData();
                if (collection != null && !collection.isEmpty()) {
                    z10 = false;
                }
                if (z10) {
                    return null;
                }
                List list = (List) success.getData();
                AddressCompleteFindItem addressCompleteFindItem = list != null ? (AddressCompleteFindItem) list.get(0) : null;
                if (addressCompleteFindItem == null) {
                    return null;
                }
                Double lat = addressCompleteFindItem.lat;
                kotlin.jvm.internal.t.f(lat, "lat");
                double doubleValue = lat.doubleValue();
                Double lng = addressCompleteFindItem.lng;
                kotlin.jvm.internal.t.f(lng, "lng");
                return new MapLocation(doubleValue, lng.doubleValue());
            }
        }
        mVar = new m(dVar);
        m mVar22 = mVar;
        Object obj2 = mVar22.f9488p;
        f10 = wm.d.f();
        i10 = mVar22.f9490r;
        boolean z102 = true;
        if (i10 != 0) {
        }
        resultWrapper = (ResultWrapper) obj2;
        if (resultWrapper instanceof ResultWrapper.Success) {
        }
    }

    public final a0 A0() {
        return this.L;
    }

    public final a0 B0() {
        return this.N;
    }

    public void C0(ResultWrapper.Error error, boolean z10) {
        kotlin.jvm.internal.t.g(error, "error");
        this.f9435i.a(error, z10);
    }

    public final Boolean D0() {
        return this.R;
    }

    public final boolean E0() {
        return kotlin.jvm.internal.t.b(this.f9429c.h().f(), Boolean.TRUE);
    }

    public final a0 F0() {
        return this.T;
    }

    public final a0 G0() {
        return this.f9444r;
    }

    public final a0 H0() {
        return this.f9447u;
    }

    public final void I0(MapLocation location, int i10) {
        kotlin.jvm.internal.t.g(location, "location");
        this.Q.q(new e(new c8.a(location, null, null, c8.c.NONE, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, false, BitmapDescriptorFactory.HUE_RED, null, null, null, 2032, null), i10, true));
    }

    public final void J0(MapLocation marker) {
        c8.a aVar;
        kotlin.jvm.internal.t.g(marker, "marker");
        c8.d dVar = (c8.d) this.D.f();
        if (dVar == null || (aVar = (c8.a) dVar.d().get(marker)) == null || aVar.a() == null) {
            return;
        }
        f.a.a(this.f9433g, "FPO_Details_Adobe", null, 2, null);
        this.f9429c.g(marker);
    }

    public final void K0() {
        this.f9431e.e();
        f.a.a(this.f9433g, "FPO_search_result_Adobe", null, 2, null);
        a.C0681a c0681a = n8.a.f29843a;
        Activity b10 = this.f9432f.b();
        kotlin.jvm.internal.t.f(b10, "getCurrentActivity(...)");
        a.C0681a.c(c0681a, b10, null, 2, null);
    }

    public final void L0() {
        try {
            AdditionalStepBeforeAddLocation additionalStepBeforeAddLocation = (AdditionalStepBeforeAddLocation) this.O.f();
            if (additionalStepBeforeAddLocation != null && !(additionalStepBeforeAddLocation instanceof AdditionalStepBeforeAddLocation.NONE)) {
                if (additionalStepBeforeAddLocation instanceof AdditionalStepBeforeAddLocation.LOGIN) {
                    if (this.f9430d.h()) {
                        tp.k.d(a1.a(this), null, null, new p(additionalStepBeforeAddLocation, null), 3, null);
                    }
                } else if (additionalStepBeforeAddLocation instanceof AdditionalStepBeforeAddLocation.L1AUTH) {
                    tp.k.d(a1.a(this), null, null, new q(additionalStepBeforeAddLocation, null), 3, null);
                } else if (additionalStepBeforeAddLocation instanceof AdditionalStepBeforeAddLocation.TANDC) {
                    if (kotlin.jvm.internal.t.b(this.f9429c.q().f(), Boolean.TRUE)) {
                        tp.k.d(a1.a(this), null, null, new r(additionalStepBeforeAddLocation, null), 3, null);
                    } else {
                        f.a.a(this.f9433g, "Flex - Add_Cancelled at L1Authentication_Adobe", null, 2, null);
                    }
                }
            }
        } finally {
            this.O.q(AdditionalStepBeforeAddLocation.NONE.INSTANCE);
        }
    }

    public final void M0(e searchQuery) {
        kotlin.jvm.internal.t.g(searchQuery, "searchQuery");
        U0();
        tp.k.d(a1.a(this), null, null, new t(searchQuery, null), 3, null);
    }

    public final void N0(boolean z10) {
        if (z10) {
            return;
        }
        f.a.c(this.f9433g, "FPOMap", null, 2, null);
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // androidx.lifecycle.z0
    public void O() {
        this.f9429c.p().o(this.C);
        super.O();
    }

    public final void O0(Boolean bool) {
        this.R = bool;
    }

    public final void P0(boolean z10) {
        this.J = z10;
    }

    public final void Q0(MapLocation location) {
        kotlin.jvm.internal.t.g(location, "location");
        this.Q.q(new e(new c8.a(location, null, null, c8.c.DEVICE_LOCATION, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, false, BitmapDescriptorFactory.HUE_RED, null, null, null, 2032, null), 0, false, 6, null));
    }

    public final void R0() {
        this.f9452z.q(new Event(Boolean.TRUE));
    }

    public final void S0() {
        MapLocation mapLocation = (MapLocation) this.f9443q.f();
        if (mapLocation != null) {
            f0 f0Var = this.Q;
            kotlin.jvm.internal.t.d(mapLocation);
            f0Var.q(new e(new c8.a(mapLocation, null, null, c8.c.HOME, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, false, BitmapDescriptorFactory.HUE_RED, null, null, null, 2032, null), 0, false, 6, null));
        }
    }

    public final void T0(MapLocation location) {
        kotlin.jvm.internal.t.g(location, "location");
        this.Q.q(new e(new c8.a(location, null, null, c8.c.DEVICE_LOCATION, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, false, BitmapDescriptorFactory.HUE_RED, null, null, null, 1904, null), 0, false, 6, null));
    }

    public final void U0() {
        this.f9429c.l();
    }

    public final void V0() {
        FlexLocation.FlexLocationItem.Flex flex;
        Map l10;
        FlexLocation.FlexLocationItem flexLocationItem = (FlexLocation.FlexLocationItem) this.F.f();
        if (flexLocationItem == null || (flex = flexLocationItem.getFlex()) == null) {
            return;
        }
        Y0(flex.getPostalCode());
        d9.f fVar = this.f9433g;
        l10 = sm.q0.l(c0.a("e.Var148", flex.getCostCentreId()), c0.a("s.prop68", flex.getCostCentreId()));
        fVar.b("Flex_Details_Post_Office_Adobe", l10);
    }

    public final void W0() {
        FlexLocation.FlexLocationItem flexLocationItem = (FlexLocation.FlexLocationItem) this.F.f();
        if (flexLocationItem == null || !i0(flexLocationItem)) {
            return;
        }
        tp.k.d(a1.a(this), null, null, new x(flexLocationItem, null), 3, null);
    }

    public final void X0() {
        FlexLocation.FlexLocationItem.Apl apl;
        FlexLocation.FlexLocationItem flexLocationItem = (FlexLocation.FlexLocationItem) this.F.f();
        if (flexLocationItem == null || (apl = flexLocationItem.getApl()) == null) {
            return;
        }
        Y0(apl.getPostalCode());
    }

    public final void e0() {
        FlexLocation.FlexLocationItem.Flex flex;
        FlexLocation.FlexLocationItem flexLocationItem = (FlexLocation.FlexLocationItem) this.F.f();
        if (flexLocationItem == null || (flex = flexLocationItem.getFlex()) == null) {
            return;
        }
        tp.k.d(a1.a(this), null, null, new f(flex, null), 3, null);
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x0097  */
    /* JADX WARN: Removed duplicated region for block: B:16:0x00c7  */
    /* JADX WARN: Removed duplicated region for block: B:25:0x0037  */
    /* JADX WARN: Removed duplicated region for block: B:8:0x0025  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object f0(FlexLocation.FlexLocationItem.FlexOrApl flexOrApl, vm.d dVar) {
        g gVar;
        Object f10;
        int i10;
        String str;
        Map l10;
        ResultWrapper resultWrapper;
        if (dVar instanceof g) {
            gVar = (g) dVar;
            int i11 = gVar.f9480s;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                gVar.f9480s = i11 - Integer.MIN_VALUE;
                Object obj = gVar.f9478q;
                f10 = wm.d.f();
                i10 = gVar.f9480s;
                if (i10 != 0) {
                    rm.y.b(obj);
                    this.M.n(new Event(new r0(q0.ON, this.f9432f.getString(e2.f19622c))));
                    if (flexOrApl instanceof FlexLocation.FlexLocationItem.Apl) {
                        f.a.a(this.f9433g, "APL - Add_Event_Save_Postal_Locker_MapView", null, 2, null);
                        str = "Flex_APL_Save_Automated_Locker_Adobe";
                    } else {
                        str = "Flex_Save_Post_Office_Adobe";
                    }
                    d9.f fVar = this.f9433g;
                    l10 = sm.q0.l(c0.a("e.Var148", flexOrApl.getCostCentreId()), c0.a("s.prop68", flexOrApl.getCostCentreId()));
                    fVar.b(str, l10);
                    v9.d dVar2 = this.f9429c;
                    gVar.f9477p = this;
                    gVar.f9480s = 1;
                    obj = dVar2.t(flexOrApl, gVar);
                    if (obj == f10) {
                        return f10;
                    }
                } else {
                    if (i10 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    this = (d) gVar.f9477p;
                    rm.y.b(obj);
                }
                resultWrapper = (ResultWrapper) obj;
                if (!(resultWrapper instanceof ResultWrapper.Success)) {
                    f.a.a(this.f9433g, "Flex_Add_a_post_office_Adobe", null, 2, null);
                    this.K.q(new Event(this.f9432f.getString(e2.f19644n)));
                    this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                    this.f9434h.a();
                } else if (resultWrapper instanceof ResultWrapper.Error) {
                    this.M.n(new Event(new r0(q0.OFF, null, 2, null)));
                    ResultWrapper.Error error = (ResultWrapper.Error) resultWrapper;
                    if (error.getAdditionalInfo() instanceof AdditionalStepBeforeAddLocation) {
                        f0 f0Var = this.O;
                        Object additionalInfo = error.getAdditionalInfo();
                        kotlin.jvm.internal.t.e(additionalInfo, "null cannot be cast to non-null type ca.canadapost.core.data.flex.model.AdditionalStepBeforeAddLocation");
                        f0Var.q((AdditionalStepBeforeAddLocation) additionalInfo);
                        return n0.f34904a;
                    }
                    this.K.q(new Event(this.f9432f.getString(e2.f19620b)));
                }
                return n0.f34904a;
            }
        }
        gVar = new g(dVar);
        Object obj2 = gVar.f9478q;
        f10 = wm.d.f();
        i10 = gVar.f9480s;
        if (i10 != 0) {
        }
        resultWrapper = (ResultWrapper) obj2;
        if (!(resultWrapper instanceof ResultWrapper.Success)) {
        }
        return n0.f34904a;
    }

    public final void g0() {
        FlexLocation.FlexLocationItem.Apl apl;
        FlexLocation.FlexLocationItem flexLocationItem = (FlexLocation.FlexLocationItem) this.F.f();
        if (flexLocationItem == null || (apl = flexLocationItem.getApl()) == null) {
            return;
        }
        tp.k.d(a1.a(this), null, null, new h(apl, null), 3, null);
    }

    public final boolean i0(FlexLocation.FlexLocationItem item) {
        kotlin.jvm.internal.t.g(item, "item");
        FlexLocation.FlexLocationItem.Apl apl = item.getApl();
        FlexLocation.FlexLocationItem.Flex flex = item.getFlex();
        if (apl == null || !apl.isSaved() || flex == null || !flex.isSaved()) {
            return (apl == null && flex != null && flex.isSaved()) ? false : true;
        }
        return false;
    }

    public final a0 k0() {
        return this.S;
    }

    public final a0 l0() {
        return this.f9451y;
    }

    public final boolean m0() {
        return this.J;
    }

    public final a0 n0() {
        return this.B;
    }

    @Override // l8.c
    public a0 o() {
        return this.f9435i.o();
    }

    public final a0 o0() {
        return this.f9437k;
    }

    public final a0 q0() {
        return this.E;
    }

    public final a0 r0() {
        return this.I;
    }

    public final a0 s0() {
        return this.f9440n;
    }

    @Override // l8.c
    public a0 t() {
        return this.f9435i.t();
    }

    public final a0 t0() {
        return this.P;
    }

    public final a0 u0() {
        return this.F;
    }

    public final a0 v0() {
        return this.G;
    }

    public final a0 w0() {
        return this.f9442p;
    }

    public final a0 x0() {
        return this.f9445s;
    }

    public final a0 y0() {
        return this.f9449w;
    }

    public final a0 z0() {
        return this.A;
    }

    /* loaded from: classes4.dex */
    public static final class e {

        /* renamed from: a, reason: collision with root package name */
        private final c8.a f9471a;

        /* renamed from: b, reason: collision with root package name */
        private final int f9472b;

        /* renamed from: c, reason: collision with root package name */
        private final boolean f9473c;

        public e(c8.a searchLocation, int i10, boolean z10) {
            kotlin.jvm.internal.t.g(searchLocation, "searchLocation");
            this.f9471a = searchLocation;
            this.f9472b = i10;
            this.f9473c = z10;
        }

        public final boolean a() {
            return this.f9473c;
        }

        public final c8.a b() {
            return this.f9471a;
        }

        public final int c() {
            return this.f9472b;
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof e)) {
                return false;
            }
            e eVar = (e) obj;
            return kotlin.jvm.internal.t.b(this.f9471a, eVar.f9471a) && this.f9472b == eVar.f9472b && this.f9473c == eVar.f9473c;
        }

        public int hashCode() {
            return (((this.f9471a.hashCode() * 31) + Integer.hashCode(this.f9472b)) * 31) + Boolean.hashCode(this.f9473c);
        }

        public String toString() {
            return "SearchQuery(searchLocation=" + this.f9471a + ", zoomLevel=" + this.f9472b + ", appendToExistingMarkers=" + this.f9473c + ")";
        }

        public /* synthetic */ e(c8.a aVar, int i10, boolean z10, int i11, kotlin.jvm.internal.k kVar) {
            this(aVar, (i11 & 2) != 0 ? 17 : i10, (i11 & 4) != 0 ? false : z10);
        }
    }
}
