Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45

以下内容为反编译后的 b.java 源代码,内容仅作参考


package cq3;

import android.content.DialogInterface;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Toast;
import androidx.view.s;
import com.inappstory.sdk.stories.api.models.Image;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.g0;
import kotlin.jvm.internal.p0;
import kotlin.jvm.internal.u;
import kotlin.text.Regex;
import kotlin.text.v;
import kotlin.text.w;
import org.jetbrains.annotations.NotNull;
import sinet.startup.inDriver.core.common.extensions.ViewBindingDelegate;
import sinet.startup.inDriver.legacy.feature.auth.data.DevPlatformNamespaceApi;
import sinet.startup.inDriver.legacy.feature.auth.data.GetNamespacesResponse;
import sinet.startup.inDriver.legacy.feature.auth.data.LabelResponse;
import sinet.startup.inDriver.legacy.feature.auth.data.NamespaceResponse;
import vm.x;

@Metadata(d1 = {"\u0000t\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b<\u0010=J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0012\u0010\b\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006H\u0016J\u001a\u0010\u000b\u001a\u00020\u00042\u0006\u0010\n\u001a\u00020\t2\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006H\u0016J\u0010\u0010\u000e\u001a\u00020\u00042\u0006\u0010\r\u001a\u00020\fH\u0016J\b\u0010\u000f\u001a\u00020\u0004H\u0016R\u001a\u0010\u0015\u001a\u00020\u00108\u0016X\u0096\u0004¢\u0006\f\n\u0004\b\u0011\u0010\u0012\u001a\u0004\b\u0013\u0010\u0014R\u0018\u0010\u0019\u001a\u0004\u0018\u00010\u00168\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0017\u0010\u0018R\"\u0010!\u001a\u00020\u001a8\u0000@\u0000X\u0081.¢\u0006\u0012\n\u0004\b\u001b\u0010\u001c\u001a\u0004\b\u001d\u0010\u001e\"\u0004\b\u001f\u0010 R\u0018\u0010%\u001a\u0004\u0018\u00010\"8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b#\u0010$R\u001b\u0010+\u001a\u00020&8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b'\u0010(\u001a\u0004\b)\u0010*R\u001b\u00101\u001a\u00020,8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b-\u0010.\u001a\u0004\b/\u00100R$\u00107\u001a\u0012\u0012\u0004\u0012\u00020302j\b\u0012\u0004\u0012\u000203`48\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b5\u00106R\u0014\u0010;\u001a\u0002088\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b9\u0010:¨\u0006>"}, d2 = {"Lcq3/b;", "Lsh1/c;", "", "hash", "Lco/g0;", "nb", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "Landroid/view/View;", "view", "onViewCreated", "Landroid/content/DialogInterface;", "dialog", "onDismiss", "onDestroy", "", "l0", "I", "Ta", "()I", "layoutRes", "Lcq3/j;", "m0", "Lcq3/j;", "onDialogResultListener", "Lsinet/startup/inDriver/legacy/feature/auth/data/DevPlatformNamespaceApi;", "n0", "Lsinet/startup/inDriver/legacy/feature/auth/data/DevPlatformNamespaceApi;", "mb", "()Lsinet/startup/inDriver/legacy/feature/auth/data/DevPlatformNamespaceApi;", "setDevPlatformNamespaceApi$auth_release", "(Lsinet/startup/inDriver/legacy/feature/auth/data/DevPlatformNamespaceApi;)V", "devPlatformNamespaceApi", "Lym/b;", "o0", "Lym/b;", "disposable", "Lpp3/i;", "p0", "Lto/d;", "lb", "()Lpp3/i;", "binding", "Lcq3/g;", "q0", "Lco/k;", "kb", "()Lcq3/g;", "adapter", "Ljava/util/ArrayList;", "Lcq3/f;", "Lkotlin/collections/ArrayList;", "r0", "Ljava/util/ArrayList;", "namespaces", "Lkotlin/text/Regex;", "s0", "Lkotlin/text/Regex;", "nonWordRegex", "<init>", "()V", "auth_release"}, k = 1, mv = {1, 8, 0})
public final class b extends sh1.c {

    static final xo.m<Object>[] f43157t0 = {p0.l(new g0(b.class, "binding", "getBinding()Lsinet/startup/inDriver/legacy/feature/auth/databinding/ServerApiListDialogAddNamespaceBinding;", 0))};

    private j onDialogResultListener;

    public DevPlatformNamespaceApi devPlatformNamespaceApi;

    private ym.b disposable;

    private final int layoutRes = mp3.d.f96843k;

    @NotNull
    private final to.d binding = new ViewBindingDelegate(this, p0.c(pp3.i.class));

    @NotNull
    private final co.k adapter = n91.o.h(new a());

    @NotNull
    private final ArrayList<Namespace> namespaces = new ArrayList<>();

    @NotNull
    private final Regex nonWordRegex = new Regex("\\W");

    @Metadata(d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Lcq3/g;", "b", "()Lcq3/g;"}, k = 3, mv = {1, 8, 0})
    static final class a extends u implements qo.a<g> {

        @Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
        public class C1253a extends kotlin.jvm.internal.q implements qo.l<String, co.g0> {
            C1253a(Object obj) {
                super(1, obj, b.class, "onNamespaceClicked", "onNamespaceClicked(Ljava/lang/String;)V", 0);
            }

            @Override
            public co.g0 invoke(String str) {
                invoke2(str);
                return co.g0.f25238a;
            }

            public final void invoke2(@NotNull String str) {
                ((b) this.receiver).nb(str);
            }
        }

        a() {
            super(0);
        }

        @Override
        @NotNull
        public final g invoke() {
            return new g(new C1253a(b.this));
        }
    }

    @Metadata(d1 = {"\u0000#\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\r\n\u0000\n\u0002\u0010\b\n\u0002\b\u0007*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0012\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0016J*\u0010\f\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\n\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\bH\u0016J*\u0010\u000e\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\r\u001a\u00020\b2\u0006\u0010\n\u001a\u00020\bH\u0016¨\u0006\u000f"}, d2 = {"androidx/core/widget/TextViewKt$addTextChangedListener$textWatcher$1", "Landroid/text/TextWatcher;", "Landroid/text/Editable;", Image.TYPE_SMALL, "Lco/g0;", "afterTextChanged", "", "text", "", "start", "count", "after", "beforeTextChanged", "before", "onTextChanged", "core-ktx_release"}, k = 1, mv = {1, 8, 0})
    public static final class C1254b implements TextWatcher {
        public C1254b() {
        }

        @Override
        public void afterTextChanged(Editable editable) {
            boolean I;
            boolean Y;
            boolean Y2;
            boolean Y3;
            boolean Y4;
            boolean Y5;
            boolean Y6;
            if (editable != null) {
                I = v.I(editable);
                if (!I) {
                    String obj = editable.toString();
                    String replace = b.this.nonWordRegex.replace(obj, "");
                    ArrayList arrayList = b.this.namespaces;
                    ArrayList arrayList2 = new ArrayList();
                    for (Object obj2 : arrayList) {
                        Namespace namespace = (Namespace) obj2;
                        Y = w.Y(namespace.getName(), obj, true);
                        if (!Y) {
                            Y2 = w.Y(namespace.getHash(), obj, true);
                            if (!Y2) {
                                List<String> d15 = namespace.d();
                                if (!(d15 instanceof Collection) || !d15.isEmpty()) {
                                    Iterator<T> it = d15.iterator();
                                    while (it.hasNext()) {
                                        Y3 = w.Y((String) it.next(), obj, true);
                                        if (Y3) {
                                            break;
                                        }
                                    }
                                }
                                Y4 = w.Y(namespace.getFilteredName(), replace, true);
                                if (!Y4) {
                                    Y5 = w.Y(namespace.getHash(), replace, true);
                                    if (!Y5) {
                                        List<String> a15 = namespace.a();
                                        if (!(a15 instanceof Collection) || !a15.isEmpty()) {
                                            Iterator<T> it4 = a15.iterator();
                                            while (it4.hasNext()) {
                                                Y6 = w.Y((String) it4.next(), replace, true);
                                                if (Y6) {
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        arrayList2.add(obj2);
                    }
                    b.this.kb().i(arrayList2);
                    return;
                }
            }
            b.this.kb().i(b.this.namespaces);
        }

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i15, int i16, int i17) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i15, int i16, int i17) {
        }
    }

    @Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0005\u001a\u0016\u0012\u0004\u0012\u00020\u0003 \u0004*\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lsinet/startup/inDriver/legacy/feature/auth/data/GetNamespacesResponse;", "response", "", "Lcq3/f;", "kotlin.jvm.PlatformType", "a", "(Lsinet/startup/inDriver/legacy/feature/auth/data/GetNamespacesResponse;)Ljava/util/List;"}, k = 3, mv = {1, 8, 0})
    static final class c extends u implements qo.l<GetNamespacesResponse, List<? extends Namespace>> {
        c() {
            super(1);
        }

        @Override
        public final List<Namespace> invoke(@NotNull GetNamespacesResponse getNamespacesResponse) {
            int v15;
            List k15;
            List list;
            int v16;
            int v17;
            List<NamespaceResponse> b15 = getNamespacesResponse.b();
            b bVar = b.this;
            v15 = p029do.v.v(b15, 10);
            ArrayList arrayList = new ArrayList(v15);
            for (NamespaceResponse namespaceResponse : b15) {
                String name = namespaceResponse.getName();
                List<LabelResponse> b16 = namespaceResponse.b();
                if (b16 != null) {
                    v17 = p029do.v.v(b16, 10);
                    ArrayList arrayList2 = new ArrayList(v17);
                    Iterator<T> it = b16.iterator();
                    while (it.hasNext()) {
                        arrayList2.add(((LabelResponse) it.next()).getName());
                    }
                    list = arrayList2;
                } else {
                    k15 = p029do.u.k();
                    list = k15;
                }
                v16 = p029do.v.v(list, 10);
                ArrayList arrayList3 = new ArrayList(v16);
                Iterator it4 = list.iterator();
                while (it4.hasNext()) {
                    arrayList3.add(bVar.nonWordRegex.replace((String) it4.next(), ""));
                }
                arrayList.add(new Namespace(name, bVar.nonWordRegex.replace(name, ""), list, arrayList3, namespaceResponse.getNameHash()));
            }
            return arrayList;
        }
    }

    @Metadata(d1 = {"\u0000\u000e\n\u0002\u0010\u0003\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0005\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"", "it", "Lco/g0;", "invoke", "(Ljava/lang/Throwable;)V", "<anonymous>"}, k = 3, mv = {1, 8, 0})
    static final class d extends u implements qo.l<Throwable, co.g0> {
        d() {
            super(1);
        }

        @Override
        public co.g0 invoke(Throwable th4) {
            invoke2(th4);
            return co.g0.f25238a;
        }

        public final void invoke2(@NotNull Throwable th4) {
            b.this.lb().f114770b.d();
            Toast.makeText(b.this.requireContext(), String.valueOf(th4), 0).show();
            b.this.dismissAllowingStateLoss();
        }
    }

    @Metadata(d1 = {"\u0000\u0014\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0007\u001a\u00020\u00042\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"", "Lcq3/f;", "kotlin.jvm.PlatformType", "it", "Lco/g0;", "invoke", "(Ljava/util/List;)V", "<anonymous>"}, k = 3, mv = {1, 8, 0})
    static final class e extends u implements qo.l<List<? extends Namespace>, co.g0> {
        e() {
            super(1);
        }

        @Override
        public co.g0 invoke(List<? extends Namespace> list) {
            invoke2((List<Namespace>) list);
            return co.g0.f25238a;
        }

        public final void invoke2(List<Namespace> list) {
            b.this.lb().f114770b.d();
            b.this.lb().f114772d.setVisibility(0);
            b.this.lb().f114771c.setVisibility(0);
            zh1.f.c(b.this.lb().f114771c);
            b.this.kb().i(list);
            b.this.namespaces.clear();
            b.this.namespaces.addAll(list);
        }
    }

    public final g kb() {
        return (g) this.adapter.getValue();
    }

    public final pp3.i lb() {
        return (pp3.i) this.binding.a(this, f43157t0[0]);
    }

    public final void nb(String str) {
        j jVar = this.onDialogResultListener;
        if (jVar != null) {
            jVar.V1("https://router-" + str + ".indrive.dev/");
        }
        dismiss();
    }

    public static final List ob(qo.l lVar, Object obj) {
        return (List) lVar.invoke(obj);
    }

    @Override
    public int getLayoutRes() {
        return this.layoutRes;
    }

    @NotNull
    public final DevPlatformNamespaceApi mb() {
        DevPlatformNamespaceApi devPlatformNamespaceApi = this.devPlatformNamespaceApi;
        if (devPlatformNamespaceApi != null) {
            return devPlatformNamespaceApi;
        }
        return null;
    }

    @Override
    public void onCreate(Bundle bundle) {
        j jVar;
        super.onCreate(bundle);
        s parentFragment = getParentFragment();
        if (parentFragment instanceof j) {
            jVar = (j) parentFragment;
        } else {
            jVar = null;
        }
        this.onDialogResultListener = jVar;
        qp3.c.a(this).d(this);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        ym.b bVar = this.disposable;
        if (bVar != null) {
            bVar.dispose();
        }
        this.onDialogResultListener = null;
    }

    @Override
    public void onDismiss(@NotNull DialogInterface dialogInterface) {
        super.onDismiss(dialogInterface);
        n91.a.m(this);
    }

    @Override
    public void onViewCreated(@NotNull View view, Bundle bundle) {
        lb().f114772d.setAdapter(kb());
        x<GetNamespacesResponse> namespaces = mb().getNamespaces();
        final c cVar = new c();
        this.disposable = un.i.h(namespaces.L(new an.j() {
            @Override
            public final Object apply(Object obj) {
                List ob5;
                ob5 = b.ob(qo.l.this, obj);
                return ob5;
            }
        }).O(xm.a.c()), new d(), new e());
        lb().f114771c.addTextChangedListener(new C1254b());
    }
}