APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Breathe - People Portal
版本号:2.19.0
包名称:com.elmo.rta.breathe

MD5 校验值:2a432003868ccf5f53c7a8e745fc59ec

反编译源代码说明

b.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package f9;

import androidx.activity.s;
import bm.m0;
import bm.x;
import com.airbnb.epoxy.b0;
import com.elmo.rta.breathe.data.dto.TimeOffCreateRequestDtoApi;
import com.elmo.rta.breathe.data.dto.TimeOffDtoApi;
import com.elmo.rta.breathe.data.dto.TimeOffResponseDtoApi;
import com.elmo.rta.breathe.data.dto.TimeOffSite;
import com.google.android.gms.internal.measurement.o2;
import cq.l;
import j$.time.Duration;
import j$.time.LocalDate;
import j$.time.OffsetDateTime;
import j$.time.Period;
import j$.time.chrono.ChronoLocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import p9.a0;
import p9.q;
import p9.z;
import pp.n;
import qp.w;

public final class b implements f9.a {

    public final g8.b f6657a;

    public final k8.b f6658b;

    public final r8.b f6659c;

    public final r8.a f6660d;

    public final y9.c f6661e;

    @vp.e(c = "com.elmo.rta.breathe.data.repository.timeOff.TimeOffApiDataSourceImpl", f = "TimeOffApiDataSource.kt", l = {52}, m = "addUnavailability")
    public static final class a extends vp.c {
        public Object D;
        public int F;

        public a(tp.d<? super a> dVar) {
            super(dVar);
        }

        @Override
        public final Object m(Object obj) {
            this.D = obj;
            this.F |= Integer.MIN_VALUE;
            return b.this.c(null, this);
        }
    }

    @vp.e(c = "com.elmo.rta.breathe.data.repository.timeOff.TimeOffApiDataSourceImpl", f = "TimeOffApiDataSource.kt", l = {67}, m = "deleteUnavailability")
    public static final class C0235b extends vp.c {
        public Object D;
        public int F;

        public C0235b(tp.d<? super C0235b> dVar) {
            super(dVar);
        }

        @Override
        public final Object m(Object obj) {
            this.D = obj;
            this.F |= Integer.MIN_VALUE;
            return b.this.a(null, this);
        }
    }

    @vp.e(c = "com.elmo.rta.breathe.data.repository.timeOff.TimeOffApiDataSourceImpl", f = "TimeOffApiDataSource.kt", l = {61}, m = "editUnavailability")
    public static final class c extends vp.c {
        public Object D;
        public int F;

        public c(tp.d<? super c> dVar) {
            super(dVar);
        }

        @Override
        public final Object m(Object obj) {
            this.D = obj;
            this.F |= Integer.MIN_VALUE;
            return b.this.d(null, null, this);
        }
    }

    @vp.e(c = "com.elmo.rta.breathe.data.repository.timeOff.TimeOffApiDataSourceImpl", f = "TimeOffApiDataSource.kt", l = {46}, m = "fetchEmployeeTimeOffs")
    public static final class d extends vp.c {
        public b D;
        public Object E;
        public int G;

        public d(tp.d<? super d> dVar) {
            super(dVar);
        }

        @Override
        public final Object m(Object obj) {
            this.E = obj;
            this.G |= Integer.MIN_VALUE;
            return b.this.e(null, this);
        }
    }

    @vp.e(c = "com.elmo.rta.breathe.data.repository.timeOff.TimeOffApiDataSourceImpl", f = "TimeOffApiDataSource.kt", l = {73}, m = "getEmployeeTimeOffById")
    public static final class e extends vp.c {
        public b D;
        public Object E;
        public int G;

        public e(tp.d<? super e> dVar) {
            super(dVar);
        }

        @Override
        public final Object m(Object obj) {
            this.E = obj;
            this.G |= Integer.MIN_VALUE;
            return b.this.b(null, this);
        }
    }

    public b(g8.b bVar, k8.b bVar2, r8.b bVar3, r8.a aVar, y9.c cVar) {
        l.f(bVar, "service");
        l.f(bVar2, "mapperInstant");
        l.f(bVar3, "mapperTimeOff");
        l.f(aVar, "timeOffCreateMapper");
        l.f(cVar, "environmentConfigProvider");
        this.f6657a = bVar;
        this.f6658b = bVar2;
        this.f6659c = bVar3;
        this.f6660d = aVar;
        this.f6661e = cVar;
    }

    @Override
    public final Object a(String str, tp.d<? super wi.c<n, ? extends x9.b>> dVar) {
        C0235b c0235b;
        int i10;
        wi.c S;
        if (dVar instanceof C0235b) {
            c0235b = (C0235b) dVar;
            int i11 = c0235b.F;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                c0235b.F = i11 - Integer.MIN_VALUE;
                Object obj = c0235b.D;
                up.a aVar = up.a.COROUTINE_SUSPENDED;
                i10 = c0235b.F;
                if (i10 == 0) {
                    if (i10 == 1) {
                        m0.r(obj);
                    } else {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                } else {
                    m0.r(obj);
                    this.f6661e.d();
                    c0235b.F = 1;
                    obj = this.f6657a.e("https://rota-api.breathehr.com", str, c0235b);
                    if (obj == aVar) {
                        return aVar;
                    }
                }
                S = s.S((wi.c) obj);
                if (!(S instanceof wi.b)) {
                    return new wi.b(n.f12723a);
                }
                if (S instanceof wi.a) {
                    return S;
                }
                throw new b0();
            }
        }
        c0235b = new C0235b(dVar);
        Object obj2 = c0235b.D;
        up.a aVar2 = up.a.COROUTINE_SUSPENDED;
        i10 = c0235b.F;
        if (i10 == 0) {
        }
        S = s.S((wi.c) obj2);
        if (!(S instanceof wi.b)) {
        }
    }

    @Override
    public final Object b(String str, tp.d<? super wi.c<q, ? extends x9.b>> dVar) {
        e eVar;
        int i10;
        b bVar;
        wi.c S;
        z.a aVar;
        z.a aVar2;
        int i11;
        int i12;
        z.b bVar2;
        z.b bVar3;
        String str2;
        String str3;
        if (dVar instanceof e) {
            eVar = (e) dVar;
            int i13 = eVar.G;
            if ((i13 & Integer.MIN_VALUE) != 0) {
                eVar.G = i13 - Integer.MIN_VALUE;
                Object obj = eVar.E;
                up.a aVar3 = up.a.COROUTINE_SUSPENDED;
                i10 = eVar.G;
                if (i10 == 0) {
                    if (i10 == 1) {
                        bVar = eVar.D;
                        m0.r(obj);
                    } else {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                } else {
                    m0.r(obj);
                    this.f6661e.d();
                    eVar.D = this;
                    eVar.G = 1;
                    obj = this.f6657a.d("https://rota-api.breathehr.com", str, eVar);
                    if (obj == aVar3) {
                        return aVar3;
                    }
                    bVar = this;
                }
                S = s.S((wi.c) obj);
                r8.b bVar4 = bVar.f6659c;
                if (!(S instanceof wi.b)) {
                    TimeOffDtoApi timeOffDtoApi = (TimeOffDtoApi) ((wi.b) S).f16948a;
                    bVar4.getClass();
                    l.f(timeOffDtoApi, "dto");
                    String str4 = timeOffDtoApi.f3803a;
                    OffsetDateTime offsetDateTime = timeOffDtoApi.f3807e;
                    OffsetDateTime offsetDateTime2 = timeOffDtoApi.f3808f;
                    String str5 = timeOffDtoApi.f3804b;
                    l.f(str5, "value");
                    z.a[] values = z.a.values();
                    int length = values.length;
                    int i14 = 0;
                    while (true) {
                        if (i14 < length) {
                            aVar = values[i14];
                            String str6 = aVar.A;
                            String lowerCase = str5.toLowerCase(Locale.ROOT);
                            l.e(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                            if (l.a(str6, lowerCase)) {
                                break;
                            }
                            i14++;
                        } else {
                            aVar = null;
                            break;
                        }
                    }
                    if (aVar == null) {
                        aVar2 = z.a.C;
                    } else {
                        aVar2 = aVar;
                    }
                    long minutes = Duration.between(timeOffDtoApi.f3807e, timeOffDtoApi.f3808f).toMinutes();
                    String str7 = timeOffDtoApi.f3810h;
                    l.f(str7, "type");
                    String str8 = timeOffDtoApi.f3811i;
                    l.f(str8, "subtype");
                    Locale locale = Locale.ROOT;
                    String lowerCase2 = str7.toLowerCase(locale);
                    l.e(lowerCase2, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                    if (!l.a(lowerCase2, "unavailability") && l.a(lowerCase2, "leave")) {
                        String lowerCase3 = str8.toLowerCase(locale);
                        l.e(lowerCase3, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                        if (l.a(lowerCase3, "sickness")) {
                            i11 = 3;
                        } else {
                            i11 = 2;
                        }
                    } else {
                        i11 = 1;
                    }
                    int[] d10 = r.f.d(3);
                    int length2 = d10.length;
                    int i15 = 0;
                    while (true) {
                        if (i15 < length2) {
                            i12 = d10[i15];
                            String a10 = gf.a.a(i12);
                            int[] iArr = d10;
                            String lowerCase4 = str7.toLowerCase(Locale.ROOT);
                            l.e(lowerCase4, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                            if (l.a(a10, lowerCase4)) {
                                break;
                            }
                            i15++;
                            d10 = iArr;
                        } else {
                            i12 = 0;
                            break;
                        }
                    }
                    if (i12 == 0) {
                        i12 = 1;
                    }
                    String str9 = timeOffDtoApi.f3812j;
                    String str10 = timeOffDtoApi.f3805c;
                    l.f(str10, "value");
                    z.b[] values2 = z.b.values();
                    int length3 = values2.length;
                    int i16 = 0;
                    while (true) {
                        if (i16 < length3) {
                            bVar2 = values2[i16];
                            z.b[] bVarArr = values2;
                            String str11 = bVar2.A;
                            int i17 = length3;
                            String lowerCase5 = str10.toLowerCase(Locale.ROOT);
                            l.e(lowerCase5, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                            if (l.a(str11, lowerCase5)) {
                                break;
                            }
                            i16++;
                            values2 = bVarArr;
                            length3 = i17;
                        } else {
                            bVar2 = null;
                            break;
                        }
                    }
                    if (bVar2 == null) {
                        bVar3 = z.b.B;
                    } else {
                        bVar3 = bVar2;
                    }
                    TimeOffSite timeOffSite = timeOffDtoApi.f3813k;
                    if (timeOffSite != null) {
                        str2 = timeOffSite.getId();
                    } else {
                        str2 = null;
                    }
                    if (timeOffSite != null) {
                        str3 = timeOffSite.getName();
                    } else {
                        str3 = null;
                    }
                    return new wi.b(new q(str4, offsetDateTime, offsetDateTime2, aVar2, minutes, i11, i12, str9, bVar3, str2, str3, timeOffDtoApi.f3809g));
                }
                if (S instanceof wi.a) {
                    return S;
                }
                throw new b0();
            }
        }
        eVar = new e(dVar);
        Object obj2 = eVar.E;
        up.a aVar32 = up.a.COROUTINE_SUSPENDED;
        i10 = eVar.G;
        if (i10 == 0) {
        }
        S = s.S((wi.c) obj2);
        r8.b bVar42 = bVar.f6659c;
        if (!(S instanceof wi.b)) {
        }
    }

    @Override
    public final Object c(a0 a0Var, tp.d<? super wi.c<n, ? extends x9.b>> dVar) {
        a aVar;
        int i10;
        wi.c S;
        if (dVar instanceof a) {
            aVar = (a) dVar;
            int i11 = aVar.F;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                aVar.F = i11 - Integer.MIN_VALUE;
                Object obj = aVar.D;
                up.a aVar2 = up.a.COROUTINE_SUSPENDED;
                i10 = aVar.F;
                if (i10 == 0) {
                    if (i10 == 1) {
                        m0.r(obj);
                    } else {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                } else {
                    m0.r(obj);
                    this.f6661e.d();
                    this.f6660d.getClass();
                    TimeOffCreateRequestDtoApi a10 = r8.a.a(a0Var);
                    aVar.F = 1;
                    obj = this.f6657a.a("https://rota-api.breathehr.com", a10, aVar);
                    if (obj == aVar2) {
                        return aVar2;
                    }
                }
                S = s.S((wi.c) obj);
                if (!(S instanceof wi.b)) {
                    return new wi.b(n.f12723a);
                }
                if (S instanceof wi.a) {
                    return S;
                }
                throw new b0();
            }
        }
        aVar = new a(dVar);
        Object obj2 = aVar.D;
        up.a aVar22 = up.a.COROUTINE_SUSPENDED;
        i10 = aVar.F;
        if (i10 == 0) {
        }
        S = s.S((wi.c) obj2);
        if (!(S instanceof wi.b)) {
        }
    }

    @Override
    public final Object d(String str, a0 a0Var, tp.d<? super wi.c<n, ? extends x9.b>> dVar) {
        c cVar;
        int i10;
        wi.c S;
        if (dVar instanceof c) {
            cVar = (c) dVar;
            int i11 = cVar.F;
            if ((i11 & Integer.MIN_VALUE) != 0) {
                cVar.F = i11 - Integer.MIN_VALUE;
                Object obj = cVar.D;
                up.a aVar = up.a.COROUTINE_SUSPENDED;
                i10 = cVar.F;
                if (i10 == 0) {
                    if (i10 == 1) {
                        m0.r(obj);
                    } else {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                } else {
                    m0.r(obj);
                    this.f6661e.d();
                    this.f6660d.getClass();
                    TimeOffCreateRequestDtoApi a10 = r8.a.a(a0Var);
                    cVar.F = 1;
                    obj = this.f6657a.b("https://rota-api.breathehr.com", str, a10, cVar);
                    if (obj == aVar) {
                        return aVar;
                    }
                }
                S = s.S((wi.c) obj);
                if (!(S instanceof wi.b)) {
                    return new wi.b(n.f12723a);
                }
                if (S instanceof wi.a) {
                    return S;
                }
                throw new b0();
            }
        }
        cVar = new c(dVar);
        Object obj2 = cVar.D;
        up.a aVar2 = up.a.COROUTINE_SUSPENDED;
        i10 = cVar.F;
        if (i10 == 0) {
        }
        S = s.S((wi.c) obj2);
        if (!(S instanceof wi.b)) {
        }
    }

    @Override
    public final Object e(LocalDate localDate, tp.d<? super wi.c<? extends List<z>, ? extends x9.b>> dVar) {
        d dVar2;
        int i10;
        b bVar;
        wi.c S;
        int i11;
        int i12;
        int i13;
        Period ofDays;
        boolean z10;
        boolean z11;
        int i14;
        if (dVar instanceof d) {
            dVar2 = (d) dVar;
            int i15 = dVar2.G;
            if ((i15 & Integer.MIN_VALUE) != 0) {
                dVar2.G = i15 - Integer.MIN_VALUE;
                Object obj = dVar2.E;
                up.a aVar = up.a.COROUTINE_SUSPENDED;
                i10 = dVar2.G;
                int i16 = 1;
                if (i10 == 0) {
                    if (i10 == 1) {
                        bVar = dVar2.D;
                        m0.r(obj);
                    } else {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                } else {
                    m0.r(obj);
                    this.f6661e.d();
                    this.f6658b.getClass();
                    String a10 = k8.b.a(localDate);
                    dVar2.D = this;
                    dVar2.G = 1;
                    obj = this.f6657a.c("https://rota-api.breathehr.com", a10, dVar2);
                    if (obj == aVar) {
                        return aVar;
                    }
                    bVar = this;
                }
                S = s.S((wi.c) obj);
                if (!(S instanceof wi.b)) {
                    List<TimeOffDtoApi> list = ((TimeOffResponseDtoApi) ((wi.b) S).f16948a).f3819a;
                    r8.b bVar2 = bVar.f6659c;
                    ArrayList arrayList = new ArrayList();
                    for (TimeOffDtoApi timeOffDtoApi : list) {
                        bVar2.getClass();
                        l.f(timeOffDtoApi, "dto");
                        LocalDate localDate2 = timeOffDtoApi.f3809g.toLocalDate();
                        String str = timeOffDtoApi.f3810h;
                        l.f(str, "type");
                        String str2 = timeOffDtoApi.f3811i;
                        l.f(str2, "subtype");
                        Locale locale = Locale.ROOT;
                        String lowerCase = str.toLowerCase(locale);
                        l.e(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                        if (!l.a(lowerCase, "unavailability") && l.a(lowerCase, "leave")) {
                            String lowerCase2 = str2.toLowerCase(locale);
                            l.e(lowerCase2, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                            if (l.a(lowerCase2, "sickness")) {
                                i11 = 3;
                            } else {
                                i11 = 2;
                            }
                        } else {
                            i11 = 1;
                        }
                        String str3 = timeOffDtoApi.f3806d;
                        l.f(str3, "value");
                        int[] d10 = r.f.d(3);
                        int length = d10.length;
                        int i17 = 0;
                        while (true) {
                            if (i17 < length) {
                                i12 = d10[i17];
                                String a11 = gf.a.a(i12);
                                String lowerCase3 = str3.toLowerCase(Locale.ROOT);
                                l.e(lowerCase3, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                                if (l.a(a11, lowerCase3)) {
                                    break;
                                }
                                i17++;
                            } else {
                                i12 = 0;
                                break;
                            }
                        }
                        if (i12 == 0) {
                            i13 = 1;
                        } else {
                            i13 = i12;
                        }
                        String str4 = timeOffDtoApi.f3805c;
                        z.b a12 = z.b.a.a(str4);
                        int ordinal = z.b.a.a(str4).ordinal();
                        if (ordinal != i16) {
                            if (ordinal != 2) {
                                if (ordinal != 3) {
                                    if (ordinal != 4) {
                                        ofDays = null;
                                    } else {
                                        i14 = 28;
                                    }
                                } else {
                                    i14 = 14;
                                }
                            } else {
                                i14 = 7;
                            }
                            ofDays = Period.ofDays(i14);
                        } else {
                            ofDays = Period.ofDays(i16);
                        }
                        String str5 = timeOffDtoApi.f3803a;
                        OffsetDateTime offsetDateTime = timeOffDtoApi.f3808f;
                        OffsetDateTime offsetDateTime2 = timeOffDtoApi.f3807e;
                        z zVar = new z(str5, str5, offsetDateTime2, com.configcat.d.l(offsetDateTime, offsetDateTime2), Duration.between(offsetDateTime2, com.configcat.d.l(offsetDateTime, offsetDateTime2)).toMinutes(), i11, i13, timeOffDtoApi.f3812j, a12);
                        LocalDate localDate3 = offsetDateTime.toLocalDate();
                        if (localDate3.compareTo((ChronoLocalDate) localDate2) <= 0) {
                            z10 = true;
                        } else {
                            z10 = false;
                        }
                        if (!z10) {
                            localDate3 = null;
                        }
                        if (localDate3 == null) {
                            localDate3 = localDate2;
                        }
                        l.e(localDate3, "globalEnd.toLocalDate().…balUntil } ?: globalUntil");
                        rp.a aVar2 = new rp.a();
                        aVar2.add(zVar);
                        OffsetDateTime offsetDateTime3 = zVar.f12622c;
                        if (localDate3.compareTo((ChronoLocalDate) offsetDateTime3.toLocalDate()) > 0) {
                            OffsetDateTime plusDays = offsetDateTime3.plusDays(1L);
                            l.e(plusDays, "localStart");
                            OffsetDateTime l10 = com.configcat.d.l(zVar.f12623d, plusDays);
                            while (plusDays.toLocalDate().compareTo((ChronoLocalDate) localDate3) <= 0) {
                                aVar2.add(z.d(zVar, zVar.f12621b + "-" + plusDays.toLocalDate().toEpochDay(), plusDays, l10));
                                plusDays = plusDays.plusDays(1L);
                                l10 = l10.plusDays(1L);
                                l.e(l10, "localEnd.plusDays(1)");
                            }
                        }
                        rp.a<z> h10 = o2.h(aVar2);
                        rp.e eVar = new rp.e();
                        eVar.addAll(h10);
                        if (ofDays != null && !h10.isEmpty()) {
                            while (h10 != null) {
                                l.e(localDate2, "globalUntil");
                                OffsetDateTime offsetDateTime4 = OffsetDateTime.MAX;
                                l.e(offsetDateTime4, "MAX");
                                ArrayList arrayList2 = new ArrayList(qp.q.J(h10, 10));
                                for (z zVar2 : h10) {
                                    OffsetDateTime plus = zVar2.f12622c.plus(ofDays);
                                    l.e(plus, "timeOff.startTime.plus(period)");
                                    OffsetDateTime plus2 = zVar2.f12623d.plus(ofDays);
                                    l.e(plus2, "timeOff.endTime.plus(period)");
                                    arrayList2.add(z.d(zVar2, zVar2.f12621b + "-" + plus.toLocalDate().toEpochDay(), plus, plus2));
                                    offsetDateTime4 = plus2;
                                }
                                if (localDate2.compareTo((ChronoLocalDate) offsetDateTime4.toLocalDate()) >= 0) {
                                    z11 = true;
                                } else {
                                    z11 = false;
                                }
                                if (z11) {
                                    h10 = arrayList2;
                                } else {
                                    h10 = null;
                                }
                                if (h10 != null) {
                                    eVar.addAll(h10);
                                }
                            }
                        }
                        x.g(eVar);
                        qp.s.O(w.D0(eVar), arrayList);
                        i16 = 1;
                    }
                    return new wi.b(arrayList);
                }
                if (S instanceof wi.a) {
                    return S;
                }
                throw new b0();
            }
        }
        dVar2 = new d(dVar);
        Object obj2 = dVar2.E;
        up.a aVar3 = up.a.COROUTINE_SUSPENDED;
        i10 = dVar2.G;
        int i162 = 1;
        if (i10 == 0) {
        }
        S = s.S((wi.c) obj2);
        if (!(S instanceof wi.b)) {
        }
    }
}