导航菜单

页面标题

页面副标题

Tasker v6.5.11 - ViewModelTaskyIntro.java 源代码

正在查看: Tasker v6.5.11 应用的 ViewModelTaskyIntro.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.joaomgcd.tasky.taskyroutine.intro;

import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Application;
import androidx.lifecycle.v0;
import com.joaomgcd.taskerm.genericaction.GenericActionActivityConfigureNotificationChannel;
import com.joaomgcd.taskerm.genericaction.GenericActionActivityDisableBatteryOptimizations;
import com.joaomgcd.taskerm.genericaction.GenericActionActivityRequestDrawOverlayPermissions;
import com.joaomgcd.taskerm.settings.q0;
import com.joaomgcd.taskerm.util.ExtensionsContextKt;
import com.joaomgcd.taskerm.util.s6;
import com.joaomgcd.taskerm.util.v6;
import com.joaomgcd.taskerm.util.x2;
import com.joaomgcd.tasky.taskyroutine.intro.ViewModelTaskyIntro;
import hg.r1;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import ji.v;
import jk.n0;
import jk.x0;
import mh.f;
import mh.l;
import mk.i0;
import net.dinglisch.android.taskerm.MonitorService;
import net.dinglisch.android.taskerm.sd;
import we.l0;
import xj.l;
import yj.k0;

public final class ViewModelTaskyIntro extends com.joaomgcd.tasky.taskyroutine.n {
    static final fk.j<Object>[] C = {k0.e(new yj.v(ViewModelTaskyIntro.class, "userWasEverStoppedFromProceeding", "getUserWasEverStoppedFromProceeding()Z", 0)), k0.e(new yj.v(ViewModelTaskyIntro.class, "userCheckedAdditionalBatteryOptimizations", "getUserCheckedAdditionalBatteryOptimizations()Z", 0))};
    public static final int D = 8;
    private final mh.f<String> A;
    private final i0<String> B;
    private final androidx.lifecycle.k0 h;
    private final jg.f i;
    private final mh.f<Boolean> j;
    private final i0<Boolean> k;
    private final mh.f<Boolean> l;
    private final i0<Boolean> m;
    private final mh.f<Boolean> n;
    private final i0<Boolean> o;
    private final mh.f<String> p;
    private final i0<String> q;
    private final mh.h<String, String> r;
    private final i0<String> s;
    private final List<a> t;
    private final jg.f u;

    @TargetApi(26)
    private final List<b> v;
    private final lj.j w;
    private final lj.j x;
    private final mh.f<Boolean> y;
    private final i0<Boolean> z;

    public final class a {
        private final int a;
        private final int b;
        private final int c;
        private final int d;
        private final boolean e;
        private final String f;

        public a(int i, int i2, int i3, int i4, boolean z, String str) {
            this.a = i;
            this.b = i2;
            this.c = i3;
            this.d = i4;
            this.e = z;
            this.f = str;
        }

        public final String a() {
            return ViewModelTaskyIntro.this.s(this.c);
        }

        public final int b() {
            return this.d;
        }

        public final String c() {
            return ViewModelTaskyIntro.this.s(this.a);
        }

        public final boolean d() {
            return this.e;
        }

        public final String e() {
            return ViewModelTaskyIntro.this.s(this.b);
        }

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

        public a(ViewModelTaskyIntro viewModelTaskyIntro, int i, int i2, int i3, int i4, boolean z, String str, int i5, yj.h hVar) {
            this(i, i2, i3, i4, z, (i5 & 32) != 0 ? null : str);
        }
    }

    static final class a0 extends yj.q implements xj.a<Boolean> {
        a0() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            boolean z = true;
            if (!com.joaomgcd.taskerm.util.k.a.n() && !ExtensionsContextKt.G2(ViewModelTaskyIntro.this.l()) && !q0.C(ViewModelTaskyIntro.this.l())) {
                z = false;
            }
            return Boolean.valueOf(z);
        }
    }

    static final class b0 extends yj.q implements xj.a<Boolean> {
        b0() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(ExtensionsContextKt.H0(ViewModelTaskyIntro.this.l()));
        }
    }

    static final class c extends yj.q implements xj.a<Boolean> {
        c() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(ViewModelTaskyIntro.this.U());
        }
    }

    static final class c0 extends yj.q implements xj.a<ji.r<s6>> {

        static final class a extends yj.q implements xj.l<s6, ji.v<? extends s6>> {
            final ViewModelTaskyIntro i;

            a(ViewModelTaskyIntro viewModelTaskyIntro) {
                super(1);
                this.i = viewModelTaskyIntro;
            }

            @Override
            public final ji.v<? extends s6> invoke(s6 s6Var) {
                yj.p.i(s6Var, "it");
                return ExtensionsContextKt.G2(this.i.l()) ? ji.r.w(s6Var) : this.i.n0();
            }
        }

        c0() {
            super(0);
        }

        public static final ji.v d(xj.l lVar, Object obj) {
            yj.p.i(lVar, "$tmp0");
            yj.p.i(obj, "p0");
            return (ji.v) lVar.invoke(obj);
        }

        @Override
        public final ji.r<s6> invoke() {
            ji.r<s6> run = new GenericActionActivityDisableBatteryOptimizations().run(ViewModelTaskyIntro.this.l());
            final a aVar = new a(ViewModelTaskyIntro.this);
            ji.r t = run.t(new oi.e() {
                @Override
                public final Object a(Object obj) {
                    v d;
                    d = ViewModelTaskyIntro.c0.d(l.this, obj);
                    return d;
                }
            });
            yj.p.h(t, "flatMap(...)");
            return t;
        }
    }

    static final class d extends yj.q implements xj.a<Boolean> {
        d() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(!q0.z(ViewModelTaskyIntro.this.l()));
        }
    }

    static final class d0 extends yj.q implements xj.a<Boolean> {
        d0() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(ViewModelTaskyIntro.this.g0());
        }
    }

    static final class e extends yj.q implements xj.a<Boolean> {
        e() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(q0.z(ViewModelTaskyIntro.this.l()) && !q0.B(ViewModelTaskyIntro.this.l()));
        }
    }

    @qj.f(c = "com.joaomgcd.tasky.taskyroutine.intro.ViewModelTaskyIntro$tryToCompleteTodo$1", f = "ViewModelTaskyIntro.kt", l = {281}, m = "invokeSuspend")
    static final class e0 extends qj.l implements xj.p<n0, oj.d<? super lj.e0>, Object> {
        int t;
        final b u;
        final ViewModelTaskyIntro v;

        e0(b bVar, ViewModelTaskyIntro viewModelTaskyIntro, oj.d<? super e0> dVar) {
            super(2, dVar);
            this.u = bVar;
            this.v = viewModelTaskyIntro;
        }

        @Override
        public final oj.d<lj.e0> k(Object obj, oj.d<?> dVar) {
            return new e0(this.u, this.v, dVar);
        }

        @Override
        public final Object r(Object obj) {
            Object c = pj.b.c();
            int i = this.t;
            if (i == 0) {
                lj.s.b(obj);
                xj.a<Boolean> i2 = this.u.i();
                this.t = 1;
                if (x2.c5(i2, 500L, 0L, this, 2, null) == c) {
                    return c;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lj.s.b(obj);
            }
            ExtensionsContextKt.e3(this.v.l(), qj.b.d(335577088));
            return lj.e0.a;
        }

        @Override
        public final Object l(n0 n0Var, oj.d<? super lj.e0> dVar) {
            return ((e0) k(n0Var, dVar)).r(lj.e0.a);
        }
    }

    static final class f extends yj.q implements xj.a<Boolean> {
        f() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(q0.B(ViewModelTaskyIntro.this.l()));
        }
    }

    static final class f0 extends yj.q implements xj.l<s6, lj.e0> {
        f0() {
            super(1);
        }

        public final void a(s6 s6Var) {
            Iterator<T> it = ViewModelTaskyIntro.this.f0().iterator();
            while (it.hasNext()) {
                ((b) it.next()).j();
            }
        }

        @Override
        public lj.e0 invoke(s6 s6Var) {
            a(s6Var);
            return lj.e0.a;
        }
    }

    static final class g extends yj.q implements xj.l<String, String> {
        public static final g i = new g();

        g() {
            super(1);
        }

        @Override
        public final String invoke(String str) {
            return null;
        }
    }

    @qj.f(c = "com.joaomgcd.tasky.taskyroutine.intro.ViewModelTaskyIntro$tryToCompleteTodo$3$1", f = "ViewModelTaskyIntro.kt", l = {290}, m = "invokeSuspend")
    static final class g0 extends qj.l implements xj.p<n0, oj.d<? super lj.e0>, Object> {
        int t;
        final String v;

        static final class a extends yj.q implements xj.l<Activity, ji.r<l0>> {
            final String i;

            a(String str) {
                super(1);
                this.i = str;
            }

            @Override
            public final ji.r<l0> invoke(Activity activity) {
                yj.p.i(activity, "$this$getWithActivity");
                return com.joaomgcd.taskerm.dialog.a.e1(activity, 2131890864, this.i);
            }
        }

        g0(String str, oj.d<? super g0> dVar) {
            super(2, dVar);
            this.v = str;
        }

        @Override
        public final oj.d<lj.e0> k(Object obj, oj.d<?> dVar) {
            return ViewModelTaskyIntro.this.new g0(this.v, dVar);
        }

        @Override
        public final Object r(Object obj) {
            Object c = pj.b.c();
            int i = this.t;
            if (i == 0) {
                lj.s.b(obj);
                this.t = 1;
                if (x0.a(500L, this) == c) {
                    return c;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                lj.s.b(obj);
            }
            com.joaomgcd.taskerm.helper.i.U(ViewModelTaskyIntro.this.p(), ExtensionsContextKt.o2(ViewModelTaskyIntro.this.l(), new a(this.v)), null, 2, null);
            return lj.e0.a;
        }

        @Override
        public final Object l(n0 n0Var, oj.d<? super lj.e0> dVar) {
            return ((g0) k(n0Var, dVar)).r(lj.e0.a);
        }
    }

    static final class h extends yj.q implements xj.a<String> {
        h() {
            super(0);
        }

        @Override
        public final String invoke() {
            if (ViewModelTaskyIntro.this.Y().getValue().booleanValue()) {
                return ViewModelTaskyIntro.this.s(2131888515);
            }
            if (ViewModelTaskyIntro.this.Z().getValue().booleanValue()) {
                return ViewModelTaskyIntro.this.s(2131886785);
            }
            return null;
        }
    }

    @qj.f(c = "com.joaomgcd.tasky.taskyroutine.intro.ViewModelTaskyIntro$updateIntro$1", f = "ViewModelTaskyIntro.kt", l = {92, 93, 94}, m = "invokeSuspend")
    static final class h0 extends qj.l implements xj.p<n0, oj.d<? super lj.e0>, Object> {
        int t;

        h0(oj.d<? super h0> dVar) {
            super(2, dVar);
        }

        @Override
        public final oj.d<lj.e0> k(Object obj, oj.d<?> dVar) {
            return ViewModelTaskyIntro.this.new h0(dVar);
        }

        @Override
        public final java.lang.Object r(java.lang.Object r7) {
            throw new UnsupportedOperationException("Method not decompiled: com.joaomgcd.tasky.taskyroutine.intro.ViewModelTaskyIntro.h0.r(java.lang.Object):java.lang.Object");
        }

        @Override
        public final Object l(n0 n0Var, oj.d<? super lj.e0> dVar) {
            return ((h0) k(n0Var, dVar)).r(lj.e0.a);
        }
    }

    static final class i extends yj.q implements xj.a<String> {
        i() {
            super(0);
        }

        @Override
        public final String invoke() {
            return ViewModelTaskyIntro.this.U() ? "Proceed" : "Check all checkboxes to proceed";
        }
    }

    @qj.f(c = "com.joaomgcd.tasky.taskyroutine.intro.ViewModelTaskyIntro$onResume$1", f = "ViewModelTaskyIntro.kt", l = {52}, m = "invokeSuspend")
    static final class j extends qj.l implements xj.p<n0, oj.d<? super lj.e0>, Object> {
        Object t;
        Object u;
        int v;

        j(oj.d<? super j> dVar) {
            super(2, dVar);
        }

        @Override
        public final oj.d<lj.e0> k(Object obj, oj.d<?> dVar) {
            return ViewModelTaskyIntro.this.new j(dVar);
        }

        @Override
        public final Object r(Object obj) {
            ViewModelTaskyIntro viewModelTaskyIntro;
            Iterator it;
            Object c = pj.b.c();
            int i = this.v;
            if (i == 0) {
                lj.s.b(obj);
                ViewModelTaskyIntro.this.z("Checking if ready to start");
                List<b> f0 = ViewModelTaskyIntro.this.f0();
                viewModelTaskyIntro = ViewModelTaskyIntro.this;
                it = f0.iterator();
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                it = (Iterator) this.u;
                viewModelTaskyIntro = (ViewModelTaskyIntro) this.t;
                lj.s.b(obj);
            }
            while (it.hasNext()) {
                b bVar = (b) it.next();
                viewModelTaskyIntro.z("Checking " + bVar.g() + "...");
                this.t = viewModelTaskyIntro;
                this.u = it;
                this.v = 1;
                if (bVar.k(this) == c) {
                    return c;
                }
            }
            ViewModelTaskyIntro.this.z("We're ready to go!");
            if (ViewModelTaskyIntro.this.Y().getValue().booleanValue() || !ViewModelTaskyIntro.this.W().getValue().booleanValue() || ViewModelTaskyIntro.this.h0()) {
                ViewModelTaskyIntro.this.l0(true);
                mh.f.j(ViewModelTaskyIntro.this.p, v0.a(ViewModelTaskyIntro.this), null, 2, null);
                ViewModelTaskyIntro.this.C();
            } else {
                ViewModelTaskyIntro.this.i0();
            }
            return lj.e0.a;
        }

        @Override
        public final Object l(n0 n0Var, oj.d<? super lj.e0> dVar) {
            return ((j) k(n0Var, dVar)).r(lj.e0.a);
        }
    }

    static final class k extends yj.q implements xj.l<l.b, lj.e0> {
        final ij.d<s6> q;

        k(ij.d<s6> dVar) {
            super(1);
            this.q = dVar;
        }

        public final void a(l.b bVar) {
            yj.p.i(bVar, "it");
            q0.P(ViewModelTaskyIntro.this.l(), true);
            this.q.b(new v6());
        }

        @Override
        public lj.e0 invoke(l.b bVar) {
            a(bVar);
            return lj.e0.a;
        }
    }

    static final class l extends yj.q implements xj.l<l.b, lj.e0> {
        final ij.d<s6> q;

        l(ij.d<s6> dVar) {
            super(1);
            this.q = dVar;
        }

        public final void a(l.b bVar) {
            yj.p.i(bVar, "it");
            q0.P(ViewModelTaskyIntro.this.l(), false);
            this.q.b(new v6());
        }

        @Override
        public lj.e0 invoke(l.b bVar) {
            a(bVar);
            return lj.e0.a;
        }
    }

    static final class m extends yj.q implements xj.l<l.b, lj.e0> {
        final ij.d<s6> q;

        m(ij.d<s6> dVar) {
            super(1);
            this.q = dVar;
        }

        public final void a(l.b bVar) {
            yj.p.i(bVar, "it");
            q0.R(ViewModelTaskyIntro.this.l(), true);
            this.q.b(new v6());
        }

        @Override
        public lj.e0 invoke(l.b bVar) {
            a(bVar);
            return lj.e0.a;
        }
    }

    static final class n extends yj.q implements xj.l<l.b, lj.e0> {
        final ij.d<s6> q;

        n(ij.d<s6> dVar) {
            super(1);
            this.q = dVar;
        }

        public final void a(l.b bVar) {
            yj.p.i(bVar, "it");
            q0.R(ViewModelTaskyIntro.this.l(), false);
            this.q.b(new v6());
        }

        @Override
        public lj.e0 invoke(l.b bVar) {
            a(bVar);
            return lj.e0.a;
        }
    }

    static final class o extends yj.q implements xj.a<f.c> {
        o() {
            super(0);
        }

        @Override
        public final f.c invoke() {
            ViewModelTaskyIntro viewModelTaskyIntro = ViewModelTaskyIntro.this;
            return viewModelTaskyIntro.n(viewModelTaskyIntro.e0());
        }
    }

    static final class p extends yj.q implements xj.a<mk.e<? extends Boolean>> {
        p() {
            super(0);
        }

        @Override
        public final mk.e<Boolean> invoke() {
            List<b> f0 = ViewModelTaskyIntro.this.f0();
            ArrayList arrayList = new ArrayList(kotlin.collections.r.v(f0, 10));
            Iterator<T> it = f0.iterator();
            while (it.hasNext()) {
                arrayList.add(((b) it.next()).h());
            }
            return mk.g.A(arrayList);
        }
    }

    static final class q extends yj.q implements xj.a<Boolean> {
        q() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(ExtensionsContextKt.H0(ViewModelTaskyIntro.this.l()));
        }
    }

    static final class r extends yj.q implements xj.a<ji.r<s6>> {
        r() {
            super(0);
        }

        @Override
        public final ji.r<s6> invoke() {
            ExtensionsContextKt.q(ViewModelTaskyIntro.this.l(), "https://tasker.joaoapps.com/userguide/en/faqs/faq-problem.html#00", false, false, false, 14, null);
            ViewModelTaskyIntro.this.k0(true);
            ji.r<s6> w = ji.r.w(new v6());
            yj.p.h(w, "just(...)");
            return w;
        }
    }

    static final class s extends yj.q implements xj.a<Boolean> {
        s() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            boolean z = true;
            if (com.joaomgcd.taskerm.util.p.f(ViewModelTaskyIntro.this.l()) && r1.k(ViewModelTaskyIntro.this.l(), "quick")) {
                z = false;
            }
            return Boolean.valueOf(z);
        }
    }

    static final class t extends yj.q implements xj.a<Boolean> {
        t() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            if (com.joaomgcd.taskerm.util.k.a.p()) {
                return Boolean.FALSE;
            }
            return Boolean.valueOf(!kotlin.collections.r.a0(ExtensionsContextKt.D(ViewModelTaskyIntro.this.l(), r1.e(ViewModelTaskyIntro.this.l().getPackageName(), "quick"))).isEmpty());
        }
    }

    static final class u extends yj.q implements xj.a<ji.r<s6>> {
        u() {
            super(0);
        }

        @Override
        public final ji.r<s6> invoke() {
            if (!com.joaomgcd.taskerm.util.k.a.p()) {
                MonitorService.X3(ViewModelTaskyIntro.this.l(), kotlin.collections.r.l()).a(ViewModelTaskyIntro.this.l());
                return new GenericActionActivityConfigureNotificationChannel("quick", null, null, 6, null).run(ViewModelTaskyIntro.this.l());
            }
            ji.r<s6> w = ji.r.w(new v6());
            yj.p.h(w, "just(...)");
            return w;
        }
    }

    static final class v extends yj.q implements xj.a<Boolean> {
        v() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(q0.A(ViewModelTaskyIntro.this.l()));
        }
    }

    static final class w extends yj.q implements xj.a<ji.r<s6>> {
        w() {
            super(0);
        }

        @Override
        public final ji.r<s6> invoke() {
            return ViewModelTaskyIntro.this.m0();
        }
    }

    static final class x extends yj.q implements xj.a<Boolean> {
        x() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(sd.j(ViewModelTaskyIntro.this.l()));
        }
    }

    static final class y extends yj.q implements xj.a<Boolean> {
        y() {
            super(0);
        }

        @Override
        public final Boolean invoke() {
            return Boolean.valueOf(!ExtensionsContextKt.z2(ViewModelTaskyIntro.this.l()));
        }
    }

    static final class z extends yj.q implements xj.a<ji.r<s6>> {
        z() {
            super(0);
        }

        @Override
        public final ji.r<s6> invoke() {
            return new GenericActionActivityRequestDrawOverlayPermissions().run(ViewModelTaskyIntro.this.l());
        }
    }

    public ViewModelTaskyIntro(Application application, androidx.lifecycle.k0 k0Var) {
        super(application);
        yj.p.i(application, "application");
        yj.p.i(k0Var, "savedStateHandle");
        this.h = k0Var;
        this.i = new jg.f(l(), false, null, "userStoppedProceeding", 4, null);
        mh.f<Boolean> fVar = new mh.f<>((f.c) null, new d(), 1, (yj.h) null);
        this.j = fVar;
        this.k = fVar.c();
        mh.f<Boolean> fVar2 = new mh.f<>((f.c) null, new e(), 1, (yj.h) null);
        this.l = fVar2;
        i0<Boolean> c2 = fVar2.c();
        this.m = c2;
        mh.f<Boolean> fVar3 = new mh.f<>((f.c) null, new f(), 1, (yj.h) null);
        this.n = fVar3;
        i0<Boolean> c3 = fVar3.c();
        this.o = c3;
        mh.f<String> fVar4 = new mh.f<>(n(mk.g.A(kotlin.collections.r.o(c2, c3))), new h());
        this.p = fVar4;
        this.q = fVar4.c();
        mh.h<String, String> hVar = new mh.h<>(fVar4, v0.a(this), g.i);
        this.r = hVar;
        this.s = hVar.c();
        int i2 = 32;
        yj.h hVar2 = null;
        String str = null;
        this.t = kotlin.collections.r.o(new a(this, 2131890733, 2131890735, 2131890734, 2131232671, true, str, i2, hVar2), new a(this, 2131886701, 2131890719, 2131890718, 2131230911, false, str, i2, hVar2));
        this.u = new jg.f(l(), false, null, "userCheckedAdditionalBatteryOptimizations", 4, null);
        List o2 = kotlin.collections.r.o(new b(this, null, 2131886115, 2131886116, false, null, new v(), null, new w(), 64, null), new b(this, 29, 2131888747, 2131887119, true, "Search for Tasker on this list and enable the permission", new x(), new y(), new z()), new b(this, 23, 2131886771, 2131886772, false, null, new a0(), new b0(), new c0()), new b(this, 23, 2131891052, 2131887139, false, "After going through everything that applies to your device here press the back key to continue.", new d0(), new q(), new r()), new b(this, null, 2131888227, 2131888228, true, "On this screen, disable the \"Show Notifications\" setting.\n\nThe setting name may vary slightly on different devices.", new s(), new t(), new u()));
        ArrayList arrayList = new ArrayList();
        for (Object obj : o2) {
            b bVar = (b) obj;
            if (bVar.d() == null || com.joaomgcd.taskerm.util.k.a.C(bVar.d().intValue())) {
                arrayList.add(obj);
            }
        }
        ArrayList arrayList2 = new ArrayList();
        for (Object obj2 : arrayList) {
            if (((b) obj2).e().invoke().booleanValue()) {
                arrayList2.add(obj2);
            }
        }
        this.v = arrayList2;
        this.w = lj.k.b(new p());
        this.x = lj.k.b(new o());
        mh.f<Boolean> fVar5 = new mh.f<>(d0(), new c());
        this.y = fVar5;
        this.z = fVar5.c();
        mh.f<String> fVar6 = new mh.f<>(d0(), new i());
        this.A = fVar6;
        this.B = fVar6.c();
    }

    public final boolean U() {
        List<b> list = this.v;
        if ((list instanceof Collection) && list.isEmpty()) {
            return true;
        }
        Iterator<T> it = list.iterator();
        while (it.hasNext()) {
            if (!((b) it.next()).h().getValue().booleanValue()) {
                return false;
            }
        }
        return true;
    }

    private final f.c d0() {
        return (f.c) this.x.getValue();
    }

    public final mk.e<Boolean> e0() {
        return (mk.e) this.w.getValue();
    }

    public final boolean h0() {
        return this.i.d(this, C[0]).booleanValue();
    }

    public final void i0() {
        l0(false);
        r().c();
    }

    public final void l0(boolean z2) {
        this.i.f(this, C[0], Boolean.valueOf(z2));
    }

    public final ji.r<s6> m0() {
        ij.d V = ij.d.V();
        yj.p.h(V, "create(...)");
        o().C("", ExtensionsContextKt.b2(l(), "disclaimer.html"), (r29 & 4) != 0 ? false : true, "Accept", (r29 & 16) != 0 ? null : "Don't Accept", (r29 & 32) != 0 ? null : null, (r29 & 64) != 0 ? false : false, (r29 & 128) != 0 ? false : false, (r29 & 256) != 0 ? null : null, (r29 & 512) != 0 ? null : new k(V), (r29 & 1024) != 0 ? null : new l(V), (r29 & 2048) != 0 ? null : null);
        return V;
    }

    public final ji.r<s6> n0() {
        ij.d V = ij.d.V();
        yj.p.h(V, "create(...)");
        o().C(x2.Q4(2131886771, l(), new Object[0]), x2.Q4(2131888326, l(), new Object[0]), (r29 & 4) != 0 ? false : false, x2.Q4(2131886907, l(), new Object[0]), (r29 & 16) != 0 ? null : x2.Q4(2131886889, l(), new Object[0]), (r29 & 32) != 0 ? null : null, (r29 & 64) != 0 ? false : false, (r29 & 128) != 0 ? false : false, (r29 & 256) != 0 ? null : null, (r29 & 512) != 0 ? null : new m(V), (r29 & 1024) != 0 ? null : new n(V), (r29 & 2048) != 0 ? null : null);
        return V;
    }

    public static final void p0(xj.l lVar, Object obj) {
        yj.p.i(lVar, "$tmp0");
        lVar.invoke(obj);
    }

    public final void E() {
        q0.O(l(), true);
        q0();
    }

    public final void T(a aVar) {
        yj.p.i(aVar, "choice");
        q0.Q(l(), true);
        boolean d2 = aVar.d();
        if (d2) {
            q0.H(l(), true);
        }
        com.joaomgcd.oldtaskercompat.j.i(l(), d2);
        q0();
    }

    public final List<a> V() {
        return this.t;
    }

    public final i0<Boolean> W() {
        return this.z;
    }

    public final i0<Boolean> X() {
        return this.k;
    }

    public final i0<Boolean> Y() {
        return this.m;
    }

    public final i0<Boolean> Z() {
        return this.o;
    }

    public final i0<String> a0() {
        return this.s;
    }

    public final i0<String> b0() {
        return this.q;
    }

    public final i0<String> c0() {
        return this.B;
    }

    public final List<b> f0() {
        return this.v;
    }

    public final boolean g0() {
        return this.u.d(this, C[1]).booleanValue();
    }

    public final void j0() {
        com.joaomgcd.oldtaskercompat.j.h(l(), true);
        i0();
    }

    public final void k0(boolean z2) {
        this.u.f(this, C[1], Boolean.valueOf(z2));
    }

    public final void o0(b bVar) {
        yj.p.i(bVar, "todo");
        if (bVar.a()) {
            v(new e0(bVar, this, null));
        }
        mh.b p2 = p();
        ji.r<s6> invoke = bVar.c().invoke();
        final f0 f0Var = new f0();
        ji.r<s6> m2 = invoke.m(new oi.d() {
            @Override
            public final void accept(Object obj) {
                ViewModelTaskyIntro.p0(xj.l.this, obj);
            }
        });
        yj.p.h(m2, "doAfterSuccess(...)");
        com.joaomgcd.taskerm.helper.i.U(p2, m2, null, 2, null);
        String b2 = bVar.b();
        if (b2 != null) {
            v(new g0(b2, null));
        }
    }

    public final void q0() {
        v(new h0(null));
    }

    @Override
    public void w() {
        super.w();
        z("Resumed");
        v(new j(null));
    }

    @Override
    public void y() {
        super.y();
    }

    public final class b {
        private final Integer a;
        private final int b;
        private final int c;
        private final boolean d;
        private final String e;
        private final xj.a<Boolean> f;
        private final xj.a<Boolean> g;
        private final xj.a<ji.r<s6>> h;
        private final mh.f<Boolean> i;
        private final i0<Boolean> j;
        final ViewModelTaskyIntro k;

        static final class a extends yj.q implements xj.a<Boolean> {
            public static final a i = new a();

            a() {
                super(0);
            }

            @Override
            public final Boolean invoke() {
                return Boolean.TRUE;
            }
        }

        static final class C0133b extends yj.q implements xj.a<Boolean> {
            C0133b() {
                super(0);
            }

            @Override
            public final Boolean invoke() {
                return b.this.i().invoke();
            }
        }

        public b(ViewModelTaskyIntro viewModelTaskyIntro, Integer num, int i, int i2, boolean z, String str, xj.a<Boolean> aVar, xj.a<Boolean> aVar2, xj.a<? extends ji.r<s6>> aVar3) {
            yj.p.i(aVar, "isDoneFunc");
            yj.p.i(aVar2, "needsToBeDoneInTheFirstPlace");
            yj.p.i(aVar3, "doIt");
            this.k = viewModelTaskyIntro;
            this.a = num;
            this.b = i;
            this.c = i2;
            this.d = z;
            this.e = str;
            this.f = aVar;
            this.g = aVar2;
            this.h = aVar3;
            mh.f<Boolean> fVar = new mh.f<>((f.c) null, new C0133b(), 1, (yj.h) null);
            this.i = fVar;
            this.j = fVar.c();
        }

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

        public final String b() {
            return this.e;
        }

        public final xj.a<ji.r<s6>> c() {
            return this.h;
        }

        public final Integer d() {
            return this.a;
        }

        public final xj.a<Boolean> e() {
            return this.g;
        }

        public final String f() {
            return x2.Q4(this.c, this.k.l(), ExtensionsContextKt.Z(this.k.l()));
        }

        public final String g() {
            return this.k.s(this.b);
        }

        public final i0<Boolean> h() {
            return this.j;
        }

        public final xj.a<Boolean> i() {
            return this.f;
        }

        public final void j() {
            mh.f.j(this.i, v0.a(this.k), null, 2, null);
        }

        public final Object k(oj.d<? super lj.e0> dVar) {
            Object i = mh.f.i(this.i, null, dVar, 1, null);
            return i == pj.b.c() ? i : lj.e0.a;
        }

        public b(ViewModelTaskyIntro viewModelTaskyIntro, Integer num, int i, int i2, boolean z, String str, xj.a aVar, xj.a aVar2, xj.a aVar3, int i3, yj.h hVar) {
            this(viewModelTaskyIntro, num, i, i2, z, str, aVar, (i3 & 64) != 0 ? a.i : aVar2, aVar3);
        }
    }
}