WeChat.apk(点击下载) / i1.java


package kr1;

import a70.j;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.j0;
import androidx.recyclerview.widget.RecyclerView;
import at1.g2;
import b10.x;
import br1.y5;
import bw3.e53;
import bw3.gw1;
import bw3.o81;
import bw3.r91;
import bw3.s91;
import bw3.sz0;
import c70.h;
import c80.b;
import com.tencent.mm.R;
import com.tencent.mm.plugin.finder.live.controller.base.LiveRoomController;
import com.tencent.mm.plugin.finder.live.model.FinderLiveService;
import com.tencent.mm.plugin.finder.live.view.s4;
import com.tencent.mm.plugin.finder.utils.a5;
import com.tencent.mm.plugin.finder.utils.u5;
import com.tencent.mm.plugin.finder.utils.y5;
import com.tencent.mm.plugin.finder.view.LoadingSwitchBtn;
import com.tencent.mm.plugin.finder.view.m0;
import com.tencent.mm.plugin.finder.view.y6;
import com.tencent.mm.plugin.mmsight.segment.FFmpegMetadataRetriever;
import com.tencent.mm.plugin.webview.ui.tools.widget.x;
import com.tencent.mm.protocal.protobuf.FinderObject;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.ui.MMActivity;
import com.tencent.rtmp.TXLiveConstants;
import com.tencent.tinker.loader.hotplug.EnvConsts;
import com.tencent.xweb.updater.IXWebBroadcastListener;
import cs1.f0;
import cs1.w;
import cu3.e0;
import do1.f;
import ft1.o;
import ft1.u;
import gk4.n0;
import gk4.p0;
import gk4.u0;
import gk4.z1;
import i14.l0;
import i14.o0;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
import kh4.p;
import lh4.m;
import lt1.e5;
import lt1.f8;
import lt1.u1;
import p64.n;
import qs1.i;
import so1.j7;
import so1.k1;
import ss1.a0;
import ss1.c0;
import ss1.d0;
import ss1.k;
import ss1.l;
import ss1.q;
import ss1.t;
import ss1.v;
import ss1.y;
import ss1.z;
import t32.e6;
import wg4.b0;

public final class i1 {
    public final int A = 35;
    public final int B = 36;
    public final int C = 37;
    public final int D = 38;
    public final int E = 40;
    public final int F = 46;
    public final int G = 48;
    public final int H = 50;
    public final int I = 51;
    public final int J = 52;
    public final int K = 53;
    public final int L = 54;
    public final int M = 55;
    public final int N = 56;
    public final int O = 57;
    public final int P = 58;
    public final int Q = 60;
    public final int R = 1000;
    public final int S = 1001;
    public final int T = 1002;
    public final int U = 1003;
    public final int V = 1004;
    public final int W = 1008;
    public final int X = 1009;
    public final int Y = 1010;
    public final int Z = 1011;

    /* renamed from: a  reason: collision with root package name */
    public final String f248324a = "Finder.MoreActionHelper";

    /* renamed from: a0  reason: collision with root package name */
    public final int f248325a0 = 1012;

    /* renamed from: b  reason: collision with root package name */
    public er1.b f248326b;

    /* renamed from: b0  reason: collision with root package name */
    public final int f248327b0 = 1013;

    /* renamed from: c  reason: collision with root package name */
    public int f248328c;

    /* renamed from: c0  reason: collision with root package name */
    public final int f248329c0 = 1014;

    /* renamed from: d  reason: collision with root package name */
    public MMActivity f248330d;

    /* renamed from: d0  reason: collision with root package name */
    public final int f248331d0 = 1015;

    /* renamed from: e  reason: collision with root package name */
    public c80.b f248332e;

    /* renamed from: e0  reason: collision with root package name */
    public final int f248333e0 = 1016;

    /* renamed from: f  reason: collision with root package name */
    public boolean f248334f;

    /* renamed from: f0  reason: collision with root package name */
    public final int f248335f0 = 1017;

    /* renamed from: g  reason: collision with root package name */
    public b f248336g;

    /* renamed from: g0  reason: collision with root package name */
    public final int f248337g0 = TXLiveConstants.PUSH_EVT_ROOM_OUT;

    /* renamed from: h  reason: collision with root package name */
    public d f248338h;

    /* renamed from: i  reason: collision with root package name */
    public lr1.d f248339i;

    /* renamed from: j  reason: collision with root package name */
    public final int f248340j = 1;

    /* renamed from: k  reason: collision with root package name */
    public final int f248341k = 2;

    /* renamed from: l  reason: collision with root package name */
    public final int f248342l = 4;

    /* renamed from: m  reason: collision with root package name */
    public final int f248343m = 5;

    /* renamed from: n  reason: collision with root package name */
    public final int f248344n = 6;

    /* renamed from: o  reason: collision with root package name */
    public final int f248345o = 8;

    /* renamed from: p  reason: collision with root package name */
    public final int f248346p = 11;

    /* renamed from: q  reason: collision with root package name */
    public final int f248347q = 13;

    /* renamed from: r  reason: collision with root package name */
    public final int f248348r = 14;

    /* renamed from: s  reason: collision with root package name */
    public final int f248349s = 15;

    /* renamed from: t  reason: collision with root package name */
    public final int f248350t = 20;

    /* renamed from: u  reason: collision with root package name */
    public final int f248351u = 21;

    /* renamed from: v  reason: collision with root package name */
    public final int f248352v = 23;

    /* renamed from: w  reason: collision with root package name */
    public final int f248353w = 24;

    /* renamed from: x  reason: collision with root package name */
    public final int f248354x = 30;

    /* renamed from: y  reason: collision with root package name */
    public final int f248355y = 32;

    /* renamed from: z  reason: collision with root package name */
    public final int f248356z = 34;

    public interface a {
        void a(kh4.a<b0> aVar);

        <T extends LiveRoomController> T b(Class<T> cls);

        z1 c(bh4.f fVar, p0 p0Var, p<? super n0, ? super bh4.d<? super b0>, ? extends Object> pVar);

        void d();

        View e();

        <T> u0<T> f(bh4.f fVar, p0 p0Var, p<? super n0, ? super bh4.d<? super T>, ? extends Object> pVar);

        n0 g();

        <T extends sr1.d> T getPlugin(Class<T> cls);

        com.tencent.mm.plugin.finder.live.view.b h();
    }

    public final class b {

        /* renamed from: a  reason: collision with root package name */
        public final a f248357a;

        /* renamed from: b  reason: collision with root package name */
        public boolean f248358b = true;

        /* renamed from: c  reason: collision with root package name */
        public boolean f248359c = true;

        /* renamed from: d  reason: collision with root package name */
        public boolean f248360d = true;

        /* renamed from: e  reason: collision with root package name */
        public n f248361e;

        /* renamed from: f  reason: collision with root package name */
        public w0 f248362f;

        /* renamed from: g  reason: collision with root package name */
        public w0 f248363g;

        /* renamed from: h  reason: collision with root package name */
        public w0 f248364h;

        /* renamed from: i  reason: collision with root package name */
        public m0 f248365i;

        /* renamed from: j  reason: collision with root package name */
        public m0 f248366j;

        /* renamed from: k  reason: collision with root package name */
        public as1.g f248367k;

        /* renamed from: l  reason: collision with root package name */
        public u1 f248368l;

        /* renamed from: m  reason: collision with root package name */
        public e0 f248369m;

        /* renamed from: n  reason: collision with root package name */
        public f8 f248370n;

        /* renamed from: o  reason: collision with root package name */
        public u0<? extends o81> f248371o;

        /* renamed from: p  reason: collision with root package name */
        public x f248372p;

        /* renamed from: q  reason: collision with root package name */
        public final List<lr1.e> f248373q = new ArrayList();

        /* renamed from: r  reason: collision with root package name */
        public final List<lr1.e> f248374r = new ArrayList();

        /* renamed from: s  reason: collision with root package name */
        public final List<lr1.e> f248375s = new ArrayList();

        /* renamed from: t  reason: collision with root package name */
        public i14.p0 f248376t;

        /* renamed from: u  reason: collision with root package name */
        public final i14.p0 f248377u;

        /* renamed from: v  reason: collision with root package name */
        public final o0 f248378v;

        /* renamed from: w  reason: collision with root package name */
        public final /* synthetic */ i1 f248379w;

        public static final class a implements i14.p0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ i1 f248380d;

            /* renamed from: e  reason: collision with root package name */
            public final /* synthetic */ b f248381e;

            public a(i1 i1Var, b bVar) {
                this.f248380d = i1Var;
                this.f248381e = bVar;
            }

            @Override // i14.p0
            public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
                boolean z15;
                T t15;
                T t16;
                T t17;
                j jVar;
                a aVar;
                k1 k1Var;
                String str;
                String str2;
                a aVar2;
                boolean z16;
                boolean z17;
                boolean z18;
                MMActivity mMActivity = this.f248380d.f248330d;
                Iterator<T> it = this.f248381e.f248373q.iterator();
                while (true) {
                    z15 = false;
                    if (!it.hasNext()) {
                        t15 = null;
                        break;
                    }
                    t15 = it.next();
                    if (t15.r() == menuItem.getItemId()) {
                        z18 = true;
                        continue;
                    } else {
                        z18 = false;
                        continue;
                    }
                    if (z18) {
                        break;
                    }
                }
                T t18 = t15;
                if (t18 != null) {
                    t18.t();
                }
                Iterator<T> it4 = this.f248381e.f248374r.iterator();
                while (true) {
                    if (!it4.hasNext()) {
                        t16 = null;
                        break;
                    }
                    t16 = it4.next();
                    if (t16.r() == menuItem.getItemId()) {
                        z17 = true;
                        continue;
                    } else {
                        z17 = false;
                        continue;
                    }
                    if (z17) {
                        break;
                    }
                }
                T t19 = t16;
                if (t19 != null) {
                    t19.t();
                }
                Iterator<T> it5 = this.f248381e.f248375s.iterator();
                while (true) {
                    if (!it5.hasNext()) {
                        t17 = null;
                        break;
                    }
                    t17 = it5.next();
                    if (t17.r() == menuItem.getItemId()) {
                        z16 = true;
                        continue;
                    } else {
                        z16 = false;
                        continue;
                    }
                    if (z16) {
                        break;
                    }
                }
                T t25 = t17;
                if (t25 != null) {
                    t25.t();
                }
                Integer valueOf = menuItem != null ? Integer.valueOf(menuItem.getItemId()) : null;
                int i16 = this.f248380d.f248344n;
                if (valueOf != null && valueOf.intValue() == i16) {
                    i1 i1Var = this.f248380d;
                    m.g(i1Var, "<this>");
                    Log.i(i1Var.f248324a, "expose isLandscape:" + i1Var.f248334f);
                    if (i1Var.f248334f) {
                        b bVar = i1Var.f248336g;
                        if (!(bVar == null || (aVar2 = bVar.f248357a) == null)) {
                            aVar2.a(new m2(i1Var));
                        }
                    } else {
                        n2.a(i1Var);
                    }
                    if (i1Var.f248328c == 0) {
                        w wVar = (w) yz3.j.c(w.class);
                        wVar.getClass();
                        w.fO0(wVar, f0.o0.f193086i, null, 0, null, null, null, null, null, 252, null);
                        wVar.D++;
                    }
                } else {
                    int i17 = this.f248380d.R;
                    String str3 = "";
                    if (valueOf != null && valueOf.intValue() == i17) {
                        i1 i1Var2 = this.f248380d;
                        m.g(i1Var2, "<this>");
                        m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
                        if (rs1.d.f297303a.S0()) {
                            str2 = u5.f119378c;
                        } else {
                            str2 = y5.f119483c.get("RV_VISITOR_" + ((u) i1Var2.c(u.class)).f217412q.f35027d);
                            if (str2 == null) {
                                str2 = str3;
                            }
                        }
                        e02.b.f204642a.a(mMActivity, str2, str3);
                    } else {
                        int i18 = this.f248380d.S;
                        if (valueOf != null && valueOf.intValue() == i18) {
                            i1 i1Var3 = this.f248380d;
                            m.g(i1Var3, "<this>");
                            if (a5.f118672a.W()) {
                                ft1.x xVar = (ft1.x) i1Var3.c(ft1.x.class);
                                ft1.x xVar2 = (ft1.x) i1Var3.c(ft1.x.class);
                                ft1.x.f217502h = !ft1.x.f217502h;
                            }
                        } else {
                            int i19 = this.f248380d.f248333e0;
                            if (valueOf != null && valueOf.intValue() == i19) {
                                i1 i1Var4 = this.f248380d;
                                q qVar = new q(mMActivity, i1Var4.f248326b, i1Var4);
                                n nVar = new n((Context) qVar.f307446a, 1, false);
                                nVar.f281245i = k.f307436d;
                                nVar.f281259q = new l(qVar);
                                nVar.q();
                            } else {
                                int i25 = this.f248380d.U;
                                if (valueOf != null && valueOf.intValue() == i25) {
                                    v vVar = new v(mMActivity, this.f248380d.f248326b);
                                    n nVar2 = new n((Context) vVar.f307455a, 1, false);
                                    nVar2.f281245i = t.f307453d;
                                    nVar2.f281259q = new ss1.u(vVar);
                                    nVar2.q();
                                } else {
                                    int i26 = this.f248380d.V;
                                    if (valueOf != null && valueOf.intValue() == i26) {
                                        i1 i1Var5 = this.f248380d;
                                        FinderObject finderObject = ((o) i1Var5.c(o.class)).f217273n;
                                        m.g(i1Var5, "<this>");
                                        if (finderObject == null || (str = finderObject.debugMessage) == null || TextUtils.isEmpty(str)) {
                                            str = "empty msg.";
                                        }
                                        e02.b.b(e02.b.f204642a, i1Var5.f248330d, str, null, 4, null);
                                    } else {
                                        int i27 = this.f248380d.T;
                                        if (valueOf != null && valueOf.intValue() == i27) {
                                            z zVar = new z(mMActivity, this.f248380d.f248326b);
                                            n nVar3 = new n((Context) zVar.f307486a, 1, false);
                                            nVar3.f281245i = new y(zVar);
                                            nVar3.q();
                                        } else {
                                            int i28 = this.f248380d.Y;
                                            if (valueOf != null && valueOf.intValue() == i28) {
                                                ss1.b0 b0Var = new ss1.b0(mMActivity, this.f248380d.f248326b);
                                                n nVar4 = new n((Context) b0Var.f307394a, 1, false);
                                                nVar4.f281245i = new a0(b0Var);
                                                nVar4.q();
                                                b.a(this.f248381e);
                                            } else {
                                                int i29 = this.f248380d.f248325a0;
                                                if (valueOf != null && valueOf.intValue() == i29) {
                                                    i1 i1Var6 = this.f248380d;
                                                    m.g(i1Var6, "<this>");
                                                    b bVar2 = i1Var6.f248336g;
                                                    if (!(bVar2 == null || (aVar = bVar2.f248357a) == null || (k1Var = (k1) aVar.b(k1.class)) == null)) {
                                                        sz0 sz02 = new sz0();
                                                        sz02.f36957d = "2";
                                                        k1Var.t5(sz02);
                                                    }
                                                    b.a(this.f248381e);
                                                } else {
                                                    int i35 = this.f248380d.f248327b0;
                                                    if (valueOf != null && valueOf.intValue() == i35) {
                                                        ss1.c cVar = new ss1.c(mMActivity, this.f248380d.f248326b);
                                                        n nVar5 = new n((Context) cVar.f307396a, 1, false);
                                                        nVar5.f281245i = new ss1.b(cVar);
                                                        nVar5.q();
                                                        b.a(this.f248381e);
                                                    } else {
                                                        int i36 = this.f248380d.f248329c0;
                                                        if (valueOf != null && valueOf.intValue() == i36) {
                                                            ss1.g gVar = new ss1.g(mMActivity, this.f248380d.f248326b);
                                                            n nVar6 = new n((Context) gVar.f307420a, 1, false);
                                                            nVar6.f281245i = new ss1.f(gVar);
                                                            nVar6.q();
                                                            b.a(this.f248381e);
                                                        } else {
                                                            int i37 = this.f248380d.f248331d0;
                                                            if (valueOf != null && valueOf.intValue() == i37) {
                                                                ss1.e eVar = new ss1.e(mMActivity, this.f248380d.f248326b);
                                                                n nVar7 = new n((Context) eVar.f307409a, 1, false);
                                                                nVar7.f281245i = new ss1.d(eVar);
                                                                nVar7.q();
                                                                b.a(this.f248381e);
                                                            } else {
                                                                int i38 = this.f248380d.f248335f0;
                                                                if (valueOf != null && valueOf.intValue() == i38) {
                                                                    ss1.f0 f0Var = new ss1.f0(mMActivity, this.f248380d.f248326b);
                                                                    n nVar8 = new n((Context) f0Var.f307419a, 1, false);
                                                                    nVar8.f281245i = new ss1.e0(f0Var);
                                                                    nVar8.q();
                                                                    b.a(this.f248381e);
                                                                } else {
                                                                    int i39 = this.f248380d.f248337g0;
                                                                    if (valueOf != null && valueOf.intValue() == i39) {
                                                                        d0 d0Var = new d0(mMActivity, this.f248380d.f248326b);
                                                                        n nVar9 = new n((Context) d0Var.f307407a, 1, false);
                                                                        nVar9.f281245i = new c0(d0Var);
                                                                        nVar9.q();
                                                                        b.a(this.f248381e);
                                                                    } else {
                                                                        int i45 = this.f248380d.A;
                                                                        if (valueOf != null && valueOf.intValue() == i45) {
                                                                            i1 i1Var7 = this.f248380d;
                                                                            m.g(i1Var7, "<this>");
                                                                            MMActivity mMActivity2 = i1Var7.f248330d;
                                                                            b bVar3 = i1Var7.f248336g;
                                                                            if (bVar3 != null) {
                                                                                yz3.d c15 = yz3.j.c(b10.x.class);
                                                                                m.f(c15, "getService(IHalfScreenService::class.java)");
                                                                                AppCompatActivity context = mMActivity2.getContext();
                                                                                m.f(context, "activity.context");
                                                                                x a15 = x.a.a((b10.x) c15, context, "https://game.weixin.qq.com/cgi-bin/h5/static/findercenter/tester.html", null, null, 12, null);
                                                                                m.g(a15, "<set-?>");
                                                                                bVar3.f248372p = a15;
                                                                            }
                                                                            b bVar4 = i1Var7.f248336g;
                                                                            if (bVar4 != null) {
                                                                                bVar4.g().show();
                                                                            }
                                                                            b bVar5 = i1Var7.f248336g;
                                                                            if (bVar5 != null) {
                                                                                bVar5.g().c(new s0(i1Var7));
                                                                            }
                                                                            b bVar6 = i1Var7.f248336g;
                                                                            if (bVar6 != null) {
                                                                                bVar6.g().setOnDismissListener(new t0(i1Var7));
                                                                            }
                                                                        } else {
                                                                            int i46 = this.f248380d.W;
                                                                            if (valueOf != null && valueOf.intValue() == i46) {
                                                                                i1 i1Var8 = this.f248380d;
                                                                                m.g(i1Var8, "<this>");
                                                                                m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
                                                                                rs1.d dVar = rs1.d.f297303a;
                                                                                if (dVar.T0()) {
                                                                                    if (b70.b.X0 == null) {
                                                                                        b70.b.X0 = new b70.b();
                                                                                    }
                                                                                    b70.b bVar7 = b70.b.X0;
                                                                                    m.d(bVar7);
                                                                                    str3 = String.valueOf(bVar7.hashCode());
                                                                                } else {
                                                                                    o70.e j05 = FinderLiveService.f112934d.j0();
                                                                                    if (!(j05 == null || (jVar = j05.f275232p0) == null)) {
                                                                                        str3 = jVar.b();
                                                                                    }
                                                                                }
                                                                                e02.b bVar8 = e02.b.f204642a;
                                                                                AppCompatActivity context2 = mMActivity.getContext();
                                                                                m.f(context2, "activity.context");
                                                                                bVar8.a(context2, "onLine: " + ((ft1.x) i1Var8.c(ft1.x.class)).f217504g + "\n " + ((ft1.x) i1Var8.c(ft1.x.class)).j5(dVar.T0(), str3), str3);
                                                                            } else {
                                                                                int i47 = this.f248380d.X;
                                                                                if (valueOf != null && valueOf.intValue() == i47) {
                                                                                    i1 i1Var9 = this.f248380d;
                                                                                    m.g(i1Var9, "<this>");
                                                                                    s91 s912 = ((o) i1Var9.c(o.class)).f217329x4;
                                                                                    String str4 = s912 != null ? s912.f36219d : null;
                                                                                    if (str4 == null || str4.length() == 0) {
                                                                                        z15 = true;
                                                                                    }
                                                                                    if (z15) {
                                                                                        Log.i(i1Var9.f248324a, "clickInnerData but innerUrl is null");
                                                                                    } else {
                                                                                        Intent intent = new Intent();
                                                                                        intent.putExtra("rawUrl", str4);
                                                                                        intent.putExtra("convertActivityFromTranslucent", true);
                                                                                        sv3.b.j(i1Var9.f248330d, "webview", ".ui.tools.WebViewUI", intent, null);
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                b.a(this.f248381e);
            }
        }

        /* renamed from: kr1.i1$b$b  reason: collision with other inner class name */
        public static final class C3637b implements i14.p0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ i1 f248382d;

            /* renamed from: e  reason: collision with root package name */
            public final /* synthetic */ b f248383e;

            public C3637b(i1 i1Var, b bVar) {
                this.f248382d = i1Var;
                this.f248383e = bVar;
            }

            @Override // i14.p0
            public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
                e0 e0Var;
                i1 i1Var = this.f248382d;
                m.g(i1Var, "<this>");
                FinderObject finderObject = ((o) i1Var.c(o.class)).f217273n;
                if (finderObject != null) {
                    b bVar = i1Var.f248336g;
                    if (!(bVar == null || (e0Var = bVar.f248369m) == null)) {
                        m.e(menuItem, "null cannot be cast to non-null type com.tencent.mm.ui.base.MMMenuItem");
                        e0Var.dK((i14.e0) menuItem, new v2(i1Var, finderObject, menuItem));
                    }
                    yz3.d c15 = yz3.j.c(cs1.o.class);
                    m.f(c15, "getService(HellLiveReport::class.java)");
                    e6.a.g((e6) c15, f0.m.f192986p, null, null, null, null, null, 62, null);
                }
                b.a(this.f248383e);
            }
        }

        public static final class c implements o0 {

            /* renamed from: a  reason: collision with root package name */
            public final /* synthetic */ i1 f248384a;

            public c(i1 i1Var) {
                this.f248384a = i1Var;
            }

            @Override // i14.o0
            public final void a(MenuItem menuItem, int i15) {
                n nVar;
                b bVar;
                e0 e0Var;
                i1 i1Var = this.f248384a;
                m.g(i1Var, "<this>");
                b bVar2 = i1Var.f248336g;
                if (bVar2 != null) {
                    nVar = bVar2.f248361e;
                } else {
                    nVar = null;
                }
                FinderObject finderObject = ((o) i1Var.c(o.class)).f217273n;
                if (nVar != null && finderObject != null && (bVar = i1Var.f248336g) != null && (e0Var = bVar.f248369m) != null) {
                    m.e(menuItem, "null cannot be cast to non-null type com.tencent.mm.ui.base.MMMenuItem");
                    e0Var.eA0(nVar, (i14.e0) menuItem);
                }
            }
        }

        public b(i1 i1Var, a aVar) {
            m.g(aVar, "livingDep");
            this.f248379w = i1Var;
            this.f248357a = aVar;
            boolean z15 = true;
            rs1.d dVar = rs1.d.f297303a;
            this.f248359c = dVar.n();
            dVar.getClass();
            zz1.e.f356376d.getClass();
            z15 = ((Number) ((tl1.c) ((wg4.n) zz1.e.f356346a7).getValue()).t()).intValue() != 1 ? false : z15;
            Log.i("FinderLiveUtil", "canPlayDesktopSwitchShow " + z15);
            this.f248360d = z15;
            String str = i1Var.f248324a;
            Log.i(str, "enableVisitorRoleEntrance:" + this.f248359c);
            this.f248376t = new a(i1Var, this);
            this.f248377u = new C3637b(i1Var, this);
            this.f248378v = new c(i1Var);
        }

        public static final void a(b bVar) {
            n nVar = bVar.f248361e;
            if (nVar != null) {
                nVar.p();
            }
            w0 w0Var = bVar.f248362f;
            if (w0Var != null) {
                w0Var.b();
            }
            w0 w0Var2 = bVar.f248363g;
            if (w0Var2 != null) {
                w0Var2.b();
            }
            w0 w0Var3 = bVar.f248364h;
            if (w0Var3 != null) {
                w0Var3.b();
            }
        }

        public static final void b(b bVar, i14.d0 d0Var, Activity activity) {
            Long l15;
            c70.g gVar;
            e53 e532;
            String str = bVar.f248379w.f248324a;
            StringBuilder sb5 = new StringBuilder();
            sb5.append("prepareAnchorMenuItems: business(LiveCommonSlice::class.java).liveFinderObject.id:");
            FinderObject finderObject = ((o) bVar.f248379w.c(o.class)).f217273n;
            String str2 = null;
            if (finderObject != null) {
                l15 = Long.valueOf(finderObject.f173515id);
            } else {
                l15 = null;
            }
            sb5.append(l15);
            sb5.append(" hlsUrl:");
            h hVar = ((u) bVar.f248379w.c(u.class)).f217413r;
            if (!(hVar == null || (gVar = hVar.f47339b) == null || (e532 = gVar.f47332o) == null)) {
                str2 = e532.f20122z;
            }
            sb5.append(str2);
            Log.i(str, sb5.toString());
            Iterator it = ((ArrayList) bVar.f248374r).iterator();
            while (it.hasNext()) {
                ((lr1.e) it.next()).q(d0Var);
            }
            u0.a(bVar.f248379w, d0Var);
        }

        public static final void c(b bVar, i14.d0 d0Var) {
            Long l15;
            c70.g gVar;
            e53 e532;
            String str = bVar.f248379w.f248324a;
            StringBuilder sb5 = new StringBuilder();
            sb5.append("prepareAnchorZeroMenuItems: business(LiveCommonSlice::class.java).liveFinderObject.id:");
            FinderObject finderObject = ((o) bVar.f248379w.c(o.class)).f217273n;
            String str2 = null;
            if (finderObject != null) {
                l15 = Long.valueOf(finderObject.f173515id);
            } else {
                l15 = null;
            }
            sb5.append(l15);
            sb5.append(" hlsUrl:");
            h hVar = ((u) bVar.f248379w.c(u.class)).f217413r;
            if (!(hVar == null || (gVar = hVar.f47339b) == null || (e532 = gVar.f47332o) == null)) {
                str2 = e532.f20122z;
            }
            sb5.append(str2);
            Log.i(str, sb5.toString());
            Iterator it = ((ArrayList) bVar.f248373q).iterator();
            while (it.hasNext()) {
                ((lr1.e) it.next()).q(d0Var);
            }
        }

        public final void d(lr1.e eVar) {
            ((ArrayList) this.f248374r).add(eVar);
            lr1.d dVar = this.f248379w.f248339i;
            if (dVar != null) {
                dVar.a(eVar);
            }
        }

        public final void e(lr1.e eVar) {
            ((ArrayList) this.f248375s).add(eVar);
            lr1.d dVar = this.f248379w.f248339i;
            if (dVar != null) {
                dVar.a(eVar);
            }
        }

        public final void f(lr1.e eVar) {
            ((ArrayList) this.f248373q).add(eVar);
            lr1.d dVar = this.f248379w.f248339i;
            if (dVar != null) {
                dVar.a(eVar);
            }
        }

        public final com.tencent.mm.plugin.webview.ui.tools.widget.x g() {
            com.tencent.mm.plugin.webview.ui.tools.widget.x xVar = this.f248372p;
            if (xVar != null) {
                return xVar;
            }
            m.p("magicLiveCardDebugHalfWebViewDialog");
            throw null;
        }
    }

    public interface c {
    }

    public final class d {

        /* renamed from: a  reason: collision with root package name */
        public int f248385a;

        /* renamed from: b  reason: collision with root package name */
        public final n0 f248386b;

        /* renamed from: c  reason: collision with root package name */
        public lt1.f0 f248387c;

        /* renamed from: d  reason: collision with root package name */
        public e5 f248388d;

        /* renamed from: e  reason: collision with root package name */
        public w0 f248389e;

        /* renamed from: f  reason: collision with root package name */
        public final List<lr1.e> f248390f = new ArrayList();

        /* renamed from: g  reason: collision with root package name */
        public final List<lr1.e> f248391g = new ArrayList();

        /* renamed from: h  reason: collision with root package name */
        public final i14.p0 f248392h = new C3638d(this);

        /* renamed from: i  reason: collision with root package name */
        public final i14.p0 f248393i = new e(this);

        /* renamed from: j  reason: collision with root package name */
        public final /* synthetic */ i1 f248394j;

        public static final class a implements l0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ d f248395d;

            public a(d dVar) {
                this.f248395d = dVar;
            }

            @Override // i14.l0
            public final void onCreateMMMenu(i14.d0 d0Var) {
                TextView textView;
                TextView textView2;
                d0Var.clear();
                Iterator it = ((ArrayList) this.f248395d.f248390f).iterator();
                while (it.hasNext()) {
                    ((lr1.e) it.next()).q(d0Var);
                }
                RecyclerView recyclerView = null;
                if (d0Var.v()) {
                    w0 w0Var = this.f248395d.f248389e;
                    if (w0Var != null) {
                        textView2 = w0Var.f248605n;
                    } else {
                        textView2 = null;
                    }
                    if (textView2 != null) {
                        textView2.setVisibility(8);
                    }
                    w0 w0Var2 = this.f248395d.f248389e;
                    if (w0Var2 != null) {
                        recyclerView = w0Var2.f248600i;
                    }
                    if (recyclerView != null) {
                        recyclerView.setVisibility(8);
                        return;
                    }
                    return;
                }
                w0 w0Var3 = this.f248395d.f248389e;
                if (w0Var3 != null) {
                    textView = w0Var3.f248605n;
                } else {
                    textView = null;
                }
                if (textView != null) {
                    textView.setVisibility(0);
                }
                w0 w0Var4 = this.f248395d.f248389e;
                if (w0Var4 != null) {
                    recyclerView = w0Var4.f248600i;
                }
                if (recyclerView != null) {
                    recyclerView.setVisibility(0);
                }
            }
        }

        public static final class b implements l0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ d f248396d;

            public b(d dVar) {
                this.f248396d = dVar;
            }

            @Override // i14.l0
            public final void onCreateMMMenu(i14.d0 d0Var) {
                d0Var.clear();
                Iterator it = ((ArrayList) this.f248396d.f248391g).iterator();
                while (it.hasNext()) {
                    ((lr1.e) it.next()).q(d0Var);
                }
            }
        }

        public static final class c implements m0.b {

            /* renamed from: a  reason: collision with root package name */
            public final /* synthetic */ i1 f248397a;

            /* renamed from: b  reason: collision with root package name */
            public final /* synthetic */ d f248398b;

            public c(i1 i1Var, d dVar) {
                this.f248397a = i1Var;
                this.f248398b = dVar;
            }

            @Override // com.tencent.mm.plugin.finder.view.m0.b
            public final void onDismiss() {
                c80.b bVar = this.f248397a.f248332e;
                if (bVar != null) {
                    b.a.a(bVar, b.EnumC0425b.FINDER_LIVE_MORE_ACTION_HIDE, null, 2, null);
                }
                this.f248398b.f248389e = null;
                lr1.d dVar = this.f248397a.f248339i;
                if (dVar != null) {
                    dVar.d();
                }
            }
        }

        /* renamed from: kr1.i1$d$d  reason: collision with other inner class name */
        public static final class C3638d implements i14.p0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ d f248399d;

            public C3638d(d dVar) {
                this.f248399d = dVar;
            }

            @Override // i14.p0
            public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
                T t15;
                boolean z15;
                Iterator<T> it = this.f248399d.f248390f.iterator();
                while (true) {
                    if (!it.hasNext()) {
                        t15 = null;
                        break;
                    }
                    t15 = it.next();
                    if (t15.r() == menuItem.getItemId()) {
                        z15 = true;
                        continue;
                    } else {
                        z15 = false;
                        continue;
                    }
                    if (z15) {
                        break;
                    }
                }
                T t16 = t15;
                if (t16 != null) {
                    t16.t();
                }
                w0 w0Var = this.f248399d.f248389e;
                if (w0Var != null) {
                    w0Var.b();
                }
            }
        }

        public static final class e implements i14.p0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ d f248400d;

            public e(d dVar) {
                this.f248400d = dVar;
            }

            @Override // i14.p0
            public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
                T t15;
                boolean z15;
                Iterator<T> it = this.f248400d.f248391g.iterator();
                while (true) {
                    if (!it.hasNext()) {
                        t15 = null;
                        break;
                    }
                    t15 = it.next();
                    if (t15.r() == menuItem.getItemId()) {
                        z15 = true;
                        continue;
                    } else {
                        z15 = false;
                        continue;
                    }
                    if (z15) {
                        break;
                    }
                }
                T t16 = t15;
                if (t16 != null) {
                    t16.t();
                }
                w0 w0Var = this.f248400d.f248389e;
                if (w0Var != null) {
                    w0Var.b();
                }
            }
        }

        public d(i1 i1Var, c cVar, int i15, n0 n0Var) {
            m.g(cVar, "postDep");
            m.g(n0Var, "mainScope");
            this.f248394j = i1Var;
            this.f248385a = i15;
            this.f248386b = n0Var;
        }

        public final void a(lr1.e eVar) {
            ((ArrayList) this.f248391g).add(eVar);
            lr1.d dVar = this.f248394j.f248339i;
            if (dVar != null) {
                dVar.a(eVar);
            }
        }

        public final void b() {
            if (this.f248389e == null) {
                i1 i1Var = this.f248394j;
                this.f248389e = new w0(i1Var.f248330d, i1Var.f248334f);
            }
            w0 w0Var = this.f248389e;
            if (w0Var != null) {
                w0Var.f248604m.setVisibility(8);
                w0Var.f248599h.setVisibility(8);
            }
            w0 w0Var2 = this.f248389e;
            if (w0Var2 != null) {
                int color = this.f248394j.f248330d.getResources().getColor(R.color.Link_100);
                TextView textView = ((m0) ((wg4.n) w0Var2.f248594c).getValue()).f121163u;
                if (textView != null) {
                    textView.setTextColor(color);
                }
            }
            w0 w0Var3 = this.f248389e;
            if (w0Var3 != null) {
                w0Var3.f248607p = new a(this);
            }
            if (w0Var3 != null) {
                w0Var3.f248608q = new b(this);
            }
            if (w0Var3 != null) {
                w0Var3.f248602k.f248611e = this.f248392h;
            }
            if (w0Var3 != null) {
                w0Var3.f248603l.f248611e = this.f248393i;
            }
            if (w0Var3 != null) {
                ((m0) ((wg4.n) w0Var3.f248594c).getValue()).f121160r = new c(this.f248394j, this);
            }
            w0 w0Var4 = this.f248389e;
            if (w0Var4 != null) {
                w0Var4.c();
            }
        }

        public final sk1.q c() {
            return ((o) this.f248394j.f248326b.a(o.class)).f217317v3;
        }
    }

    public static final class e implements a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ j7 f248401a;

        public e(j7 j7Var) {
            this.f248401a = j7Var;
        }

        @Override // kr1.i1.a
        public void a(kh4.a<b0> aVar) {
            m.g(aVar, "callback");
            this.f248401a.q5(aVar);
        }

        @Override // kr1.i1.a
        public <T extends LiveRoomController> T b(Class<T> cls) {
            m.g(cls, "ctrl");
            return (T) this.f248401a.controller(cls);
        }

        @Override // kr1.i1.a
        public z1 c(bh4.f fVar, p0 p0Var, p<? super n0, ? super bh4.d<? super b0>, ? extends Object> pVar) {
            m.g(fVar, "context");
            m.g(p0Var, IXWebBroadcastListener.STAGE_START);
            m.g(pVar, "block");
            return i.j(this.f248401a, fVar, p0Var, pVar);
        }

        @Override // kr1.i1.a
        public void d() {
            uo1.j.f319627a.f(this.f248401a.getStore());
        }

        @Override // kr1.i1.a
        public View e() {
            return this.f248401a.f303585n;
        }

        @Override // kr1.i1.a
        public <T> u0<T> f(bh4.f fVar, p0 p0Var, p<? super n0, ? super bh4.d<? super T>, ? extends Object> pVar) {
            m.g(fVar, "context");
            m.g(p0Var, IXWebBroadcastListener.STAGE_START);
            m.g(pVar, "block");
            return i.h(this.f248401a, fVar, p0Var, pVar);
        }

        @Override // kr1.i1.a
        public n0 g() {
            com.tencent.mm.plugin.finder.live.view.b bVar;
            s4 s4Var = this.f248401a.f319606e;
            if (s4Var instanceof com.tencent.mm.plugin.finder.live.view.b) {
                bVar = (com.tencent.mm.plugin.finder.live.view.b) s4Var;
            } else {
                bVar = null;
            }
            if (bVar != null) {
                return bVar.getViewScope();
            }
            return null;
        }

        @Override // kr1.i1.a
        public <T extends sr1.d> T getPlugin(Class<T> cls) {
            m.g(cls, "modelClass");
            return (T) this.f248401a.l5(cls);
        }

        @Override // kr1.i1.a
        public com.tencent.mm.plugin.finder.live.view.b h() {
            s4 s4Var = this.f248401a.f319606e;
            if (s4Var instanceof com.tencent.mm.plugin.finder.live.view.b) {
                return (com.tencent.mm.plugin.finder.live.view.b) s4Var;
            }
            return null;
        }
    }

    public static final class f implements f.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ i1 f248402a;

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ int f248403b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ p<Boolean, gw1, b0> f248404c;

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ boolean f248405d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ int f248406e;

        /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.p<? super java.lang.Boolean, ? super bw3.gw1, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public f(i1 i1Var, int i15, p<? super Boolean, ? super gw1, b0> pVar, boolean z15, int i16) {
            this.f248402a = i1Var;
            this.f248403b = i15;
            this.f248404c = pVar;
            this.f248405d = z15;
            this.f248406e = i16;
        }

        @Override // do1.f.a
        public void a(int i15, int i16, String str, int i17, gw1 gw12) {
            if (this.f248405d) {
                int i18 = this.f248406e;
                int i19 = this.f248403b;
                Pattern pattern = m60.d.f258150a;
                ((o) this.f248402a.c(o.class)).f217289q = i18 & (~i19);
            } else {
                int i25 = this.f248406e;
                int i26 = this.f248403b;
                Pattern pattern2 = m60.d.f258150a;
                ((o) this.f248402a.c(o.class)).f217289q = i25 | i26;
            }
            qs1.q qVar = qs1.q.f291299a;
            qVar.d("commonAnchorFlagClick failed, flag:" + this.f248403b, ((o) this.f248402a.c(o.class)).f217289q);
            p<Boolean, gw1, b0> pVar = this.f248404c;
            if (pVar != null) {
                pVar.invoke(Boolean.FALSE, gw12);
            }
        }

        @Override // do1.f.a
        public void b(int i15, long j15, gw1 gw12) {
            ((o) this.f248402a.c(o.class)).f217289q = i15;
            ((o) this.f248402a.c(o.class)).B7((long) i15);
            qs1.q qVar = qs1.q.f291299a;
            qVar.d("commonAnchorFlagClick succ, flag:" + this.f248403b, ((o) this.f248402a.c(o.class)).f217289q);
            p<Boolean, gw1, b0> pVar = this.f248404c;
            if (pVar != null) {
                pVar.invoke(Boolean.TRUE, gw12);
            }
        }

        @Override // do1.f.a
        public void c(int i15, long j15) {
        }

        @Override // do1.f.a
        public void d(int i15, int i16, String str, int i17) {
        }
    }

    public static final class g implements c {
        public g(g2 g2Var) {
        }
    }

    public i1(j7 j7Var, MMActivity mMActivity) {
        m.g(j7Var, "controller");
        m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        this.f248326b = j7Var.getStore().getLiveRoomData();
        this.f248330d = mMActivity;
        s4 s4Var = j7Var.f319606e;
        m.e(s4Var, "null cannot be cast to non-null type com.tencent.mm.live.plugin.ILiveStatus");
        c80.b bVar = (c80.b) s4Var;
        this.f248332e = bVar;
        this.f248328c = bVar.getLiveRole();
        this.f248334f = j7Var.o5();
        this.f248336g = new b(this, new e(j7Var));
    }

    public static /* synthetic */ SpannableString b(i1 i1Var, String str, String str2, int i15, int i16, Object obj) {
        if ((i16 & 4) != 0) {
            i15 = MMApplicationContext.getContext().getResources().getColor(R.color.BW_0_Alpha_0_3);
        }
        return i1Var.a(str, str2, i15);
    }

    public final SpannableString a(String str, String str2, int i15) {
        m.g(str, FFmpegMetadataRetriever.METADATA_KEY_TITLE);
        m.g(str2, "subTitle");
        if ((str2.length() == 0) || !ek4.d0.x(str, str2, false)) {
            String str3 = this.f248324a;
            Log.i(str3, "assembleMenuItemTitleSpan title:" + str + ",subTitle:" + str2);
            return new SpannableString(str);
        }
        SpannableString spannableString = new SpannableString(str);
        int H2 = ek4.d0.H(str, str2, 0, false, 6, null);
        try {
            spannableString.setSpan(new ForegroundColorSpan(i15), H2, str2.length() + H2, 33);
        } catch (Exception e15) {
            a5 a5Var = a5.f118672a;
            a5Var.o0(e15, this.f248324a + "-assembleMenuItemTitleSpan");
        }
        return spannableString;
    }

    public final <T extends j0> T c(Class<T> cls) {
        m.g(cls, "bu");
        return (T) this.f248326b.a(cls);
    }

    public final void d(List<String> list) {
        Collection<? extends String> collection;
        if (com.tencent.mm.plugin.finder.utils.l.f119136a.b(this.f248326b)) {
            ArrayList<String> arrayList = new ArrayList<>();
            if (list != null) {
                collection = new ArrayList<>();
                for (T t15 : list) {
                    if (ek4.y.k(t15, "@chatroom", false, 2, null)) {
                        collection.add(t15);
                    }
                }
            } else {
                collection = xg4.e0.f338660d;
            }
            arrayList.addAll(collection);
            if (!arrayList.isEmpty()) {
                b.EnumC0425b bVar = b.EnumC0425b.FINDER_LIVE_TRANSMIT_TO_CHAT_GROUP_RESPONSE;
                Bundle bundle = new Bundle();
                bundle.putInt("requestCode", 16);
                bundle.putBoolean("is_share_success", true);
                bundle.putStringArrayList("current_group_select", arrayList);
                b0 b0Var = b0.f332794a;
                h(bVar, bundle);
            }
        }
    }

    public final LoadingSwitchBtn e(View view, int i15, boolean z15) {
        m.g(view, "rootView");
        LoadingSwitchBtn loadingSwitchBtn = (LoadingSwitchBtn) view.findViewById(i15);
        loadingSwitchBtn.setCheck(z15);
        String string = this.f248330d.getResources().getString(R.string.f9y);
        m.f(string, "context.resources.getStr….R.string.finder_waiting)");
        Context context = loadingSwitchBtn.getContext();
        m.f(context, "context");
        LoadingSwitchBtn.a aVar = null;
        y6 y6Var = y6.f121769d;
        if (y6Var != null) {
            aVar = new LoadingSwitchBtn.a(y6Var);
        }
        u32.b bVar = new u32.b();
        bVar.f316045c = 500;
        new WeakReference(context);
        u32.g gVar = new u32.g();
        gVar.f316060c = string;
        gVar.f316061d = aVar;
        gVar.f316063a = new WeakReference<>(context);
        bVar.f316044b = gVar;
        loadingSwitchBtn.L = bVar;
        loadingSwitchBtn.setEnabled(false);
        return loadingSwitchBtn;
    }

    public final void f(int i15, boolean z15, boolean z16, p<? super Boolean, ? super gw1, b0> pVar) {
        int i16 = ((o) c(o.class)).f217289q;
        String str = this.f248324a;
        Log.i(str, "commonAnchorFlagClick anchorStatusFlag: " + i16 + " enable:" + z15);
        if (z15) {
            Pattern pattern = m60.d.f258150a;
            ((o) c(o.class)).f217289q = i16 | i15;
        } else {
            Pattern pattern2 = m60.d.f258150a;
            ((o) c(o.class)).f217289q = (~i15) & i16;
        }
        if (z16) {
            f fVar = new f(this, i15, pVar, z15, i16);
            FinderLiveService.f112934d.getClass();
            br1.y5 y5Var = FinderLiveService.B;
            if (y5Var != null) {
                y5.a.g(y5Var, ((u) c(u.class)).f217412q.f35027d, ((u) c(u.class)).f217408j, ((o) c(o.class)).f217289q, (long) i15, 0, fVar, 16, null);
            }
        } else if (pVar != null) {
            pVar.invoke(Boolean.TRUE, null);
        }
    }

    public final void g() {
        ((o) c(o.class)).X0 = false;
    }

    public final void h(b.EnumC0425b bVar, Bundle bundle) {
        m.g(bVar, "status");
        this.f248332e.statusChange(bVar, bundle);
    }

    public final void i(FinderObject finderObject, r91 r912) {
        m.g(finderObject, "sourceObject");
        m.g(r912, "destLiveInfo");
        r91 r913 = finderObject.liveInfo;
        boolean z15 = false;
        if (r913 != null && r913.f35027d == r912.f35027d) {
            z15 = true;
        }
        if (z15) {
            String str = this.f248324a;
            StringBuilder sb5 = new StringBuilder();
            sb5.append("source object:");
            vs1.a aVar = vs1.a.f328455a;
            sb5.append(aVar.t(finderObject.liveInfo));
            sb5.append(",dest live info's purchase info:");
            sb5.append(aVar.i(r912.I));
            Log.i(str, sb5.toString());
            finderObject.liveInfo = r912;
        }
    }

    public i1(g2 g2Var, MMActivity mMActivity, int i15, n0 n0Var, c80.b bVar, er1.b bVar2) {
        m.g(g2Var, "moreActionUIC");
        m.g(mMActivity, "context");
        m.g(n0Var, "mainScope");
        m.g(bVar, "statusMonitor");
        m.g(bVar2, "buContext");
        this.f248330d = mMActivity;
        this.f248326b = bVar2;
        this.f248332e = bVar;
        this.f248328c = bVar.getLiveRole();
        this.f248334f = false;
        this.f248338h = new d(this, new g(g2Var), i15, n0Var);
    }
}