package jg;

import android.app.Activity;
import ca.canadapost.core.data.google.model.googlepay.GooglePayRequest;
import ca.canadapost.core.data.google.model.googlepay.GooglePayResponse;
import ca.canadapost.core.data.model.Event;
import ca.canadapost.core.data.model.PackageDeliveryOptionInstructionResponse;
import ca.canadapost.core.data.model.RepositoryError;
import ca.canadapost.core.data.model.ResultWrapper;
import ca.canadapost.module.track.model.Datetime;
import ca.canadapost.module.track.model.PackageDTPaymentDetails;
import ca.canadapost.module.track.model.PackageDTRefundPaymentDetails;
import ca.canadapost.module.track.model.PackageDetailsDTO;
import ca.canadapost.module.track.model.PackageDutyAndTaxesCommitDutiesPaymentResponse;
import ca.canadapost.module.track.model.PackageEligibility;
import ca.canadapost.module.track.model.PackageItemEventViewModel;
import ca.canadapost.module.track.model.PackageItemModel;
import ca.canadapost.module.track.webservice.TrackDutyAndTaxesCreatePaymentPayloadResponse;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.android.gms.wallet.PaymentData;
import java.util.Arrays;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Locale;
import l8.h;
import org.joda.time.DateTime;
import org.json.JSONObject;
import w8.h;

/* loaded from: classes4.dex */
public final class i3 extends f implements l8.h, l8.c {
    private final androidx.lifecycle.f0 A;
    private final androidx.lifecycle.f0 B;
    private final androidx.lifecycle.f0 C;
    private final androidx.lifecycle.f0 D;
    private final androidx.lifecycle.f0 E;
    private final androidx.lifecycle.f0 F;
    private final androidx.lifecycle.f0 G;
    private final androidx.lifecycle.f0 H;
    private final androidx.lifecycle.f0 I;
    private final androidx.lifecycle.f0 J;
    private final androidx.lifecycle.f0 K;
    private w3 L;
    private PackageItemModel M;
    private final androidx.lifecycle.f0 N;
    private final androidx.lifecycle.f0 O;
    private final androidx.lifecycle.a0 P;
    private final androidx.lifecycle.f0 Q;
    private final androidx.lifecycle.a0 R;
    private final androidx.lifecycle.f0 S;
    private final androidx.lifecycle.a0 T;
    private final androidx.lifecycle.f0 U;
    private final androidx.lifecycle.a0 V;
    private final androidx.lifecycle.f0 W;
    private final androidx.lifecycle.a0 X;
    private final androidx.lifecycle.f0 Y;
    private final androidx.lifecycle.a0 Z;

    /* renamed from: a0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24341a0;

    /* renamed from: b0, reason: collision with root package name */
    private final androidx.lifecycle.a0 f24342b0;

    /* renamed from: c0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24343c0;

    /* renamed from: d0, reason: collision with root package name */
    private final androidx.lifecycle.a0 f24344d0;

    /* renamed from: e, reason: collision with root package name */
    private final fg.c f24345e;

    /* renamed from: e0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24346e0;

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

    /* renamed from: f0, reason: collision with root package name */
    private final androidx.lifecycle.a0 f24348f0;

    /* renamed from: g, reason: collision with root package name */
    private final o9.c f24349g;

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

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

    /* renamed from: h0, reason: collision with root package name */
    private final androidx.lifecycle.a0 f24352h0;

    /* renamed from: i, reason: collision with root package name */
    private final ca.b f24353i;

    /* renamed from: i0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24354i0;

    /* renamed from: j, reason: collision with root package name */
    private final ja.d f24355j;

    /* renamed from: j0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24356j0;

    /* renamed from: k, reason: collision with root package name */
    private final y9.e f24357k;

    /* renamed from: k0, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24358k0;

    /* renamed from: l, reason: collision with root package name */
    private final gg.a f24359l;

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

    /* renamed from: n, reason: collision with root package name */
    private final p9.h f24361n;

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

    /* renamed from: p, reason: collision with root package name */
    private final ka.b f24363p;

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

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

    /* renamed from: s, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24366s;

    /* renamed from: t, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24367t;

    /* renamed from: u, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24368u;

    /* renamed from: v, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24369v;

    /* renamed from: w, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24370w;

    /* renamed from: x, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24371x;

    /* renamed from: y, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24372y;

    /* renamed from: z, reason: collision with root package name */
    private final androidx.lifecycle.f0 f24373z;

    /* 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 f24374p;

        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;
            PackageItemModel G0;
            f10 = wm.d.f();
            int i10 = this.f24374p;
            if (i10 == 0) {
                rm.y.b(obj);
                w3 H0 = i3.this.H0();
                if (H0 != null && (G0 = H0.G0()) != null) {
                    fg.c j02 = i3.this.j0();
                    this.f24374p = 1;
                    if (j02.f(G0, this) == f10) {
                        return f10;
                    }
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return rm.n0.f34904a;
        }

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

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

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

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

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            PackageItemModel G0;
            androidx.lifecycle.f0 a02;
            f10 = wm.d.f();
            int i10 = this.f24376p;
            if (i10 == 0) {
                rm.y.b(obj);
                fg.c j02 = i3.this.j0();
                String c10 = i3.this.h0().c();
                String c11 = i3.this.h0().c();
                PackageItemModel G02 = i3.this.G0();
                String itemNumber = G02 != null ? G02.getItemNumber() : null;
                kotlin.jvm.internal.u0 u0Var = kotlin.jvm.internal.u0.f26205a;
                Locale locale = Locale.US;
                Object[] objArr = new Object[1];
                w3 H0 = i3.this.H0();
                objArr[0] = (H0 == null || (a02 = H0.a0()) == null) ? null : (Double) a02.f();
                String format = String.format(locale, "%.2f", Arrays.copyOf(objArr, 1));
                kotlin.jvm.internal.t.f(format, "format(...)");
                w3 H02 = i3.this.H0();
                String dutyAndTaxesEmail = (H02 == null || (G0 = H02.G0()) == null) ? null : G0.getDutyAndTaxesEmail();
                this.f24376p = 1;
                obj = j02.u(c10, c11, itemNumber, format, dutyAndTaxesEmail, this);
                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 = (ResultWrapper) obj;
            if (resultWrapper instanceof ResultWrapper.Success) {
                i3.this.U.n(kotlin.coroutines.jvm.internal.b.a(true));
                ResultWrapper.Success success = (ResultWrapper.Success) resultWrapper;
                if (!qa.d.h(((TrackDutyAndTaxesCreatePaymentPayloadResponse) success.getData()).message)) {
                    w3 H03 = i3.this.H0();
                    PackageItemModel G03 = H03 != null ? H03.G0() : null;
                    if (G03 != null) {
                        G03.setDutyAndTaxesPaymentPayload(((TrackDutyAndTaxesCreatePaymentPayloadResponse) success.getData()).message);
                    }
                    i3.this.f24343c0.q(new Event(((TrackDutyAndTaxesCreatePaymentPayloadResponse) success.getData()).message));
                }
            } else if (resultWrapper instanceof ResultWrapper.Error) {
                i3.this.U.n(kotlin.coroutines.jvm.internal.b.a(true));
            }
            return rm.n0.f34904a;
        }

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

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

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

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

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

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

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

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

            /* JADX INFO: Access modifiers changed from: package-private */
            /* renamed from: jg.i3$c$a$a, reason: collision with other inner class name */
            /* loaded from: classes4.dex */
            public static final class C0515a extends kotlin.jvm.internal.v implements dn.l {

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

                /* JADX INFO: Access modifiers changed from: package-private */
                /* renamed from: jg.i3$c$a$a$a, reason: collision with other inner class name */
                /* loaded from: classes4.dex */
                public static final class C0516a extends kotlin.coroutines.jvm.internal.l implements dn.p {

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

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

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

                    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                    C0516a(i3 i3Var, PackageItemModel packageItemModel, vm.d dVar) {
                        super(2, dVar);
                        this.f24386q = i3Var;
                        this.f24387r = packageItemModel;
                    }

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

                    @Override // kotlin.coroutines.jvm.internal.a
                    public final Object invokeSuspend(Object obj) {
                        Object f10;
                        f10 = wm.d.f();
                        int i10 = this.f24385p;
                        if (i10 == 0) {
                            rm.y.b(obj);
                            fg.c j02 = this.f24386q.j0();
                            PackageItemModel packageItemModel = this.f24387r;
                            this.f24385p = 1;
                            if (j02.x(packageItemModel, this) == f10) {
                                return f10;
                            }
                        } else {
                            if (i10 != 1) {
                                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                            }
                            rm.y.b(obj);
                        }
                        return rm.n0.f34904a;
                    }

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

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0515a(i3 i3Var) {
                    super(1);
                    this.f24384p = i3Var;
                }

                public final void a(PackageItemModel packageItemModel) {
                    if (packageItemModel != null) {
                        i3 i3Var = this.f24384p;
                        tp.k.d(androidx.lifecycle.a1.a(i3Var), null, null, new C0516a(i3Var, packageItemModel, null), 3, null);
                    }
                    LinkedHashMap linkedHashMap = new LinkedHashMap();
                    linkedHashMap.put("e.Var17", this.f24384p.k0().h() ? "registered" : "anonymous");
                    linkedHashMap.put("e.Var13", "Duty and Taxes paid Google pay Confirmation");
                    this.f24384p.a0().b("Duty_and_taxes_Paid_click_Adobe", linkedHashMap);
                    this.f24384p.Y.q(new Event(Boolean.TRUE));
                    this.f24384p.V0();
                }

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

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

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

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                b(i3 i3Var) {
                    super(0);
                    this.f24388p = i3Var;
                }

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

                /* renamed from: invoke, reason: collision with other method in class */
                public final void m291invoke() {
                    this.f24388p.a0().b("Duty and Taxes Google Pay card failure", null);
                }
            }

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            a(i3 i3Var, String str) {
                super(1);
                this.f24382p = i3Var;
                this.f24383q = str;
            }

            public final void a(ResultWrapper result) {
                kotlin.jvm.internal.t.g(result, "result");
                if (result instanceof ResultWrapper.Error) {
                    this.f24382p.J0(new ResultWrapper.Error(null, null, RepositoryError.ServiceError, null, 8, null), true);
                    return;
                }
                Object data = ((ResultWrapper.Success) result).getData();
                kotlin.jvm.internal.t.e(data, "null cannot be cast to non-null type ca.canadapost.core.data.google.model.googlepay.GooglePayResponse");
                GooglePayResponse googlePayResponse = (GooglePayResponse) data;
                PackageDutyAndTaxesCommitDutiesPaymentResponse packageDutyAndTaxesCommitDutiesPaymentResponse = new PackageDutyAndTaxesCommitDutiesPaymentResponse(googlePayResponse.getProofOfPymt(), googlePayResponse.getCcSavedStatus(), googlePayResponse.getCreditCardNotSaved());
                w3 H0 = this.f24382p.H0();
                PackageItemModel G0 = H0 != null ? H0.G0() : null;
                if (G0 != null) {
                    G0.setDutyAndTaxesEmail(this.f24383q);
                }
                if (qa.d.h(packageDutyAndTaxesCommitDutiesPaymentResponse.getProofOfPymt())) {
                    this.f24382p.J0(new ResultWrapper.Error(null, null, RepositoryError.ServiceError, null, 8, null), true);
                }
                this.f24382p.I0().a(this.f24382p.H0(), packageDutyAndTaxesCommitDutiesPaymentResponse, new C0515a(this.f24382p), new b(this.f24382p));
            }

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

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

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

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            Object f10;
            f10 = wm.d.f();
            int i10 = this.f24378p;
            if (i10 == 0) {
                rm.y.b(obj);
                y9.e g02 = i3.this.g0();
                GooglePayRequest googlePayRequest = this.f24380r;
                a aVar = new a(i3.this, this.f24381s);
                this.f24378p = 1;
                if (g02.a(googlePayRequest, aVar, this) == f10) {
                    return f10;
                }
            } else {
                if (i10 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                rm.y.b(obj);
            }
            return rm.n0.f34904a;
        }

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public i3(fg.c repository, t7.c contextService, o9.c cpEventBus, d9.f analyticsService, ca.b languageService, ja.d sharedPreferencesService, y9.e googlePayService, gg.a trackPaymentService, g9.d sessionRepository, p9.h featureFlagRepository, g9.d cpcSessionRepository, ka.b userProfileRepository) {
        super(contextService);
        kotlin.jvm.internal.t.g(repository, "repository");
        kotlin.jvm.internal.t.g(contextService, "contextService");
        kotlin.jvm.internal.t.g(cpEventBus, "cpEventBus");
        kotlin.jvm.internal.t.g(analyticsService, "analyticsService");
        kotlin.jvm.internal.t.g(languageService, "languageService");
        kotlin.jvm.internal.t.g(sharedPreferencesService, "sharedPreferencesService");
        kotlin.jvm.internal.t.g(googlePayService, "googlePayService");
        kotlin.jvm.internal.t.g(trackPaymentService, "trackPaymentService");
        kotlin.jvm.internal.t.g(sessionRepository, "sessionRepository");
        kotlin.jvm.internal.t.g(featureFlagRepository, "featureFlagRepository");
        kotlin.jvm.internal.t.g(cpcSessionRepository, "cpcSessionRepository");
        kotlin.jvm.internal.t.g(userProfileRepository, "userProfileRepository");
        this.f24345e = repository;
        this.f24347f = contextService;
        this.f24349g = cpEventBus;
        this.f24351h = analyticsService;
        this.f24353i = languageService;
        this.f24355j = sharedPreferencesService;
        this.f24357k = googlePayService;
        this.f24359l = trackPaymentService;
        this.f24360m = sessionRepository;
        this.f24361n = featureFlagRepository;
        this.f24362o = cpcSessionRepository;
        this.f24363p = userProfileRepository;
        this.f24364q = new l8.i(contextService);
        this.f24365r = new l8.d();
        Boolean bool = Boolean.FALSE;
        this.f24366s = new androidx.lifecycle.f0(bool);
        this.f24367t = new androidx.lifecycle.f0(bool);
        this.f24368u = new androidx.lifecycle.f0(Boolean.TRUE);
        this.f24369v = new androidx.lifecycle.f0(bool);
        this.f24370w = new androidx.lifecycle.f0(bool);
        this.f24371x = new androidx.lifecycle.f0(bool);
        this.f24372y = new androidx.lifecycle.f0(bool);
        this.f24373z = new androidx.lifecycle.f0(bool);
        this.A = new androidx.lifecycle.f0(bool);
        this.B = new androidx.lifecycle.f0(bool);
        this.C = new androidx.lifecycle.f0(bool);
        this.D = new androidx.lifecycle.f0();
        this.E = new androidx.lifecycle.f0();
        this.F = new androidx.lifecycle.f0();
        this.G = new androidx.lifecycle.f0("");
        this.H = new androidx.lifecycle.f0();
        this.I = new androidx.lifecycle.f0();
        this.J = new androidx.lifecycle.f0();
        androidx.lifecycle.f0 f0Var = new androidx.lifecycle.f0();
        this.K = f0Var;
        this.N = new androidx.lifecycle.f0();
        androidx.lifecycle.f0 f0Var2 = new androidx.lifecycle.f0();
        this.O = f0Var2;
        this.P = f0Var2;
        androidx.lifecycle.f0 f0Var3 = new androidx.lifecycle.f0();
        this.Q = f0Var3;
        this.R = f0Var3;
        androidx.lifecycle.f0 f0Var4 = new androidx.lifecycle.f0();
        this.S = f0Var4;
        this.T = f0Var4;
        androidx.lifecycle.f0 f0Var5 = new androidx.lifecycle.f0();
        this.U = f0Var5;
        this.V = f0Var5;
        androidx.lifecycle.f0 f0Var6 = new androidx.lifecycle.f0(bool);
        this.W = f0Var6;
        this.X = f0Var6;
        androidx.lifecycle.f0 f0Var7 = new androidx.lifecycle.f0(new Event(bool));
        this.Y = f0Var7;
        this.Z = f0Var7;
        androidx.lifecycle.f0 f0Var8 = new androidx.lifecycle.f0(new Event(bool));
        this.f24341a0 = f0Var8;
        this.f24342b0 = f0Var8;
        androidx.lifecycle.f0 f0Var9 = new androidx.lifecycle.f0();
        this.f24343c0 = f0Var9;
        this.f24344d0 = f0Var9;
        androidx.lifecycle.f0 f0Var10 = new androidx.lifecycle.f0(new Event(bool));
        this.f24346e0 = f0Var10;
        this.f24348f0 = f0Var10;
        l8.g gVar = new l8.g();
        this.f24350g0 = gVar;
        this.f24352h0 = gVar;
        this.f24354i0 = new androidx.lifecycle.f0(bool);
        this.f24356j0 = new androidx.lifecycle.f0(bool);
        this.f24358k0 = new androidx.lifecycle.f0(bool);
        f0Var.q(Boolean.valueOf(languageService.b()));
        P0();
        U0();
        V0();
        X();
        Y();
    }

    private final void U0() {
        boolean z10;
        String descFr;
        androidx.lifecycle.f0 Y;
        PackageDeliveryOptionInstructionResponse packageDeliveryOptionInstructionResponse;
        boolean z11;
        androidx.lifecycle.f0 Y2;
        PackageDeliveryOptionInstructionResponse packageDeliveryOptionInstructionResponse2;
        androidx.lifecycle.f0 Y3;
        PackageDeliveryOptionInstructionResponse packageDeliveryOptionInstructionResponse3;
        androidx.lifecycle.f0 Y4;
        androidx.lifecycle.f0 Y5;
        PackageItemModel G0;
        PackageEligibility eligibility;
        PackageItemModel G02;
        PackageEligibility eligibility2;
        w3 w3Var = this.L;
        if (w3Var != null) {
            Boolean valueOf = (w3Var == null || (G02 = w3Var.G0()) == null || (eligibility2 = G02.getEligibility()) == null) ? null : Boolean.valueOf(eligibility2.getWindowClosed());
            kotlin.jvm.internal.t.d(valueOf);
            if (valueOf.booleanValue()) {
                androidx.lifecycle.f0 f0Var = this.f24367t;
                Boolean bool = Boolean.FALSE;
                f0Var.q(bool);
                this.f24368u.q(bool);
                w3 w3Var2 = this.L;
                r1 = w3Var2 != null ? w3Var2.r0() : null;
                if (qa.d.h(r1)) {
                    this.f24369v.q(bool);
                    this.f24370w.q(Boolean.TRUE);
                } else {
                    androidx.lifecycle.f0 f0Var2 = this.G;
                    kotlin.jvm.internal.t.d(r1);
                    f0Var2.q(r1);
                    this.f24369v.q(Boolean.TRUE);
                    this.f24370w.q(bool);
                }
                this.F.q(bool);
                return;
            }
        }
        w3 w3Var3 = this.L;
        if (w3Var3 != null) {
            Boolean valueOf2 = (w3Var3 == null || (G0 = w3Var3.G0()) == null || (eligibility = G0.getEligibility()) == null) ? null : Boolean.valueOf(eligibility.getCanSetDeliveryPreference());
            kotlin.jvm.internal.t.d(valueOf2);
            if (valueOf2.booleanValue()) {
                w3 w3Var4 = this.L;
                String r02 = w3Var4 != null ? w3Var4.r0() : null;
                w3 w3Var5 = this.L;
                if (((w3Var5 == null || (Y5 = w3Var5.Y()) == null) ? null : (PackageDeliveryOptionInstructionResponse) Y5.f()) == null && qa.d.h(r02)) {
                    this.f24367t.q(Boolean.TRUE);
                    androidx.lifecycle.f0 f0Var3 = this.f24370w;
                    Boolean bool2 = Boolean.FALSE;
                    f0Var3.q(bool2);
                    this.f24368u.q(bool2);
                    this.f24369v.q(bool2);
                    this.F.q(bool2);
                    return;
                }
                androidx.lifecycle.f0 f0Var4 = this.f24367t;
                Boolean bool3 = Boolean.FALSE;
                f0Var4.q(bool3);
                androidx.lifecycle.f0 f0Var5 = this.f24368u;
                Boolean bool4 = Boolean.TRUE;
                f0Var5.q(bool4);
                this.f24369v.q(bool3);
                this.f24370w.q(bool3);
                String string = this.f24355j.getString("DEFAULT_DELIVERY_PREFERENCE_KEY", "");
                kotlin.jvm.internal.t.f(string, "getString(...)");
                PackageDeliveryOptionInstructionResponse packageDeliveryOptionInstructionResponse4 = (PackageDeliveryOptionInstructionResponse) qa.d.p(string, PackageDeliveryOptionInstructionResponse.class);
                String b10 = kotlin.text.f.b(androidx.core.content.a.getColor(this.f24347f.a(), yf.b.f52383e), null, 1, null);
                w3 w3Var6 = this.L;
                if (((w3Var6 == null || (Y4 = w3Var6.Y()) == null) ? null : (PackageDeliveryOptionInstructionResponse) Y4.f()) == null) {
                    if (qa.d.h(r02)) {
                        return;
                    }
                    androidx.lifecycle.f0 f0Var6 = this.G;
                    kotlin.jvm.internal.u0 u0Var = kotlin.jvm.internal.u0.f26205a;
                    String format = String.format("<font face='sans-serif' color='#" + b10 + "'>%s</font>", Arrays.copyOf(new Object[]{r02}, 1));
                    kotlin.jvm.internal.t.f(format, "format(...)");
                    f0Var6.q(format);
                    if (packageDeliveryOptionInstructionResponse4 != null) {
                        String cd2 = packageDeliveryOptionInstructionResponse4.getCd();
                        w3 w3Var7 = this.L;
                        z10 = kotlin.text.y.z(cd2, w3Var7 != null ? w3Var7.q0() : null, true);
                        if (z10) {
                            this.F.q(bool4);
                            androidx.lifecycle.f0 f0Var7 = this.G;
                            String format2 = String.format("<font face='sans-serif' color='#" + b10 + "'>%s</font> <font face='sans-serif-medium' color='#" + b10 + "'>%s</font>", Arrays.copyOf(new Object[]{this.G.f(), this.f24347f.getString(yf.h.f52560c0)}, 2));
                            kotlin.jvm.internal.t.f(format2, "format(...)");
                            f0Var7.q(format2);
                            return;
                        }
                    }
                    this.F.q(bool3);
                    return;
                }
                if (this.f24353i.b()) {
                    w3 w3Var8 = this.L;
                    descFr = (w3Var8 == null || (Y3 = w3Var8.Y()) == null || (packageDeliveryOptionInstructionResponse3 = (PackageDeliveryOptionInstructionResponse) Y3.f()) == null) ? null : packageDeliveryOptionInstructionResponse3.getDescEn();
                    kotlin.jvm.internal.t.d(descFr);
                } else {
                    w3 w3Var9 = this.L;
                    descFr = (w3Var9 == null || (Y = w3Var9.Y()) == null || (packageDeliveryOptionInstructionResponse = (PackageDeliveryOptionInstructionResponse) Y.f()) == null) ? null : packageDeliveryOptionInstructionResponse.getDescFr();
                    kotlin.jvm.internal.t.d(descFr);
                }
                androidx.lifecycle.f0 f0Var8 = this.G;
                kotlin.jvm.internal.u0 u0Var2 = kotlin.jvm.internal.u0.f26205a;
                String format3 = String.format("<font face='sans-serif' color='#" + b10 + "'>%s</font>", Arrays.copyOf(new Object[]{descFr}, 1));
                kotlin.jvm.internal.t.f(format3, "format(...)");
                f0Var8.q(format3);
                if (packageDeliveryOptionInstructionResponse4 != null) {
                    String cd3 = packageDeliveryOptionInstructionResponse4.getCd();
                    w3 w3Var10 = this.L;
                    if (w3Var10 != null && (Y2 = w3Var10.Y()) != null && (packageDeliveryOptionInstructionResponse2 = (PackageDeliveryOptionInstructionResponse) Y2.f()) != null) {
                        r1 = packageDeliveryOptionInstructionResponse2.getCd();
                    }
                    z11 = kotlin.text.y.z(cd3, r1, true);
                    if (z11) {
                        this.F.q(bool4);
                        androidx.lifecycle.f0 f0Var9 = this.G;
                        String format4 = String.format("<font face='sans-serif' color='#" + b10 + "'>%s</font> <font face='sans-serif-medium' color='#" + b10 + "'>%s</font>", Arrays.copyOf(new Object[]{this.G.f(), this.f24347f.getString(yf.h.f52560c0)}, 2));
                        kotlin.jvm.internal.t.f(format4, "format(...)");
                        f0Var9.q(format4);
                        return;
                    }
                }
                this.F.q(bool3);
                return;
            }
        }
        androidx.lifecycle.f0 f0Var10 = this.f24367t;
        Boolean bool5 = Boolean.FALSE;
        f0Var10.q(bool5);
        this.f24370w.q(bool5);
        this.f24368u.q(bool5);
        this.f24369v.q(bool5);
        this.F.q(bool5);
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* JADX WARN: Removed duplicated region for block: B:106:0x0206  */
    /* JADX WARN: Removed duplicated region for block: B:119:0x01a4  */
    /* JADX WARN: Removed duplicated region for block: B:21:0x0088  */
    /* JADX WARN: Removed duplicated region for block: B:33:0x00d9  */
    /* JADX WARN: Removed duplicated region for block: B:36:0x00ea A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:39:0x00f6  */
    /* JADX WARN: Removed duplicated region for block: B:47:0x00fb  */
    /* JADX WARN: Removed duplicated region for block: B:50:0x0139 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:53:0x0145  */
    /* JADX WARN: Removed duplicated region for block: B:58:0x014a  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x016e  */
    /* JADX WARN: Removed duplicated region for block: B:69:0x019f  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x01a7  */
    /* JADX WARN: Removed duplicated region for block: B:74:0x01b1  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x0256  */
    /* JADX WARN: Removed duplicated region for block: B:91:0x025c  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void V0() {
        Boolean bool;
        boolean z10;
        boolean z11;
        androidx.lifecycle.f0 f0Var;
        PackageItemEventViewModel n02;
        Date dtPaymentDate;
        PackageDTPaymentDetails packageDTPaymentDetails;
        PackageDTPaymentDetails packageDTPaymentDetails2;
        Double customsAmtDue;
        w3 w3Var = this.L;
        if (w3Var == null || (bool = (Boolean) w3Var.g1().f()) == null) {
            return;
        }
        kotlin.jvm.internal.t.d(bool);
        if (!bool.booleanValue()) {
            return;
        }
        PackageItemEventViewModel p02 = w3Var.p0();
        PackageItemEventViewModel o02 = w3Var.o0();
        androidx.lifecycle.f0 f0Var2 = this.D;
        Boolean bool2 = Boolean.FALSE;
        f0Var2.q(bool2);
        if (p02 != null) {
            this.D.q(Boolean.TRUE);
            this.E.q(this.f24347f.getString(yf.h.f52646t1));
        }
        if (o02 != null) {
            this.D.q(Boolean.TRUE);
            this.E.q(this.f24347f.getString(yf.h.f52651u1));
        }
        Object f10 = this.D.f();
        kotlin.jvm.internal.t.d(f10);
        if (!((Boolean) f10).booleanValue()) {
            PackageDTRefundPaymentDetails packageDTRefundPaymentDetails = w3Var.G0().getPackageDTRefundPaymentDetails();
            if ((packageDTRefundPaymentDetails != null ? packageDTRefundPaymentDetails.getDtRefundSalesOrderNbr() : null) == null) {
                z10 = false;
                if (w3Var.B0().f() != null) {
                    Object f11 = w3Var.B0().f();
                    kotlin.jvm.internal.t.d(f11);
                    double d10 = 0.0d;
                    if (((Number) f11).doubleValue() >= 0.0d) {
                        PackageDetailsDTO details = w3Var.G0().getDetails();
                        if (details != null && (customsAmtDue = details.getCustomsAmtDue()) != null) {
                            d10 = customsAmtDue.doubleValue();
                        }
                        Object f12 = w3Var.B0().f();
                        kotlin.jvm.internal.t.d(f12);
                        if (d10 <= ((Number) f12).doubleValue()) {
                            z11 = true;
                            this.H.q(w3Var.Z());
                            f0Var = this.I;
                            if (f0Var != null) {
                                f0Var.q(w3Var.c0());
                            }
                            n02 = w3Var.n0();
                            if (bool.booleanValue() && n02 == null) {
                                packageDTPaymentDetails2 = w3Var.G0().getPackageDTPaymentDetails();
                                if ((packageDTPaymentDetails2 == null ? packageDTPaymentDetails2.getDtPaymentDate() : null) == null && !w3Var.G0().getEligibility().getHasDutyTaxes() && !z11) {
                                    this.f24371x.q(bool2);
                                    this.f24372y.q(bool2);
                                    this.f24373z.q(bool2);
                                    this.C.q(Boolean.TRUE);
                                    this.A.q(bool2);
                                    return;
                                }
                            }
                            if (w3Var.G0().getEligibility().getHasDutyTaxes() && n02 == null) {
                                packageDTPaymentDetails = w3Var.G0().getPackageDTPaymentDetails();
                                if ((packageDTPaymentDetails == null ? packageDTPaymentDetails.getDtPaymentDate() : null) == null && !z11) {
                                    this.f24371x.q(Boolean.TRUE);
                                    this.f24372y.q(bool2);
                                    this.f24373z.q(bool2);
                                    this.C.q(bool2);
                                    this.A.q(bool2);
                                    return;
                                }
                            }
                            if (n02 == null) {
                                PackageDTPaymentDetails packageDTPaymentDetails3 = w3Var.G0().getPackageDTPaymentDetails();
                                if ((packageDTPaymentDetails3 != null ? packageDTPaymentDetails3.getDtPaymentDate() : null) == null && !z11) {
                                    return;
                                }
                            }
                            this.f24371x.q(bool2);
                            this.C.q(bool2);
                            androidx.lifecycle.f0 f0Var3 = this.A;
                            Boolean bool3 = Boolean.TRUE;
                            f0Var3.q(bool3);
                            androidx.lifecycle.f0 f0Var4 = this.f24372y;
                            PackageDTPaymentDetails packageDTPaymentDetails4 = w3Var.G0().getPackageDTPaymentDetails();
                            f0Var4.q(Boolean.valueOf((packageDTPaymentDetails4 != null ? packageDTPaymentDetails4.getDtPaymentDate() : null) != null));
                            if (n02 != null) {
                                h.a aVar = w8.h.f40968a;
                                Datetime datetime = n02.getDatetime();
                                String date = datetime != null ? datetime.getDate() : null;
                                Datetime datetime2 = n02.getDatetime();
                                String time = datetime2 != null ? datetime2.getTime() : null;
                                Datetime datetime3 = n02.getDatetime();
                                String zoneOffset = datetime3 != null ? datetime3.getZoneOffset() : null;
                                org.joda.time.format.b e10 = aVar.e();
                                kotlin.jvm.internal.t.f(e10, "<get-DATE_TIME_FORMATTER_WITH_TZ>(...)");
                                DateTime m10 = aVar.m(date, time, zoneOffset, e10);
                                androidx.lifecycle.f0 f0Var5 = this.J;
                                Long valueOf = m10 != null ? Long.valueOf(m10.getMillis()) : null;
                                kotlin.jvm.internal.t.d(valueOf);
                                f0Var5.q(w3Var.x0(valueOf.longValue()));
                                this.B.q(bool3);
                            } else {
                                PackageDTPaymentDetails packageDTPaymentDetails5 = w3Var.G0().getPackageDTPaymentDetails();
                                if ((packageDTPaymentDetails5 != null ? packageDTPaymentDetails5.getDtPaymentDate() : null) != null) {
                                    PackageDTPaymentDetails packageDTPaymentDetails6 = w3Var.G0().getPackageDTPaymentDetails();
                                    this.J.q(w3Var.x0(new DateTime((packageDTPaymentDetails6 == null || (dtPaymentDate = packageDTPaymentDetails6.getDtPaymentDate()) == null) ? null : Long.valueOf(dtPaymentDate.getTime())).getMillis()));
                                    this.B.q(bool3);
                                } else {
                                    this.B.q(bool2);
                                }
                            }
                            this.f24373z.q(bool2);
                            if (z10) {
                                this.f24373z.q(bool2);
                                return;
                            }
                            PackageDetailsDTO details2 = w3Var.G0().getDetails();
                            Boolean valueOf2 = details2 != null ? Boolean.valueOf(details2.getRefundAllowed()) : null;
                            kotlin.jvm.internal.t.d(valueOf2);
                            if (!valueOf2.booleanValue() || w3Var.w1()) {
                                return;
                            }
                            this.f24373z.q(bool3);
                            return;
                        }
                    }
                }
                z11 = false;
                this.H.q(w3Var.Z());
                f0Var = this.I;
                if (f0Var != null) {
                }
                n02 = w3Var.n0();
                if (bool.booleanValue()) {
                    packageDTPaymentDetails2 = w3Var.G0().getPackageDTPaymentDetails();
                    if ((packageDTPaymentDetails2 == null ? packageDTPaymentDetails2.getDtPaymentDate() : null) == null) {
                        this.f24371x.q(bool2);
                        this.f24372y.q(bool2);
                        this.f24373z.q(bool2);
                        this.C.q(Boolean.TRUE);
                        this.A.q(bool2);
                        return;
                    }
                }
                if (w3Var.G0().getEligibility().getHasDutyTaxes()) {
                    packageDTPaymentDetails = w3Var.G0().getPackageDTPaymentDetails();
                    if ((packageDTPaymentDetails == null ? packageDTPaymentDetails.getDtPaymentDate() : null) == null) {
                        this.f24371x.q(Boolean.TRUE);
                        this.f24372y.q(bool2);
                        this.f24373z.q(bool2);
                        this.C.q(bool2);
                        this.A.q(bool2);
                        return;
                    }
                }
                if (n02 == null) {
                }
                this.f24371x.q(bool2);
                this.C.q(bool2);
                androidx.lifecycle.f0 f0Var32 = this.A;
                Boolean bool32 = Boolean.TRUE;
                f0Var32.q(bool32);
                androidx.lifecycle.f0 f0Var42 = this.f24372y;
                PackageDTPaymentDetails packageDTPaymentDetails42 = w3Var.G0().getPackageDTPaymentDetails();
                f0Var42.q(Boolean.valueOf((packageDTPaymentDetails42 != null ? packageDTPaymentDetails42.getDtPaymentDate() : null) != null));
                if (n02 != null) {
                }
                this.f24373z.q(bool2);
                if (z10) {
                }
            }
        }
        z10 = true;
        if (w3Var.B0().f() != null) {
        }
        z11 = false;
        this.H.q(w3Var.Z());
        f0Var = this.I;
        if (f0Var != null) {
        }
        n02 = w3Var.n0();
        if (bool.booleanValue()) {
        }
        if (w3Var.G0().getEligibility().getHasDutyTaxes()) {
        }
        if (n02 == null) {
        }
        this.f24371x.q(bool2);
        this.C.q(bool2);
        androidx.lifecycle.f0 f0Var322 = this.A;
        Boolean bool322 = Boolean.TRUE;
        f0Var322.q(bool322);
        androidx.lifecycle.f0 f0Var422 = this.f24372y;
        PackageDTPaymentDetails packageDTPaymentDetails422 = w3Var.G0().getPackageDTPaymentDetails();
        f0Var422.q(Boolean.valueOf((packageDTPaymentDetails422 != null ? packageDTPaymentDetails422.getDtPaymentDate() : null) != null));
        if (n02 != null) {
        }
        this.f24373z.q(bool2);
        if (z10) {
        }
    }

    private final void X() {
        this.f24354i0.q(Boolean.valueOf(this.f24361n.d(p9.a.CUSTOMS_FEE_HANDLING)));
        a1();
    }

    private final void Y() {
        PackageDetailsDTO details;
        PackageItemModel packageItemModel = this.M;
        if (((packageItemModel == null || (details = packageItemModel.getDetails()) == null) ? null : details.getCustomsHandlingPricing()) != null) {
            this.f24356j0.q(Boolean.TRUE);
        }
        a1();
    }

    private final void a1() {
        Object f10 = this.f24354i0.f();
        Boolean bool = Boolean.TRUE;
        if (kotlin.jvm.internal.t.b(f10, bool) && kotlin.jvm.internal.t.b(this.f24356j0.f(), bool)) {
            this.f24358k0.q(bool);
        }
    }

    public final androidx.lifecycle.a0 A0() {
        return this.R;
    }

    public final androidx.lifecycle.f0 B0() {
        return this.f24371x;
    }

    public final androidx.lifecycle.f0 C0() {
        return this.f24366s;
    }

    public final androidx.lifecycle.f0 D0() {
        return this.f24368u;
    }

    public final androidx.lifecycle.a0 E0() {
        return this.f24344d0;
    }

    public final androidx.lifecycle.f0 F0() {
        return this.f24367t;
    }

    public final PackageItemModel G0() {
        return this.M;
    }

    public final w3 H0() {
        return this.L;
    }

    public final gg.a I0() {
        return this.f24359l;
    }

    @Override // l8.h
    public androidx.lifecycle.a0 J() {
        return this.f24364q.J();
    }

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

    public final void K0() {
        Boolean bool;
        w3 w3Var = this.L;
        if (w3Var == null || (bool = (Boolean) w3Var.C0().f()) == null || bool.booleanValue() || !w3Var.G0().getEligibility().getCanSetDeliveryPreference()) {
            return;
        }
        w3 w3Var2 = this.L;
        androidx.lifecycle.f0 C0 = w3Var2 != null ? w3Var2.C0() : null;
        if (C0 != null) {
            C0.q(Boolean.TRUE);
        }
        tp.k.d(androidx.lifecycle.a1.a(this), null, null, new a(null), 3, null);
    }

    public final androidx.lifecycle.a0 L0() {
        return this.X;
    }

    public final androidx.lifecycle.f0 M0() {
        return this.K;
    }

    public final androidx.lifecycle.f0 N0() {
        return this.N;
    }

    public final void O0() {
        h.a.a(this, androidx.lifecycle.a1.a(this), null, null, null, new b(null), 7, null);
    }

    public final void P0() {
        PackageItemModel packageItemModel = (PackageItemModel) this.f24345e.c().f();
        this.M = packageItemModel;
        if (packageItemModel != null) {
            this.L = new w3(packageItemModel, this.f24353i, this.f24347f, this.f24349g, null, this.f24362o, this.f24363p, 16, null);
        }
    }

    public final void Q0(PaymentData paymentData) {
        PackageItemModel G0;
        PackageItemModel G02;
        PackageDetailsDTO details;
        PackageDetailsDTO details2;
        Double customsAmtDue;
        String json = paymentData != null ? paymentData.toJson() : null;
        if (json != null) {
            try {
                JSONObject jSONObject = new JSONObject(json).getJSONObject("paymentMethodData");
                kotlin.jvm.internal.t.f(jSONObject, "getJSONObject(...)");
                String string = jSONObject.getJSONObject("info").getJSONObject("billingAddress").getString(AppMeasurementSdk.ConditionalUserProperty.NAME);
                String string2 = new JSONObject(json).getString(Scopes.EMAIL);
                String string3 = jSONObject.getJSONObject("tokenizationData").getString("token");
                String string4 = jSONObject.getJSONObject("info").getString("cardNetwork");
                kotlin.jvm.internal.t.d(string2);
                PackageItemModel packageItemModel = this.M;
                double doubleValue = (packageItemModel == null || (details2 = packageItemModel.getDetails()) == null || (customsAmtDue = details2.getCustomsAmtDue()) == null) ? 0.0d : customsAmtDue.doubleValue();
                w3 w3Var = this.L;
                String cuPin = (w3Var == null || (G02 = w3Var.G0()) == null || (details = G02.getDetails()) == null) ? null : details.getCuPin();
                w3 w3Var2 = this.L;
                String itemNumber = (w3Var2 == null || (G0 = w3Var2.G0()) == null) ? null : G0.getItemNumber();
                kotlin.jvm.internal.t.d(itemNumber);
                String c10 = this.f24353i.c();
                kotlin.jvm.internal.t.d(string3);
                kotlin.jvm.internal.t.d(string4);
                kotlin.jvm.internal.t.d(string);
                h.a.a(this, androidx.lifecycle.a1.a(this), null, null, null, new c(new GooglePayRequest(string2, doubleValue, cuPin, itemNumber, c10, string3, string4, string), string2, null), 7, null);
            } catch (Exception e10) {
                tr.a.f36618a.c("handlePayment", "Error: " + e10, e10);
                this.f24351h.b("Duty and Taxes Google Pay server failure", null);
                J0(new ResultWrapper.Error(null, null, RepositoryError.ServiceError, null, 8, null), true);
            }
        }
    }

    public final void R0() {
        PackageDetailsDTO details;
        Double customsAmtDue;
        if (this.X.f() != null) {
            Object f10 = this.X.f();
            kotlin.jvm.internal.t.d(f10);
            if (((Boolean) f10).booleanValue()) {
                Boolean bool = (Boolean) this.N.f();
                if (bool == null || !bool.booleanValue()) {
                    return;
                }
                y9.e eVar = this.f24357k;
                Activity b10 = this.f24347f.b();
                kotlin.jvm.internal.t.f(b10, "getCurrentActivity(...)");
                PackageItemModel packageItemModel = this.M;
                eVar.b(b10, String.valueOf((packageItemModel == null || (details = packageItemModel.getDetails()) == null || (customsAmtDue = details.getCustomsAmtDue()) == null) ? 0.0d : customsAmtDue.doubleValue()));
                return;
            }
        }
        this.Q.n(new Event(Boolean.TRUE));
    }

    public final void S0(Integer num) {
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        linkedHashMap.put("e.Var17", this.f24360m.h() ? "registered" : "anonymous");
        linkedHashMap.put("e.Var13", "Duty and Taxes paid Google pay Failure");
        this.f24351h.b("Duty_and_taxes_Paid_click_Adobe", linkedHashMap);
    }

    public final void T0() {
        String dutyAndTaxesEmail;
        if (this.X.f() != null) {
            Object f10 = this.X.f();
            kotlin.jvm.internal.t.d(f10);
            if (((Boolean) f10).booleanValue()) {
                PackageItemModel packageItemModel = this.M;
                Boolean bool = null;
                if ((packageItemModel != null ? packageItemModel.getDutyAndTaxesEmail() : null) != null) {
                    PackageItemModel packageItemModel2 = this.M;
                    if (packageItemModel2 != null && (dutyAndTaxesEmail = packageItemModel2.getDutyAndTaxesEmail()) != null) {
                        bool = Boolean.valueOf(dutyAndTaxesEmail.length() == 0);
                    }
                    kotlin.jvm.internal.t.d(bool);
                    if (!bool.booleanValue()) {
                        O0();
                        return;
                    }
                }
                this.S.n(Boolean.TRUE);
                return;
            }
        }
        this.Q.n(new Event(Boolean.TRUE));
    }

    public final void W0() {
        this.f24346e0.q(new Event(Boolean.TRUE));
    }

    public final void X0() {
        if (this.f24345e.k()) {
            R().q(new Event(Boolean.TRUE));
        } else {
            R().q(new Event(Boolean.FALSE));
        }
    }

    public final void Y0() {
        this.f24350g0.s();
    }

    public final void Z() {
        this.f24341a0.q(new Event(Boolean.TRUE));
    }

    public final void Z0(boolean z10) {
        this.W.n(Boolean.valueOf(z10));
    }

    public final d9.f a0() {
        return this.f24351h;
    }

    public final androidx.lifecycle.f0 b0() {
        return this.G;
    }

    public final void b1() {
        this.Y.q(new Event(Boolean.TRUE));
    }

    public final androidx.lifecycle.f0 c0() {
        return this.I;
    }

    public final void c1() {
        this.O.n(new Event(Boolean.TRUE));
    }

    public final androidx.lifecycle.f0 d0() {
        return this.H;
    }

    public final androidx.lifecycle.f0 e0() {
        return this.J;
    }

    public final androidx.lifecycle.a0 f0() {
        return this.V;
    }

    public final y9.e g0() {
        return this.f24357k;
    }

    public final ca.b h0() {
        return this.f24353i;
    }

    public final androidx.lifecycle.f0 i0() {
        return this.E;
    }

    public final fg.c j0() {
        return this.f24345e;
    }

    public final g9.d k0() {
        return this.f24360m;
    }

    public final androidx.lifecycle.a0 l0() {
        return this.f24342b0;
    }

    public final androidx.lifecycle.f0 m0() {
        return this.C;
    }

    public final androidx.lifecycle.f0 n0() {
        return this.f24370w;
    }

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

    public final androidx.lifecycle.f0 o0() {
        return this.f24369v;
    }

    public final androidx.lifecycle.a0 p0() {
        return this.f24352h0;
    }

    public final androidx.lifecycle.f0 q0() {
        return this.f24358k0;
    }

    public final androidx.lifecycle.a0 r0() {
        return this.f24348f0;
    }

    public final androidx.lifecycle.f0 s0() {
        return this.A;
    }

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

    public final androidx.lifecycle.a0 t0() {
        return this.T;
    }

    @Override // l8.h
    public tp.u1 u(tp.m0 m0Var, vm.g context, tp.o0 start, String str, dn.p block) {
        kotlin.jvm.internal.t.g(m0Var, "<this>");
        kotlin.jvm.internal.t.g(context, "context");
        kotlin.jvm.internal.t.g(start, "start");
        kotlin.jvm.internal.t.g(block, "block");
        return this.f24364q.u(m0Var, context, start, str, block);
    }

    public final androidx.lifecycle.f0 u0() {
        return this.B;
    }

    public final androidx.lifecycle.a0 v0() {
        return this.Z;
    }

    public final androidx.lifecycle.f0 w0() {
        return this.f24372y;
    }

    public final androidx.lifecycle.f0 x0() {
        return this.f24373z;
    }

    public final androidx.lifecycle.f0 y0() {
        return this.D;
    }

    public final androidx.lifecycle.a0 z0() {
        return this.P;
    }
}
