导航菜单

页面标题

页面副标题

Tasker v6.6.3 - xq.java 源代码

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

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


package net.dinglisch.android.taskerm;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import com.joaomgcd.taskerm.structuredoutput.StructureType;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import net.dinglisch.android.taskerm.xq;
import pg.n2;

public final class xq {
    public static final a a = new a(null);
    private static final vj.j<sk.n> b = vj.k.a(new ik.a() {
        @Override
        public final Object e() {
            sk.n t;
            t = xq.t();
            return t;
        }
    });
    private static final vj.j<sk.n> c = vj.k.a(new ik.a() {
        @Override
        public final Object e() {
            sk.n s;
            s = xq.s();
            return s;
        }
    });

    public static final class a {
        public a(jk.h hVar) {
            this();
        }

        private static final SharedPreferences.Editor A(vj.j<? extends SharedPreferences.Editor> jVar) {
            return jVar.getValue();
        }

        private final boolean A0(Bundle bundle, final Context context, String str) {
            return ((Boolean) O(bundle, context, str, new ik.a() {
                @Override
                public final Object e() {
                    boolean B0;
                    B0 = xq.a.B0();
                    return Boolean.valueOf(B0);
                }
            }, new ik.l() {
                @Override
                public final Object invoke(Object obj) {
                    boolean C0;
                    C0 = xq.a.C0(context, (String) obj);
                    return Boolean.valueOf(C0);
                }
            }, new ik.p() {
                @Override
                public final Object n(Object obj, Object obj2) {
                    boolean D0;
                    D0 = xq.a.D0((Bundle) obj, (String) obj2);
                    return Boolean.valueOf(D0);
                }
            })).booleanValue();
        }

        public static final boolean B0() {
            return false;
        }

        public static final boolean C0(Context context, String str) {
            jk.p.i(str, "realVarName");
            return com.joaomgcd.taskerm.structuredoutput.a.a.a(context, str);
        }

        public static final String D(Bundle bundle, Context context, String str) {
            jk.p.i(str, "it");
            return wp.W0(str) ? xq.a.d0(bundle, str) : wp.B0(context, str);
        }

        public static final boolean D0(Bundle bundle, String str) {
            jk.p.i(bundle, "bundle");
            jk.p.i(str, "realVarName");
            return bundle.getBoolean(xq.a.w0(str));
        }

        private static final s3 E(Bundle bundle, Context context, String str, List<String> list) {
            ArrayList arrayList;
            Object clone = bundle.clone();
            jk.p.g(clone, "null cannot be cast to non-null type android.os.Bundle");
            Bundle bundle2 = (Bundle) clone;
            wp.N1(context, str, list, bundle2);
            if (wp.W0(str)) {
                arrayList = null;
            } else {
                arrayList = new ArrayList(kotlin.collections.t.w(list, 10));
                int i = 0;
                for (Object obj : list) {
                    int i2 = i + 1;
                    if (i < 0) {
                        kotlin.collections.t.v();
                    }
                    arrayList.add(str + i2);
                    i = i2;
                }
            }
            return new s3(bundle2, null, arrayList, 2, null);
        }

        private final pg.f2 G() {
            return new pg.f2(2131231834);
        }

        private final pg.v1 H() {
            return new pg.v1("easystructureread", "Easy Data Reading", "Notifications related to easily reading data with Tasker like JSON or HTML.", 5, null, null, null, false, null, false, null, null, 4080, null);
        }

        private final StructureType I(String str, Context context) {
            if (str == null || !J(str)) {
                return null;
            }
            return com.joaomgcd.taskerm.structuredoutput.b.a.a(context, M(str).get(0));
        }

        public static void J0(a aVar, Bundle bundle, String str, StructureType structureType, Context context, Boolean bool, int i, Object obj) {
            aVar.I0(bundle, str, structureType, (i & 8) != 0 ? null : context, (i & 16) != 0 ? null : bool);
        }

        private final boolean K(String str) {
            return sk.q.U(str, ".", false, 2, null);
        }

        private final boolean L(String str) {
            return sk.q.U(str, "[", false, 2, null) && sk.q.U(str, "]", false, 2, null);
        }

        private final List<String> M(String str) {
            if (!L(str)) {
                return kotlin.collections.t.p(sk.q.a1(str, ".", null, 2, null), sk.q.S0(str, ".", null, 2, null));
            }
            List J0 = sk.q.J0(str, new String[]{"["}, false, 0, 6, null);
            String str2 = (String) J0.get(0);
            List J02 = sk.q.J0((String) J0.get(1), new String[]{"]"}, false, 0, 6, null);
            String str3 = (String) J02.get(0);
            return kotlin.collections.t.p(str2, str3);
        }

        private final <T> T O(Bundle bundle, Context context, String str, ik.a<? extends T> aVar, ik.l<? super String, ? extends T> lVar, ik.p<? super Bundle, ? super String, ? extends T> pVar) {
            if (bundle == null || str == null || !J(str)) {
                return aVar.e();
            }
            String str2 = M(str).get(0);
            return !com.joaomgcd.taskerm.util.l7.z0(str2) ? lVar.invoke(str2) : pVar.n(bundle, str2);
        }

        private final dn P(Context context, String str, StructureType structureType, Bundle bundle, boolean z, ik.l<? super String, String> lVar) {
            String n0;
            if (!J(str)) {
                return null;
            }
            List<String> M = M(str);
            String str2 = M.get(0);
            String str3 = M.get(1);
            final String invoke = lVar.invoke(str2);
            if (invoke == null) {
                return null;
            }
            if (sk.q.U(str3, "%", false, 2, null) && (n0 = n0(context, str3, null, bundle, z)) != null) {
                str3 = n0;
            }
            if (eg.w.w(invoke)) {
                return new dn(Q(structureType, StructureType.JSON, new ik.a() {
                    @Override
                    public final Object e() {
                        com.joaomgcd.taskerm.util.of S;
                        S = xq.a.S(invoke);
                        return S;
                    }
                }), str3);
            }
            if (ag.d.a(invoke)) {
                return new dn(Q(structureType, StructureType.HTML_XML, new ik.a() {
                    @Override
                    public final Object e() {
                        com.joaomgcd.taskerm.util.of T;
                        T = xq.a.T(invoke);
                        return T;
                    }
                }), str3);
            }
            if (af.e.a(invoke)) {
                return new dn(Q(structureType, StructureType.CSV, new ik.a() {
                    @Override
                    public final Object e() {
                        com.joaomgcd.taskerm.util.of U;
                        U = xq.a.U(invoke);
                        return U;
                    }
                }), str3);
            }
            return null;
        }

        private static final com.joaomgcd.taskerm.util.of Q(StructureType structureType, StructureType structureType2, final ik.a<? extends com.joaomgcd.taskerm.util.of> aVar) {
            if (com.joaomgcd.taskerm.util.b7.b1(structureType, StructureType.None, StructureType.Auto, structureType2)) {
                return (com.joaomgcd.taskerm.util.of) com.joaomgcd.taskerm.util.b7.n6(null, new ik.a() {
                    @Override
                    public final Object e() {
                        com.joaomgcd.taskerm.util.of R;
                        R = xq.a.R(ik.a.this);
                        return R;
                    }
                }, 1, null);
            }
            return null;
        }

        public static final com.joaomgcd.taskerm.util.of R(ik.a aVar) {
            return (com.joaomgcd.taskerm.util.of) aVar.e();
        }

        public static final com.joaomgcd.taskerm.util.of S(String str) {
            return new eg.r(str);
        }

        public static final com.joaomgcd.taskerm.util.of T(String str) {
            return new ag.a(str);
        }

        public static final com.joaomgcd.taskerm.util.of U(String str) {
            return new af.d(str);
        }

        public static final StructureType X() {
            return null;
        }

        public static final StructureType Y(Context context, String str) {
            jk.p.i(str, "realVarName");
            return com.joaomgcd.taskerm.structuredoutput.b.a.a(context, str);
        }

        public static final StructureType Z(Bundle bundle, String str) {
            jk.p.i(bundle, "bundle");
            jk.p.i(str, "realVarName");
            return xq.a.V(bundle, str);
        }

        private final String d0(Bundle bundle, String str) {
            return com.joaomgcd.taskerm.util.l7.V(bundle.getString(str));
        }

        private final sk.n e0() {
            return (sk.n) xq.b.getValue();
        }

        private final sk.n f0() {
            return (sk.n) xq.c.getValue();
        }

        private final String h0(final Context context, String str, final String str2, Bundle bundle, boolean z) {
            return o0(context, str, str2, bundle, z, new ik.l() {
                @Override
                public final Object invoke(Object obj) {
                    String i0;
                    i0 = xq.a.i0(context, str2, (String) obj);
                    return i0;
                }
            }, new ik.l() {
                @Override
                public final Object invoke(Object obj) {
                    StructureType j0;
                    j0 = xq.a.j0(context, (String) obj);
                    return j0;
                }
            });
        }

        public static final String i0(Context context, String str, String str2) {
            jk.p.i(str2, "it");
            return wp.C0(context, str2, str);
        }

        public static final StructureType j0(Context context, String str) {
            jk.p.i(str, "it");
            return xq.a.I(str, context);
        }

        private final String k0(final Context context, final String str, String str2, final Bundle bundle, boolean z) {
            return bundle == null ? str2 : o0(context, str, str2, bundle, z, new ik.l() {
                @Override
                public final Object invoke(Object obj) {
                    String l0;
                    l0 = xq.a.l0(bundle, (String) obj);
                    return l0;
                }
            }, new ik.l() {
                @Override
                public final Object invoke(Object obj) {
                    StructureType m0;
                    m0 = xq.a.m0(bundle, context, str, (String) obj);
                    return m0;
                }
            });
        }

        public static final String l0(Bundle bundle, String str) {
            jk.p.i(str, "it");
            return xq.a.d0(bundle, str);
        }

        public static final StructureType m0(Bundle bundle, Context context, String str, String str2) {
            jk.p.i(str2, "it");
            return xq.a.W(bundle, context, str);
        }

        private final String o0(final Context context, final String str, String str2, final Bundle bundle, boolean z, ik.l<? super String, String> lVar, ik.l<? super String, ? extends StructureType> lVar2) {
            StringBuilder sb;
            String str3;
            StringBuilder sb2;
            if (str == null) {
                return str2;
            }
            if (z) {
                String invoke = lVar.invoke(str);
                return invoke == null ? str2 : invoke;
            }
            if (!J(str)) {
                String invoke2 = lVar.invoke(str);
                return invoke2 == null ? str2 : invoke2;
            }
            StructureType invoke3 = lVar2.invoke(str);
            if (invoke3 == null) {
                List<String> M = M(str);
                String V = com.joaomgcd.taskerm.util.l7.V(lVar.invoke(M.get(0)));
                if (V == null) {
                    return str2;
                }
                boolean K = K(str);
                String str4 = M.get(1);
                if (K) {
                    sb2 = new StringBuilder();
                    sb2.append(V);
                    sb2.append(".");
                    sb2.append((Object) str4);
                } else {
                    sb2 = new StringBuilder();
                    sb2.append(V);
                    sb2.append("[");
                    sb2.append((Object) str4);
                    sb2.append("]");
                }
                return sb2.toString();
            }
            dn P = P(context, str, invoke3, bundle, z, lVar);
            if (P != null) {
                final com.joaomgcd.taskerm.util.of a = P.a();
                final String b = P.b();
                if (a == null) {
                    return str2;
                }
                String str5 = (String) com.joaomgcd.taskerm.util.b7.n6(null, new ik.a() {
                    @Override
                    public final Object e() {
                        String v0;
                        v0 = xq.a.v0(com.joaomgcd.taskerm.util.of.this, bundle, context, str, b);
                        return v0;
                    }
                }, 1, null);
                return str5 == null ? str2 : str5;
            }
            final String invoke4 = lVar.invoke(str);
            if (invoke4 == null) {
                return str2;
            }
            if (eg.w.w(invoke4)) {
                n2.a aVar = pg.n2.A;
                if (aVar.o(context, "potentialjsonalert")) {
                    eg.r rVar = (eg.r) com.joaomgcd.taskerm.util.b7.n6(null, new ik.a() {
                        @Override
                        public final Object e() {
                            eg.r p0;
                            p0 = xq.a.p0(invoke4);
                            return p0;
                        }
                    }, 1, null);
                    if (rVar == null) {
                        return invoke4;
                    }
                    String f = rVar.f();
                    if (f == null) {
                        f = "example";
                    }
                    if (wp.c1("%" + f)) {
                        sb = new StringBuilder();
                        sb.append(str);
                        sb.append(".");
                        sb.append(f);
                    } else {
                        sb = new StringBuilder();
                        sb.append(str);
                        sb.append("[");
                        sb.append(f);
                        sb.append("]");
                    }
                    String sb3 = sb.toString();
                    String j6 = com.joaomgcd.taskerm.util.b7.j6(2131888364, context, new Object[0]);
                    Object e = rVar.e(f);
                    if (e == null || (str3 = e.toString()) == null) {
                        str3 = "null";
                    }
                    xg.e2.y2(aVar.m(context, "potentialjsonalert", j6, com.joaomgcd.taskerm.util.b7.j6(2131888365, context, sb3, str3), new ik.l() {
                        @Override
                        public final Object invoke(Object obj) {
                            vj.e0 q0;
                            q0 = xq.a.q0(context, (pg.n2) obj);
                            return q0;
                        }
                    }), context, new ik.a() {
                        @Override
                        public final Object e() {
                            vj.e0 r0;
                            r0 = xq.a.r0();
                            return r0;
                        }
                    });
                }
            }
            if (!ag.d.a(invoke4)) {
                return invoke4;
            }
            n2.a aVar2 = pg.n2.A;
            if (!aVar2.o(context, "potentialhtmlalert") || ((ag.a) com.joaomgcd.taskerm.util.b7.n6(null, new ik.a() {
                @Override
                public final Object e() {
                    ag.a s0;
                    s0 = xq.a.s0(invoke4);
                    return s0;
                }
            }, 1, null)) == null) {
                return invoke4;
            }
            xg.e2.y2(aVar2.m(context, "potentialhtmlalert", com.joaomgcd.taskerm.util.b7.j6(2131888254, context, new Object[0]), com.joaomgcd.taskerm.util.b7.j6(2131888255, context, str + "[div]"), new ik.l() {
                @Override
                public final Object invoke(Object obj) {
                    vj.e0 t0;
                    t0 = xq.a.t0(context, (pg.n2) obj);
                    return t0;
                }
            }), context, new ik.a() {
                @Override
                public final Object e() {
                    vj.e0 u0;
                    u0 = xq.a.u0();
                    return u0;
                }
            });
            return invoke4;
        }

        public static final eg.r p0(String str) {
            return new eg.r(str);
        }

        public static final vj.e0 q0(Context context, pg.n2 n2Var) {
            jk.p.i(n2Var, "$this$warnWithNotification");
            a aVar = xq.a;
            n2Var.E(aVar.G());
            n2Var.y(aVar.H());
            n2Var.D(new pg.j(context, "https://tasker.joaoapps.com/userguide/en/variables.html#json", true, null, 8, null));
            return vj.e0.a;
        }

        public static final vj.e0 r0() {
            return vj.e0.a;
        }

        public static final ag.a s0(String str) {
            return new ag.a(str);
        }

        public static final vj.e0 t0(Context context, pg.n2 n2Var) {
            jk.p.i(n2Var, "$this$warnWithNotification");
            a aVar = xq.a;
            n2Var.E(aVar.G());
            n2Var.y(aVar.H());
            n2Var.D(new pg.j(context, "https://tasker.joaoapps.com/userguide/en/variables.html#html", true, null, 8, null));
            return vj.e0.a;
        }

        public static final vj.e0 u0() {
            return vj.e0.a;
        }

        public static final String v0(com.joaomgcd.taskerm.util.of ofVar, Bundle bundle, Context context, String str, String str2) {
            Object e;
            if (ofVar instanceof eg.r) {
                e = ((eg.r) ofVar).i(str2, xq.a.A0(bundle, context, str));
            } else {
                e = ofVar.e(str2);
            }
            if (e != null) {
                return com.joaomgcd.taskerm.util.b7.O3(e, 10);
            }
            return null;
        }

        private final String w0(String str) {
            if (E0(str)) {
                return str;
            }
            return str + "#@ohmyjsonsmartsearchdisabledOHNO!@#";
        }

        private final String x0(String str) {
            if (E0(str)) {
                return str;
            }
            return str + "#@superstructuretypeyeaaahh@#";
        }

        public static final SharedPreferences.Editor z(Context context) {
            return wp.u0(context).edit();
        }

        public static final vj.e0 z0() {
            return vj.e0.a;
        }

        public final boolean B(String str, String str2) {
            jk.p.i(str, "input");
            jk.p.i(str2, "variable");
            g1 F = F(str2);
            if (F == null) {
                return wp.L(str, str2, true);
            }
            g1 F2 = F(str);
            if (F2 == null) {
                return false;
            }
            return wp.L(str, F.b(), true) && (F2.a() == F.a());
        }

        public final s3 C(final Context context, String str, final Bundle bundle, String str2) {
            String V;
            com.joaomgcd.taskerm.util.of d;
            ArrayList arrayList;
            jk.p.i(context, "context");
            if (str == null || bundle == null || !wp.o1(str)) {
                return null;
            }
            StructureType W = W(bundle, context, str);
            if (W != null) {
                dn P = P(context, str, W, bundle, false, new ik.l() {
                    @Override
                    public final Object invoke(Object obj) {
                        String D;
                        D = xq.a.D(bundle, context, (String) obj);
                        return D;
                    }
                });
                com.joaomgcd.taskerm.util.of d2 = P != null ? P.d() : null;
                List<Object> h = d2 instanceof eg.r ? ((eg.r) d2).h(P.c(), A0(bundle, context, str)) : (P == null || (d = P.d()) == null) ? null : d.d(P.c());
                if (h != null) {
                    arrayList = new ArrayList(kotlin.collections.t.w(h, 10));
                    Iterator<T> it = h.iterator();
                    while (it.hasNext()) {
                        arrayList.add(com.joaomgcd.taskerm.util.b7.O3(it.next(), 10));
                    }
                } else {
                    arrayList = null;
                }
                if (arrayList != null) {
                    return E(bundle, context, str, arrayList);
                }
            }
            if (J(str) && (V = com.joaomgcd.taskerm.util.l7.V(n0(context, str, str, bundle, false))) != null) {
                if (str2 == null) {
                    str2 = "";
                }
                String str3 = V + "(" + str2 + ")";
                if (str3 != null) {
                    return new s3(null, kotlin.collections.t.d(str3), null, 5, null);
                }
            }
            return null;
        }

        public final boolean E0(String str) {
            if (str != null) {
                return sk.q.A(str, "#@superstructuretypeyeaaahh@#", false, 2, null);
            }
            return false;
        }

        public final g1 F(String str) {
            jk.p.i(str, "variableNameInput");
            sk.n nVar = new sk.n("(.+?)([\\d]+)$");
            sk.n nVar2 = new sk.n("(.+?)\\(([\\d]+)\\)$");
            sk.j h = nVar.h(str);
            if (h == null && (h = nVar2.h(str)) == null) {
                return null;
            }
            String str2 = h.a().get(1);
            Integer t = sk.q.t(h.a().get(2));
            if (t != null) {
                return new g1(str2, t.intValue());
            }
            return null;
        }

        public final String F0(Context context, String str, String str2, Bundle bundle) {
            jk.p.i(context, "context");
            jk.p.i(str, "arrayName");
            jk.p.i(str2, "arrayJoiner");
            return kotlin.collections.t.n0(com.joaomgcd.taskerm.util.l7.e0(str, context, bundle), str2, null, null, 0, null, null, 62, null);
        }

        public final void G0(Bundle bundle, String str, StructureType structureType) {
            J0(this, bundle, str, structureType, null, null, 24, null);
        }

        public final void H0(Bundle bundle, String str, StructureType structureType, Context context) {
            J0(this, bundle, str, structureType, context, null, 16, null);
        }

        public final void I0(Bundle bundle, String str, StructureType structureType, Context context, Boolean bool) {
            if (str == null || E0(str)) {
                return;
            }
            String x0 = x0(str);
            if (structureType == null) {
                if (bundle != null) {
                    bundle.remove(x0);
                    return;
                }
                return;
            }
            boolean booleanValue = bool != null ? bool.booleanValue() : false;
            int valueForBundle = structureType.getValueForBundle();
            if (!wp.W0(str)) {
                if (context != null) {
                    com.joaomgcd.taskerm.structuredoutput.b.a.c(context, str, structureType);
                    com.joaomgcd.taskerm.structuredoutput.a.a.c(context, str, booleanValue);
                    return;
                }
                return;
            }
            if (bundle == null) {
                return;
            }
            bundle.putInt(x0, valueForBundle);
            String w0 = w0(str);
            if (booleanValue) {
                bundle.putBoolean(w0, booleanValue);
            } else {
                bundle.remove(w0);
            }
        }

        public final boolean J(String str) {
            if (str == null) {
                return false;
            }
            return K(str) || L(str);
        }

        public final String K0(boolean z) {
            return z ? "true" : "false";
        }

        public final String N(String str) {
            List<String> M;
            if (!J(str)) {
                return str;
            }
            if (str == null || (M = M(str)) == null) {
                return null;
            }
            return (String) kotlin.collections.t.h0(M, 0);
        }

        public final StructureType V(Bundle bundle, String str) {
            String x0;
            int i;
            if (bundle == null || str == null || (x0 = x0(str)) == null || (i = bundle.getInt(x0)) == 0) {
                return null;
            }
            return (StructureType) ((Enum) com.joaomgcd.taskerm.util.b7.b6(i, StructureType.class));
        }

        public final StructureType W(Bundle bundle, final Context context, String str) {
            jk.p.i(context, "context");
            return (StructureType) O(bundle, context, str, new ik.a() {
                @Override
                public final Object e() {
                    StructureType X;
                    X = xq.a.X();
                    return X;
                }
            }, new ik.l() {
                @Override
                public final Object invoke(Object obj) {
                    StructureType Y;
                    Y = xq.a.Y(context, (String) obj);
                    return Y;
                }
            }, new ik.p() {
                @Override
                public final Object n(Object obj, Object obj2) {
                    StructureType Z;
                    Z = xq.a.Z((Bundle) obj, (String) obj2);
                    return Z;
                }
            });
        }

        public final String a0(String str) {
            jk.p.i(str, "regularVarName");
            return x0(str);
        }

        public final List<String> b0(Context context, String str, String str2, Bundle bundle) {
            jk.p.i(context, "context");
            jk.p.i(str, "arrayName");
            jk.p.i(str2, "indexes");
            List J0 = sk.q.J0(str2, new String[]{","}, false, 0, 6, null);
            ArrayList arrayList = new ArrayList();
            Iterator it = J0.iterator();
            while (it.hasNext()) {
                Integer t = sk.q.t((String) it.next());
                if (t != null) {
                    arrayList.add(t);
                }
            }
            return c0(context, str, arrayList, bundle);
        }

        public final List<String> c0(Context context, String str, List<Integer> list, Bundle bundle) {
            List<String> m;
            jk.p.i(context, "context");
            jk.p.i(str, "arrayName");
            jk.p.i(list, "indexes1Based");
            ArrayList arrayList = new ArrayList(kotlin.collections.t.w(list, 10));
            Iterator<T> it = list.iterator();
            while (it.hasNext()) {
                arrayList.add(Integer.valueOf(((Number) it.next()).intValue() - 1));
            }
            if (!sk.q.A(str, ")", false, 2, null)) {
                str = str + "()";
            }
            String substring = str.substring(0, str.length() - 2);
            jk.p.h(substring, "substring(...)");
            t3 V = wp.V(context, str, bundle);
            if (V == null || (m = V.c()) == null) {
                m = kotlin.collections.t.m();
            }
            ArrayList arrayList2 = new ArrayList(kotlin.collections.t.w(arrayList, 10));
            Iterator it2 = arrayList.iterator();
            while (it2.hasNext()) {
                int intValue = ((Number) it2.next()).intValue();
                String str2 = (String) kotlin.collections.t.h0(m, intValue);
                if (str2 == null) {
                    str2 = substring + (intValue + 1);
                }
                arrayList2.add(str2);
            }
            return arrayList2;
        }

        public final t3 g0(Context context, String str, String str2, Bundle bundle) {
            jk.p.i(context, "context");
            jk.p.i(str, "expr");
            jk.p.i(str2, "lookupVarName");
            t3 t3Var = new t3(kotlin.collections.t.d("0"), null);
            sk.j d = sk.n.d(sk.q.U(str, "~R", false, 2, null) ? f0() : e0(), str, 0, 2, null);
            if (d == null) {
                return t3Var;
            }
            List<String> a = d.a();
            String str3 = (String) kotlin.collections.t.h0(a, 3);
            if (str3 == null || str3.length() == 0) {
                o7.G("Variables", "empty content specifier for $?");
                return t3Var;
            }
            List<Integer> P2 = com.joaomgcd.taskerm.util.b7.P2(wp.c0(context, str2, wp.N(context, str3, bundle), bundle));
            return P2 == null ? t3Var : new t3(c0(context, str2, P2, bundle), com.joaomgcd.taskerm.util.l7.V((String) kotlin.collections.t.h0(a, 1)));
        }

        public final String n0(Context context, String str, String str2, Bundle bundle, boolean z) {
            StringBuilder sb;
            jk.p.i(context, "context");
            String V = com.joaomgcd.taskerm.util.l7.V(str);
            if (V == null) {
                return str2;
            }
            if (z || !J(V)) {
                return wp.W0(V) ? k0(context, str, str2, bundle, z) : wp.C0(context, V, str2);
            }
            List<String> M = M(V);
            String str3 = M.get(0);
            String str4 = M.get(1);
            String n0 = n0(context, str3, null, bundle, z);
            if (n0 == null) {
                return str2;
            }
            if (eg.w.w(n0) || ag.d.a(n0) || af.e.a(n0)) {
                return wp.W0(str3) ? k0(context, str, str2, bundle, z) : h0(context, str, str2, bundle, z);
            }
            if (K(V)) {
                sb = new StringBuilder();
                sb.append(n0);
                sb.append(".");
                sb.append(str4);
            } else {
                sb = new StringBuilder();
                sb.append(n0);
                sb.append("[");
                sb.append(str4);
                sb.append("]");
            }
            return sb.toString();
        }

        public final void y(final Context context, List<String> list, Bundle bundle) {
            jk.p.i(context, "context");
            if (list == null) {
                return;
            }
            vj.j a = vj.k.a(new ik.a() {
                @Override
                public final Object e() {
                    SharedPreferences.Editor z;
                    z = xq.a.z(context);
                    return z;
                }
            });
            boolean z = false;
            for (String str : list) {
                if (!wp.W0(str)) {
                    A(a).remove(str);
                    z = true;
                } else if (bundle != null) {
                    bundle.remove(str);
                }
            }
            if (z) {
                A(a).commit();
            }
        }

        public final void y0(Context context) {
            jk.p.i(context, "context");
            if (f1.v1(context)) {
                return;
            }
            xg.e2.y2(n2.a.n(pg.n2.A, context, "winvarwihtoutaccessibility", com.joaomgcd.taskerm.util.b7.j6(2131891128, context, new Object[0]), com.joaomgcd.taskerm.util.b7.j6(2131891129, context, new Object[0]), null, 16, null), context, new ik.a() {
                @Override
                public final Object e() {
                    vj.e0 z0;
                    z0 = xq.a.z0();
                    return z0;
                }
            });
        }

        private a() {
        }
    }

    public static final void e(Context context, List<String> list, Bundle bundle) {
        a.y(context, list, bundle);
    }

    public static final boolean f(String str, String str2) {
        return a.B(str, str2);
    }

    public static final s3 g(Context context, String str, Bundle bundle, String str2) {
        return a.C(context, str, bundle, str2);
    }

    public static final boolean h(String str) {
        return a.J(str);
    }

    public static final String i(String str) {
        return a.N(str);
    }

    public static final List<String> j(Context context, String str, String str2, Bundle bundle) {
        return a.b0(context, str, str2, bundle);
    }

    public static final t3 k(Context context, String str, String str2, Bundle bundle) {
        return a.g0(context, str, str2, bundle);
    }

    public static final String l(Context context, String str, String str2, Bundle bundle, boolean z) {
        return a.n0(context, str, str2, bundle, z);
    }

    public static final void m(Context context) {
        a.y0(context);
    }

    public static final boolean n(String str) {
        return a.E0(str);
    }

    public static final String o(Context context, String str, String str2, Bundle bundle) {
        return a.F0(context, str, str2, bundle);
    }

    public static final void p(Bundle bundle, String str, StructureType structureType) {
        a.G0(bundle, str, structureType);
    }

    public static final void q(Bundle bundle, String str, StructureType structureType, Context context) {
        a.H0(bundle, str, structureType, context);
    }

    public static final String r(boolean z) {
        return a.K0(z);
    }

    public static final sk.n s() {
        return new sk.n("^\\$((.|\n)*)\\?(!?~R.+)");
    }

    public static final sk.n t() {
        return new sk.n("^\\$((.|\n)*)\\?(.+)");
    }
}