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


package br1;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.os.Looper;
import android.os.ResultReceiver;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentActivity;
import bw3.ah1;
import bw3.bv1;
import bw3.c21;
import bw3.c51;
import bw3.cb;
import bw3.cq3;
import bw3.d53;
import bw3.db1;
import bw3.e31;
import bw3.e53;
import bw3.eh1;
import bw3.fg1;
import bw3.ft0;
import bw3.fx0;
import bw3.g53;
import bw3.g81;
import bw3.gw1;
import bw3.gx0;
import bw3.gz0;
import bw3.h51;
import bw3.h53;
import bw3.hb1;
import bw3.hc1;
import bw3.hf1;
import bw3.hq;
import bw3.hx1;
import bw3.hz0;
import bw3.i51;
import bw3.i53;
import bw3.j43;
import bw3.j52;
import bw3.j61;
import bw3.jg1;
import bw3.jn1;
import bw3.jz0;
import bw3.k35;
import bw3.k41;
import bw3.k52;
import bw3.k61;
import bw3.kk1;
import bw3.l51;
import bw3.lk0;
import bw3.ly4;
import bw3.n11;
import bw3.nw5;
import bw3.oc1;
import bw3.oj4;
import bw3.ol0;
import bw3.on0;
import bw3.oy0;
import bw3.p31;
import bw3.px0;
import bw3.py0;
import bw3.qa1;
import bw3.qw0;
import bw3.qy0;
import bw3.r91;
import bw3.rc1;
import bw3.ry0;
import bw3.s20;
import bw3.s61;
import bw3.s81;
import bw3.sf1;
import bw3.tl0;
import bw3.ts0;
import bw3.u61;
import bw3.u91;
import bw3.ug1;
import bw3.vy0;
import bw3.w51;
import bw3.wd1;
import bw3.wf1;
import bw3.wg1;
import bw3.wv0;
import bw3.ww0;
import bw3.wy0;
import bw3.x31;
import bw3.x43;
import bw3.xe1;
import bw3.xs1;
import bw3.xv0;
import bw3.y11;
import bw3.y42;
import bw3.yg1;
import bw3.yi1;
import bw3.yy0;
import bw3.zd3;
import bw3.zi1;
import bw3.zj1;
import bw3.zs0;
import com.tencent.mm.R;
import com.tencent.mm.autogen.events.FeedLiveLifeEvent;
import com.tencent.mm.autogen.events.FeedUpdateEvent;
import com.tencent.mm.message.l;
import com.tencent.mm.plugin.appbrand.jsapi.e5;
import com.tencent.mm.plugin.finder.live.model.FinderLiveService;
import com.tencent.mm.plugin.finder.live.viewmodel.data.business.LiveAnchorSlice;
import com.tencent.mm.plugin.finder.utils.a5;
import com.tencent.mm.plugin.finder.utils.y5;
import com.tencent.mm.protocal.protobuf.FinderContact;
import com.tencent.mm.protocal.protobuf.FinderJumpInfo;
import com.tencent.mm.protocal.protobuf.FinderMedia;
import com.tencent.mm.protocal.protobuf.FinderObject;
import com.tencent.mm.protocal.protobuf.FinderObjectDesc;
import com.tencent.mm.sdk.crash.CrashReportFactory;
import com.tencent.mm.sdk.platformtools.BuildInfo;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.sdk.platformtools.MMHandler;
import com.tencent.mm.sdk.platformtools.StringKtKt;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.storage.t1;
import com.tencent.mm.storage.w1;
import com.tencent.mm.ui.MMActivity;
import com.tencent.thumbplayer.tplayer.plugins.report.TPReportKeys;
import com.tencent.tinker.loader.hotplug.EnvConsts;
import com.tencent.trtc.TRTCCloudDef;
import cr1.a;
import cr1.b;
import cr1.d;
import cr1.e;
import cr1.e1;
import cr1.f;
import cr1.f0;
import cr1.f1;
import cr1.g;
import cr1.g1;
import cr1.h;
import cr1.i;
import cr1.j0;
import cr1.k0;
import cr1.n0;
import cr1.o;
import cr1.s;
import cr1.s0;
import cr1.t0;
import cr1.u;
import cr1.w;
import cr1.x;
import cr1.x0;
import cr1.y;
import cr1.z;
import cs1.f0;
import ct1.z0;
import d32.u3;
import dj1.a;
import do1.c0;
import do1.f;
import do1.h;
import do1.x;
import ds.r;
import ek0.v2;
import ek0.w2;
import ft1.c1;
import ft1.d1;
import ft1.h1;
import ft1.j1;
import ft1.k1;
import ft1.r1;
import ft1.s1;
import ft1.y1;
import i14.y0;
import ie1.h;
import j70.a;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import jb4.j;
import jk4.n1;
import kotlin.ResultKt;
import nf0.e6;
import sr1.i9;
import sr1.il;
import t32.b5;
import t32.e2;
import t32.k6;
import wk1.b1;
import wk1.n2;
import yf0.b;
import zr.n;

public final class t implements y5 {

    /* renamed from: f  reason: collision with root package name */
    public static final b f14909f = new b(null);

    /* renamed from: a  reason: collision with root package name */
    public final WeakReference<Context> f14910a;

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

    /* renamed from: c  reason: collision with root package name */
    public final bv1 f14912c;

    /* renamed from: d  reason: collision with root package name */
    public final String f14913d;

    /* renamed from: e  reason: collision with root package name */
    public ArrayList<wg4.l<View, Integer>> f14914e = new ArrayList<>();

    public static final class a {

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

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

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

        /* renamed from: d  reason: collision with root package name */
        public final String f14918d;

        /* renamed from: e  reason: collision with root package name */
        public final dt1.b f14919e;

        public a(boolean z15, int i15, int i16, String str, dt1.b bVar) {
            lh4.m.g(str, "errMsg");
            this.f14915a = z15;
            this.f14916b = i15;
            this.f14917c = i16;
            this.f14918d = str;
            this.f14919e = bVar;
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof a)) {
                return false;
            }
            a aVar = (a) obj;
            return this.f14915a == aVar.f14915a && this.f14916b == aVar.f14916b && this.f14917c == aVar.f14917c && lh4.m.b(this.f14918d, aVar.f14918d) && lh4.m.b(this.f14919e, aVar.f14919e);
        }

        public int hashCode() {
            boolean z15 = this.f14915a;
            if (z15) {
                z15 = true;
            }
            int i15 = z15 ? 1 : 0;
            int i16 = z15 ? 1 : 0;
            int i17 = z15 ? 1 : 0;
            int hashCode = ((((((i15 * 31) + this.f14916b) * 31) + this.f14917c) * 31) + this.f14918d.hashCode()) * 31;
            dt1.b bVar = this.f14919e;
            return hashCode + (bVar == null ? 0 : bVar.hashCode());
        }

        public String toString() {
            return "CloseLiveResult(success=" + this.f14915a + ", errCode=" + this.f14916b + ", errType=" + this.f14917c + ", errMsg=" + this.f14918d + ", anchorFinishInfo=" + this.f14919e + ')';
        }
    }

    public static final class a0<_Ret, _Var> implements g74.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ kh4.l<Boolean, wg4.b0> f14920a;

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

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ t f14922c;

        /* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: kh4.l<? super java.lang.Boolean, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public a0(kh4.l<? super Boolean, wg4.b0> lVar, String str, t tVar) {
            this.f14920a = lVar;
            this.f14921b = str;
            this.f14922c = tVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            b.c cVar = (b.c) obj;
            if (cVar.f345499a == 0 && cVar.f345500b == 0) {
                sz1.n0 n0Var = sz1.n0.f308424a;
                String str = this.f14921b;
                er1.b bVar = this.f14922c.f14911b;
                T t15 = cVar.f345502d;
                lh4.m.f(t15, "it.resp");
                if (n0Var.n(str, bVar, (s81) t15)) {
                    kh4.l<Boolean, wg4.b0> lVar = this.f14920a;
                    if (lVar == null) {
                        return null;
                    }
                    lVar.invoke(Boolean.TRUE);
                    return wg4.b0.f332794a;
                }
                kh4.l<Boolean, wg4.b0> lVar2 = this.f14920a;
                if (lVar2 == null) {
                    return null;
                }
                lVar2.invoke(Boolean.FALSE);
                return wg4.b0.f332794a;
            }
            kh4.l<Boolean, wg4.b0> lVar3 = this.f14920a;
            if (lVar3 == null) {
                return null;
            }
            lVar3.invoke(Boolean.FALSE);
            return wg4.b0.f332794a;
        }
    }

    public static final class b {
        public b(lh4.h hVar) {
        }

        public final h53 a(String str, g53 g532, r91 r912, TRTCCloudDef.TRTCParams tRTCParams, c70.g gVar, int i15, er1.b bVar) {
            h53 h532;
            boolean z15;
            lh4.m.g(str, "name");
            lh4.m.g(g532, "liveSdkInfo");
            lh4.m.g(r912, "liveInfo");
            lh4.m.g(tRTCParams, "trtcParams");
            lh4.m.g(gVar, "liveRoomInfo");
            lh4.m.g(bVar, "liveData");
            tRTCParams.roomId = g532.f22335f;
            tRTCParams.sdkAppId = g532.f22333d;
            tRTCParams.privateMapKey = dk0.j0.b(g532.f22338i);
            tRTCParams.userId = g532.f22334e;
            tRTCParams.userSig = dk0.j0.b(g532.f22337h);
            tRTCParams.role = (i15 == 1 || i15 != 2) ? 20 : 21;
            gVar.f47318a = str;
            gVar.f47319b = r912.f35027d;
            HashMap<Integer, c70.k> hashMap = gVar.f47328k;
            String str2 = g532.f22344r;
            lh4.m.f(str2, "liveSdkInfo.live_cdn_url");
            hashMap.put(0, new c70.k(str2, 0, ""));
            gVar.f47321d = g532.f22340n;
            xv3.a parseFrom = new h53().parseFrom(g532.f22339j.f341419a);
            lh4.m.e(parseFrom, "null cannot be cast to non-null type com.tencent.mm.protocal.protobuf.LiveSdkParams");
            h53 h533 = (h53) parseFrom;
            rs1.d dVar = rs1.d.f297303a;
            if (dVar.k1(bVar) || dVar.V0(bVar)) {
                eh1 eh12 = r912.f35048p;
                gVar.f47320c = eh12 != null ? eh12.f20533d : 0;
            } else {
                gVar.f47320c = h533.f23371f.f20102f;
            }
            int intValue = ((Number) ((tl1.c) ((wg4.n) tn1.a.f313163c1).getValue()).t()).intValue();
            if (!((!BuildInfo.DEBUG && !BuildInfo.IS_FLAVOR_PURPLE && !BuildInfo.IS_FLAVOR_RED && !CrashReportFactory.hasDebuger()) || intValue == -1 || i15 == 1)) {
                gVar.f47320c = intValue;
            }
            e53 e532 = h533.f23371f;
            gVar.f47322e = e532.f20104h;
            gVar.f47323f = e532.f20105i;
            gVar.f47331n = e532.f20116v;
            i53 i532 = h533.f23369d;
            d53 d532 = h533.f23370e;
            if (i532 != null) {
                boolean z16 = (((ie1.h) yz3.j.c(ie1.h.class)).Xj0(h.c.Jh, 0) == 1) && i532.f24485r > 0;
                a5.f118672a.getClass();
                boolean booleanValue = ((Boolean) ((wg4.n) a5.f118675d).getValue()).booleanValue();
                boolean z17 = z16 && booleanValue;
                boolean z18 = ((ie1.h) yz3.j.c(ie1.h.class)).Xj0(h.c.f232419ui, 0) == 1;
                Log.i(StringKtKt.TAG, "processLiveSdkParams enableHEVCEncFromSvr:" + z16 + ", sdkenable:" + i532.f24485r + ", enableHEVCEncFromLocal:" + booleanValue + ", isHEVCEncEnable:" + z17 + ", isForceHEVCMixing:" + z18);
                j70.a aVar = a.b.f237819a;
                aVar.e().f250985t = z17;
                aVar.e().f250986u = z18;
                if (i532.f24474d > 0) {
                    aVar.e().f250972d = i532.f24474d;
                }
                if (i532.f24476f > 0) {
                    aVar.e().f250973e = i532.f24476f;
                }
                if (i532.f24477g > 0) {
                    aVar.e().f250974f = i532.f24477g;
                }
                if (i532.f24484q > 0) {
                    aVar.e().f250975g = i532.f24484q;
                }
                if (i532.f24486s > 0) {
                    aVar.e().f250976h = i532.f24486s;
                }
                if (i532.f24487t > 0) {
                    aVar.e().f250977i = i532.f24487t;
                }
                if (i532.f24488u > 0) {
                    aVar.e().f250978j = i532.f24488u;
                }
                if (i532.f24489v > 0) {
                    aVar.e().f250979n = i532.f24489v;
                }
                if (i532.f24479i > 0) {
                    aVar.e().f250981p = i532.f24479i;
                }
                int i16 = i532.f24480j;
                if (i16 >= 0 && i16 < 2) {
                    aVar.e().f250980o = i532.f24480j;
                }
                FinderLiveService.f112934d.Q(i532);
            }
            if (d532 != null) {
                if (d532.f19001d > 0) {
                    a.b.f237819a.a().f250946f = d532.f19001d;
                }
                Log.i(StringKtKt.TAG, "processLiveSdkParams audioQuality:" + d532.f19001d);
            }
            if (e532 != null) {
                Log.i(StringKtKt.TAG, "userDefineRecordId:" + e532.f20100d + ',' + e532.f20101e);
                String str3 = e532.f20101e;
                String str4 = e532.f20100d;
                int i17 = e532.f20111q;
                String str5 = e532.Q;
                boolean X80 = ((o00.q) yz3.j.c(o00.q.class)).X80(5);
                n4 n4Var = n4.f14721a;
                if (n4.f14724d == null) {
                    n4.f14724d = new hf1();
                }
                hf1 hf12 = n4.f14724d;
                if (hf12 != null) {
                    hf12.f23673d = 1;
                }
                if (X80) {
                    n4.f14725e = 1;
                }
                if (!X80) {
                    i17 = e532.f20112r;
                    z15 = true;
                } else {
                    z15 = false;
                }
                gVar.f47327j = ((yr.u) yz3.j.c(yr.u.class)).fO0().Sa(gVar.f47319b);
                gVar.f47326i = e532.f20112r;
                if (i17 < 100) {
                    gVar.f47324g = c70.a.MMLiveStreamSwitchMode_Fixed;
                    gVar.f47325h = i17;
                } else if (i17 == 101) {
                    gVar.f47324g = c70.a.MMLiveStreamSwitchMode_Auto;
                } else if (i17 == 102) {
                    gVar.f47324g = c70.a.MMLiveStreamSwitchMode_ML;
                }
                LinkedList<hq> linkedList = e532.f20106j;
                if (!(linkedList == null || linkedList.isEmpty())) {
                    LinkedList<hq> linkedList2 = e532.f20106j;
                    lh4.m.f(linkedList2, "channelParams.cdn_trans_info");
                    Iterator<T> it = linkedList2.iterator();
                    while (it.hasNext()) {
                        T next = it.next();
                        HashMap<Integer, c70.k> hashMap2 = gVar.f47328k;
                        Integer valueOf = Integer.valueOf(next.f24028f);
                        String str6 = next.f24027e;
                        lh4.m.f(str6, "it.url");
                        hashMap2.put(valueOf, new c70.k(str6, next.f24032j, next.f24033n));
                        it = it;
                        h533 = h533;
                    }
                    h532 = h533;
                    if (z15) {
                        c70.k d15 = gVar.d(i17);
                        String str7 = d15 != null ? d15.f47381c : null;
                        if (str7 == null || str7.length() == 0) {
                            tn1.a aVar2 = tn1.a.f313149a;
                            if (((Number) ((tl1.c) ((wg4.n) tn1.a.f313231n3).getValue()).t()).intValue() == 0) {
                                int i18 = e532.f20111q;
                                c70.k kVar = gVar.f47328k.get(Integer.valueOf(i17));
                                c70.k kVar2 = gVar.f47328k.get(Integer.valueOf(i18));
                                if (!(kVar == null || kVar2 == null)) {
                                    Log.i("LiveRoomInfo", "before exchangeCdnUrl:" + gVar.f47328k);
                                    int i19 = kVar.f47380b;
                                    String str8 = kVar.f47381c;
                                    kVar.f47380b = kVar2.f47380b;
                                    kVar.f47381c = kVar2.f47381c;
                                    kVar2.f47380b = i19;
                                    kVar2.f47381c = str8;
                                    Log.i("LiveRoomInfo", "after exchangeCdnUrl:" + gVar.f47328k);
                                }
                            }
                        }
                    }
                } else {
                    h532 = h533;
                }
                if (!Util.isNullOrNil(str3) || !Util.isNullOrNil(str4) || !Util.isNullOrNil(str5)) {
                    a50.g gVar2 = new a50.g();
                    if (!Util.isNullOrNil(str3)) {
                        gVar2.put("userdefine_streamid_main", str3);
                    }
                    if (!Util.isNullOrNil(str4)) {
                        gVar2.put("userdefine_record_id", str4);
                    }
                    if (!Util.isNullOrNil(str5)) {
                        gVar2.put("userdefine_push_args", str5);
                    }
                    a50.g gVar3 = new a50.g();
                    gVar3.put("Str_uc_params", gVar2);
                    tRTCParams.businessInfo = gVar3.toString();
                }
                gVar.f47332o = e532;
                Log.i(StringKtKt.TAG, "processLiveSdkParams cdnQualitySvrcfg" + gVar.f47325h + " cdnSwitchMode:" + gVar.f47324g + " cdn_quality_h265backcfg:" + gVar.f47326i);
            } else {
                h532 = h533;
            }
            Log.i(StringKtKt.TAG, "processLiveCgiSDKResponse trtcParams.roomId" + tRTCParams.roomId + " trtcParams.userId:" + tRTCParams.userId + " debugAudienceMode:" + intValue + " liveRoomInfo:" + gVar);
            return h532;
        }
    }

    public static final class b0<_Ret, _Var> implements g74.a {

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

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Long, Long, wg4.b0> f14924b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ long f14925c;

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.p<? super java.lang.Long, ? super java.lang.Long, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public b0(t tVar, kh4.p<? super Long, ? super Long, wg4.b0> pVar, long j15) {
            this.f14923a = tVar;
            this.f14924b = pVar;
            this.f14925c = j15;
        }

        @Override // g74.a
        public Object call(Object obj) {
            b.c cVar = (b.c) obj;
            if (cVar.f345499a == 0 && cVar.f345500b == 0 && cVar.f345502d != null) {
                ((j1) this.f14923a.i0(j1.class)).f217124g = (float) ((k61) cVar.f345502d).f26986e;
                k61 k612 = (k61) cVar.f345502d;
                dt1.h hVar = new dt1.h(k612.f26985d, k612.f26986e, k612.f26987f);
                t tVar = this.f14923a;
                String str = tVar.f14913d;
                Log.i(str, "[WeCoin] getWeCoinBalance rsp success data = " + hVar + " curConsumeBalanceCNY: " + ((j1) tVar.i0(j1.class)).f217124g);
                ((j1) this.f14923a.i0(j1.class)).f217126i = hVar;
                if (rs1.d.f297303a.e1()) {
                    ((j1) this.f14923a.i0(j1.class)).f217124g = 4.5f;
                }
                kh4.p<Long, Long, wg4.b0> pVar = this.f14924b;
                if (pVar == null) {
                    return null;
                }
                pVar.invoke(Long.valueOf(((k61) cVar.f345502d).f26985d), Long.valueOf(this.f14925c));
                return wg4.b0.f332794a;
            }
            String str2 = this.f14923a.f14913d;
            Log.i(str2, "[WeCoin] getWeCoinBalance rsp error, errType: " + cVar.f345499a + " errCode: " + cVar.f345500b);
            kh4.p<Long, Long, wg4.b0> pVar2 = this.f14924b;
            if (pVar2 == null) {
                return null;
            }
            pVar2.invoke(-1L, Long.valueOf(this.f14925c));
            return wg4.b0.f332794a;
        }
    }

    public static final class c<_Ret, _Var> implements g74.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ s.a f14926a;

        public c(s.a aVar) {
            this.f14926a = aVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            b.c cVar = (b.c) obj;
            s.a aVar = this.f14926a;
            if (aVar == null) {
                return null;
            }
            int i15 = cVar.f345499a;
            int i16 = cVar.f345500b;
            String str = cVar.f345501c;
            T t15 = cVar.f345502d;
            lh4.m.f(t15, "it.resp");
            aVar.a(i15, i16, str, (ww0) t15);
            return wg4.b0.f332794a;
        }
    }

    public static final class c0 implements DialogInterface.OnClickListener {

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

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

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ t f14929f;

        /* renamed from: g  reason: collision with root package name */
        public final /* synthetic */ Context f14930g;

        public c0(int i15, int i16, t tVar, Context context) {
            this.f14927d = i15;
            this.f14928e = i16;
            this.f14929f = tVar;
            this.f14930g = context;
        }

        public final void onClick(DialogInterface dialogInterface, int i15) {
            dialogInterface.dismiss();
            String str = "qqmusic://qq.com/media/playSonglist?p=%7b%22song%22%3a%5b%7b%22type%22%3a%220%22%2c%22songid%22%3a%22" + this.f14927d + "%22%2c%22songmid%22%3a%22" + this.f14928e + "%22%7d%5d%2c%22action%22%3a%22play%22%7d&source=https%3a%2f%2fi.y.qq.com%2fv8%2fplaysong.html%3fADTAG%3dhz_nb_wxzhibo1";
            Uri parse = Uri.parse(str);
            if (parse == null) {
                Log.w(this.f14929f.f14913d, "goQQMusic parse qq music action url fail, url %s", str);
            }
            Intent intent = new Intent("android.intent.action.VIEW", parse);
            intent.addFlags(268435456);
            Context context = this.f14930g;
            k30.a aVar = new k30.a();
            aVar.c(intent);
            j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/finder/live/model/FinderLiveAssistant$goQQMusic$1", "onClick", "(Landroid/content/DialogInterface;I)V", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
            context.startActivity((Intent) aVar.a(0));
            j30.a.e(context, "com/tencent/mm/plugin/finder/live/model/FinderLiveAssistant$goQQMusic$1", "onClick", "(Landroid/content/DialogInterface;I)V", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
            Log.i(this.f14929f.f14913d, "goQQMusic qqMusicActionUrl: %s", str);
            ((cs1.w) yz3.j.c(cs1.w.class)).hP0(3);
        }
    }

    public static final class d<_Ret, _Var> implements g74.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ u.a f14931a;

        public d(u.a aVar) {
            this.f14931a = aVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            b.c cVar = (b.c) obj;
            u.a aVar = this.f14931a;
            if (aVar == null) {
                return null;
            }
            int i15 = cVar.f345499a;
            int i16 = cVar.f345500b;
            String str = cVar.f345501c;
            T t15 = cVar.f345502d;
            lh4.m.f(t15, "it.resp");
            aVar.a(i15, i16, str, (n11) t15);
            return wg4.b0.f332794a;
        }
    }

    public static final class d0 implements DialogInterface.OnClickListener {

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

        public d0(t tVar) {
            this.f14932d = tVar;
        }

        public final void onClick(DialogInterface dialogInterface, int i15) {
            dialogInterface.dismiss();
            Log.i(this.f14932d.f14913d, "goQQMusic cancel");
        }
    }

    public static final class e extends lh4.o implements kh4.a<wg4.b0> {

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

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

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

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public e(t tVar, View view, int i15) {
            super(0);
            this.f14933d = tVar;
            this.f14934e = view;
            this.f14935f = i15;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // kh4.a
        public wg4.b0 invoke() {
            this.f14933d.f14914e.add(new wg4.l<>(this.f14934e, Integer.valueOf(this.f14935f)));
            String str = this.f14933d.f14913d;
            Log.i(str, "cache view:" + this.f14934e.getClass().getSimpleName() + " visibility:" + this.f14935f);
            return wg4.b0.f332794a;
        }
    }

    public static final class e0 implements zl3.j<Boolean> {

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

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ kh4.l<Boolean, wg4.b0> f14937b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Integer, Integer, wg4.b0> f14938c;

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.l<? super java.lang.Boolean, wg4.b0> */
        /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.p<? super java.lang.Integer, ? super java.lang.Integer, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public e0(t tVar, kh4.l<? super Boolean, wg4.b0> lVar, kh4.p<? super Integer, ? super Integer, wg4.b0> pVar) {
            this.f14936a = tVar;
            this.f14937b = lVar;
            this.f14938c = pVar;
        }

        @Override // zl3.j
        public void a(int i15, int i16, String str) {
            Log.i(this.f14936a.f14913d, "[WeCoin] initEngine onFailed");
            kh4.p<Integer, Integer, wg4.b0> pVar = this.f14938c;
            if (pVar != null) {
                pVar.invoke(Integer.valueOf(i15), Integer.valueOf(i16));
            }
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // zl3.j
        public void onSuccess(Boolean bool) {
            Boolean bool2 = bool;
            Log.i(this.f14936a.f14913d, "[WeCoin] initEngine onSuccess");
            kh4.l<Boolean, wg4.b0> lVar = this.f14937b;
            if (lVar != null) {
                lVar.invoke(bool2);
            }
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$cancelGiftText$$inlined$fail$default$1", f = "FinderLiveAssistant.kt", l = {}, m = "invokeSuspend")
    public static final class f extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ rp1.e f14939d;

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

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public f(rp1.e eVar, bh4.d dVar, t tVar) {
            super(2, dVar);
            this.f14939d = eVar;
            this.f14940e = tVar;
        }

        @Override // dh4.a
        public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
            return new f(this.f14939d, dVar, this.f14940e);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
            return ((f) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ResultKt.throwOnFailure(obj);
            o60.d dVar = ((rp1.b) this.f14939d).f296966b.f296964a;
            if (dVar != null) {
                String str = this.f14940e.f14913d;
                Log.i(str, "[cancelGiftText] errCode = " + dVar.f274955f + ", errType = " + dVar.f274954e);
            }
            return wg4.b0.f332794a;
        }
    }

    public static final class f0 implements n0.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ kh4.s<Boolean, Integer, Integer, String, u91, wg4.b0> f14941a;

        public static final class a extends lh4.o implements kh4.a<wg4.b0> {

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

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

            /* renamed from: f  reason: collision with root package name */
            public final /* synthetic */ kh4.s<Boolean, Integer, Integer, String, u91, wg4.b0> f14944f;

            /* renamed from: g  reason: collision with root package name */
            public final /* synthetic */ String f14945g;

            /* renamed from: h  reason: collision with root package name */
            public final /* synthetic */ u91 f14946h;

            /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.s<? super java.lang.Boolean, ? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.String, ? super bw3.u91, wg4.b0> */
            /* JADX WARN: Multi-variable type inference failed */
            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public a(int i15, int i16, kh4.s<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super u91, wg4.b0> sVar, String str, u91 u912) {
                super(0);
                this.f14942d = i15;
                this.f14943e = i16;
                this.f14944f = sVar;
                this.f14945g = str;
                this.f14946h = u912;
            }

            /* Return type fixed from 'java.lang.Object' to match base method */
            @Override // kh4.a
            public wg4.b0 invoke() {
                int i15 = this.f14942d;
                if (i15 == 0 && this.f14943e == 0) {
                    kh4.s<Boolean, Integer, Integer, String, u91, wg4.b0> sVar = this.f14944f;
                    if (sVar != null) {
                        sVar.A(Boolean.TRUE, Integer.valueOf(i15), Integer.valueOf(this.f14943e), this.f14945g, this.f14946h);
                    }
                } else {
                    kh4.s<Boolean, Integer, Integer, String, u91, wg4.b0> sVar2 = this.f14944f;
                    if (sVar2 != null) {
                        sVar2.A(Boolean.FALSE, Integer.valueOf(i15), Integer.valueOf(this.f14943e), this.f14945g, null);
                    }
                }
                return wg4.b0.f332794a;
            }
        }

        /* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: kh4.s<? super java.lang.Boolean, ? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.String, ? super bw3.u91, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public f0(kh4.s<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super u91, wg4.b0> sVar) {
            this.f14941a = sVar;
        }

        @Override // cr1.n0.a
        public void a(int i15, int i16, String str, u91 u912) {
            lh4.m.g(u912, "resp");
            m60.d.O(new a(i15, i16, this.f14941a, str, u912));
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$cancelGiftText$$inlined$success$default$1", f = "FinderLiveAssistant.kt", l = {}, m = "invokeSuspend")
    public static final class g extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ rp1.e f14947d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ lh4.f0 f14948e;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public g(rp1.e eVar, bh4.d dVar, lh4.f0 f0Var) {
            super(2, dVar);
            this.f14947d = eVar;
            this.f14948e = f0Var;
        }

        @Override // dh4.a
        public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
            return new g(this.f14947d, dVar, this.f14948e);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
            return ((g) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ResultKt.throwOnFailure(obj);
            this.f14948e.f253292d = ((rp1.f) this.f14947d).f296978b;
            return wg4.b0.f332794a;
        }
    }

    public static final class g0 implements s0.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ kh4.q<Boolean, String, rc1, wg4.b0> f14949a;

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

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ t f14951c;

        public static final class a extends lh4.o implements kh4.a<wg4.b0> {

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

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

            /* renamed from: f  reason: collision with root package name */
            public final /* synthetic */ kh4.q<Boolean, String, rc1, wg4.b0> f14954f;

            /* renamed from: g  reason: collision with root package name */
            public final /* synthetic */ rc1 f14955g;

            /* renamed from: h  reason: collision with root package name */
            public final /* synthetic */ String f14956h;

            /* renamed from: i  reason: collision with root package name */
            public final /* synthetic */ tl0 f14957i;

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

            /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.q<? super java.lang.Boolean, ? super java.lang.String, ? super bw3.rc1, wg4.b0> */
            /* JADX WARN: Multi-variable type inference failed */
            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public a(int i15, int i16, kh4.q<? super Boolean, ? super String, ? super rc1, wg4.b0> qVar, rc1 rc12, String str, tl0 tl02, t tVar) {
                super(0);
                this.f14952d = i15;
                this.f14953e = i16;
                this.f14954f = qVar;
                this.f14955g = rc12;
                this.f14956h = str;
                this.f14957i = tl02;
                this.f14958j = tVar;
            }

            /* Return type fixed from 'java.lang.Object' to match base method */
            @Override // kh4.a
            public wg4.b0 invoke() {
                byte[] bArr;
                String str = "";
                if (this.f14952d == 0 && this.f14953e == 0) {
                    kh4.q<Boolean, String, rc1, wg4.b0> qVar = this.f14954f;
                    if (qVar != null) {
                        qVar.invoke(Boolean.TRUE, str, this.f14955g);
                    }
                } else {
                    kh4.q<Boolean, String, rc1, wg4.b0> qVar2 = this.f14954f;
                    if (qVar2 != null) {
                        Boolean bool = Boolean.FALSE;
                        String str2 = this.f14956h;
                        if (str2 != null) {
                            str = str2;
                        }
                        qVar2.invoke(bool, str, this.f14955g);
                    }
                }
                if (this.f14957i.f37688d == 106) {
                    oc1 oc12 = new oc1();
                    tl0 tl02 = this.f14957i;
                    t tVar = this.f14958j;
                    xv3.b bVar = tl02.f37689e;
                    if (bVar != null) {
                        bArr = bVar.f();
                    } else {
                        bArr = null;
                    }
                    oc12.parseFrom(bArr);
                    ((wy1.m0) tVar.i0(wy1.m0.class)).f335654h.remove(Long.valueOf(oc12.f31847d));
                }
                return wg4.b0.f332794a;
            }
        }

        /* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: kh4.q<? super java.lang.Boolean, ? super java.lang.String, ? super bw3.rc1, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public g0(kh4.q<? super Boolean, ? super String, ? super rc1, wg4.b0> qVar, tl0 tl02, t tVar) {
            this.f14949a = qVar;
            this.f14950b = tl02;
            this.f14951c = tVar;
        }

        @Override // cr1.s0.a
        public void a(int i15, int i16, String str, rc1 rc12) {
            lh4.m.g(rc12, "resp");
            m60.d.O(new a(i15, i16, this.f14949a, rc12, str, this.f14950b, this.f14951c));
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant", f = "FinderLiveAssistant.kt", l = {2835, 2848, 2855}, m = "cancelGiftText")
    public static final class h extends dh4.d {

        /* renamed from: d  reason: collision with root package name */
        public Object f14959d;

        /* renamed from: e  reason: collision with root package name */
        public Object f14960e;

        /* renamed from: f  reason: collision with root package name */
        public Object f14961f;

        /* renamed from: g  reason: collision with root package name */
        public /* synthetic */ Object f14962g;

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ t f14963h;

        /* renamed from: i  reason: collision with root package name */
        public int f14964i;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public h(t tVar, bh4.d<? super h> dVar) {
            super(dVar);
            this.f14963h = tVar;
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            this.f14962g = obj;
            this.f14964i |= Integer.MIN_VALUE;
            return this.f14963h.j0(null, null, null, this);
        }
    }

    public static final class h0 extends lh4.o implements kh4.p<Boolean, sf1, wg4.b0> {

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

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Boolean, sf1, wg4.b0> f14966e;

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.p<? super java.lang.Boolean, ? super bw3.sf1, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public h0(t tVar, kh4.p<? super Boolean, ? super sf1, wg4.b0> pVar) {
            super(2);
            this.f14965d = tVar;
            this.f14966e = pVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public wg4.b0 invoke(Boolean bool, sf1 sf12) {
            boolean booleanValue = bool.booleanValue();
            sf1 sf13 = sf12;
            if (booleanValue) {
                y0.f(this.f14965d.n0(), gy3.a.q(this.f14965d.n0(), R.string.edk));
            }
            kh4.p<Boolean, sf1, wg4.b0> pVar = this.f14966e;
            if (pVar != null) {
                pVar.invoke(Boolean.valueOf(booleanValue), sf13);
            }
            return wg4.b0.f332794a;
        }
    }

    public static final class i<_Ret, _Var> implements g74.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ z.a f14967a;

        public i(z.a aVar) {
            this.f14967a = aVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            b.c cVar = (b.c) obj;
            z.a aVar = this.f14967a;
            if (aVar == null) {
                return null;
            }
            int i15 = cVar.f345499a;
            int i16 = cVar.f345500b;
            String str = cVar.f345501c;
            T t15 = cVar.f345502d;
            lh4.m.f(t15, "it.resp");
            aVar.a(i15, i16, str, (p31) t15);
            return wg4.b0.f332794a;
        }
    }

    public static final class i0 implements b1.a {

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

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Boolean, sf1, wg4.b0> f14969b;

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

        public static final class a extends lh4.o implements kh4.a<wg4.b0> {

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

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

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

            /* renamed from: g  reason: collision with root package name */
            public final /* synthetic */ kh4.p<Boolean, sf1, wg4.b0> f14974g;

            /* renamed from: h  reason: collision with root package name */
            public final /* synthetic */ sf1 f14975h;

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

            /* JADX DEBUG: Multi-variable search result rejected for r4v0, resolved type: kh4.p<? super java.lang.Boolean, ? super bw3.sf1, wg4.b0> */
            /* JADX WARN: Multi-variable type inference failed */
            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public a(MMActivity mMActivity, int i15, int i16, kh4.p<? super Boolean, ? super sf1, wg4.b0> pVar, sf1 sf12, boolean z15) {
                super(0);
                this.f14971d = mMActivity;
                this.f14972e = i15;
                this.f14973f = i16;
                this.f14974g = pVar;
                this.f14975h = sf12;
                this.f14976i = z15;
            }

            /* Return type fixed from 'java.lang.Object' to match base method */
            /* JADX WARNING: Removed duplicated region for block: B:23:0x0041  */
            /* JADX WARNING: Removed duplicated region for block: B:28:0x0055  */
            @Override // kh4.a
            public wg4.b0 invoke() {
                boolean z15;
                String str;
                oj4 oj42;
                String str2;
                boolean z16;
                rs1.d.f297303a.d2(this.f14971d, false);
                if (this.f14972e == 0 && this.f14973f == 0) {
                    kh4.p<Boolean, sf1, wg4.b0> pVar = this.f14974g;
                    if (pVar != null) {
                        pVar.invoke(Boolean.TRUE, this.f14975h);
                    }
                } else {
                    if (this.f14976i) {
                        cb baseResponse = this.f14975h.getBaseResponse();
                        if (!(baseResponse == null || (oj42 = baseResponse.f18129e) == null || (str2 = oj42.f32041d) == null)) {
                            if (str2.length() > 0) {
                                z16 = true;
                            } else {
                                z16 = false;
                            }
                            if (z16) {
                                z15 = true;
                                if (!z15) {
                                    MMActivity mMActivity = this.f14971d;
                                    oj4 oj43 = this.f14975h.getBaseResponse().f18129e;
                                    if (oj43 != null) {
                                        str = oj43.f32041d;
                                    } else {
                                        str = null;
                                    }
                                    y0.e(mMActivity, str);
                                } else {
                                    MMActivity mMActivity2 = this.f14971d;
                                    y0.e(mMActivity2, mMActivity2.getString(R.string.edj, Integer.valueOf(this.f14972e), Integer.valueOf(this.f14973f)));
                                }
                            }
                        }
                        z15 = false;
                        if (!z15) {
                        }
                    }
                    kh4.p<Boolean, sf1, wg4.b0> pVar2 = this.f14974g;
                    if (pVar2 != null) {
                        pVar2.invoke(Boolean.FALSE, this.f14975h);
                    }
                }
                return wg4.b0.f332794a;
            }
        }

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.p<? super java.lang.Boolean, ? super bw3.sf1, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public i0(MMActivity mMActivity, kh4.p<? super Boolean, ? super sf1, wg4.b0> pVar, boolean z15) {
            this.f14968a = mMActivity;
            this.f14969b = pVar;
            this.f14970c = z15;
        }

        @Override // wk1.b1.a
        public void a(int i15, int i16, String str, sf1 sf12) {
            lh4.m.g(sf12, "resp");
            m60.d.O(new a(this.f14968a, i15, i16, this.f14969b, sf12, this.f14970c));
        }
    }

    public static final class j implements f.a {

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

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ kh4.s<Boolean, Integer, Integer, String, ol0, wg4.b0> f14978b;

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.s<? super java.lang.Boolean, ? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.String, ? super bw3.ol0, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public j(t tVar, kh4.s<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super ol0, wg4.b0> sVar) {
            this.f14977a = tVar;
            this.f14978b = sVar;
        }

        @Override // cr1.f.a
        public void a(int i15, int i16, String str, ol0 ol02) {
            String str2;
            String str3;
            lh4.m.g(ol02, "resp");
            if (i15 == 0 && i16 == 0) {
                kh4.s<Boolean, Integer, Integer, String, ol0, wg4.b0> sVar = this.f14978b;
                if (sVar != null) {
                    Boolean bool = Boolean.TRUE;
                    Integer valueOf = Integer.valueOf(i16);
                    Integer valueOf2 = Integer.valueOf(i15);
                    if (str == null) {
                        str3 = "";
                    } else {
                        str3 = str;
                    }
                    sVar.A(bool, valueOf, valueOf2, str3, ol02);
                    return;
                }
                return;
            }
            Log.i(this.f14977a.f14913d, "close live room failed");
            kh4.s<Boolean, Integer, Integer, String, ol0, wg4.b0> sVar2 = this.f14978b;
            if (sVar2 != null) {
                Boolean bool2 = Boolean.FALSE;
                Integer valueOf3 = Integer.valueOf(i16);
                Integer valueOf4 = Integer.valueOf(i15);
                if (str == null) {
                    str2 = "";
                } else {
                    str2 = str;
                }
                sVar2.A(bool2, valueOf3, valueOf4, str2, ol02);
            }
        }
    }

    public static final class j0 extends lh4.o implements kh4.a<wg4.b0> {

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

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public j0(t tVar) {
            super(0);
            this.f14979d = tVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // kh4.a
        public wg4.b0 invoke() {
            t tVar = this.f14979d;
            Iterator<wg4.l<View, Integer>> it = tVar.f14914e.iterator();
            while (it.hasNext()) {
                wg4.l<View, Integer> next = it.next();
                A a15 = next.f332807d;
                int intValue = next.f332808e.intValue();
                if (a15 != null) {
                    k30.a aVar = new k30.a();
                    ThreadLocal<k30.a> threadLocal = k30.c.f244265a;
                    aVar.c(Integer.valueOf(intValue));
                    j30.a.d(a15, aVar.b(), "com/tencent/mm/plugin/finder/live/model/FinderLiveAssistant$resumeViewVisibility$1", "invoke", "()V", "android/view/View_EXEC_", "setVisibility", "(I)V");
                    a15.setVisibility(((Integer) aVar.a(0)).intValue());
                    j30.a.e(a15, "com/tencent/mm/plugin/finder/live/model/FinderLiveAssistant$resumeViewVisibility$1", "invoke", "()V", "android/view/View_EXEC_", "setVisibility", "(I)V");
                }
                String str = tVar.f14913d;
                Log.i(str, "resume view:" + a15.getClass().getSimpleName() + " visibility:" + intValue);
            }
            this.f14979d.f14914e.clear();
            return wg4.b0.f332794a;
        }
    }

    public static final class k implements j.b {
        @Override // jb4.j.b
        public void a(int i15, int i16, String str, ts0 ts02, int i17, String str2) {
            lh4.m.g(ts02, "resp");
        }
    }

    public static final class k0<_Ret, _Var> implements g74.a {

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

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

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ kh4.l<Boolean, wg4.b0> f14982c;

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

        /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.l<? super java.lang.Boolean, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public k0(t tVar, Context context, kh4.l<? super Boolean, wg4.b0> lVar, String str) {
            this.f14980a = tVar;
            this.f14981b = context;
            this.f14982c = lVar;
            this.f14983d = str;
        }

        @Override // g74.a
        public Object call(Object obj) {
            T t15;
            T t16;
            String str;
            x31 x312;
            String str2;
            b.c cVar = (b.c) obj;
            if (cVar.f345499a == 0 && cVar.f345500b == 0) {
                List<z5> list = ((c1) this.f14980a.i0(c1.class)).f216947f;
                lh4.m.f(list, "business(LiveMsgSlice::class.java).msgList");
                String str3 = this.f14983d;
                Iterator<T> it = list.iterator();
                while (true) {
                    t15 = null;
                    if (!it.hasNext()) {
                        t16 = null;
                        break;
                    }
                    t16 = it.next();
                    if (lh4.m.b(t16.d(), str3)) {
                        break;
                    }
                }
                T t17 = t16;
                if (t17 == null || (str = t17.f()) == null) {
                    ArrayList<x31> arrayList = ((h1) this.f14980a.i0(h1.class)).f217086f;
                    String str4 = this.f14983d;
                    Iterator<x31> it4 = arrayList.iterator();
                    while (true) {
                        if (!it4.hasNext()) {
                            x312 = null;
                            break;
                        }
                        x312 = it4.next();
                        FinderContact finderContact = x312.f41749d;
                        if (finderContact != null) {
                            str2 = finderContact.username;
                        } else {
                            str2 = null;
                        }
                        if (lh4.m.b(str2, str4)) {
                            break;
                        }
                    }
                    x31 x313 = x312;
                    if (x313 != null) {
                        str = x313.f41755j;
                    } else {
                        str = null;
                    }
                }
                if (str == null) {
                    List<dt1.l> list2 = ((ft1.e0) this.f14980a.i0(ft1.e0.class)).f217036t;
                    lh4.m.f(list2, "business(LiveLinkMicSlic…).audienceLinkMicUserList");
                    String str5 = this.f14983d;
                    synchronized (list2) {
                        Iterator<T> it5 = list2.iterator();
                        while (true) {
                            if (!it5.hasNext()) {
                                break;
                            }
                            T next = it5.next();
                            if (lh4.m.b(next.f202417c, str5)) {
                                t15 = next;
                                break;
                            }
                        }
                    }
                    T t18 = t15;
                    if (t18 != null) {
                        str = t18.f202418d;
                    }
                }
                c4.f14432a.a(this.f14980a.f14911b, 2, str);
                Context context = this.f14981b;
                y0.f(context, context.getResources().getString(R.string.eac));
                this.f14982c.invoke(Boolean.FALSE);
            }
            return wg4.b0.f332794a;
        }
    }

    public static final class l implements i.a {

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

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ kh4.u<Boolean, Boolean, String, Integer, Integer, String, on0, wg4.b0> f14985b;

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.u<? super java.lang.Boolean, ? super java.lang.Boolean, ? super java.lang.String, ? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.String, ? super bw3.on0, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public l(t tVar, kh4.u<? super Boolean, ? super Boolean, ? super String, ? super Integer, ? super Integer, ? super String, ? super on0, wg4.b0> uVar) {
            this.f14984a = tVar;
            this.f14985b = uVar;
        }

        @Override // cr1.i.a
        public void a(int i15, int i16, String str, on0 on02) {
            String str2;
            String str3;
            String str4;
            lh4.m.g(on02, "resp");
            if (i15 == 0 && i16 == 0) {
                t tVar = this.f14984a;
                tVar.getClass();
                FinderObject finderObject = on02.f32123d;
                String str5 = null;
                r91 r912 = finderObject != null ? finderObject.liveInfo : null;
                ft1.u uVar = (ft1.u) tVar.i0(ft1.u.class);
                if (r912 == null) {
                    r912 = new r91();
                }
                uVar.s5(r912);
                ((ft1.o) tVar.i0(ft1.o.class)).b7(on02.f32123d);
                ft1.u uVar2 = (ft1.u) tVar.i0(ft1.u.class);
                FinderObject finderObject2 = on02.f32123d;
                uVar2.f217408j = finderObject2 != null ? finderObject2.f173515id : 0;
                ft1.u uVar3 = (ft1.u) tVar.i0(ft1.u.class);
                FinderObject finderObject3 = on02.f32123d;
                if (finderObject3 != null) {
                    str5 = finderObject3.objectNonceId;
                }
                if (str5 == null) {
                    str5 = "";
                }
                uVar3.f217415t = str5;
                kh4.u<Boolean, Boolean, String, Integer, Integer, String, on0, wg4.b0> uVar4 = this.f14985b;
                if (uVar4 != null) {
                    Boolean bool = Boolean.TRUE;
                    Boolean bool2 = Boolean.FALSE;
                    Integer valueOf = Integer.valueOf(i15);
                    Integer valueOf2 = Integer.valueOf(i16);
                    if (str == null) {
                        str4 = "";
                    } else {
                        str4 = str;
                    }
                    uVar4.invoke(bool, bool2, "", valueOf, valueOf2, str4, on02);
                    return;
                }
                return;
            }
            Log.i(this.f14984a.f14913d, "launch live room failed");
            if (i16 == -200008) {
                kh4.u<Boolean, Boolean, String, Integer, Integer, String, on0, wg4.b0> uVar5 = this.f14985b;
                if (uVar5 != null) {
                    Boolean bool3 = Boolean.FALSE;
                    Boolean bool4 = Boolean.TRUE;
                    String str6 = on02.f32124e;
                    if (str6 == null) {
                        str6 = "";
                    }
                    Integer valueOf3 = Integer.valueOf(i15);
                    Integer valueOf4 = Integer.valueOf(i16);
                    if (str == null) {
                        str3 = "";
                    } else {
                        str3 = str;
                    }
                    uVar5.invoke(bool3, bool4, str6, valueOf3, valueOf4, str3, on02);
                    return;
                }
                return;
            }
            kh4.u<Boolean, Boolean, String, Integer, Integer, String, on0, wg4.b0> uVar6 = this.f14985b;
            if (uVar6 != null) {
                Boolean bool5 = Boolean.FALSE;
                Integer valueOf5 = Integer.valueOf(i15);
                Integer valueOf6 = Integer.valueOf(i16);
                if (str == null) {
                    str2 = "";
                } else {
                    str2 = str;
                }
                uVar6.invoke(bool5, bool5, "", valueOf5, valueOf6, str2, on02);
            }
        }
    }

    public static final class l0<_Ret, _Var> implements g74.a {

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

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

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ kh4.l<Boolean, wg4.b0> f14988c;

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

        /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.l<? super java.lang.Boolean, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public l0(t tVar, Context context, kh4.l<? super Boolean, wg4.b0> lVar, String str) {
            this.f14986a = tVar;
            this.f14987b = context;
            this.f14988c = lVar;
            this.f14989d = str;
        }

        @Override // g74.a
        public Object call(Object obj) {
            T t15;
            String str;
            x31 x312;
            String str2;
            b.c cVar = (b.c) obj;
            byte[] bArr = null;
            if (cVar.f345499a == 0 && cVar.f345500b == 0) {
                List<z5> list = ((c1) this.f14986a.i0(c1.class)).f216947f;
                lh4.m.f(list, "business(LiveMsgSlice::class.java).msgList");
                String str3 = this.f14989d;
                Iterator<T> it = list.iterator();
                while (true) {
                    if (!it.hasNext()) {
                        t15 = null;
                        break;
                    }
                    t15 = it.next();
                    if (lh4.m.b(t15.d(), str3)) {
                        break;
                    }
                }
                T t16 = t15;
                if (t16 == null || (str = t16.f()) == null) {
                    ArrayList<x31> arrayList = ((h1) this.f14986a.i0(h1.class)).f217086f;
                    String str4 = this.f14989d;
                    Iterator<x31> it4 = arrayList.iterator();
                    while (true) {
                        if (!it4.hasNext()) {
                            x312 = null;
                            break;
                        }
                        x312 = it4.next();
                        FinderContact finderContact = x312.f41749d;
                        if (finderContact != null) {
                            str2 = finderContact.username;
                        } else {
                            str2 = null;
                        }
                        if (lh4.m.b(str2, str4)) {
                            break;
                        }
                    }
                    x31 x313 = x312;
                    if (x313 != null) {
                        str = x313.f41755j;
                    } else {
                        str = null;
                    }
                }
                if (str == null) {
                    List<dt1.l> list2 = ((ft1.e0) this.f14986a.i0(ft1.e0.class)).f217036t;
                    lh4.m.f(list2, "business(LiveLinkMicSlic…).audienceLinkMicUserList");
                    String str5 = this.f14989d;
                    synchronized (list2) {
                        Iterator<T> it5 = list2.iterator();
                        while (true) {
                            if (!it5.hasNext()) {
                                break;
                            }
                            dt1.l next = it5.next();
                            if (lh4.m.b(next.f202417c, str5)) {
                                bArr = next;
                                break;
                            }
                        }
                    }
                    dt1.l lVar = (dt1.l) bArr;
                    if (lVar != null) {
                        str = lVar.f202418d;
                    }
                }
                c4.f14432a.a(this.f14986a.f14911b, 1, str);
                Context context = this.f14987b;
                y0.f(context, context.getResources().getString(R.string.eaa));
                this.f14988c.invoke(Boolean.TRUE);
            } else if (cVar.f345500b == -200197) {
                Context context2 = this.f14987b;
                Resources resources = context2.getResources();
                Object[] objArr = new Object[1];
                gx0 gx02 = new gx0();
                xv3.b bVar = ((hc1) cVar.f345502d).f23583d;
                if (bVar != null) {
                    bArr = bVar.f();
                }
                gx02.parseFrom(bArr);
                wg4.b0 b0Var = wg4.b0.f332794a;
                objArr[0] = Integer.valueOf(gx02.f23149d);
                y0.e(context2, resources.getString(R.string.eab, objArr));
            }
            return wg4.b0.f332794a;
        }
    }

    public static final class m implements h.a {

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

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

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

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Boolean, Boolean, wg4.b0> f14993d;

        /* JADX DEBUG: Multi-variable search result rejected for r4v0, resolved type: kh4.p<? super java.lang.Boolean, ? super java.lang.Boolean, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public m(t tVar, String str, int i15, kh4.p<? super Boolean, ? super Boolean, wg4.b0> pVar) {
            this.f14990a = tVar;
            this.f14991b = str;
            this.f14992c = i15;
            this.f14993d = pVar;
        }

        @Override // do1.h.a
        public void a(boolean z15) {
            String str = this.f14990a.f14913d;
            Log.i(str, "doDisableComment success, enable:" + z15 + " username:" + this.f14991b);
            int i15 = this.f14992c;
            if (i15 == 2) {
                ((ft1.o) this.f14990a.i0(ft1.o.class)).f217237f1.put(this.f14991b, Boolean.valueOf(!z15));
            } else if (i15 == 3) {
                ((ft1.o) this.f14990a.i0(ft1.o.class)).f217242g1.put(this.f14991b, Boolean.valueOf(!z15));
            }
            kh4.p<Boolean, Boolean, wg4.b0> pVar = this.f14993d;
            if (pVar != null) {
                pVar.invoke(Boolean.TRUE, Boolean.valueOf(z15));
            }
        }

        @Override // do1.h.a
        public void b(int i15, int i16, String str, boolean z15) {
            String str2 = this.f14990a.f14913d;
            Log.i(str2, "doDisableComment fail, enable:" + z15 + " username:" + this.f14991b + " errType:" + i15 + " errCode:" + i16);
            kh4.p<Boolean, Boolean, wg4.b0> pVar = this.f14993d;
            if (pVar != null) {
                pVar.invoke(Boolean.FALSE, Boolean.valueOf(z15));
            }
        }
    }

    public static final class m0 implements f.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ f.a f14994a;

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

        public m0(f.a aVar, Context context) {
            this.f14994a = aVar;
            this.f14995b = context;
        }

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

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

        @Override // do1.f.a
        public void c(int i15, long j15) {
            f.a aVar = this.f14994a;
            if (aVar != null) {
                aVar.c(i15, j15);
            }
        }

        @Override // do1.f.a
        public void d(int i15, int i16, String str, int i17) {
            if (i16 == -200139) {
                Context context = this.f14995b;
                i14.j.E(context, context.getString(R.string.cz9), "", this.f14995b.getString(R.string.f367504vi), false, null);
            } else {
                Context context2 = this.f14995b;
                y0.e(context2, context2.getString(R.string.f368267dh2));
            }
            f.a aVar = this.f14994a;
            if (aVar != null) {
                aVar.d(i15, i16, str, i17);
            }
        }
    }

    public static final class n implements Runnable {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ gk4.n0 f14996d;

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

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ t f14998f;

        /* renamed from: g  reason: collision with root package name */
        public final /* synthetic */ kh4.s<Boolean, Integer, Integer, String, dt1.b, wg4.b0> f14999g;

        @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$doFinishLive$1$1", f = "FinderLiveAssistant.kt", l = {607, 608, e5.CTRL_INDEX}, m = "invokeSuspend")
        public static final class a extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

            /* renamed from: d  reason: collision with root package name */
            public Object f15000d;

            /* renamed from: e  reason: collision with root package name */
            public int f15001e;

            /* renamed from: f  reason: collision with root package name */
            public /* synthetic */ Object f15002f;

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

            /* renamed from: h  reason: collision with root package name */
            public final /* synthetic */ t f15004h;

            /* renamed from: i  reason: collision with root package name */
            public final /* synthetic */ kh4.s<Boolean, Integer, Integer, String, dt1.b, wg4.b0> f15005i;

            /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.s<? super java.lang.Boolean, ? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.String, ? super dt1.b, wg4.b0> */
            /* JADX WARN: Multi-variable type inference failed */
            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public a(boolean z15, t tVar, kh4.s<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super dt1.b, wg4.b0> sVar, bh4.d<? super a> dVar) {
                super(2, dVar);
                this.f15003g = z15;
                this.f15004h = tVar;
                this.f15005i = sVar;
            }

            @Override // dh4.a
            public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
                a aVar = new a(this.f15003g, this.f15004h, this.f15005i, dVar);
                aVar.f15002f = obj;
                return aVar;
            }

            /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
            @Override // kh4.p
            public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
                return ((a) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
            }

            /* JADX WARNING: Removed duplicated region for block: B:24:0x0108  */
            @Override // dh4.a
            public final Object invokeSuspend(Object obj) {
                Object obj2;
                Object obj3;
                gk4.n0 n0Var;
                a aVar;
                Object obj4;
                ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
                int i15 = this.f15001e;
                if (i15 == 0) {
                    ResultKt.throwOnFailure(obj);
                    n0Var = (gk4.n0) this.f15002f;
                    if (this.f15003g) {
                        t tVar = this.f15004h;
                        Context n05 = tVar.n0();
                        this.f15002f = n0Var;
                        this.f15001e = 1;
                        gk4.m mVar = new gk4.m(ch4.b.b(this), 1);
                        mVar.j();
                        l0 l0Var = new l0(tVar, mVar);
                        String str = tVar.f14913d;
                        Log.i(str, "doManualCloseLive liveId:" + ((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35027d + " objectId:" + ((ft1.u) tVar.i0(ft1.u.class)).f217408j + " nonceId:" + ((ft1.u) tVar.i0(ft1.u.class)).f217415t);
                        n94.f h15 = new f1(((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) tVar.i0(ft1.u.class)).f217408j, ((ft1.u) tVar.i0(ft1.u.class)).f217415t, new z(tVar, l0Var)).h();
                        if (n05 instanceof MMActivity) {
                            h15.n((i74.b) n05);
                        }
                        new FeedLiveLifeEvent().publish();
                        obj4 = mVar.i();
                        if (obj4 == aVar2) {
                            return aVar2;
                        }
                    } else {
                        t tVar2 = this.f15004h;
                        this.f15001e = 3;
                        obj2 = t.h0(tVar2, 8, this);
                        if (obj2 == aVar2) {
                            return aVar2;
                        }
                        m60.d.O(new u(this.f15005i, (a) obj2));
                        return wg4.b0.f332794a;
                    }
                } else if (i15 == 1) {
                    n0Var = (gk4.n0) this.f15002f;
                    ResultKt.throwOnFailure(obj);
                    obj4 = obj;
                } else if (i15 == 2) {
                    aVar = (a) this.f15000d;
                    n0Var = (gk4.n0) this.f15002f;
                    ResultKt.throwOnFailure(obj);
                    obj3 = obj;
                    a aVar3 = (a) obj3;
                    if (gk4.o0.h(n0Var)) {
                        if (!aVar.f14915a || !aVar3.f14915a) {
                            m60.d.O(new u(this.f15005i, aVar));
                        } else {
                            m60.d.O(new u(this.f15005i, aVar3));
                        }
                    }
                    return wg4.b0.f332794a;
                } else if (i15 == 3) {
                    ResultKt.throwOnFailure(obj);
                    obj2 = obj;
                    m60.d.O(new u(this.f15005i, (a) obj2));
                    return wg4.b0.f332794a;
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                a aVar4 = (a) obj4;
                t tVar3 = this.f15004h;
                this.f15002f = n0Var;
                this.f15000d = aVar4;
                this.f15001e = 2;
                obj3 = t.h0(tVar3, 8, this);
                if (obj3 == aVar2) {
                    return aVar2;
                }
                aVar = aVar4;
                a aVar32 = (a) obj3;
                if (gk4.o0.h(n0Var)) {
                }
                return wg4.b0.f332794a;
            }
        }

        /* JADX DEBUG: Multi-variable search result rejected for r4v0, resolved type: kh4.s<? super java.lang.Boolean, ? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.String, ? super dt1.b, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public n(gk4.n0 n0Var, boolean z15, t tVar, kh4.s<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super dt1.b, wg4.b0> sVar) {
            this.f14996d = n0Var;
            this.f14997e = z15;
            this.f14998f = tVar;
            this.f14999g = sVar;
        }

        public final void run() {
            gk4.h.d(this.f14996d, null, gk4.p0.UNDISPATCHED, new a(this.f14997e, this.f14998f, this.f14999g, null), 1, null);
        }
    }

    public static final class n0<_Ret, _Var> implements g74.a {

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

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Boolean, String, wg4.b0> f15007b;

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.p<? super java.lang.Boolean, ? super java.lang.String, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public n0(t tVar, kh4.p<? super Boolean, ? super String, wg4.b0> pVar) {
            this.f15006a = tVar;
            this.f15007b = pVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            boolean z15;
            b.c cVar = (b.c) obj;
            String str = this.f15006a.f14913d;
            Log.i(str, "errType:" + cVar.f345499a + " errCode:" + cVar.f345500b);
            kh4.p<Boolean, String, wg4.b0> pVar = this.f15007b;
            if (pVar == null) {
                return null;
            }
            if (cVar.f345500b == 0) {
                z15 = true;
            } else {
                z15 = false;
            }
            pVar.invoke(Boolean.valueOf(z15), cVar.f345501c);
            return wg4.b0.f332794a;
        }
    }

    public static final class o<_Ret, _Var> implements g74.a {

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

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

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Boolean, x31, wg4.b0> f15010c;

        /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.p<? super java.lang.Boolean, ? super bw3.x31, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public o(t tVar, String str, kh4.p<? super Boolean, ? super x31, wg4.b0> pVar) {
            this.f15008a = tVar;
            this.f15009b = str;
            this.f15010c = pVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            boolean z15;
            ConcurrentHashMap<String, Boolean> concurrentHashMap;
            x31 x312;
            ConcurrentHashMap<String, Boolean> concurrentHashMap2;
            int i15;
            x31 x313;
            b.c cVar = (b.c) obj;
            int i16 = 0;
            if (cVar.f345499a == 0 && cVar.f345500b == 0) {
                z15 = true;
            } else {
                z15 = false;
            }
            Log.i(this.f15008a.f14913d, "doGetFinderLiveContact success:" + z15 + " username:" + this.f15009b);
            if (z15) {
                er1.b bVar = this.f15008a.f14911b;
                if (!(bVar == null || (concurrentHashMap2 = ((ft1.o) bVar.a(ft1.o.class)).f217237f1) == null)) {
                    String str = this.f15009b;
                    s61 s612 = (s61) cVar.f345502d;
                    if (s612 == null || (x313 = s612.f36094d) == null) {
                        i15 = 0;
                    } else {
                        i15 = x313.f41751f;
                    }
                    concurrentHashMap2.put(str, Boolean.valueOf(m60.d.u(i15, 1)));
                }
                er1.b bVar2 = this.f15008a.f14911b;
                if (!(bVar2 == null || (concurrentHashMap = ((ft1.o) bVar2.a(ft1.o.class)).f217242g1) == null)) {
                    String str2 = this.f15009b;
                    s61 s613 = (s61) cVar.f345502d;
                    if (!(s613 == null || (x312 = s613.f36094d) == null)) {
                        i16 = x312.f41751f;
                    }
                    concurrentHashMap.put(str2, Boolean.valueOf(m60.d.u(i16, 2)));
                }
            }
            kh4.p<Boolean, x31, wg4.b0> pVar = this.f15010c;
            x31 x314 = null;
            if (pVar == null) {
                return null;
            }
            Boolean valueOf = Boolean.valueOf(z15);
            s61 s614 = (s61) cVar.f345502d;
            if (s614 != null) {
                x314 = s614.f36094d;
            }
            pVar.invoke(valueOf, x314);
            return wg4.b0.f332794a;
        }
    }

    public static final class o0 extends lh4.o implements kh4.a<wg4.b0> {

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

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

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public o0(t tVar, String str) {
            super(0);
            this.f15011d = tVar;
            this.f15012e = str;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // kh4.a
        public wg4.b0 invoke() {
            String str = this.f15011d.f14913d;
            Log.i(str, "showCenterTextToast " + this.f15012e + " context:" + this.f15011d.n0());
            Context n05 = this.f15011d.n0();
            if (n05 != null) {
                y0.k(n05, this.f15012e);
            }
            return wg4.b0.f332794a;
        }
    }

    public static final class p<_Ret, _Var> implements g74.a {

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

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Boolean, Integer, wg4.b0> f15014b;

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.p<? super java.lang.Boolean, ? super java.lang.Integer, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public p(t tVar, kh4.p<? super Boolean, ? super Integer, wg4.b0> pVar) {
            this.f15013a = tVar;
            this.f15014b = pVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            b.c cVar = (b.c) obj;
            int i15 = cVar.f345499a;
            int i16 = cVar.f345500b;
            String str = this.f15013a.f14913d;
            Log.i(str, "doGetGiftList errType:" + i15 + ", errCode:" + i16);
            if (i15 == 0 && i16 == 0) {
                FinderLiveService finderLiveService = FinderLiveService.f112934d;
                xv3.b bVar = ((ft0) cVar.f345502d).f22000e;
                finderLiveService.getClass();
                FinderLiveService.I = bVar;
                T t15 = cVar.f345502d;
                FinderLiveService.J = ((ft0) t15).f22001f;
                FinderLiveService.K = ((ft0) t15).f22002g;
                if (rs1.d.f297303a.S0()) {
                    h51 h512 = new h51();
                    t tVar = this.f15013a;
                    h512.f23363d = n2.f333835a.a(11250);
                    h512.f23364e = r32.b.d(tVar.f14912c);
                    n94.f<b.c<i51>> h15 = h512.b().h();
                    h15.H(new v(this.f15014b, i16, this.f15013a));
                    t tVar2 = this.f15013a;
                    if (tVar2.n0() == null || !(tVar2.n0() instanceof MMActivity)) {
                        return h15;
                    }
                    Context n05 = tVar2.n0();
                    lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
                    h15.n((MMActivity) n05);
                    return h15;
                }
                kh4.p<Boolean, Integer, wg4.b0> pVar = this.f15014b;
                if (pVar == null) {
                    return null;
                }
                pVar.invoke(Boolean.TRUE, Integer.valueOf(i16));
                return wg4.b0.f332794a;
            }
            kh4.p<Boolean, Integer, wg4.b0> pVar2 = this.f15014b;
            if (pVar2 == null) {
                return null;
            }
            pVar2.invoke(Boolean.FALSE, Integer.valueOf(i16));
            return wg4.b0.f332794a;
        }
    }

    public static final class p0 implements zl3.j<Void> {

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

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

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ kh4.l<Boolean, wg4.b0> f15017c;

        /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kh4.l<? super java.lang.Boolean, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public p0(t tVar, FragmentActivity fragmentActivity, kh4.l<? super Boolean, wg4.b0> lVar) {
            this.f15015a = tVar;
            this.f15016b = fragmentActivity;
            this.f15017c = lVar;
        }

        @Override // zl3.j
        public void a(int i15, int i16, String str) {
            this.f15017c.invoke(Boolean.FALSE);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // zl3.j
        public void onSuccess(Void r35) {
            t tVar = this.f15015a;
            FragmentActivity fragmentActivity = this.f15016b;
            tVar.getClass();
            lh4.m.g(fragmentActivity, "context");
            zl3.d Fq0 = ((zl3.e) d60.z.q(zl3.e.class)).Fq0(fragmentActivity, true);
            if (Fq0 != null) {
                Fq0.a(new o0(this.f15017c));
            } else {
                this.f15017c.invoke(Boolean.TRUE);
            }
        }
    }

    public static final class q<_Ret, _Var> implements g74.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ kh4.r<Integer, Integer, String, zs0, wg4.b0> f15018a;

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

        /* JADX DEBUG: Multi-variable search result rejected for r1v0, resolved type: kh4.r<? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.String, ? super bw3.zs0, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public q(kh4.r<? super Integer, ? super Integer, ? super String, ? super zs0, wg4.b0> rVar, t tVar) {
            this.f15018a = rVar;
            this.f15019b = tVar;
        }

        /* JADX DEBUG: Multi-variable search result rejected for r0v1, resolved type: kh4.r<java.lang.Integer, java.lang.Integer, java.lang.String, bw3.zs0, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        @Override // g74.a
        public Object call(Object obj) {
            zs0 zs02;
            Integer num;
            b.c cVar = (b.c) obj;
            if (cVar.f345499a == 0 && cVar.f345500b == 0 && (zs02 = (zs0) cVar.f345502d) != null) {
                t tVar = this.f15019b;
                h1 h1Var = (h1) tVar.i0(h1.class);
                h1Var.f217086f.clear();
                h1Var.f217086f.addAll(zs02.f44804d);
                h1Var.f217088h.clear();
                h1Var.f217088h.addAll(zs02.f44806f);
                h1Var.f217089i = zs02.f44808h;
                h1Var.f217087g = zs02.f44810j;
                String str = zs02.f44816s;
                if (str == null) {
                    str = "";
                }
                h1Var.f217090j = str;
                ((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35029e = zs02.f44808h;
                ((ft1.o) tVar.i0(ft1.o.class)).f217239f3 = zs02.f44812o;
                ((ft1.o) tVar.i0(ft1.o.class)).f217244g3 = zs02.f44813p;
                ((ft1.o) tVar.i0(ft1.o.class)).S3.clear();
                ((ft1.o) tVar.i0(ft1.o.class)).S3.addAll(zs02.f44814q);
                if (!rs1.d.f297303a.S0()) {
                    h1 h1Var2 = (h1) tVar.i0(h1.class);
                    StringBuilder sb5 = new StringBuilder();
                    sb5.append("online member enableComment:");
                    x31 x312 = ((h1) h1Var2.business(h1.class)).f217087g;
                    if (x312 != null) {
                        num = Integer.valueOf(x312.f41750e);
                    } else {
                        num = null;
                    }
                    sb5.append(num);
                    Log.i("MMFinder.LiveOnlineMemberSlice", sb5.toString());
                    x31 x313 = ((h1) h1Var2.business(h1.class)).f217087g;
                    if (x313 != null) {
                        int i15 = x313.f41750e;
                        if (i15 == 1) {
                            ((ft1.o) h1Var2.business(ft1.o.class)).f217304t = true;
                        } else if (i15 == 0) {
                            ((ft1.o) h1Var2.business(ft1.o.class)).f217304t = false;
                        }
                    }
                }
            }
            kh4.r<Integer, Integer, String, zs0, wg4.b0> rVar = this.f15018a;
            if (rVar == 0) {
                return null;
            }
            rVar.D(Integer.valueOf(cVar.f345500b), Integer.valueOf(cVar.f345499a), cVar.f345501c, cVar.f345502d);
            return wg4.b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$switchGiftSkin$$inlined$fail$default$1", f = "FinderLiveAssistant.kt", l = {}, m = "invokeSuspend")
    public static final class q0 extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ rp1.e f15020d;

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

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public q0(rp1.e eVar, bh4.d dVar, t tVar) {
            super(2, dVar);
            this.f15020d = eVar;
            this.f15021e = tVar;
        }

        @Override // dh4.a
        public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
            return new q0(this.f15020d, dVar, this.f15021e);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
            return ((q0) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ResultKt.throwOnFailure(obj);
            o60.d dVar = ((rp1.b) this.f15020d).f296966b.f296964a;
            if (dVar != null) {
                String str = this.f15021e.f14913d;
                Log.i(str, "[switchGiftSkin] errCode = " + dVar.f274955f + ", errType = " + dVar.f274954e);
            }
            return wg4.b0.f332794a;
        }
    }

    public static final class r extends lh4.o implements kh4.r<Integer, Integer, String, xs1, wg4.b0> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ WeakReference<kh4.r<Integer, Integer, String, xs1, wg4.b0>> f15022d;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public r(WeakReference<kh4.r<Integer, Integer, String, xs1, wg4.b0>> weakReference) {
            super(4);
            this.f15022d = weakReference;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object] */
        @Override // kh4.r
        public wg4.b0 D(Integer num, Integer num2, String str, xs1 xs12) {
            kh4.r<Integer, Integer, String, xs1, wg4.b0> rVar;
            int intValue = num.intValue();
            int intValue2 = num2.intValue();
            String str2 = str;
            xs1 xs13 = xs12;
            lh4.m.g(xs13, "resp");
            WeakReference<kh4.r<Integer, Integer, String, xs1, wg4.b0>> weakReference = this.f15022d;
            if (!(weakReference == null || (rVar = weakReference.get()) == null)) {
                rVar.D(Integer.valueOf(intValue), Integer.valueOf(intValue2), str2, xs13);
            }
            return wg4.b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$switchGiftSkin$$inlined$success$default$1", f = "FinderLiveAssistant.kt", l = {}, m = "invokeSuspend")
    public static final class r0 extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ rp1.e f15023d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ lh4.f0 f15024e;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public r0(rp1.e eVar, bh4.d dVar, lh4.f0 f0Var) {
            super(2, dVar);
            this.f15023d = eVar;
            this.f15024e = f0Var;
        }

        @Override // dh4.a
        public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
            return new r0(this.f15023d, dVar, this.f15024e);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
            return ((r0) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ResultKt.throwOnFailure(obj);
            this.f15024e.f253292d = ((rp1.f) this.f15023d).f296978b;
            return wg4.b0.f332794a;
        }
    }

    public static final class s extends lh4.o implements kh4.a<wg4.b0> {

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

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

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ Context f15027f;

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

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ kh4.u<Boolean, Integer, Integer, String, c70.g, TRTCCloudDef.TRTCParams, wv0, wg4.b0> f15029h;

        /* JADX DEBUG: Multi-variable search result rejected for r6v0, resolved type: kh4.u<? super java.lang.Boolean, ? super java.lang.Integer, ? super java.lang.Integer, ? super java.lang.String, ? super c70.g, ? super com.tencent.trtc.TRTCCloudDef$TRTCParams, ? super bw3.wv0, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public s(t tVar, long j15, Context context, int i15, kh4.u<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super c70.g, ? super TRTCCloudDef.TRTCParams, ? super wv0, wg4.b0> uVar) {
            super(0);
            this.f15025d = tVar;
            this.f15026e = j15;
            this.f15027f = context;
            this.f15028g = i15;
            this.f15029h = uVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // kh4.a
        public wg4.b0 invoke() {
            String str;
            String str2;
            d1 d1Var;
            String str3;
            i70.a aVar;
            Intent intent;
            String stringExtra;
            u3 u3Var;
            t tVar = this.f15025d;
            jg1 c05 = tVar.c0(((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35027d);
            int i15 = rn1.x.f296832h;
            long j15 = this.f15026e;
            Long l15 = rn1.x.f296836l;
            if (l15 != null && l15.longValue() == 0) {
                rn1.x.f296836l = Long.valueOf(j15);
                Log.i("FinderLiveDataLoader", "setLiveReportObj " + m60.d.p(j15) + ", refObjectId:" + m60.d.p(c05.f26103p));
                rn1.x.f296835k = c05;
            }
            String X = rs1.d.f297303a.X("sessionBuffer");
            if (X == null) {
                X = "";
            }
            c05.f26106s = X;
            Context context = this.f15027f;
            if (!(context == null || (u3Var = (u3) y24.r.f342954a.b(context).e(u3.class)) == null)) {
                u3Var.f197241d = c05;
            }
            Context context2 = this.f15027f;
            Activity activity = context2 instanceof Activity ? (Activity) context2 : null;
            if (activity == null || (intent = activity.getIntent()) == null || (stringExtra = intent.getStringExtra("key_enter_live_param_source_web_url")) == null) {
                str = "";
            } else {
                str = stringExtra;
            }
            long j16 = ((ft1.u) this.f15025d.i0(ft1.u.class)).f217412q.f35027d;
            byte[] bArr = ((ft1.u) this.f15025d.i0(ft1.u.class)).f217409n;
            String d15 = r32.b.d(this.f15025d.f14912c);
            long j17 = ((ft1.u) this.f15025d.i0(ft1.u.class)).f217408j;
            int i16 = this.f15028g;
            String str4 = ((ft1.u) this.f15025d.i0(ft1.u.class)).f217415t;
            String str5 = ((ft1.u) this.f15025d.i0(ft1.u.class)).f217416u;
            String str6 = ((ft1.o) this.f15025d.i0(ft1.o.class)).f217254i3;
            int i17 = ((ft1.o) this.f15025d.i0(ft1.o.class)).f217259j3;
            t tVar2 = this.f15025d;
            bv1 bv12 = tVar2.f14912c;
            xv0 xv02 = ((ft1.o) tVar2.i0(ft1.o.class)).Q3;
            FinderLiveService finderLiveService = FinderLiveService.f112934d;
            String str7 = (finderLiveService == null || (aVar = FinderLiveService.f112936f) == null) ? null : aVar.T;
            finderLiveService.getClass();
            dt1.k kVar = FinderLiveService.C;
            if (kVar == null || (d1Var = kVar.f202409f) == null || (str3 = d1Var.f14476z) == null) {
                str2 = "";
            } else {
                str2 = str3;
            }
            cr1.p pVar = new cr1.p(j16, bArr, d15, j17, i16, str4, str5, str6, i17, bv12, 0, xv02, str7, str2, 0, ((ft1.u) this.f15025d.i0(ft1.u.class)).f217418w, c05, ((ft1.u) this.f15025d.i0(ft1.u.class)).f217406h, 0, str, null, 1328128, null);
            Context context3 = this.f15027f;
            t tVar3 = this.f15025d;
            if (context3 != null) {
                y24.r rVar = y24.r.f342954a;
                ((z0) rVar.b(context3).a(z0.class)).k5(pVar.f192619w);
                ((z0) rVar.b(context3).a(z0.class)).l5(((ft1.u) tVar3.i0(ft1.u.class)).f217406h, pVar.f192619w.f40288d);
            }
            n94.f h15 = pVar.h();
            h15.H(new y(this.f15025d, this.f15026e, this.f15029h, this.f15028g));
            t tVar4 = this.f15025d;
            if (tVar4.n0() != null && (tVar4.n0() instanceof MMActivity) && !((ft1.c0) tVar4.i0(ft1.c0.class)).f216940g) {
                Context n05 = tVar4.n0();
                lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
                h15.n((MMActivity) n05);
            }
            return wg4.b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant", f = "FinderLiveAssistant.kt", l = {2774, 2848, 2855}, m = "switchGiftSkin")
    public static final class s0 extends dh4.d {

        /* renamed from: d  reason: collision with root package name */
        public Object f15030d;

        /* renamed from: e  reason: collision with root package name */
        public Object f15031e;

        /* renamed from: f  reason: collision with root package name */
        public Object f15032f;

        /* renamed from: g  reason: collision with root package name */
        public /* synthetic */ Object f15033g;

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ t f15034h;

        /* renamed from: i  reason: collision with root package name */
        public int f15035i;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public s0(t tVar, bh4.d<? super s0> dVar) {
            super(dVar);
            this.f15034h = tVar;
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            this.f15033g = obj;
            this.f15035i |= Integer.MIN_VALUE;
            return this.f15034h.u0(null, null, null, this);
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$doLikeLive$$inlined$fail$default$1", f = "FinderLiveAssistant.kt", l = {}, m = "invokeSuspend")
    /* renamed from: br1.t$t  reason: collision with other inner class name */
    public static final class C0332t extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ rp1.e f15036d;

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

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public C0332t(rp1.e eVar, bh4.d dVar, t tVar) {
            super(2, dVar);
            this.f15036d = eVar;
            this.f15037e = tVar;
        }

        @Override // dh4.a
        public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
            return new C0332t(this.f15036d, dVar, this.f15037e);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
            return ((C0332t) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            Integer num;
            ResultKt.throwOnFailure(obj);
            T t15 = ((rp1.b) this.f15036d).f296966b;
            o60.d dVar = t15.f296964a;
            Integer num2 = null;
            if (dVar != null) {
                num = new Integer(dVar.f274954e);
            } else {
                num = null;
            }
            o60.d dVar2 = t15.f296964a;
            if (dVar2 != null) {
                num2 = new Integer(dVar2.f274955f);
            }
            Log.i(this.f15037e.f14913d, "onSceneEnd errType:" + num + " errCode:" + num2);
            return wg4.b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$switchGiftText$$inlined$fail$default$1", f = "FinderLiveAssistant.kt", l = {}, m = "invokeSuspend")
    public static final class t0 extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ rp1.e f15038d;

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

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public t0(rp1.e eVar, bh4.d dVar, t tVar) {
            super(2, dVar);
            this.f15038d = eVar;
            this.f15039e = tVar;
        }

        @Override // dh4.a
        public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
            return new t0(this.f15038d, dVar, this.f15039e);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
            return ((t0) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ResultKt.throwOnFailure(obj);
            o60.d dVar = ((rp1.b) this.f15038d).f296966b.f296964a;
            if (dVar != null) {
                String str = this.f15039e.f14913d;
                Log.i(str, "[switchGiftText] errCode = " + dVar.f274955f + ", errType = " + dVar.f274954e);
            }
            return wg4.b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$doLikeLive$$inlined$success$default$1", f = "FinderLiveAssistant.kt", l = {}, m = "invokeSuspend")
    public static final class u extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ rp1.e f15040d;

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

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ lh4.f0 f15042f;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public u(rp1.e eVar, bh4.d dVar, t tVar, lh4.f0 f0Var) {
            super(2, dVar);
            this.f15040d = eVar;
            this.f15041e = tVar;
            this.f15042f = f0Var;
        }

        @Override // dh4.a
        public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
            return new u(this.f15040d, dVar, this.f15041e, this.f15042f);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
            return ((u) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            String str;
            qa1 qa12;
            ResultKt.throwOnFailure(obj);
            T t15 = ((rp1.f) this.f15040d).f296978b;
            if (m60.d.u(t15.f34681d, 1)) {
                t tVar = this.f15041e;
                String string = MMApplicationContext.getContext().getResources().getString(R.string.dot);
                lh4.m.f(string, "getContext().resources.g…er_live_lottery_attended)");
                tVar.getClass();
                m60.d.O(new n0(tVar, string, R.raw.icons_outlined_done));
                String str2 = this.f15041e.f14913d;
                StringBuilder sb5 = new StringBuilder();
                sb5.append("doLikeLive attended lottery success,lotteryId:");
                dt1.s sVar = ((vt1.j0) this.f15041e.i0(vt1.j0.class)).f328924j;
                if (sVar == null || (qa12 = sVar.f202475d) == null) {
                    str = null;
                } else {
                    str = qa12.f33951d;
                }
                sb5.append(str);
                Log.i(str2, sb5.toString());
                if (!rs1.d.f297303a.S0()) {
                    yz3.d c15 = yz3.j.c(cs1.w.class);
                    lh4.m.f(c15, "getService(HellLiveVisitorReoprter::class.java)");
                    cs1.w.QO0((cs1.w) c15, f0.w0.POPUP_TOAST_JOINED, "", null, 0, 12, null);
                    this.f15041e.getClass();
                    ((z81.g) yz3.j.c(z81.g.class)).P8("finder_live_popup_joined_toast", null, kt1.e.f248850p2.a(), 25561);
                }
            }
            if (m60.d.u(t15.f34681d, 4)) {
                y0.makeText(MMApplicationContext.getContext(), MMApplicationContext.getContext().getResources().getString(R.string.dzd), 0).show();
            }
            this.f15042f.f253292d = t15;
            return wg4.b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant$switchGiftText$$inlined$success$default$1", f = "FinderLiveAssistant.kt", l = {}, m = "invokeSuspend")
    public static final class u0 extends dh4.j implements kh4.p<gk4.n0, bh4.d<? super wg4.b0>, Object> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ rp1.e f15043d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ lh4.f0 f15044e;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public u0(rp1.e eVar, bh4.d dVar, lh4.f0 f0Var) {
            super(2, dVar);
            this.f15043d = eVar;
            this.f15044e = f0Var;
        }

        @Override // dh4.a
        public final bh4.d<wg4.b0> create(Object obj, bh4.d<?> dVar) {
            return new u0(this.f15043d, dVar, this.f15044e);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // kh4.p
        public Object invoke(gk4.n0 n0Var, bh4.d<? super wg4.b0> dVar) {
            return ((u0) create(n0Var, dVar)).invokeSuspend(wg4.b0.f332794a);
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            ResultKt.throwOnFailure(obj);
            this.f15044e.f253292d = ((rp1.f) this.f15043d).f296978b;
            return wg4.b0.f332794a;
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant", f = "FinderLiveAssistant.kt", l = {lq0.m.CTRL_INDEX, 2847, 2854}, m = "doLikeLive")
    public static final class v extends dh4.d {

        /* renamed from: d  reason: collision with root package name */
        public Object f15045d;

        /* renamed from: e  reason: collision with root package name */
        public Object f15046e;

        /* renamed from: f  reason: collision with root package name */
        public Object f15047f;

        /* renamed from: g  reason: collision with root package name */
        public /* synthetic */ Object f15048g;

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ t f15049h;

        /* renamed from: i  reason: collision with root package name */
        public int f15050i;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public v(t tVar, bh4.d<? super v> dVar) {
            super(dVar);
            this.f15049h = tVar;
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            this.f15048g = obj;
            this.f15050i |= Integer.MIN_VALUE;
            return this.f15049h.a0(0, 0, this);
        }
    }

    @dh4.f(c = "com.tencent.mm.plugin.finder.live.model.FinderLiveAssistant", f = "FinderLiveAssistant.kt", l = {2805, 2848, 2855}, m = "switchGiftText")
    public static final class v0 extends dh4.d {

        /* renamed from: d  reason: collision with root package name */
        public Object f15051d;

        /* renamed from: e  reason: collision with root package name */
        public Object f15052e;

        /* renamed from: f  reason: collision with root package name */
        public Object f15053f;

        /* renamed from: g  reason: collision with root package name */
        public /* synthetic */ Object f15054g;

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ t f15055h;

        /* renamed from: i  reason: collision with root package name */
        public int f15056i;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public v0(t tVar, bh4.d<? super v0> dVar) {
            super(dVar);
            this.f15055h = tVar;
        }

        @Override // dh4.a
        public final Object invokeSuspend(Object obj) {
            this.f15054g = obj;
            this.f15056i |= Integer.MIN_VALUE;
            return this.f15055h.v0(null, null, null, null, this);
        }
    }

    public static final class w<_Ret, _Var> implements g74.a {

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

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

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ i9.d f15059c;

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

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

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ WeakReference<Context> f15062f;

        /* renamed from: g  reason: collision with root package name */
        public final /* synthetic */ String f15063g;

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

        /* renamed from: i  reason: collision with root package name */
        public final /* synthetic */ String f15065i;

        public w(t tVar, int i15, i9.d dVar, x0 x0Var, String str, WeakReference<Context> weakReference, String str2, int i16, String str3) {
            this.f15057a = tVar;
            this.f15058b = i15;
            this.f15059c = dVar;
            this.f15060d = x0Var;
            this.f15061e = str;
            this.f15062f = weakReference;
            this.f15063g = str2;
            this.f15064h = i16;
            this.f15065i = str3;
        }

        @Override // g74.a
        public Object call(Object obj) {
            String str;
            String str2;
            b.c cVar = (b.c) obj;
            int i15 = cVar.f345499a;
            int i16 = cVar.f345500b;
            String str3 = cVar.f345501c;
            wg1 wg12 = (wg1) cVar.f345502d;
            String str4 = this.f15057a.f14913d;
            StringBuilder sb5 = new StringBuilder();
            sb5.append("doPostGift errType:");
            sb5.append(i15);
            sb5.append(", errCode:");
            sb5.append(i16);
            sb5.append(", errMsg:");
            sb5.append(str3);
            sb5.append(", bill_no:");
            byte[] bArr = null;
            if (wg12 != null) {
                str = wg12.f41020d;
            } else {
                str = null;
            }
            sb5.append(str);
            Log.i(str4, sb5.toString());
            y5.f119481a.d(this.f15058b);
            if (i16 == 0 || i16 == -200042) {
                Context context = this.f15062f.get();
                if (context != null) {
                    t tVar = this.f15057a;
                    String str5 = this.f15061e;
                    xv3.b bVar = wg12.f41021e;
                    if (bVar != null) {
                        bArr = bVar.f();
                    }
                    a0 a0Var = new a0(this.f15057a, this.f15059c, this.f15063g, this.f15064h, this.f15065i, this.f15060d);
                    b0 b0Var = new b0(this.f15057a, this.f15059c, this.f15063g, this.f15064h, this.f15065i, this.f15060d);
                    c0 c0Var = new c0(this.f15057a, this.f15059c, this.f15063g, this.f15064h, this.f15065i, this.f15060d);
                    Log.i(tVar.f14913d, "[WeCoin] sessionID:" + str5 + " consumeGift:" + bArr);
                    fl3.j jVar = new fl3.j(1, (FragmentActivity) context, a0Var, b0Var, c0Var);
                    if (bArr == null) {
                        bArr = new byte[0];
                    }
                    jVar.f215478g = bArr;
                    ((zl3.e) d60.z.q(zl3.e.class)).Y90(jVar);
                }
            } else {
                i9.d dVar = this.f15059c;
                if (dVar != null) {
                    str2 = str3;
                    i9.d.a.a(dVar, false, i16, i9.d.b.NETWORK, null, null, 0, null, str3, this.f15060d, 16, null);
                } else {
                    str2 = str3;
                }
                com.tencent.mm.plugin.report.service.q qVar = com.tencent.mm.plugin.report.service.q.INSTANCE;
                qVar.g(22129, 1, this.f15061e, "", 1, 3, Integer.valueOf(i16), str2);
                qVar.u(y5.f119488h, 80);
            }
            return wg4.b0.f332794a;
        }
    }

    public static final class x implements f0.a {

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

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ kh4.p<Boolean, u61, wg4.b0> f15067b;

        public static final class a extends lh4.o implements kh4.a<wg4.b0> {

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

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

            /* renamed from: f  reason: collision with root package name */
            public final /* synthetic */ t f15070f;

            /* renamed from: g  reason: collision with root package name */
            public final /* synthetic */ kh4.p<Boolean, u61, wg4.b0> f15071g;

            /* renamed from: h  reason: collision with root package name */
            public final /* synthetic */ u61 f15072h;

            /* JADX DEBUG: Multi-variable search result rejected for r4v0, resolved type: kh4.p<? super java.lang.Boolean, ? super bw3.u61, wg4.b0> */
            /* JADX WARN: Multi-variable type inference failed */
            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public a(int i15, int i16, t tVar, kh4.p<? super Boolean, ? super u61, wg4.b0> pVar, u61 u612) {
                super(0);
                this.f15068d = i15;
                this.f15069e = i16;
                this.f15070f = tVar;
                this.f15071g = pVar;
                this.f15072h = u612;
            }

            /* Return type fixed from 'java.lang.Object' to match base method */
            @Override // kh4.a
            public wg4.b0 invoke() {
                boolean z15;
                if (this.f15068d == 0 && this.f15069e == 0) {
                    androidx.lifecycle.j0 a15 = this.f15070f.f14911b.a(k1.class);
                    u61 u612 = this.f15072h;
                    k1 k1Var = (k1) a15;
                    if (u612.f38368f > 0) {
                        z15 = true;
                    } else {
                        z15 = false;
                    }
                    k1Var.B = z15;
                    k1Var.C = u612.f38367e;
                    kh4.p<Boolean, u61, wg4.b0> pVar = this.f15071g;
                    if (pVar != null) {
                        pVar.invoke(Boolean.TRUE, u612);
                    }
                } else {
                    kh4.p<Boolean, u61, wg4.b0> pVar2 = this.f15071g;
                    if (pVar2 != null) {
                        pVar2.invoke(Boolean.FALSE, null);
                    }
                }
                return wg4.b0.f332794a;
            }
        }

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.p<? super java.lang.Boolean, ? super bw3.u61, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        public x(t tVar, kh4.p<? super Boolean, ? super u61, wg4.b0> pVar) {
            this.f15066a = tVar;
            this.f15067b = pVar;
        }

        @Override // cr1.f0.a
        public void a(int i15, int i16, String str, u61 u612) {
            lh4.m.g(u612, "resp");
            m60.d.O(new a(i15, i16, this.f15066a, this.f15067b, u612));
        }
    }

    public static final class y<_Ret, _Var> implements g74.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ j0.a f15073a;

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

        public y(j0.a aVar, t tVar) {
            this.f15073a = aVar;
            this.f15074b = tVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            m60.d.O(new d0((b.c) obj, this.f15073a, this.f15074b));
            return wg4.b0.f332794a;
        }
    }

    public static final class z<_Ret, _Var> implements g74.a {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ k0.a f15075a;

        public z(k0.a aVar) {
            this.f15075a = aVar;
        }

        @Override // g74.a
        public Object call(Object obj) {
            b.c cVar = (b.c) obj;
            k0.a aVar = this.f15075a;
            if (aVar == null) {
                return null;
            }
            int i15 = cVar.f345499a;
            int i16 = cVar.f345500b;
            String str = cVar.f345501c;
            T t15 = cVar.f345502d;
            lh4.m.f(t15, "it.resp");
            aVar.a(i15, i16, str, (g81) t15);
            return wg4.b0.f332794a;
        }
    }

    public t(WeakReference<Context> weakReference, er1.b bVar, bv1 bv12) {
        lh4.m.g(bVar, "buContext");
        this.f14910a = weakReference;
        this.f14911b = bVar;
        this.f14912c = bv12;
        this.f14913d = "FinderLiveAssistant_" + hashCode() + '_' + bVar.hashCode();
    }

    /* JADX WARNING: Code restructure failed: missing block: B:14:0x00a5, code lost:
        if ((r3 instanceof pu1.d3) != false) goto L_0x00a9;
     */
    /* JADX WARNING: Removed duplicated region for block: B:263:0x09db  */
    /* JADX WARNING: Removed duplicated region for block: B:264:0x09e0  */
    /* JADX WARNING: Removed duplicated region for block: B:267:0x0a0e  */
    /* JADX WARNING: Removed duplicated region for block: B:268:0x0a11  */
    /* JADX WARNING: Removed duplicated region for block: B:271:0x0a44  */
    /* JADX WARNING: Removed duplicated region for block: B:285:0x0ad7  */
    public static final void g0(t tVar, wv0 wv02, int i15, kh4.u uVar) {
        boolean z15;
        String str;
        sr1.r0 r0Var;
        Integer num;
        T t15;
        boolean z16;
        T t16;
        boolean z17;
        vs1.k kVar;
        Object obj;
        w51 w512;
        String str2;
        String str3;
        String str4;
        byte[] byteArray;
        w1.a aVar = w1.a.Mh;
        m60.d.O(new vt1.l0((vt1.j0) tVar.i0(vt1.j0.class)));
        s.f14861a.a(tVar.f14911b, wv02.f41519o, true);
        ((ft1.y) tVar.i0(ft1.y.class)).j5(wv02.Q);
        ((ft1.y) tVar.i0(ft1.y.class)).k5(wv02.R);
        ((ft1.v) tVar.i0(ft1.v.class)).f217422f = wv02.f41529s1;
        ((ft1.o) tVar.i0(ft1.o.class)).U = wv02.f41522p0;
        ft1.o oVar = (ft1.o) tVar.i0(ft1.o.class);
        x31 x312 = wv02.f41512j;
        oVar.S6(x312 != null ? x312.f41760r : null);
        r91 r912 = wv02.f41504f;
        if (r912 != null) {
            ((co1.o) tVar.i0(co1.o.class)).j5(r912, "processJoinLiveResponse");
            wg4.b0 b0Var = wg4.b0.f332794a;
        }
        g53 g532 = wv02.f41502e;
        if (g532 != null) {
            ((ft1.u) tVar.i0(ft1.u.class)).p5(g532, wv02.f41504f, wv02.f41500d);
            xe1 xe12 = wv02.U;
            if (!(xe12 == null || (byteArray = xe12.toByteArray()) == null)) {
                kVar = rs1.d.f297303a.H1(byteArray);
            }
            kVar = null;
            String str5 = tVar.f14913d;
            StringBuilder sb5 = new StringBuilder();
            sb5.append("recive promote msg: ");
            if (kVar != null) {
                obj = m60.i.h(kVar);
            } else {
                obj = "new_promote_info = null";
            }
            sb5.append(obj);
            Log.i(str5, sb5.toString());
            if (i15 == 1 || !(kVar instanceof vs1.x) || ((vs1.x) kVar).H) {
                r91 r913 = wv02.f41504f;
                ((k1) tVar.i0(k1.class)).w5(m60.d.u((int) (r913 != null ? r913.M : 0), 16));
                ((k1) tVar.i0(k1.class)).v5(kVar);
            }
            ft1.o oVar2 = (ft1.o) tVar.i0(ft1.o.class);
            kk1 kk12 = wv02.f41508h;
            Integer valueOf = kk12 != null ? Integer.valueOf(kk12.f27446d) : null;
            Log.i(oVar2.f217236f, "join live enableComment:" + valueOf);
            if (valueOf != null) {
                valueOf.intValue();
                if (valueOf.intValue() == 1) {
                    oVar2.f217304t = true;
                } else if (valueOf.intValue() == 0) {
                    oVar2.f217304t = false;
                }
            }
            ArrayList<String> arrayList = ((ft1.o) tVar.f14911b.a(ft1.o.class)).V2;
            if (!arrayList.isEmpty()) {
                n94.f h15 = new cr1.q0(((ft1.u) tVar.f14911b.a(ft1.u.class)).f217412q.f35027d, ((ft1.u) tVar.f14911b.a(ft1.u.class)).f217408j, 1, cr1.q0.f192628v.a(arrayList)).h();
                h15.H(new f0(tVar));
                if (tVar.n0() != null && (tVar.n0() instanceof MMActivity)) {
                    Context n05 = tVar.n0();
                    lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
                    h15.n((MMActivity) n05);
                }
                ((ft1.o) tVar.f14911b.a(ft1.o.class)).V2.clear();
            }
            ft1.o oVar3 = (ft1.o) tVar.i0(ft1.o.class);
            String str6 = wv02.S;
            if (str6 == null) {
                str6 = "";
            }
            oVar3.y7(str6);
            ((ft1.o) tVar.i0(ft1.o.class)).M = wv02.f41527r1;
            ((ft1.o) tVar.i0(ft1.o.class)).f217256j = wv02.f41517n;
            ((ft1.o) tVar.i0(ft1.o.class)).f217220b1 = ((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35050q;
            ((ft1.o) tVar.i0(ft1.o.class)).P2 = wv02.f41532u;
            FinderLiveService finderLiveService = FinderLiveService.f112934d;
            finderLiveService.getClass();
            if (FinderLiveService.L) {
                ft1.o oVar4 = (ft1.o) tVar.i0(ft1.o.class);
                long j15 = ((ft1.o) tVar.i0(ft1.o.class)).U0;
                w512 = "";
                long j16 = ((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35061z;
                if (j15 < j16) {
                    j15 = j16;
                }
                oVar4.U0 = j15;
            } else {
                w512 = "";
            }
            ft1.o oVar5 = (ft1.o) tVar.i0(ft1.o.class);
            w51 w513 = wv02.B;
            oVar5.D1 = w513;
            oVar5.F1 = w513 != null ? w513.f40635e : 0;
            ((ft1.o) tVar.i0(ft1.o.class)).Q1 = wv02.f41525q1;
            ft1.o oVar6 = (ft1.o) tVar.i0(ft1.o.class);
            c51 c512 = wv02.f41516m1;
            oVar6.R1 = m60.d.v(c512 != null ? c512.f17949h : 0, 1);
            ((ft1.o) tVar.i0(ft1.o.class)).f217233e2 = wv02.M;
            ((ft1.o) tVar.i0(ft1.o.class)).W1 = wv02.H;
            ((ft1.o) tVar.i0(ft1.o.class)).f217229d2 = !m60.d.u((int) wv02.L, 1);
            ((ft1.o) tVar.i0(ft1.o.class)).I4 = wv02.f41497a1;
            ((ft1.o) tVar.i0(ft1.o.class)).J4 = wv02.Y;
            tVar.q0(wv02);
            ((ft1.o) tVar.i0(ft1.o.class)).F = wv02.T;
            yg1 yg12 = wv02.U0;
            ((n1) ((ft1.o) tVar.i0(ft1.o.class)).G).setValue(Boolean.valueOf(yg12 != null && yg12.f43364d == 10));
            ((ft1.o) tVar.i0(ft1.o.class)).L = wv02.f41511i1;
            ((ft1.o) tVar.i0(ft1.o.class)).N = wv02.f41531t1;
            String str7 = tVar.f14913d;
            StringBuilder sb6 = new StringBuilder();
            sb6.append("joinlive anchorOpPromoteMiniAppInfo:");
            FinderJumpInfo finderJumpInfo = wv02.f41511i1;
            sb6.append(finderJumpInfo != null ? Integer.valueOf(finderJumpInfo.hashCode()) : null);
            sb6.append(", creatorCenterEntrance:");
            FinderJumpInfo finderJumpInfo2 = wv02.f41523p1;
            sb6.append(finderJumpInfo2 != null ? Integer.valueOf(finderJumpInfo2.hashCode()) : null);
            Log.i(str7, sb6.toString());
            ((ft1.o) tVar.i0(ft1.o.class)).f217314v = wv02.V0;
            ((ft1.o) tVar.i0(ft1.o.class)).f217280o2 = m60.d.u(wv02.V, 8192);
            ((ft1.o) tVar.i0(ft1.o.class)).f217286p2 = true;
            r91 r914 = wv02.f41504f;
            ((r1) tVar.i0(r1.class)).f217372i.postValue(Boolean.valueOf(m60.d.u(r914 != null ? (int) r914.M : 0, 32768)));
            r1 r1Var = (r1) tVar.i0(r1.class);
            ly4 ly4 = wv02.f41538y0;
            r1Var.f217373j = ly4 != null ? ly4.f29118e : false;
            t1 i16 = d60.z.s().i();
            w1.a aVar2 = w1.a.Cl;
            ly4 ly42 = wv02.f41538y0;
            i16.L(aVar2, Boolean.valueOf(ly42 != null ? ly42.f29119f : false));
            r91 r915 = wv02.f41504f;
            boolean z18 = !m60.d.u(r915 != null ? (int) r915.M : 0, 262144);
            Log.i(tVar.f14913d, "[processJoinLiveResponse] canGetRetentionList = " + z18);
            k1 k1Var = (k1) tVar.i0(k1.class);
            if (!z18) {
                k1Var.f217147p.f269365a.clear();
            }
            k1Var.f217149q = z18;
            r91 r916 = wv02.f41504f;
            boolean z19 = !m60.d.u(r916 != null ? (int) r916.M : 0, 524288);
            Log.i(tVar.f14913d, "[processJoinLiveResponse] canGetProductList = " + z19);
            ((k1) tVar.i0(k1.class)).f217150r = z19;
            if (wv02.T) {
                d60.z.s().i().L(aVar, 1);
                Context n06 = tVar.n0();
                if (n06 != null) {
                    String string = n06.getString(R.string.clf);
                    lh4.m.f(string, "getString(R.string.finder_assistant_join)");
                    tVar.t0(string);
                    wg4.b0 b0Var2 = wg4.b0.f332794a;
                }
                int i17 = wv02.V;
                ((ft1.o) tVar.i0(ft1.o.class)).f217258j2 = m60.d.u(i17, 2);
                ((ft1.o) tVar.i0(ft1.o.class)).A = m60.d.u(i17, 256);
                ((k1) tVar.i0(k1.class)).q5(wv02.C != 1);
                ((vt1.j0) tVar.i0(vt1.j0.class)).f328927p.postValue(Boolean.valueOf(m60.d.u((int) wv02.X, 1)));
                Log.i(tVar.f14913d, "joinLive, set isAssistant 1, switchFlag:" + i17 + ", enableGiftSwitch:" + ((ft1.o) tVar.i0(ft1.o.class)).f217258j2 + ", liveRoomLikeSwitch:" + ((ft1.o) tVar.i0(ft1.o.class)).A + ", bindShop:" + ((k1) tVar.i0(k1.class)).f217140f + ",anchor_live_ext_flag:" + wv02.X);
            } else {
                d60.z.s().i().L(aVar, 0);
                Log.i(tVar.f14913d, "joinLive, set isAssistant, 0");
            }
            Context n07 = tVar.n0();
            if (n07 != null) {
                if (n07 instanceof AppCompatActivity) {
                    b5 b5Var = (b5) y24.r.f342954a.c((AppCompatActivity) n07).c(b5.class);
                    if (wv02.T) {
                        str4 = "1";
                    } else {
                        str4 = "0";
                    }
                    b5Var.n3("moderators_type", str4);
                }
                wg4.b0 b0Var3 = wg4.b0.f332794a;
            }
            Log.i(tVar.f14913d, "joinlive resp ecSource:%s", wv02.H);
            ((d1) tVar.i0(d1.class)).f217016g = new h0(tVar);
            ly4 ly43 = wv02.f41538y0;
            if (ly43 != null) {
                if (ly43.f29118e) {
                    String str8 = ly43.f29117d;
                    if (!(str8 == null || str8.length() == 0)) {
                        ((r1) tVar.i0(r1.class)).f217370g.postValue(ly43.f29117d);
                        str3 = w512;
                        Log.i(tVar.f14913d, "from joinlive SingingSongName: " + ly43.f29117d);
                        wg4.b0 b0Var4 = wg4.b0.f332794a;
                        str2 = str3;
                    }
                }
                str3 = w512;
                ((r1) tVar.i0(r1.class)).f217370g.postValue(str3);
                Log.i(tVar.f14913d, "from joinlive SingingSongName: " + ly43.f29117d);
                wg4.b0 b0Var42 = wg4.b0.f332794a;
                str2 = str3;
            } else {
                str2 = w512;
            }
            LinkedList<Integer> linkedList = wv02.P;
            if (linkedList != null) {
                f4 f4Var = FinderLiveService.f112941n;
                f4Var.getClass();
                f4Var.f14560h.post(new g4(linkedList, f4Var));
                wg4.b0 b0Var5 = wg4.b0.f332794a;
            }
            int i18 = ((ft1.o) tVar.i0(ft1.o.class)).F1;
            if (!(i18 == 1 || i18 == 0)) {
                ((ft1.o) tVar.i0(ft1.o.class)).j5(tVar.f14911b);
            }
            if (m60.d.u(wv02.f41536x0, 4096)) {
                Log.i("Finder.FinderLiveVisitorGameTeamWidget", "extflag canShowEntrance");
                str = "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity";
                n94.f h16 = new do1.n(((ft1.u) tVar.i0(ft1.u.class)).f217408j, ((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35027d, xv3.b.a(((ft1.u) tVar.i0(ft1.u.class)).f217409n), ((ft1.u) tVar.i0(ft1.u.class)).f217415t, 0, null, false, 112, null).h();
                h16.H(new i0(tVar, wv02));
                if (tVar.n0() != null && (tVar.n0() instanceof MMActivity)) {
                    Context n08 = tVar.n0();
                    lh4.m.e(n08, str);
                    h16.n((MMActivity) n08);
                }
                wg4.b0 b0Var6 = wg4.b0.f332794a;
            } else {
                str = "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity";
            }
            String str9 = tVar.f14913d;
            StringBuilder sb7 = new StringBuilder();
            sb7.append("gameteam joinlive liveData.business(LiveCommonSlice::class.java).gameInfo:");
            w51 w514 = ((ft1.o) tVar.i0(ft1.o.class)).D1;
            if (w514 == null) {
                w514 = str2;
            }
            sb7.append(m60.i.h(w514));
            Log.i(str9, sb7.toString());
            if (wv02.G != null) {
                Log.i(tVar.f14913d, "live_game_data:" + wv02.G);
                ((ft1.o) tVar.i0(ft1.o.class)).L1 = wv02.G;
            } else {
                Log.i(tVar.f14913d, "live_game_data is null");
            }
            TRTCCloudDef.TRTCParams tRTCParams = new TRTCCloudDef.TRTCParams();
            sk1.q b15 = sk1.d.f302423a.b(((ft1.o) tVar.i0(ft1.o.class)).f217278o);
            String nickname = b15 != null ? b15.getNickname() : str2;
            c70.g gVar = new c70.g(nickname, ((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35027d, 0, null, 0, 0, null, 0, 0, 0, null, 0, 0, 0, null, null, 0, 0, 262140, null);
            h53 a15 = f14909f.a(nickname, ((ft1.u) tVar.i0(ft1.u.class)).f217411p, ((ft1.u) tVar.i0(ft1.u.class)).f217412q, tRTCParams, gVar, i15, tVar.f14911b);
            ((y1) tVar.i0(y1.class)).k5(a15);
            ((y1) tVar.i0(y1.class)).l5(gVar);
            e53 e532 = a15.f23371f;
            if (e532 != null) {
                tn1.a aVar3 = tn1.a.f313149a;
                if (!(((Number) ((tl1.c) ((wg4.n) tn1.a.f313255r3).getValue()).t()).intValue() == 1) || ((ft1.u) tVar.i0(ft1.u.class)).f217412q.X != 1) {
                    ((ft1.o) tVar.i0(ft1.o.class)).f217315v1 = e532.f20113s;
                } else {
                    ((ft1.o) tVar.i0(ft1.o.class)).f217315v1 = 0;
                }
                ((ft1.o) tVar.i0(ft1.o.class)).f217327x2 = a15.f23371f.f20114t == 1;
                ft1.o oVar7 = (ft1.o) tVar.i0(ft1.o.class);
                e53 e533 = a15.f23371f;
                oVar7.f217333y2 = e533.f20115u == 1;
                int i19 = e533.R;
                if (2 <= i19 && i19 < 51) {
                    ((ft1.o) tVar.i0(ft1.o.class)).f217338z2 = a15.f23371f.R;
                } else {
                    ((ft1.o) tVar.i0(ft1.o.class)).f217338z2 = 2;
                }
            }
            ((s1) tVar.i0(s1.class)).f217378f = m60.d.u(gVar.f47331n, 2);
            StringBuilder sb8 = new StringBuilder();
            sb8.append("processLiveSdkParams support_screen_rotate:");
            sb8.append(e532 != null ? Integer.valueOf(e532.f20113s) : null);
            sb8.append(",qosReport:");
            sb8.append(((ft1.o) tVar.i0(ft1.o.class)).f217327x2);
            sb8.append(", qosControl:");
            sb8.append(((ft1.o) tVar.i0(ft1.o.class)).f217333y2);
            sb8.append(", seiMode:");
            sb8.append(gVar.f47331n);
            Log.i(StringKtKt.TAG, sb8.toString());
            wg4.b0 b0Var7 = wg4.b0.f332794a;
            tVar.p0(wv02.f41536x0);
            ((ft1.o) tVar.i0(ft1.o.class)).f217216a1 = wv02.W;
            ((j1) tVar.i0(j1.class)).f217125h = wv02.Z0;
            tVar.o0();
            ((ft1.o) tVar.i0(ft1.o.class)).d7(true);
            long j17 = (((ft1.u) tVar.i0(ft1.u.class)).f217411p.f22342p - 60) * ((long) 1000);
            if (j17 < 60000) {
                j17 = 60000;
            }
            finderLiveService.v(j17);
            r91 r917 = wv02.f41504f;
            if (r917 != null) {
                if (r917.f35052s == 5) {
                    Log.i(tVar.f14913d, "processJoinLiveResponse: externalPost = true");
                    ((ft1.o) tVar.i0(ft1.o.class)).F3 = true;
                } else {
                    Log.i(tVar.f14913d, "processJoinLiveResponse: externalPost = false");
                    ((ft1.o) tVar.i0(ft1.o.class)).F3 = false;
                }
                if (r917.f35052s == 1) {
                    Log.i(tVar.f14913d, "processJoinLiveResponse: isShowGameWelfareTask = true");
                    ft1.o oVar8 = (ft1.o) tVar.i0(ft1.o.class);
                }
                ft1.o oVar9 = (ft1.o) tVar.i0(ft1.o.class);
                int i25 = r917.f35052s;
                oVar9.G3 = i25 == 5 || i25 == 1;
            }
            int i26 = wv02.V;
            Log.i(tVar.f14913d, "switchFlag from joinLive = " + i26 + '}');
            if (((ft1.o) tVar.i0(ft1.o.class)).G3 && rs1.d.f297303a.U0(tVar.f14911b)) {
                long j18 = (long) i26;
                ((ft1.o) tVar.i0(ft1.o.class)).C7(j18);
                ((ft1.o) tVar.i0(ft1.o.class)).w7(j18);
            }
            if (uVar != null) {
                z15 = false;
                uVar.invoke(Boolean.TRUE, 0, 0, "", gVar, tRTCParams, wv02);
            } else {
                z15 = false;
            }
            String str10 = tVar.f14913d;
            StringBuilder sb9 = new StringBuilder();
            sb9.append("processJoinLiveResponse live_id:");
            sb9.append(((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35027d);
            sb9.append(",appId:");
            sb9.append(tRTCParams.sdkAppId);
            sb9.append(",roomId:");
            sb9.append(tRTCParams.roomId);
            sb9.append(",userId:");
            sb9.append(tRTCParams.userId);
            sb9.append(", micUser:$");
            hb1 hb12 = wv02.f41506g;
            sb9.append(hb12 != null ? hb12.f23559j : null);
            sb9.append(",heat1:");
            sb9.append(((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35054u);
            sb9.append(",heat2:");
            sb9.append(((ft1.u) tVar.i0(ft1.u.class)).f217412q.W0);
            sb9.append(",like:");
            sb9.append(((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35061z);
            sb9.append(", enableBgm:");
            sb9.append(rs1.d.f297303a.C(tVar.f14911b));
            Log.i(str10, sb9.toString());
        } else {
            str = "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity";
            z15 = false;
        }
        ((ft1.o) tVar.i0(ft1.o.class)).f217251i = wv02.f41526r;
        ((ft1.w1) tVar.i0(ft1.w1.class)).o5(m60.d.u(wv02.f41526r, 1));
        rs1.d dVar = rs1.d.f297303a;
        if (!dVar.S0()) {
            ft1.o oVar10 = (ft1.o) tVar.i0(ft1.o.class);
            LinkedList<px0> linkedList2 = wv02.f41521p;
            lh4.m.f(linkedList2, "this");
            ij1.b c15 = a.C2191a.c(dj1.b.f200487e, z15, 1, null);
            if (c15 != null) {
                Iterator<T> it = linkedList2.iterator();
                while (true) {
                    if (!it.hasNext()) {
                        t16 = null;
                        break;
                    }
                    t16 = it.next();
                    if (t16.f33534f == 3) {
                        z17 = true;
                        continue;
                    } else {
                        z17 = z15;
                        continue;
                    }
                    if (z17) {
                        break;
                    }
                }
                T t17 = t16;
                if (t17 != null) {
                    t17.f33532d = c15.field_nickname;
                    t17.f33533e = c15.field_avatarUrl;
                }
            }
            oVar10.I2 = linkedList2;
            ((ft1.o) tVar.i0(ft1.o.class)).H2 = wv02.f41524q;
            ((ft1.o) tVar.i0(ft1.o.class)).J2 = wv02.f41528s;
            ft1.o oVar11 = (ft1.o) tVar.i0(ft1.o.class);
            db1 db12 = wv02.f41501d1;
            oVar11.K2 = db12 != null ? db12.f19139d : null;
            ft1.o oVar12 = (ft1.o) tVar.i0(ft1.o.class);
            db1 db13 = wv02.f41501d1;
            if (db13 != null) {
                if (!db13.f19141f) {
                    db13 = null;
                }
                if (db13 != null) {
                    num = Integer.valueOf(db13.f19140e);
                    d60.z.s().i().L(w1.a.Nh, Integer.valueOf(num == null ? num.intValue() : z15 ? 1 : 0));
                    oVar12.L2 = num;
                    ((ft1.o) tVar.i0(ft1.o.class)).M2 = wv02.f41505f1;
                    String str11 = tVar.f14913d;
                    StringBuilder sb10 = new StringBuilder();
                    sb10.append("[processVisitorRoleResponse] preferred_show_nickname:");
                    db1 db14 = wv02.f41501d1;
                    sb10.append(db14 == null ? db14.f19139d : null);
                    sb10.append(", replace_role_type:");
                    sb10.append(((ft1.o) tVar.i0(ft1.o.class)).L2);
                    sb10.append(", is_force_use_server_nickname:");
                    sb10.append(wv02.f41505f1);
                    Log.i(str11, sb10.toString());
                    if (((ft1.o) tVar.i0(ft1.o.class)).I2.isEmpty()) {
                        ft1.o oVar13 = (ft1.o) tVar.i0(ft1.o.class);
                        Log.i(oVar13.f217236f, "updateVisitorRoleInfo,before udpate:" + m60.i.h(oVar13.s6()));
                        Iterator<T> it4 = oVar13.I2.iterator();
                        while (true) {
                            if (!it4.hasNext()) {
                                t15 = null;
                                break;
                            }
                            T next = it4.next();
                            if (next.f33534f == oVar13.v5()) {
                                z16 = true;
                                continue;
                            } else {
                                z16 = z15;
                                continue;
                            }
                            if (z16) {
                                t15 = next;
                                break;
                            }
                        }
                        T t18 = t15;
                        if (t18 != null) {
                            oVar13.G2 = t18;
                        }
                        Log.i(oVar13.f217236f, "updateVisitorRoleInfo,after udpate:" + m60.i.h(oVar13.s6()) + " roteType: " + oVar13.s6().f33534f);
                        rs1.d.f297303a.T1(((ft1.o) tVar.i0(ft1.o.class)).I2, wv02.f41524q, ((ft1.o) tVar.i0(ft1.o.class)).J2);
                    } else {
                        Log.i(tVar.f14913d, "processVisitorRoleResponse " + dVar.O1("joinLive", ((ft1.o) tVar.i0(ft1.o.class)).I2, ((ft1.o) tVar.i0(ft1.o.class)).v5(), ((ft1.o) tVar.i0(ft1.o.class)).J2));
                    }
                }
            }
            num = null;
            d60.z.s().i().L(w1.a.Nh, Integer.valueOf(num == null ? num.intValue() : z15 ? 1 : 0));
            oVar12.L2 = num;
            ((ft1.o) tVar.i0(ft1.o.class)).M2 = wv02.f41505f1;
            String str112 = tVar.f14913d;
            StringBuilder sb102 = new StringBuilder();
            sb102.append("[processVisitorRoleResponse] preferred_show_nickname:");
            db1 db142 = wv02.f41501d1;
            sb102.append(db142 == null ? db142.f19139d : null);
            sb102.append(", replace_role_type:");
            sb102.append(((ft1.o) tVar.i0(ft1.o.class)).L2);
            sb102.append(", is_force_use_server_nickname:");
            sb102.append(wv02.f41505f1);
            Log.i(str112, sb102.toString());
            if (((ft1.o) tVar.i0(ft1.o.class)).I2.isEmpty()) {
            }
        }
        Log.i(tVar.f14913d, "joinLive tracBuff = " + wv02.f41503e1);
        ((ft1.o) tVar.f14911b.a(ft1.o.class)).W = wv02.f41503e1;
        rs1.d dVar2 = rs1.d.f297303a;
        if (dVar2.C(tVar.f14911b) && (tVar.n0() instanceof MMActivity)) {
            Context n09 = tVar.n0();
            lh4.m.e(n09, str);
            dVar2.L1((MMActivity) n09, tVar.f14911b, wv02.A, j0.f14643d);
        }
        FinderLiveService finderLiveService2 = FinderLiveService.f112934d;
        finderLiveService2.getClass();
        com.tencent.mm.plugin.finder.live.view.b bVar = FinderLiveService.f112937g;
        if (!(bVar == null || (r0Var = (sr1.r0) bVar.getPlugin(sr1.r0.class)) == null)) {
            r0Var.n1();
            wg4.b0 b0Var8 = wg4.b0.f332794a;
        }
        ((k1) tVar.i0(k1.class)).V0 = wv02.f41513j1;
        ((ft1.o) tVar.i0(ft1.o.class)).f217284p0 = wv02.f41518n1;
        ft1.o oVar14 = (ft1.o) tVar.i0(ft1.o.class);
        c51 c513 = wv02.f41516m1;
        oVar14.f217301s2 = m60.d.v(c513 != null ? c513.f17948g : 0, 1);
        ft1.w wVar = (ft1.w) finderLiveService2.e(ft1.w.class);
        if (wVar != null) {
            c51 c514 = wv02.f41516m1;
            wVar.u5("joinLive", c514 != null ? c514.f17950i : 0);
            wg4.b0 b0Var9 = wg4.b0.f332794a;
        }
    }

    public static final Object h0(t tVar, int i15, bh4.d dVar) {
        tVar.getClass();
        bh4.h hVar = new bh4.h(ch4.b.b(dVar));
        yz3.d c15 = yz3.j.c(zr.n.class);
        lh4.m.f(c15, "getService(IFinderLiveFeatureService::class.java)");
        n.a.c((zr.n) c15, ((ft1.u) tVar.i0(ft1.u.class)).f217412q.f35027d, true, null, new k0(tVar, hVar), i15, null, null, 100, null);
        return hVar.b();
    }

    @Override // br1.y5
    public void A(byte[] bArr, long j15, long j16, String str, String str2, int i15, x.a aVar) {
        lh4.m.g(str, "objectNonceId");
        lh4.m.g(str2, "finderUserName");
        String str3 = this.f14913d;
        Log.i(str3, "randomLinkMic: liveId:" + j15 + ", objectId:" + j16 + ", objectNonceId:" + str + ", finderUserName:" + str2 + ", opCode:" + i15);
        n94.f h15 = new do1.x(bArr, j15, j16, str, str2, i15, aVar).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    /* JADX DEBUG: Failed to insert an additional move for type inference into block B:50:0x010b */
    /* JADX WARNING: Removed duplicated region for block: B:28:0x00a9  */
    /* JADX WARNING: Removed duplicated region for block: B:49:0x010a  */
    /* JADX WARNING: Removed duplicated region for block: B:51:0x010d  */
    @Override // br1.y5
    public boolean B(Intent intent) {
        boolean z15;
        boolean z16;
        T t15;
        boolean z17;
        boolean z18;
        Integer num;
        boolean z19;
        LinkedList<j52> linkedList;
        T t16;
        int i15 = ((ft1.o) i0(ft1.o.class)).s6().f33534f;
        ((ft1.o) i0(ft1.o.class)).v6();
        int i16 = ((ft1.o) i0(ft1.o.class)).s6().f33534f;
        Log.i(this.f14913d, "checkVisitorRoleType oriVisitorRoleType:" + i15 + ",newVisitorRoleType:" + i16);
        if (i15 == i16 || i16 == 4) {
            z15 = false;
        } else {
            z15 = true;
        }
        if (!z15) {
            ft1.o oVar = (ft1.o) i0(ft1.o.class);
            w51 w512 = oVar.D1;
            k52 k522 = oVar.f217233e2;
            wg4.b0 b0Var = null;
            Integer num2 = null;
            if (!(w512 == null || k522 == null)) {
                qs1.q.f291299a.c(k522, oVar.f217236f + "_getlast");
                String str = w512.f40636f;
                if (str == null || str.length() == 0) {
                    z19 = true;
                } else {
                    z19 = false;
                }
                if (!z19 && (linkedList = k522.f26951d) != null) {
                    Iterator<T> it = linkedList.iterator();
                    while (true) {
                        if (!it.hasNext()) {
                            t16 = null;
                            break;
                        }
                        t16 = it.next();
                        if (lh4.m.b(t16.f25713d, str)) {
                            break;
                        }
                    }
                    t15 = t16;
                    if (t15 == null) {
                        j52 y55 = ((ft1.o) i0(ft1.o.class)).y5();
                        if (y55 == null || t15.f25715f == y55.f25715f) {
                            z17 = false;
                        } else {
                            z17 = true;
                        }
                        String str2 = this.f14913d;
                        StringBuilder sb5 = new StringBuilder();
                        sb5.append("check should update by gameRankSwitch, ");
                        if (y55 != null) {
                            z18 = true;
                        } else {
                            z18 = false;
                        }
                        sb5.append(z18);
                        sb5.append(", last:");
                        sb5.append(t15.f25715f);
                        sb5.append(", cur:");
                        if (y55 != null) {
                            num = Integer.valueOf(y55.f25715f);
                        } else {
                            num = null;
                        }
                        sb5.append(num);
                        Log.i(str2, sb5.toString());
                        if (y55 != null) {
                            num2 = Integer.valueOf(y55.f25715f);
                        }
                        if (z17 && num2 != null) {
                            t15.f25715f = num2.intValue();
                        }
                        b0Var = wg4.b0.f332794a;
                        z16 = z17;
                    } else {
                        z16 = false;
                    }
                    if (b0Var == null) {
                        Log.i(this.f14913d, "lastGameRankSwitchInfo null");
                    }
                }
            }
            t15 = null;
            if (t15 == null) {
            }
            if (b0Var == null) {
            }
        } else {
            z16 = false;
        }
        if (!z15 && !z16) {
            return false;
        }
        FeedUpdateEvent feedUpdateEvent = new FeedUpdateEvent();
        feedUpdateEvent.f62754d.f62755a = ((ft1.u) i0(ft1.u.class)).f217412q.f35027d;
        feedUpdateEvent.f62754d.f62756b = 14;
        feedUpdateEvent.publish();
        return true;
    }

    @Override // br1.y5
    public void C(long j15, long j16, String str, byte[] bArr, int i15, x31 x312, String str2, s.a aVar) {
        x31 x313 = x312;
        String str3 = this.f14913d;
        Log.i(str3, "acceptBattle liveId:" + j15 + " objectId:" + j16 + " objectNonceId:" + str + " battleId:" + str2);
        oy0 oy02 = new oy0();
        oy02.f32486n = str2;
        oy02.f32479d = x313;
        LinkedList<x31> linkedList = new LinkedList<>();
        if (x313 == null) {
            x313 = new x31();
        }
        linkedList.add(x313);
        oy02.f32485j = linkedList;
        oy02.f32483h = xv3.b.a(new py0().toByteArray());
        oy02.f32480e = 20027;
        oy02.f32481f = a5.f118672a.o();
        n94.f h15 = new cr1.s(j15, j16, str, bArr, i15, oy02).h();
        h15.H(new c(aVar));
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void D(Bundle bundle, Object obj, String str) {
        Bundle bundle2;
        boolean z15;
        lh4.m.g(str, "keyUsername");
        if (obj instanceof Bundle) {
            bundle2 = (Bundle) obj;
        } else {
            bundle2 = null;
        }
        if (bundle2 != null) {
            String string = bundle2.getString(str);
            if (string == null || string.length() == 0) {
                z15 = true;
            } else {
                z15 = false;
            }
            if (!z15) {
                r0.h(r0.f14834a, n0(), this.f14911b, false, string, this.f14912c, false, null, 96, null);
                return;
            }
            String str2 = this.f14913d;
            Log.i(str2, "onPostGoToVisitorProfileResult finderUsername:" + string);
        }
    }

    @Override // br1.y5
    public void E(String str, boolean z15, Context context, kh4.l<? super Boolean, wg4.b0> lVar) {
        lh4.m.g(context, "context");
        lh4.m.g(lVar, "callback");
        if (z15) {
            String c15 = r32.b.c(context);
            long j15 = ((ft1.u) i0(ft1.u.class)).f217408j;
            long j16 = ((ft1.u) i0(ft1.u.class)).f217412q.f35027d;
            fg1 fg12 = new fg1();
            LinkedList<ah1> linkedList = fg12.f21609d;
            ah1 ah12 = new ah1();
            ah12.f16282d = str;
            ah12.f16283e = 2;
            linkedList.add(ah12);
            wg4.b0 b0Var = wg4.b0.f332794a;
            n94.f h15 = new cr1.r0(c15, j15, j16, 2, null, fg12, 16, null).h();
            h15.H(new k0(this, context, lVar, str));
            if (context instanceof MMActivity) {
                h15.n((MMActivity) context);
                return;
            }
            return;
        }
        String c16 = r32.b.c(context);
        long j17 = ((ft1.u) i0(ft1.u.class)).f217408j;
        long j18 = ((ft1.u) i0(ft1.u.class)).f217412q.f35027d;
        fx0 fx02 = new fx0();
        LinkedList<ah1> linkedList2 = fx02.f22109d;
        ah1 ah13 = new ah1();
        ah13.f16282d = str;
        ah13.f16283e = 2;
        linkedList2.add(ah13);
        wg4.b0 b0Var2 = wg4.b0.f332794a;
        n94.f h16 = new cr1.r0(c16, j17, j18, 1, fx02, null, 32, null).h();
        h16.H(new l0(this, context, lVar, str));
        if (context instanceof MMActivity) {
            h16.n((i74.b) context);
        }
    }

    @Override // br1.y5
    public void F(int i15, int i16, t0.a aVar) {
        c70.i iVar;
        n94.f h15 = new cr1.t0(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, r32.b.d(this.f14912c), ((ft1.u) i0(ft1.u.class)).f217408j, 0, i15, i16, aVar).h();
        boolean z15 = true;
        if (i16 != 1 && n0() != null && (n0() instanceof MMActivity)) {
            FinderLiveService.f112934d.getClass();
            i70.a aVar2 = FinderLiveService.f112936f;
            if (aVar2 == null || (iVar = aVar2.A) == null || iVar.f()) {
                z15 = false;
            }
            if (z15) {
                Context n05 = n0();
                lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
                h15.n((MMActivity) n05);
            }
        }
    }

    @Override // br1.y5
    public void G(long j15, long j16, String str, byte[] bArr, int i15, LinkedList<String> linkedList, w.a aVar) {
        lh4.m.g(linkedList, "usernameList");
        String str2 = this.f14913d;
        Log.i(str2, "batchGetMicContact liveId:" + j15 + ", objectId:" + j16 + ", nonceId:" + str + ", scene:" + i15);
        n94.f h15 = new cr1.w(j15, j16, str, bArr, i15, linkedList, aVar).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void H(String str) {
        yz3.d c15 = yz3.j.c(e2.class);
        lh4.m.f(c15, "getService(IFinderCommon…atureService::class.java)");
        e2.a.a((e2) c15, str == null ? "" : str, 0, null, 0, null, 0, 0, true, null, null, 872, null);
    }

    @Override // br1.y5
    public void I() {
        m60.d.O(new j0(this));
    }

    @Override // br1.y5
    public void J(MMActivity mMActivity, LinkedList<String> linkedList, boolean z15, kh4.p<? super Boolean, ? super sf1, wg4.b0> pVar) {
        lh4.m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        lh4.m.g(linkedList, "stockIds");
        boolean z16 = dj1.b.f200487e.O5().f39654h == 3;
        rs1.d.f297303a.d2(mMActivity, true);
        new b1(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, ((ft1.o) i0(ft1.o.class)).f217278o, z16 ? r32.b.c(mMActivity) : null, xv3.b.a(((ft1.u) i0(ft1.u.class)).f217409n), linkedList, new i0(mMActivity, pVar, z15), "").h().n(mMActivity);
    }

    @Override // br1.y5
    public void K(Activity activity, boolean z15) {
        lh4.m.g(activity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        v2 v2Var = (v2) yz3.j.c(v2.class);
        Intent intent = new Intent();
        LinkedList<px0> linkedList = ((ft1.o) i0(ft1.o.class)).I2;
        ArrayList arrayList = new ArrayList(xg4.v.m(linkedList, 10));
        Iterator<T> it = linkedList.iterator();
        while (it.hasNext()) {
            arrayList.add(it.next().toByteArray());
        }
        intent.putExtra("KEY_VISITOR_ROLE_LIST", arrayList);
        intent.putExtra("KEY_VISITOR_ROLE", ((ft1.o) i0(ft1.o.class)).v5());
        intent.putExtra("KEY_MODIFY_TIME", ((ft1.o) i0(ft1.o.class)).J2);
        intent.putExtra("KEY_SOURCE", 1);
        wg4.b0 b0Var = wg4.b0.f332794a;
        v2Var.vx(activity, intent, 1009, z15);
    }

    @Override // br1.y5
    public void L(Context context, Intent intent, Integer num) {
        lh4.m.g(context, "context");
        ((ft1.o) i0(ft1.o.class)).X0 = false;
        if (intent != null) {
            if (num != null) {
                sv3.b.n(context, "webview", ".ui.tools.WebViewUI", intent, num.intValue());
            } else {
                sv3.b.j(context, "webview", ".ui.tools.WebViewUI", intent, null);
            }
        }
    }

    @Override // br1.y5
    public void M(View view, int i15) {
        lh4.m.g(view, "view");
        m60.d.O(new e(this, view, i15));
    }

    @Override // br1.y5
    public void N(long j15, long j16, String str, byte[] bArr, int i15, x31 x312, String str2, int i16, String str3, xv3.b bVar, b.a aVar) {
        x31 x313;
        String str4;
        boolean z15;
        String str5;
        x43 x432;
        FinderObject finderObject;
        FinderObjectDesc finderObjectDesc;
        LinkedList<FinderMedia> linkedList;
        FinderMedia finderMedia;
        FinderObjectDesc finderObjectDesc2;
        k41 k412;
        Log.i(this.f14913d, "acceptLinkMicPk liveId:" + j15 + ", objectId:" + j16 + ", nonceId:" + str + ", scene:" + i15 + ", sdkUserId:" + str2 + ", sdkLiveId:" + i16 + ", sessionId:" + str3);
        oy0 oy02 = new oy0();
        oy02.f32479d = x312;
        LinkedList<x31> linkedList2 = new LinkedList<>();
        if (x312 == null) {
            x313 = new x31();
        } else {
            x313 = x312;
        }
        linkedList2.add(x313);
        oy02.f32485j = linkedList2;
        oy02.f32486n = str3;
        ry0 ry02 = new ry0();
        FinderObject finderObject2 = ((ft1.o) i0(ft1.o.class)).f217273n;
        x43 x433 = null;
        if (finderObject2 == null || (finderObjectDesc2 = finderObject2.objectDesc) == null || (k412 = finderObjectDesc2.liveDesc) == null) {
            str4 = null;
        } else {
            str4 = k412.f26925d;
        }
        if (str4 == null || str4.length() == 0) {
            z15 = true;
        } else {
            z15 = false;
        }
        if (z15 && ((finderObject = ((ft1.o) i0(ft1.o.class)).f217273n) == null || (finderObjectDesc = finderObject.objectDesc) == null || (linkedList = finderObjectDesc.media) == null || (finderMedia = (FinderMedia) xg4.c0.Q(linkedList)) == null || (str4 = finderMedia.url) == null)) {
            str4 = "";
        }
        ry02.f35859g = str4;
        if (x312 == null || (str5 = x312.f41757o) == null) {
            str5 = "";
        }
        ry02.f35858f = str5;
        ry02.f35856d = str2;
        ry02.f35857e = i16;
        ry02.f35860h = bVar;
        if (x312 != null) {
            x432 = x312.f41765w;
        } else {
            x432 = null;
        }
        ry02.f35861i = x432;
        ry02.f35862j = ((ft1.o) i0(ft1.o.class)).I5();
        if (x312 != null) {
            x433 = x312.f41765w;
        }
        ry02.f35861i = x433;
        oy02.f32483h = xv3.b.a(ry02.toByteArray());
        oy02.f32480e = 20016;
        oy02.f32481f = a5.f118672a.o();
        n94.f h15 = new cr1.b(j15, j16, str, bArr, i15, oy02, aVar).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void O(Activity activity) {
        int i15;
        lh4.m.g(activity, "context");
        Intent intent = new Intent();
        String tI0 = ((ie1.i) yz3.j.c(ie1.i.class)).tI0();
        if (tI0 == null) {
            tI0 = "";
        }
        if (Util.isEqual(((ft1.u) i0(ft1.u.class)).f217411p.f22340n, ((ft1.o) i0(ft1.o.class)).P6())) {
            i15 = 1;
        } else {
            i15 = 2;
        }
        intent.putExtra("key_live_anchor_type", i15);
        intent.putExtra("key_live_id", m60.d.p(((ft1.u) i0(ft1.u.class)).f217412q.f35027d));
        intent.putExtra("key_live_attach", ((ft1.o) i0(ft1.o.class)).R2.f202480b);
        intent.putExtra("key_from", 3);
        intent.putExtra("key_session_id", tI0);
        String str = (String) xg4.c0.Q(((ft1.o) i0(ft1.o.class)).R2.f202479a);
        if (str != null) {
            intent.putExtra("key_finder_live_username", str);
        }
        sv3.b.j(activity, "luckymoney", ".ui.LuckyMoneyPrepareUI", intent, null);
        String str2 = this.f14913d;
        Log.i(str2, "goPrepareLuckyMoney liveId:" + ((ft1.u) i0(ft1.u.class)).f217412q.f35027d + ", luckyMoneyData:" + ((ft1.o) i0(ft1.o.class)).R2 + ", sessionId:" + tI0);
    }

    @Override // br1.y5
    public void P(int i15, x31 x312, String str, String str2, g.a aVar) {
        String str3;
        String str4;
        String str5;
        boolean S0 = rs1.d.f297303a.S0();
        String str6 = this.f14913d;
        StringBuilder sb5 = new StringBuilder();
        sb5.append("closeLinkMic isAnchor:");
        sb5.append(S0);
        sb5.append(", linkMicState:");
        sb5.append(((ft1.e0) i0(ft1.e0.class)).f217040x);
        sb5.append(", liveId:");
        sb5.append(((ft1.u) i0(ft1.u.class)).f217412q.f35027d);
        sb5.append(", objectId:");
        sb5.append(((ft1.u) i0(ft1.u.class)).f217408j);
        sb5.append(", nonceId:");
        sb5.append(((ft1.u) i0(ft1.u.class)).f217415t);
        sb5.append(", scene:");
        sb5.append(i15);
        sb5.append(", userId:");
        dt1.l D5 = ((ft1.e0) i0(ft1.e0.class)).D5();
        if (D5 != null) {
            str3 = D5.f202415a;
        } else {
            str3 = null;
        }
        sb5.append(str3);
        sb5.append(", selfSdkId:");
        sb5.append(((ft1.o) i0(ft1.o.class)).P6());
        sb5.append(", sessionId:");
        dt1.l D52 = ((ft1.e0) i0(ft1.e0.class)).D5();
        String str7 = "";
        if (D52 == null || (str4 = D52.f202420f) == null) {
            str4 = str7;
        }
        sb5.append(str4);
        sb5.append(", applySessionId:");
        sb5.append(((ft1.e0) i0(ft1.e0.class)).f217028j);
        Log.i(str6, sb5.toString());
        long j15 = ((ft1.u) i0(ft1.u.class)).f217412q.f35027d;
        long j16 = ((ft1.u) i0(ft1.u.class)).f217408j;
        String str8 = ((ft1.u) i0(ft1.u.class)).f217415t;
        byte[] bArr = ((ft1.u) i0(ft1.u.class)).f217409n;
        if (str == null) {
            str5 = str7;
        } else {
            str5 = str;
        }
        if (str2 != null) {
            str7 = str2;
        }
        oy0 oy02 = new oy0();
        oy02.f32486n = str7;
        hz0 hz02 = new hz0();
        hz02.f24308d = str5;
        oy02.f32483h = xv3.b.a(hz02.toByteArray());
        oy02.f32480e = 20005;
        oy02.f32481f = a5.f118672a.o();
        new cr1.g(j15, j16, str8, bArr, i15, oy02, aVar).h();
    }

    @Override // br1.y5
    public void Q(MMActivity mMActivity, vs1.z zVar, kh4.p<? super Boolean, ? super sf1, wg4.b0> pVar) {
        String str;
        lh4.m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        lh4.m.g(zVar, "product");
        LinkedList<String> linkedList = new LinkedList<>();
        LinkedList<s20> linkedList2 = zVar.f328520u.f37031z;
        if (linkedList2 != null) {
            for (s20 s202 : xg4.c0.M(linkedList2)) {
                if (s202.f35994f > 0 && (str = s202.f35993e) != null) {
                    linkedList.add(str);
                }
            }
        }
        if (linkedList.isEmpty()) {
            Log.i(this.f14913d, "empty stockIds");
            if (pVar != null) {
                pVar.invoke(Boolean.TRUE, null);
                return;
            }
            return;
        }
        J(mMActivity, linkedList, false, new h0(this, pVar));
    }

    @Override // br1.y5
    public void R(String str, long j15, o.a aVar) {
        lh4.m.g(aVar, "callback");
        n94.f h15 = new cr1.o(str, j15, aVar).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public long S() {
        Long l15;
        dt1.h hVar = ((j1) i0(j1.class)).f217126i;
        String str = this.f14913d;
        StringBuilder sb5 = new StringBuilder();
        sb5.append("[WeCoin] getWeCoinBalanceFromCache, balance = ");
        if (hVar != null) {
            l15 = Long.valueOf(hVar.f202383a);
        } else {
            l15 = null;
        }
        sb5.append(l15);
        Log.i(str, sb5.toString());
        if (hVar != null) {
            return hVar.f202383a;
        }
        return 0;
    }

    @Override // br1.y5
    public void T(int i15, kh4.s<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super ol0, wg4.b0> sVar) {
        long j15 = ((ft1.u) i0(ft1.u.class)).f217412q.f35027d;
        long j16 = ((ft1.u) i0(ft1.u.class)).f217408j;
        String str = this.f14913d;
        Log.i(str, "doCloseLive liveId:" + j15 + " objectId:" + j16 + " nonceId:" + ((ft1.u) i0(ft1.u.class)).f217415t);
        if (j15 == 0 || j16 == 0) {
            Log.i(this.f14913d, "doCloseLive return by invalid params");
            return;
        }
        new cr1.f(j15, r32.b.d(this.f14912c), j16, ((ft1.u) i0(ft1.u.class)).f217415t, i15, new j(this, sVar)).h();
        new FeedLiveLifeEvent().publish();
    }

    @Override // br1.y5
    public void U(kh4.u<? super Boolean, ? super Boolean, ? super String, ? super Integer, ? super Integer, ? super String, ? super on0, wg4.b0> uVar) {
        String str;
        int i15;
        nw5 nw5;
        int i16;
        e31 e312;
        boolean z15;
        int i17;
        Integer num;
        String str2;
        LinkedList linkedList = new LinkedList();
        if (m60.d.u(((ft1.w1) i0(ft1.w1.class)).f217493i, 1)) {
            linkedList.addAll(rs1.d.f297303a.b0(((ft1.w1) i0(ft1.w1.class)).f217492h));
        }
        LinkedList linkedList2 = new LinkedList();
        if (m60.d.u(((ft1.w1) i0(ft1.w1.class)).f217493i, 2)) {
            linkedList2.addAll(((ft1.w1) i0(ft1.w1.class)).f217495n);
        }
        LinkedList linkedList3 = new LinkedList();
        if (m60.d.u(((ft1.w1) i0(ft1.w1.class)).f217493i, 4)) {
            linkedList3.addAll(((ft1.w1) i0(ft1.w1.class)).f217496o);
        }
        if (((ft1.o) i0(ft1.o.class)).F3) {
            str = ((ft1.o) i0(ft1.o.class)).H3;
        } else {
            str = "";
        }
        if (((ft1.o) i0(ft1.o.class)).f217252i1) {
            i15 = 5;
        } else {
            i15 = ((ft1.o) i0(ft1.o.class)).J3;
        }
        if (((ft1.o) i0(ft1.o.class)).F3) {
            nw5 = new nw5();
            nw5.f31398d = ((ft1.o) i0(ft1.o.class)).I3;
            nw5.f31399e = ((ft1.o) i0(ft1.o.class)).K3;
            nw5.f31400f = ((ft1.o) i0(ft1.o.class)).L3;
        } else {
            nw5 = null;
        }
        if (!((ft1.o) this.f14911b.a(ft1.o.class)).G3 || !((ft1.w1) this.f14911b.a(ft1.w1.class)).m5()) {
            i16 = ((ft1.w1) this.f14911b.a(ft1.w1.class)).f217493i;
        } else {
            i16 = 0;
        }
        if (!((ft1.o) this.f14911b.a(ft1.o.class)).G3 || !((ft1.w1) this.f14911b.a(ft1.w1.class)).m5()) {
            e312 = ((ft1.w1) this.f14911b.a(ft1.w1.class)).f217498q;
        } else {
            e312 = null;
        }
        boolean z16 = ((ft1.o) this.f14911b.a(ft1.o.class)).f217264k4;
        byte[] bArr = (byte[]) ((wg4.l) ((n1) ((ft1.o) this.f14911b.a(ft1.o.class)).f217268l4).getValue()).f332808e;
        String str3 = ((ft1.o) this.f14911b.a(ft1.o.class)).f217282o4;
        Log.i(this.f14913d, "fromChatRoomId:" + str3 + ", visibilityRoomList:" + xg4.c0.V(linkedList2, ",", null, null, 0, null, null, 62, null));
        if (str3 == null || str3.length() == 0) {
            z15 = true;
        } else {
            z15 = false;
        }
        if (z15 || !linkedList2.contains(str3)) {
            i17 = 0;
        } else {
            i17 = 1;
        }
        String str4 = this.f14913d;
        StringBuilder sb5 = new StringBuilder();
        sb5.append("doCreateLive: luckyMoneyChatRoom:");
        sb5.append(((ft1.o) i0(ft1.o.class)).R2.f202479a);
        sb5.append(", visibilityMode:");
        sb5.append(i16);
        sb5.append(", visibilityList:");
        sb5.append(linkedList);
        sb5.append(", visibilityRoomList:");
        sb5.append(linkedList2);
        sb5.append(", externalPost:");
        sb5.append(((ft1.o) i0(ft1.o.class)).F3);
        sb5.append(", appid:");
        sb5.append(str);
        sb5.append(", gameVersionType:");
        if (nw5 != null) {
            num = Integer.valueOf(nw5.f31398d);
        } else {
            num = null;
        }
        sb5.append(num);
        sb5.append(", scene:");
        sb5.append(i15);
        sb5.append(", acknowledgeSpamMsg:");
        sb5.append(z16);
        Log.i(str4, sb5.toString());
        String d15 = r32.b.d(this.f14912c);
        FinderObjectDesc finderObjectDesc = ((ft1.u) i0(ft1.u.class)).f217414s;
        zj1 zj12 = ((ft1.o) i0(ft1.o.class)).E2;
        int i18 = ((ft1.w1) i0(ft1.w1.class)).f217494j;
        LinkedList<String> linkedList4 = ((ft1.o) i0(ft1.o.class)).R2.f202479a;
        wd1 K5 = ((ft1.o) i0(ft1.o.class)).K5();
        if (K5 != null) {
            str2 = K5.f40926h;
        } else {
            str2 = null;
        }
        new cr1.i(d15, finderObjectDesc, null, zj12, i16, i18, linkedList, linkedList2, linkedList3, linkedList4, str2, str, i15, nw5, e312, z16, bArr, i17, this.f14912c, ((ft1.o) i0(ft1.o.class)).I5(), ((ft1.w1) this.f14911b.a(ft1.w1.class)).f217499r, new l(this, uVar), 4, null).h();
    }

    @Override // br1.y5
    public void V(long j15, long j16, String str, byte[] bArr, int i15, x31 x312, String str2, u.a aVar) {
        x31 x313 = x312;
        String str3 = this.f14913d;
        Log.i(str3, "applyBattle liveId:" + j15 + " objectId:" + j16 + " objectNonceId:" + str + " micId:" + str2);
        oy0 oy02 = new oy0();
        oy02.f32479d = x313;
        LinkedList<x31> linkedList = new LinkedList<>();
        if (x313 == null) {
            x313 = new x31();
        }
        linkedList.add(x313);
        oy02.f32485j = linkedList;
        vy0 vy02 = new vy0();
        vy02.f40405d = str2;
        oy02.f32483h = xv3.b.a(vy02.toByteArray());
        oy02.f32480e = 20026;
        oy02.f32481f = a5.f118672a.o();
        n94.f h15 = new cr1.u(j15, j16, str, bArr, i15, oy02).h();
        h15.H(new d(aVar));
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void W(Context context, long j15, long j16, y42 y422, f.a aVar) {
        lh4.m.g(context, "context");
        lh4.m.g(y422, "gameTeamSetting");
        String str = this.f14913d;
        Log.i(str, "setGameTeamMode liveId:" + j15 + " objectId:" + j16 + " gameTeamMode:" + y422);
        int i15 = ((ft1.o) i0(ft1.o.class)).f217289q;
        String c15 = r32.b.c(context);
        int i16 = do1.f.f201656y;
        do1.f fVar = new do1.f(j15, j16, i15, c15, 0, null, y422, null, 0, new m0(aVar, context), null, 1200, null);
        fVar.j(context, context.getResources().getString(R.string.f9y), 500);
        n94.f h15 = fVar.h();
        if (context instanceof MMActivity) {
            h15.n((i74.b) context);
        }
    }

    @Override // br1.y5
    public zl3.f Y(FragmentActivity fragmentActivity, int i15, kh4.l<? super Boolean, wg4.b0> lVar) {
        lh4.m.g(fragmentActivity, "context");
        lh4.m.g(lVar, "callback");
        String tI0 = ((ie1.i) yz3.j.c(ie1.i.class)).tI0();
        if (tI0 == null) {
            tI0 = "";
        }
        String str = this.f14913d;
        Log.i(str, "showRechargeFoodsDialog sessionId:" + tI0);
        zl3.i iVar = new zl3.i();
        iVar.f354475a = i15;
        iVar.f354477c = tI0;
        iVar.f354487m = true;
        iVar.f354478d = new p0(this, fragmentActivity, lVar);
        iVar.f354481g = zl3.h.COMMON_CHARGE;
        return ((zl3.e) d60.z.q(zl3.e.class)).zK0(fragmentActivity, iVar);
    }

    @Override // br1.y5
    public void Z(long j15, long j16, String str, byte[] bArr, int i15, x31 x312, int i16, int i17, d.a aVar) {
        x31 x313 = x312;
        String str2 = this.f14913d;
        Log.i(str2, "applyLinkMic liveId:" + j15 + ", objectId:" + j16 + ", nonceId:" + str + ", scene:" + i15 + ", micType:" + i16);
        oy0 oy02 = new oy0();
        oy02.f32479d = x313;
        LinkedList<x31> linkedList = new LinkedList<>();
        if (x313 == null) {
            x313 = new x31();
        }
        linkedList.add(x313);
        oy02.f32485j = linkedList;
        wy0 wy02 = new wy0();
        wy02.f41616d = i16;
        wy02.f41617e = i17;
        oy02.f32483h = xv3.b.a(wy02.toByteArray());
        oy02.f32480e = 20003;
        oy02.f32481f = a5.f118672a.o();
        n94.f h15 = new cr1.d(j15, j16, str, bArr, i15, oy02, aVar).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void a(Context context, long j15, long j16, String str, int i15, int i16, String str2, String str3, int i17, xv3.b bVar, List<il.a> list, String str4, String str5, String str6, byte[] bArr, i9.d dVar) {
        lh4.m.g(context, "context");
        lh4.m.g(str3, "sendGiftTargetUserName");
        lh4.m.g(list, "randomGiftInfo");
        WeakReference weakReference = new WeakReference(context);
        if (((ft1.o) i0(ft1.o.class)).A5() || i17 != 0) {
            com.tencent.mm.plugin.report.service.q qVar = com.tencent.mm.plugin.report.service.q.INSTANCE;
            qVar.t(1581, 70);
            String d15 = r32.b.d(this.f14912c);
            String o15 = a5.f118672a.o();
            qVar.g(22129, 1, o15, "", 1, 1, 0, "");
            x0 x0Var = new x0(j15, j16, str, i15, d15, i16, o15, str2, str3, ((b5) y24.r.f342954a.b(context).c(b5.class)).l0(), str6, i17, bVar, bArr, list, str4, str5, null);
            n94.f h15 = x0Var.h();
            if (context instanceof MMActivity) {
                h15.n((i74.b) context);
            }
            h15.H(new w(this, i16, dVar, x0Var, o15, weakReference, str, i15, str2));
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:16:0x006b  */
    /* JADX WARNING: Removed duplicated region for block: B:25:0x0117  */
    /* JADX WARNING: Removed duplicated region for block: B:33:0x0139  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x002d  */
    @Override // br1.y5
    public Object a0(int i15, int i16, bh4.d<? super qw0> dVar) {
        v vVar;
        int i17;
        lh4.f0 f0Var;
        lh4.f0 f0Var2;
        t tVar;
        ch4.a aVar;
        rp1.e eVar;
        if (dVar instanceof v) {
            vVar = (v) dVar;
            int i18 = vVar.f15050i;
            if ((i18 & Integer.MIN_VALUE) != 0) {
                vVar.f15050i = i18 - Integer.MIN_VALUE;
                Object obj = vVar.f15048g;
                ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
                i17 = vVar.f15050i;
                if (i17 != 0) {
                    ResultKt.throwOnFailure(obj);
                    Log.i(this.f14913d, "[likeInfo] doLikeLive:" + i15);
                    if (i15 <= 0) {
                        return null;
                    }
                    ((ft1.o) i0(ft1.o.class)).U0 += (long) i15;
                    bv1 m05 = m0();
                    lh4.f0 f0Var3 = new lh4.f0();
                    cr1.q qVar = new cr1.q(n2.f333835a.b(564, m05), ((ft1.u) i0(ft1.u.class)).f217409n, ((ft1.u) i0(ft1.u.class)).f217412q.f35027d, i15, ((ft1.u) i0(ft1.u.class)).f217408j, i16, ((ft1.u) i0(ft1.u.class)).f217415t, r32.b.d(this.f14912c), m05, c0(((ft1.u) i0(ft1.u.class)).f217412q.f35027d));
                    vVar.f15045d = this;
                    vVar.f15046e = f0Var3;
                    vVar.f15050i = 1;
                    obj = rp1.d.c(qVar, null, vVar, 1, null);
                    aVar = aVar2;
                    if (obj == aVar) {
                        return aVar;
                    }
                    tVar = this;
                    f0Var = f0Var3;
                } else if (i17 == 1) {
                    ResultKt.throwOnFailure(obj);
                    tVar = (t) vVar.f15045d;
                    f0Var = (lh4.f0) vVar.f15046e;
                    aVar = aVar2;
                } else if (i17 == 2) {
                    f0Var = (lh4.f0) vVar.f15046e;
                    tVar = (t) vVar.f15045d;
                    ResultKt.throwOnFailure(obj);
                    eVar = (rp1.e) vVar.f15047f;
                    aVar = aVar2;
                    if (eVar instanceof rp1.b) {
                        bh4.f fVar = eVar.f296977a;
                        if (fVar == null) {
                            fVar = vVar.getContext();
                        }
                        C0332t tVar2 = new C0332t(eVar, null, tVar);
                        vVar.f15045d = f0Var;
                        vVar.f15046e = eVar;
                        vVar.f15047f = null;
                        vVar.f15050i = 3;
                        if (gk4.h.g(fVar, tVar2, vVar) == aVar) {
                            return aVar;
                        }
                        f0Var2 = f0Var;
                        f0Var = f0Var2;
                    }
                    return f0Var.f253292d;
                } else if (i17 == 3) {
                    rp1.e eVar2 = (rp1.e) vVar.f15046e;
                    f0Var2 = (lh4.f0) vVar.f15045d;
                    ResultKt.throwOnFailure(obj);
                    f0Var = f0Var2;
                    return f0Var.f253292d;
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                eVar = (rp1.e) obj;
                if (eVar instanceof rp1.f) {
                    bh4.f fVar2 = eVar.f296977a;
                    if (fVar2 == null) {
                        fVar2 = vVar.getContext();
                    }
                    u uVar = new u(eVar, null, tVar, f0Var);
                    vVar.f15045d = tVar;
                    vVar.f15046e = f0Var;
                    vVar.f15047f = eVar;
                    vVar.f15050i = 2;
                    if (gk4.h.g(fVar2, uVar, vVar) == aVar) {
                        return aVar;
                    }
                }
                if (eVar instanceof rp1.b) {
                }
                return f0Var.f253292d;
            }
        }
        vVar = new v(this, dVar);
        Object obj2 = vVar.f15048g;
        ch4.a aVar22 = ch4.a.COROUTINE_SUSPENDED;
        i17 = vVar.f15050i;
        if (i17 != 0) {
        }
        eVar = (rp1.e) obj2;
        if (eVar instanceof rp1.f) {
        }
        if (eVar instanceof rp1.b) {
        }
        return f0Var.f253292d;
    }

    @Override // br1.y5
    public void b(long j15, byte[] bArr, String str, long j16, int i15, LinkedList<Integer> linkedList, x.a aVar) {
        lh4.m.g(linkedList, "songIdList");
        lh4.m.g(aVar, "callback");
        n94.f h15 = new cr1.x(j15, bArr, str, j16, i15, linkedList, aVar).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void b0(long j15, long j16, int i15, int i16, f.a aVar) {
        String str = this.f14913d;
        Log.i(str, "setAnchorStatus liveId:" + j15 + " objectId:" + j16 + " flag:" + i15 + " micSetting[" + ((ft1.e0) i0(ft1.e0.class)).G.f44393d + ':' + ((ft1.e0) i0(ft1.e0.class)).G.f44394e + ']');
        zd3 zd32 = new zd3();
        zd32.f44393d = ((ft1.e0) i0(ft1.e0.class)).G.f44393d;
        hx1 hx12 = new hx1();
        hx12.f24259e = String.valueOf(((LiveAnchorSlice) i0(LiveAnchorSlice.class)).f114247i);
        hx12.f24260f = ((LiveAnchorSlice) i0(LiveAnchorSlice.class)).f114246h;
        String d15 = r32.b.d(this.f14912c);
        ft1.o oVar = (ft1.o) i0(ft1.o.class);
        y42 y422 = new y42();
        y422.f42938d = oVar.F1;
        y422.f42939e = oVar.E5();
        new do1.f(j15, j16, i15, d15, i16, zd32, y422, ((vt1.j0) i0(vt1.j0.class)).f328929r, 0, aVar, hx12, 256, null).h();
    }

    @Override // br1.y5
    public void c(long j15, long j16, String str, byte[] bArr, int i15, x31 x312, int i16, String str2, String str3, int i17, a.AbstractC2008a aVar) {
        String str4;
        FinderContact finderContact;
        String str5 = this.f14913d;
        StringBuilder sb5 = new StringBuilder();
        sb5.append("acceptAudienceLinkMic nickName: ");
        if (x312 == null || (finderContact = x312.f41749d) == null) {
            str4 = null;
        } else {
            str4 = finderContact.nickname;
        }
        sb5.append(str4);
        sb5.append(" liveId:");
        sb5.append(j15);
        sb5.append(", objectId:");
        sb5.append(j16);
        sb5.append(", nonceId:");
        sb5.append(str);
        sb5.append(", scene:");
        sb5.append(i15);
        sb5.append(", micType:");
        sb5.append(i16);
        sb5.append(", userId:");
        sb5.append(str2);
        sb5.append(", sessionId:");
        sb5.append(str3);
        Log.i(str5, sb5.toString());
        oy0 oy02 = new oy0();
        oy02.f32486n = str3;
        oy02.f32479d = x312;
        qy0 qy02 = new qy0();
        qy02.f34746e = i16;
        qy02.f34745d = str2;
        qy02.f34747f = i17;
        oy02.f32483h = xv3.b.a(qy02.toByteArray());
        oy02.f32480e = 20004;
        oy02.f32481f = a5.f118672a.o();
        new cr1.a(j15, j16, str, bArr, i15, oy02, aVar).h();
    }

    @Override // br1.y5
    public jg1 c0(long j15) {
        return rs1.d.f297303a.I(n0(), j15, this.f14913d);
    }

    @Override // br1.y5
    public void d(String str, boolean z15, int i15, kh4.p<? super Boolean, ? super Boolean, wg4.b0> pVar) {
        if (str != null) {
            n94.f h15 = new do1.h(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, str, i15, z15, new m(this, str, i15, pVar)).h();
            if (n0() != null && (n0() instanceof MMActivity)) {
                Context n05 = n0();
                lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
                h15.n((MMActivity) n05);
            }
        }
    }

    @Override // br1.y5
    public void d0(String str, boolean z15, k6<jn1> k6Var) {
        String str2 = this.f14913d;
        Log.i(str2, "putInBlackList username:" + str + " isBlack: " + z15);
        if (str == null) {
            return;
        }
        if (((ft1.o) i0(ft1.o.class)).F) {
            ((com.tencent.mm.plugin.finder.service.t1) yz3.j.c(com.tencent.mm.plugin.finder.service.t1.class)).QB(((ft1.o) i0(ft1.o.class)).f217278o, str, z15, k6Var);
        } else {
            ((com.tencent.mm.plugin.finder.service.t1) yz3.j.c(com.tencent.mm.plugin.finder.service.t1.class)).jt(str, z15, k6Var);
        }
    }

    @Override // br1.y5
    public void e(MMActivity mMActivity, long j15, long j16, String str, byte[] bArr, String str2, int i15, String str3, kh4.l<? super Boolean, wg4.b0> lVar) {
        int i16;
        lh4.m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        lh4.m.g(str, "anchorUsername");
        if (!rs1.d.f297303a.S0()) {
            i16 = 0;
        } else if (!((k1) i0(k1.class)).f217141g) {
            i16 = 2;
        } else {
            i16 = 1;
        }
        n94.f h15 = new cr1.m0(j15, j16, str, bArr, i16, r32.b.c(mMActivity), ((ft1.o) i0(ft1.o.class)).C2, str2, null, i15, ((b5) y24.r.f342954a.c(mMActivity).c(b5.class)).l0(), str3, 256, null).h();
        h15.H(new a0(lVar, str2, this));
        h15.n(mMActivity);
    }

    @Override // br1.y5
    public void e0(Context context, int i15) {
        lh4.m.g(context, "context");
        ((zw.f) yz3.j.c(zw.f.class)).Ot(context instanceof Activity ? (Activity) context : null, i15, 1, 30, 1, false, new Intent());
    }

    @Override // br1.y5
    public void f(int i15, kh4.r<? super Integer, ? super Integer, ? super String, ? super zs0, wg4.b0> rVar) {
        n94.f h15 = new g1(n2.f333835a.a(3603), ((ft1.u) i0(ft1.u.class)).f217412q.f35027d, r32.b.d(this.f14912c), ((ft1.u) i0(ft1.u.class)).f217408j, 2, null, null).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
        h15.H(new q(rVar, this));
    }

    @Override // br1.y5
    public void f0(gk4.n0 n0Var, boolean z15, kh4.s<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super dt1.b, wg4.b0> sVar) {
        lh4.m.g(n0Var, "scope");
        String str = this.f14913d;
        Log.i(str, "doFinishLive manualFinish:" + z15);
        ((xc4.j) xc4.j.f338034d).g(new n(n0Var, z15, this, sVar), "doFinishLive");
    }

    @Override // br1.y5
    public void g(Context context, long j15, int i15, kh4.u<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super c70.g, ? super TRTCCloudDef.TRTCParams, ? super wv0, wg4.b0> uVar) {
        long c15 = e6.c();
        ((cs1.w) yz3.j.c(cs1.w.class)).f193588q.put(Long.valueOf(j15), Long.valueOf(c15));
        Log.i("HABBYGE-MALI.HellLiveVisitorReoprter", "LiveKeyReport1# putEnterSessionId liveId:" + m60.d.p(j15) + ", enterSessionId:" + c15);
        m60.d.G(this.f14913d, new s(this, j15, context, i15, uVar));
    }

    @Override // br1.y5
    public void h(MMActivity mMActivity, kh4.p<? super Boolean, ? super u61, wg4.b0> pVar) {
        lh4.m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        new cr1.f0(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, ((ft1.o) i0(ft1.o.class)).f217278o, ((k1) i0(k1.class)).C, new x(this, pVar)).h().n(mMActivity);
    }

    /* JADX WARNING: Code restructure failed: missing block: B:21:0x0050, code lost:
        if (r5 != false) goto L_0x0055;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:5:0x0020, code lost:
        if (r4.h1(r19.f14911b) != false) goto L_0x0022;
     */
    /* JADX WARNING: Removed duplicated region for block: B:31:0x00de  */
    /* JADX WARNING: Removed duplicated region for block: B:32:0x00e5  */
    @Override // br1.y5
    public void i(long j15, long j16, String str, int i15, kh4.p<? super Boolean, ? super Integer, wg4.b0> pVar) {
        l51 l512;
        Boolean bool;
        int i16;
        boolean z15;
        boolean z16;
        if (!((ft1.o) i0(ft1.o.class)).f217258j2) {
            rs1.d dVar = rs1.d.f297303a;
            if (dVar.S0()) {
            }
            String str2 = this.f14913d;
            StringBuilder sb5 = new StringBuilder();
            sb5.append("doGetGiftList liveData.business(LiveCommonSlice::class.java).enableGiftSwitch:");
            sb5.append(((ft1.o) i0(ft1.o.class)).f217258j2);
            sb5.append(",haveFansClub:");
            l512 = ((ft1.y) i0(ft1.y.class)).f217515g;
            if (l512 != null) {
                bool = Boolean.valueOf(l512.f28128e);
            } else {
                bool = null;
            }
            sb5.append(bool);
            sb5.append(",FinderUtil.isTest():");
            sb5.append(a5.f118672a.W());
            Log.i(str2, sb5.toString());
        }
        rs1.d dVar2 = rs1.d.f297303a;
        if (!dVar2.S0()) {
            l51 l513 = ((ft1.y) i0(ft1.y.class)).f217515g;
            if (l513 == null || !l513.f28131h) {
                z15 = false;
            } else {
                z15 = true;
            }
            if (z15) {
                l51 l514 = ((ft1.y) i0(ft1.y.class)).f217515g;
                if (l514 == null || !l514.f28128e) {
                    z16 = false;
                } else {
                    z16 = true;
                }
            }
            i16 = 0;
            n94.f h15 = new cr1.l(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, ((ft1.u) i0(ft1.u.class)).f217415t, r32.b.d(this.f14912c), i16, ((ft1.u) i0(ft1.u.class)).f217409n, dVar2.Q(this.f14911b), i15).h();
            h15.H(new p(this, pVar));
            if (n0() != null && (n0() instanceof MMActivity)) {
                Context n05 = n0();
                lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
                h15.n((MMActivity) n05);
            }
            String str22 = this.f14913d;
            StringBuilder sb52 = new StringBuilder();
            sb52.append("doGetGiftList liveData.business(LiveCommonSlice::class.java).enableGiftSwitch:");
            sb52.append(((ft1.o) i0(ft1.o.class)).f217258j2);
            sb52.append(",haveFansClub:");
            l512 = ((ft1.y) i0(ft1.y.class)).f217515g;
            if (l512 != null) {
            }
            sb52.append(bool);
            sb52.append(",FinderUtil.isTest():");
            sb52.append(a5.f118672a.W());
            Log.i(str22, sb52.toString());
        }
        i16 = 1;
        n94.f h152 = new cr1.l(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, ((ft1.u) i0(ft1.u.class)).f217415t, r32.b.d(this.f14912c), i16, ((ft1.u) i0(ft1.u.class)).f217409n, dVar2.Q(this.f14911b), i15).h();
        h152.H(new p(this, pVar));
        Context n052 = n0();
        lh4.m.e(n052, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
        h152.n((MMActivity) n052);
        String str222 = this.f14913d;
        StringBuilder sb522 = new StringBuilder();
        sb522.append("doGetGiftList liveData.business(LiveCommonSlice::class.java).enableGiftSwitch:");
        sb522.append(((ft1.o) i0(ft1.o.class)).f217258j2);
        sb522.append(",haveFansClub:");
        l512 = ((ft1.y) i0(ft1.y.class)).f217515g;
        if (l512 != null) {
        }
        sb522.append(bool);
        sb522.append(",FinderUtil.isTest():");
        sb522.append(a5.f118672a.W());
        Log.i(str222, sb522.toString());
    }

    public <T extends androidx.lifecycle.j0> T i0(Class<T> cls) {
        lh4.m.g(cls, "bu");
        return (T) this.f14911b.a(cls);
    }

    @Override // br1.y5
    public void j(long j15, kh4.p<? super Long, ? super Long, wg4.b0> pVar) {
        String str = this.f14913d;
        Log.i(str, "[WeCoin] getWeCoinBalance: requestId:" + j15);
        n94.f<b.c<k61>> h15 = new j61().b().h();
        h15.H(new b0(this, pVar, j15));
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:16:0x0068  */
    /* JADX WARNING: Removed duplicated region for block: B:33:0x00fc  */
    /* JADX WARNING: Removed duplicated region for block: B:41:0x011c  */
    /* JADX WARNING: Removed duplicated region for block: B:44:0x0122  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x002a  */
    public Object j0(Context context, vn1.e eVar, k35 k35, bh4.d<? super zi1> dVar) {
        h hVar;
        int i15;
        lh4.f0 f0Var;
        t tVar;
        lh4.f0 f0Var2;
        rp1.e eVar2;
        rp1.e eVar3;
        t tVar2;
        xv3.b bVar;
        String str;
        if (dVar instanceof h) {
            hVar = (h) dVar;
            int i16 = hVar.f14964i;
            if ((i16 & Integer.MIN_VALUE) != 0) {
                hVar.f14964i = i16 - Integer.MIN_VALUE;
                Object obj = hVar.f14962g;
                ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
                i15 = hVar.f14964i;
                if (i15 != 0) {
                    ResultKt.throwOnFailure(obj);
                    lh4.f0 f0Var3 = new lh4.f0();
                    yi1 yi12 = new yi1();
                    yi12.f43443d = n2.f333835a.a(8655);
                    FinderLiveService.f112934d.getClass();
                    er1.b bVar2 = FinderLiveService.D;
                    if (bVar2 != null) {
                        byte[] bArr = ((ft1.u) bVar2.a(ft1.u.class)).f217409n;
                        if (bArr != null) {
                            bVar = new xv3.b(bArr, 0, bArr.length);
                        } else {
                            bVar = null;
                        }
                        yi12.f43444e = bVar;
                        yi12.f43445f = ((ft1.u) bVar2.a(ft1.u.class)).f217412q.f35027d;
                        yi12.f43446g = ((ft1.u) bVar2.a(ft1.u.class)).f217408j;
                        if (rs1.d.f297303a.S() == 3) {
                            str = r32.b.c(context);
                        } else {
                            str = "";
                        }
                        yi12.f43447h = str;
                    }
                    yi12.f43448i = eVar.field_rewardProductId;
                    yi12.f43449j = k35.f26906d;
                    yi12.f43452p = false;
                    yi12.f43451o = 2;
                    u32.c cVar = (u32.c) yi12.b();
                    u32.c.k(cVar, context, null, 0, 6, null);
                    hVar.f14959d = this;
                    hVar.f14960e = f0Var3;
                    hVar.f14964i = 1;
                    Object c15 = rp1.d.c(cVar, null, hVar, 1, null);
                    if (c15 == aVar) {
                        return aVar;
                    }
                    f0Var2 = f0Var3;
                    obj = c15;
                    tVar2 = this;
                } else if (i15 == 1) {
                    t tVar3 = (t) hVar.f14959d;
                    ResultKt.throwOnFailure(obj);
                    f0Var2 = (lh4.f0) hVar.f14960e;
                    tVar2 = tVar3;
                } else if (i15 == 2) {
                    eVar3 = (rp1.e) hVar.f14961f;
                    f0Var2 = (lh4.f0) hVar.f14960e;
                    tVar = (t) hVar.f14959d;
                    ResultKt.throwOnFailure(obj);
                    eVar2 = eVar3;
                    f0Var = f0Var2;
                    if (eVar2 instanceof rp1.b) {
                        bh4.f fVar = eVar2.f296977a;
                        if (fVar == null) {
                            fVar = hVar.getContext();
                        }
                        f fVar2 = new f(eVar2, null, tVar);
                        hVar.f14959d = f0Var;
                        hVar.f14960e = eVar2;
                        hVar.f14961f = null;
                        hVar.f14964i = 3;
                        if (gk4.h.g(fVar, fVar2, hVar) == aVar) {
                            return aVar;
                        }
                    }
                    return f0Var.f253292d;
                } else if (i15 == 3) {
                    rp1.e eVar4 = (rp1.e) hVar.f14960e;
                    f0Var = (lh4.f0) hVar.f14959d;
                    ResultKt.throwOnFailure(obj);
                    return f0Var.f253292d;
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                eVar2 = (rp1.e) obj;
                if (!(eVar2 instanceof rp1.f)) {
                    bh4.f fVar3 = eVar2.f296977a;
                    if (fVar3 == null) {
                        fVar3 = hVar.getContext();
                    }
                    g gVar = new g(eVar2, null, f0Var2);
                    hVar.f14959d = tVar2;
                    hVar.f14960e = f0Var2;
                    hVar.f14961f = eVar2;
                    hVar.f14964i = 2;
                    if (gk4.h.g(fVar3, gVar, hVar) == aVar) {
                        return aVar;
                    }
                    tVar = tVar2;
                    eVar3 = eVar2;
                    eVar2 = eVar3;
                    f0Var = f0Var2;
                    if (eVar2 instanceof rp1.b) {
                    }
                    return f0Var.f253292d;
                }
                tVar = tVar2;
                f0Var = f0Var2;
                if (eVar2 instanceof rp1.b) {
                }
                return f0Var.f253292d;
            }
        }
        hVar = new h(this, dVar);
        Object obj2 = hVar.f14962g;
        ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
        i15 = hVar.f14964i;
        if (i15 != 0) {
        }
        eVar2 = (rp1.e) obj2;
        if (!(eVar2 instanceof rp1.f)) {
        }
    }

    @Override // br1.y5
    public void k(Context context, int i15, int i16) {
        lh4.m.g(context, "context");
        boolean b15 = com.tencent.mm.plugin.finder.utils.n.f119184a.b(context, "com.tencent.qqmusic", "CBD27CD7C861227D013A25B2D10F0799");
        String str = this.f14913d;
        Log.i(str, "goQQMusic isInstalled:" + b15 + " songId:" + i15 + " songmid:" + i16);
        if (b15) {
            i14.j.A(context, context.getResources().getString(R.string.f3a, context.getResources().getString(R.string.f0p)), "", context.getResources().getString(R.string.f367559x1), context.getResources().getString(R.string.f367394sg), new c0(i15, i16, this, context), new d0(this));
            return;
        }
        Log.i(this.f14913d, "goQQMusic download");
        Intent intent = new Intent();
        intent.putExtra("rawUrl", "https://y.qq.com/m/download.html");
        intent.putExtra("showShare", false);
        sv3.b.j(context, "webview", ".ui.tools.WebViewUI", intent, null);
    }

    public void k0() {
        String str;
        String str2;
        String str3 = this.f14913d;
        Log.i(str3, "doCloseVisitorLive liveId:" + ((ft1.u) i0(ft1.u.class)).f217412q.f35027d + " objectId:" + ((ft1.u) i0(ft1.u.class)).f217408j + " nonceId:" + ((ft1.u) i0(ft1.u.class)).f217415t);
        bv1 m05 = m0();
        int i15 = ((cs1.w) yz3.j.c(cs1.w.class)).f193569d1.f193182d;
        if (i15 == 0) {
            i15 = 4;
            Log.i(this.f14913d, "doCloseVisitorLive offlineType default slide");
        }
        String str4 = this.f14913d;
        Log.i(str4, "doCloseVisitorLive offlineType " + i15);
        yz3.d c15 = yz3.j.c(jb4.j.class);
        lh4.m.f(c15, "getService(ILiveCgiFactoryService::class.java)");
        jb4.j jVar = (jb4.j) c15;
        lk0 b15 = n2.f333835a.b(3976, m05);
        String d15 = r32.b.d(this.f14912c);
        byte[] bArr = ((ft1.u) i0(ft1.u.class)).f217409n;
        long j15 = ((ft1.u) i0(ft1.u.class)).f217412q.f35027d;
        long j16 = ((ft1.u) i0(ft1.u.class)).f217408j;
        String str5 = ((ft1.u) i0(ft1.u.class)).f217415t;
        int i16 = ((ft1.o) i0(ft1.o.class)).s6().f33534f;
        String str6 = ((ft1.u) i0(ft1.u.class)).f217418w;
        k kVar = new k();
        if (FinderLiveService.f112934d != null) {
            str = str6;
            i70.a aVar = FinderLiveService.f112936f;
            if (aVar != null) {
                str2 = aVar.T;
                j.a.a(jVar, b15, d15, bArr, j15, j16, str5, 0, true, i15, null, i16, m05, str, kVar, str2, ((ft1.j) i0(ft1.j.class)).f217100j.getValue(), c0(((ft1.u) i0(ft1.u.class)).f217412q.f35027d), false, null, 393728, null).h();
                ((cs1.w) yz3.j.c(cs1.w.class)).nP0(f0.r0.Unknown);
            }
        } else {
            str = str6;
        }
        str2 = null;
        j.a.a(jVar, b15, d15, bArr, j15, j16, str5, 0, true, i15, null, i16, m05, str, kVar, str2, ((ft1.j) i0(ft1.j.class)).f217100j.getValue(), c0(((ft1.u) i0(ft1.u.class)).f217412q.f35027d), false, null, 393728, null).h();
        ((cs1.w) yz3.j.c(cs1.w.class)).nP0(f0.r0.Unknown);
    }

    @Override // br1.y5
    public void l(MMActivity mMActivity, String str, int i15, kh4.s<? super Boolean, ? super Integer, ? super Integer, ? super String, ? super u91, wg4.b0> sVar) {
        lh4.m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        lh4.m.g(str, "stockId");
        new cr1.n0(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, ((ft1.o) i0(ft1.o.class)).f217278o, str, i15, new f0(sVar)).h().n(mMActivity);
    }

    public void l0(y.a aVar) {
        lk0 a15 = n2.f333835a.a(6845);
        String d15 = r32.b.d(this.f14912c);
        ft1.o oVar = (ft1.o) i0(ft1.o.class);
        new cr1.y(a15, d15, null, ((ft1.u) i0(ft1.u.class)).f217409n, aVar).h();
    }

    @Override // br1.y5
    public void m(long j15, long j16, String str, byte[] bArr, int i15, x31 x312, String str2, int i16, xv3.b bVar, e.a aVar) {
        String str3;
        boolean z15;
        FinderObject finderObject;
        FinderObjectDesc finderObjectDesc;
        LinkedList<FinderMedia> linkedList;
        FinderMedia finderMedia;
        FinderObjectDesc finderObjectDesc2;
        k41 k412;
        x31 x313 = x312;
        Log.i(this.f14913d, "applyLinkMicPk liveId:" + j15 + ", objectId:" + j16 + ", nonceId:" + str + ", scene:" + i15 + ", sdkUserId:" + str2 + ", sdkLiveId:" + i16);
        oy0 oy02 = new oy0();
        oy02.f32479d = x313;
        LinkedList<x31> linkedList2 = new LinkedList<>();
        if (x313 == null) {
            x313 = new x31();
        }
        linkedList2.add(x313);
        oy02.f32485j = linkedList2;
        yy0 yy02 = new yy0();
        FinderObject finderObject2 = ((ft1.o) i0(ft1.o.class)).f217273n;
        x43 x432 = null;
        if (finderObject2 == null || (finderObjectDesc2 = finderObject2.objectDesc) == null || (k412 = finderObjectDesc2.liveDesc) == null) {
            str3 = null;
        } else {
            str3 = k412.f26925d;
        }
        if (str3 == null || str3.length() == 0) {
            z15 = true;
        } else {
            z15 = false;
        }
        if (z15 && ((finderObject = ((ft1.o) i0(ft1.o.class)).f217273n) == null || (finderObjectDesc = finderObject.objectDesc) == null || (linkedList = finderObjectDesc.media) == null || (finderMedia = (FinderMedia) xg4.c0.Q(linkedList)) == null || (str3 = finderMedia.url) == null)) {
            str3 = "";
        }
        yy02.f43863d = str3;
        yy02.f43866g = str2;
        yy02.f43867h = i16;
        yy02.f43865f = bVar;
        if (((ft1.o) i0(ft1.o.class)).x6()) {
            x432 = ((ft1.o) i0(ft1.o.class)).I5();
        }
        yy02.f43864e = x432;
        oy02.f32483h = xv3.b.a(yy02.toByteArray());
        oy02.f32480e = 20015;
        oy02.f32481f = a5.f118672a.o();
        n94.f h15 = new cr1.e(j15, j16, str, bArr, i15, oy02, aVar).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    public final bv1 m0() {
        bv1 bv12 = new bv1();
        Context n05 = n0();
        if (n05 != null) {
            return ((b5) y24.r.f342954a.b(n05).c(b5.class)).l0();
        }
        return bv12;
    }

    @Override // br1.y5
    public void n(long j15, long j16, int i15, long j17, int i16, f.a aVar) {
        String str = this.f14913d;
        Log.i(str, "setAnchorStatus opFlag:" + m60.d.p(j17) + ", liveId:" + j15 + " objectId:" + j16 + " flag:" + i15 + " micSetting[" + ((ft1.e0) i0(ft1.e0.class)).G.f44393d + ':' + ((ft1.e0) i0(ft1.e0.class)).G.f44394e + ']');
        new do1.f(j15, j16, i15, r32.b.d(this.f14912c), i16, null, null, null, j17, aVar, null, 1248, null).h();
    }

    public final Context n0() {
        WeakReference<Context> weakReference = this.f14910a;
        if (weakReference != null) {
            return weakReference.get();
        }
        return null;
    }

    @Override // br1.y5
    public void o(String str, xv3.b bVar, j0.a aVar) {
        String str2;
        int i15;
        lh4.m.g(str, "lotteryId");
        if (rs1.d.f297303a.S0()) {
            i15 = 1;
            str2 = r32.b.d(this.f14912c);
        } else {
            i15 = 2;
            str2 = "";
        }
        r91 r912 = ((ft1.u) i0(ft1.u.class)).f217412q;
        if (r912 != null) {
            n94.f h15 = new cr1.j0(i15, str2, r912.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, ((ft1.u) i0(ft1.u.class)).f217409n, ((ft1.u) i0(ft1.u.class)).f217415t, str, bVar, null).h();
            if (n0() != null && (n0() instanceof MMActivity)) {
                Context n05 = n0();
                lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
                h15.n((MMActivity) n05);
            }
            h15.H(new y(aVar, this));
        }
    }

    public final void o0() {
        Long l15;
        if (rs1.d.f297303a.e1()) {
            Log.i(this.f14913d, "hardCodeDebugRestrictTest");
            LinkedList linkedList = new LinkedList();
            cq3 cq32 = new cq3();
            cq32.f18589d = 5;
            linkedList.add(cq32);
            cq3 cq33 = new cq3();
            cq33.f18589d = 10;
            linkedList.add(cq33);
            cq3 cq34 = new cq3();
            cq34.f18589d = 15;
            linkedList.add(cq34);
            cq3 cq35 = new cq3();
            cq35.f18589d = 20;
            linkedList.add(cq35);
            ug1 ug12 = ((j1) i0(j1.class)).f217125h;
            if (ug12 != null) {
                ug12.f38654e.clear();
                ug12.f38654e.addAll(linkedList);
                c21 c212 = ug12.f38655f;
                if (c212 != null) {
                    cq3 cq36 = (cq3) xg4.c0.Q(linkedList);
                    if (cq36 != null) {
                        l15 = Long.valueOf(cq36.f18589d);
                    } else {
                        l15 = null;
                    }
                    c212.f17885e = l15.longValue();
                }
            }
        }
    }

    @Override // br1.y5
    public void p(long j15, long j16, String str, byte[] bArr, int i15, x31 x312, String str2, z.a aVar) {
        x31 x313 = x312;
        String str3 = this.f14913d;
        Log.i(str3, "closeBattle liveId:" + j15 + " objectId:" + j16 + " objectNonceId:" + str + " micId:" + str2);
        oy0 oy02 = new oy0();
        oy02.f32486n = str2;
        oy02.f32479d = x313;
        LinkedList<x31> linkedList = new LinkedList<>();
        if (x313 == null) {
            x313 = new x31();
        }
        linkedList.add(x313);
        oy02.f32485j = linkedList;
        gz0 gz02 = new gz0();
        gz02.f23194d = gz02.f23194d;
        oy02.f32483h = xv3.b.a(gz02.toByteArray());
        oy02.f32480e = 20028;
        oy02.f32481f = a5.f118672a.o();
        n94.f h15 = new cr1.z(j15, j16, str, bArr, i15, oy02).h();
        h15.H(new i(aVar));
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    public final void p0(int i15) {
        com.tencent.mm.plugin.finder.utils.l.f119136a.f("joinlive", i15, this.f14911b);
        ((ft1.o) this.f14911b.a(ft1.o.class)).q5("joinlive", i15);
        ((ft1.o) this.f14911b.a(ft1.o.class)).o5("joinlive", i15);
        ((ft1.o) this.f14911b.a(ft1.o.class)).p5("joinlive", i15);
        ((ft1.o) i0(ft1.o.class)).Z0 = i15;
        ((vt1.j0) i0(vt1.j0.class)).x5();
    }

    @Override // br1.y5
    public void q(MMActivity mMActivity, long j15, long j16, String str, tl0 tl02, kh4.q<? super Boolean, ? super String, ? super rc1, wg4.b0> qVar) {
        lh4.m.g(mMActivity, EnvConsts.ACTIVITY_MANAGER_SRVNAME);
        lh4.m.g(str, "audienceUsername");
        lh4.m.g(tl02, "finderCmdItem");
        new cr1.s0(j15, j16, str, tl02, new g0(qVar, tl02, this)).h().n(mMActivity);
    }

    public final void q0(wv0 wv02) {
        y11 y112 = wv02.Z;
        if (y112 != null) {
            er1.b bVar = this.f14911b;
            lh4.m.g(bVar, "buContext");
            ft1.o oVar = (ft1.o) bVar.a(ft1.o.class);
            Log.i("Finder.OlympicsLiveRoomUtil", "processAudienceEventInfo " + "joinLive" + ", token:" + y112.f42837d);
        }
    }

    @Override // br1.y5
    public void r(long j15, long j16, long j17, String str, f.a aVar) {
        String str2 = this.f14913d;
        Log.i(str2, "setMicSetting liveId:" + j15 + " focusMicUserId: " + str + " objectId:" + j16 + " micSettingFlag:" + j17 + " BUPROVIDER.get(LiveLinkMicSlice::class.java).micSetting[" + ((ft1.e0) i0(ft1.e0.class)).G.f44393d + ':' + ((ft1.e0) i0(ft1.e0.class)).G.f44394e + ']');
        zd3 zd32 = new zd3();
        zd32.f44393d = j17;
        zd32.f44395f = str == null ? "" : str;
        int i15 = ((ft1.o) i0(ft1.o.class)).f217289q;
        String d15 = r32.b.d(this.f14912c);
        int i16 = do1.f.f201656y;
        n94.f h15 = new do1.f(j15, j16, i15, d15, 0, zd32, null, null, 0, aVar, null, 1232, null).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    public void r0(long j15, long j16, j43 j432, f.a aVar) {
        lh4.m.g(j432, "lotterySetting");
        String str = this.f14913d;
        Log.i(str, "setMicSetting liveId:" + j15 + " objectId:" + j16 + " lotterySetting:" + j432.f25693d + ", " + j432.f25694e);
        int i15 = ((ft1.o) i0(ft1.o.class)).f217289q;
        String d15 = r32.b.d(this.f14912c);
        int i16 = do1.f.f201656y;
        n94.f h15 = new do1.f(j15, j16, i15, d15, 0, null, null, j432, 0, aVar, null, 1136, null).h();
        Context n05 = n0();
        if (n05 != null && (n05 instanceof MMActivity)) {
            h15.n((i74.b) n05);
        }
    }

    @Override // br1.y5
    public void s(Context context, int i15) {
        lh4.m.g(context, "context");
        Intent intent = new Intent();
        intent.putExtra("key_media_type", 2);
        intent.putExtra(TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 4);
        sv3.b.u(context, "com.tencent.mm.pluginsdk.ui.tools.FileSelectorUI", intent, i15);
    }

    public void s0(String str, kh4.p<? super Boolean, ? super String, wg4.b0> pVar) {
        lh4.m.g(str, "topic");
        new cr1.q0(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, 1, cr1.q0.f192628v.c(str)).h().H(new n0(this, pVar));
    }

    @Override // br1.y5
    public void t(String str, int i15, xv3.b bVar, boolean z15, long j15, kh4.p<? super Boolean, ? super x31, wg4.b0> pVar) {
        Context n05;
        if (str != null) {
            do1.m mVar = new do1.m(((ft1.u) i0(ft1.u.class)).f217412q.f35027d, ((ft1.u) i0(ft1.u.class)).f217408j, str, i15, bVar, null);
            if (z15 && (n05 = n0()) != null) {
                u32.c.k(mVar, n05, null, j15, 2, null);
            }
            n94.f h15 = mVar.h();
            if (n0() != null && (n0() instanceof MMActivity)) {
                Context n06 = n0();
                lh4.m.e(n06, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
                h15.n((MMActivity) n06);
            }
            h15.H(new o(this, str, pVar));
        }
    }

    public final void t0(String str) {
        m60.d.O(new o0(this, str));
    }

    @Override // br1.y5
    public void u(Context context, kh4.l<? super Boolean, wg4.b0> lVar, kh4.p<? super Integer, ? super Integer, wg4.b0> pVar) {
        lh4.m.g(context, "context");
        Log.i(this.f14913d, "[WeCoin] initEngine");
        ((zl3.e) d60.z.q(zl3.e.class)).mf(context, new e0(this, lVar, pVar));
    }

    /* JADX WARNING: Removed duplicated region for block: B:16:0x0068  */
    /* JADX WARNING: Removed duplicated region for block: B:33:0x00fc  */
    /* JADX WARNING: Removed duplicated region for block: B:41:0x011c  */
    /* JADX WARNING: Removed duplicated region for block: B:44:0x0122  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x002a  */
    public Object u0(Context context, vn1.e eVar, k35 k35, bh4.d<? super zi1> dVar) {
        s0 s0Var;
        int i15;
        lh4.f0 f0Var;
        t tVar;
        lh4.f0 f0Var2;
        rp1.e eVar2;
        rp1.e eVar3;
        t tVar2;
        xv3.b bVar;
        String str;
        if (dVar instanceof s0) {
            s0Var = (s0) dVar;
            int i16 = s0Var.f15035i;
            if ((i16 & Integer.MIN_VALUE) != 0) {
                s0Var.f15035i = i16 - Integer.MIN_VALUE;
                Object obj = s0Var.f15033g;
                ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
                i15 = s0Var.f15035i;
                if (i15 != 0) {
                    ResultKt.throwOnFailure(obj);
                    lh4.f0 f0Var3 = new lh4.f0();
                    yi1 yi12 = new yi1();
                    yi12.f43443d = n2.f333835a.a(8655);
                    FinderLiveService.f112934d.getClass();
                    er1.b bVar2 = FinderLiveService.D;
                    if (bVar2 != null) {
                        byte[] bArr = ((ft1.u) bVar2.a(ft1.u.class)).f217409n;
                        if (bArr != null) {
                            bVar = new xv3.b(bArr, 0, bArr.length);
                        } else {
                            bVar = null;
                        }
                        yi12.f43444e = bVar;
                        yi12.f43445f = ((ft1.u) bVar2.a(ft1.u.class)).f217412q.f35027d;
                        yi12.f43446g = ((ft1.u) bVar2.a(ft1.u.class)).f217408j;
                        if (rs1.d.f297303a.S() == 3) {
                            str = r32.b.c(context);
                        } else {
                            str = "";
                        }
                        yi12.f43447h = str;
                    }
                    yi12.f43448i = eVar.field_rewardProductId;
                    yi12.f43449j = k35.f26906d;
                    yi12.f43452p = true;
                    yi12.f43451o = 0;
                    u32.c cVar = (u32.c) yi12.b();
                    u32.c.k(cVar, context, null, 0, 6, null);
                    s0Var.f15030d = this;
                    s0Var.f15031e = f0Var3;
                    s0Var.f15035i = 1;
                    Object c15 = rp1.d.c(cVar, null, s0Var, 1, null);
                    if (c15 == aVar) {
                        return aVar;
                    }
                    f0Var2 = f0Var3;
                    obj = c15;
                    tVar2 = this;
                } else if (i15 == 1) {
                    t tVar3 = (t) s0Var.f15030d;
                    ResultKt.throwOnFailure(obj);
                    f0Var2 = (lh4.f0) s0Var.f15031e;
                    tVar2 = tVar3;
                } else if (i15 == 2) {
                    eVar3 = (rp1.e) s0Var.f15032f;
                    f0Var2 = (lh4.f0) s0Var.f15031e;
                    tVar = (t) s0Var.f15030d;
                    ResultKt.throwOnFailure(obj);
                    eVar2 = eVar3;
                    f0Var = f0Var2;
                    if (eVar2 instanceof rp1.b) {
                        bh4.f fVar = eVar2.f296977a;
                        if (fVar == null) {
                            fVar = s0Var.getContext();
                        }
                        q0 q0Var = new q0(eVar2, null, tVar);
                        s0Var.f15030d = f0Var;
                        s0Var.f15031e = eVar2;
                        s0Var.f15032f = null;
                        s0Var.f15035i = 3;
                        if (gk4.h.g(fVar, q0Var, s0Var) == aVar) {
                            return aVar;
                        }
                    }
                    return f0Var.f253292d;
                } else if (i15 == 3) {
                    rp1.e eVar4 = (rp1.e) s0Var.f15031e;
                    f0Var = (lh4.f0) s0Var.f15030d;
                    ResultKt.throwOnFailure(obj);
                    return f0Var.f253292d;
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                eVar2 = (rp1.e) obj;
                if (!(eVar2 instanceof rp1.f)) {
                    bh4.f fVar2 = eVar2.f296977a;
                    if (fVar2 == null) {
                        fVar2 = s0Var.getContext();
                    }
                    r0 r0Var = new r0(eVar2, null, f0Var2);
                    s0Var.f15030d = tVar2;
                    s0Var.f15031e = f0Var2;
                    s0Var.f15032f = eVar2;
                    s0Var.f15035i = 2;
                    if (gk4.h.g(fVar2, r0Var, s0Var) == aVar) {
                        return aVar;
                    }
                    tVar = tVar2;
                    eVar3 = eVar2;
                    eVar2 = eVar3;
                    f0Var = f0Var2;
                    if (eVar2 instanceof rp1.b) {
                    }
                    return f0Var.f253292d;
                }
                tVar = tVar2;
                f0Var = f0Var2;
                if (eVar2 instanceof rp1.b) {
                }
                return f0Var.f253292d;
            }
        }
        s0Var = new s0(this, dVar);
        Object obj2 = s0Var.f15033g;
        ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
        i15 = s0Var.f15035i;
        if (i15 != 0) {
        }
        eVar2 = (rp1.e) obj2;
        if (!(eVar2 instanceof rp1.f)) {
        }
    }

    @Override // br1.y5
    public void v(long j15, long j16, String str, byte[] bArr, int i15, List<String> list, k0.a aVar) {
        lh4.m.g(str, "nonceId");
        lh4.m.g(list, "sendIdList");
        n94.f h15 = new cr1.k0(j15, j16, str, bArr, i15, list).h();
        h15.H(new z(aVar));
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:16:0x0068  */
    /* JADX WARNING: Removed duplicated region for block: B:33:0x0100  */
    /* JADX WARNING: Removed duplicated region for block: B:41:0x0120  */
    /* JADX WARNING: Removed duplicated region for block: B:44:0x0126  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x002a  */
    public Object v0(Context context, vn1.e eVar, k35 k35, String str, bh4.d<? super zi1> dVar) {
        v0 v0Var;
        int i15;
        lh4.f0 f0Var;
        t tVar;
        lh4.f0 f0Var2;
        rp1.e eVar2;
        rp1.e eVar3;
        t tVar2;
        xv3.b bVar;
        String str2;
        if (dVar instanceof v0) {
            v0Var = (v0) dVar;
            int i16 = v0Var.f15056i;
            if ((i16 & Integer.MIN_VALUE) != 0) {
                v0Var.f15056i = i16 - Integer.MIN_VALUE;
                Object obj = v0Var.f15054g;
                ch4.a aVar = ch4.a.COROUTINE_SUSPENDED;
                i15 = v0Var.f15056i;
                if (i15 != 0) {
                    ResultKt.throwOnFailure(obj);
                    lh4.f0 f0Var3 = new lh4.f0();
                    yi1 yi12 = new yi1();
                    yi12.f43443d = n2.f333835a.a(8655);
                    FinderLiveService.f112934d.getClass();
                    er1.b bVar2 = FinderLiveService.D;
                    if (bVar2 != null) {
                        byte[] bArr = ((ft1.u) bVar2.a(ft1.u.class)).f217409n;
                        if (bArr != null) {
                            bVar = new xv3.b(bArr, 0, bArr.length);
                        } else {
                            bVar = null;
                        }
                        yi12.f43444e = bVar;
                        yi12.f43445f = ((ft1.u) bVar2.a(ft1.u.class)).f217412q.f35027d;
                        yi12.f43446g = ((ft1.u) bVar2.a(ft1.u.class)).f217408j;
                        if (rs1.d.f297303a.S() == 3) {
                            str2 = r32.b.c(context);
                        } else {
                            str2 = "";
                        }
                        yi12.f43447h = str2;
                    }
                    yi12.f43448i = eVar.field_rewardProductId;
                    yi12.f43449j = k35.f26906d;
                    yi12.f43452p = false;
                    yi12.f43450n = str;
                    yi12.f43451o = 1;
                    u32.c cVar = (u32.c) yi12.b();
                    u32.c.k(cVar, context, null, 0, 6, null);
                    v0Var.f15051d = this;
                    v0Var.f15052e = f0Var3;
                    v0Var.f15056i = 1;
                    Object c15 = rp1.d.c(cVar, null, v0Var, 1, null);
                    if (c15 == aVar) {
                        return aVar;
                    }
                    f0Var2 = f0Var3;
                    obj = c15;
                    tVar2 = this;
                } else if (i15 == 1) {
                    t tVar3 = (t) v0Var.f15051d;
                    ResultKt.throwOnFailure(obj);
                    f0Var2 = (lh4.f0) v0Var.f15052e;
                    tVar2 = tVar3;
                } else if (i15 == 2) {
                    eVar3 = (rp1.e) v0Var.f15053f;
                    f0Var2 = (lh4.f0) v0Var.f15052e;
                    tVar = (t) v0Var.f15051d;
                    ResultKt.throwOnFailure(obj);
                    eVar2 = eVar3;
                    f0Var = f0Var2;
                    if (eVar2 instanceof rp1.b) {
                        bh4.f fVar = eVar2.f296977a;
                        if (fVar == null) {
                            fVar = v0Var.getContext();
                        }
                        t0 t0Var = new t0(eVar2, null, tVar);
                        v0Var.f15051d = f0Var;
                        v0Var.f15052e = eVar2;
                        v0Var.f15053f = null;
                        v0Var.f15056i = 3;
                        if (gk4.h.g(fVar, t0Var, v0Var) == aVar) {
                            return aVar;
                        }
                    }
                    return f0Var.f253292d;
                } else if (i15 == 3) {
                    rp1.e eVar4 = (rp1.e) v0Var.f15052e;
                    f0Var = (lh4.f0) v0Var.f15051d;
                    ResultKt.throwOnFailure(obj);
                    return f0Var.f253292d;
                } else {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                eVar2 = (rp1.e) obj;
                if (!(eVar2 instanceof rp1.f)) {
                    bh4.f fVar2 = eVar2.f296977a;
                    if (fVar2 == null) {
                        fVar2 = v0Var.getContext();
                    }
                    u0 u0Var = new u0(eVar2, null, f0Var2);
                    v0Var.f15051d = tVar2;
                    v0Var.f15052e = f0Var2;
                    v0Var.f15053f = eVar2;
                    v0Var.f15056i = 2;
                    if (gk4.h.g(fVar2, u0Var, v0Var) == aVar) {
                        return aVar;
                    }
                    tVar = tVar2;
                    eVar3 = eVar2;
                    eVar2 = eVar3;
                    f0Var = f0Var2;
                    if (eVar2 instanceof rp1.b) {
                    }
                    return f0Var.f253292d;
                }
                tVar = tVar2;
                f0Var = f0Var2;
                if (eVar2 instanceof rp1.b) {
                }
                return f0Var.f253292d;
            }
        }
        v0Var = new v0(this, dVar);
        Object obj2 = v0Var.f15054g;
        ch4.a aVar2 = ch4.a.COROUTINE_SUSPENDED;
        i15 = v0Var.f15056i;
        if (i15 != 0) {
        }
        eVar2 = (rp1.e) obj2;
        if (!(eVar2 instanceof rp1.f)) {
        }
    }

    @Override // br1.y5
    public void w(kh4.r<? super Integer, ? super Integer, ? super String, ? super xs1, wg4.b0> rVar) {
        WeakReference weakReference;
        if (rVar != null) {
            weakReference = new WeakReference(rVar);
        } else {
            weakReference = null;
        }
        bv1 m05 = m0();
        c0.a aVar = do1.c0.f201645w;
        oy0 oy02 = new oy0();
        oy02.f32480e = 20006;
        oy02.f32481f = nf0.u0.r() + System.currentTimeMillis();
        n94.f h15 = new do1.c0(oy02, this.f14911b, m05, new r(weakReference)).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void x(int i15, String str, String str2, int i16, x31 x312, h.a aVar) {
        x31 x313 = x312;
        String str3 = this.f14913d;
        Log.i(str3, "closeLinkMicPk liveId:" + ((ft1.u) i0(ft1.u.class)).f217412q.f35027d + ", objectId:" + ((ft1.u) i0(ft1.u.class)).f217408j + ", nonceId:" + ((ft1.u) i0(ft1.u.class)).f217415t + ", scene:" + i15 + ", closeScene:" + i16 + ", sdkUserId:" + str + ", sessionId:" + str2);
        long j15 = ((ft1.u) i0(ft1.u.class)).f217412q.f35027d;
        long j16 = ((ft1.u) i0(ft1.u.class)).f217408j;
        String str4 = ((ft1.u) i0(ft1.u.class)).f217415t;
        byte[] bArr = ((ft1.u) i0(ft1.u.class)).f217409n;
        oy0 oy02 = new oy0();
        oy02.f32479d = x313;
        LinkedList<x31> linkedList = new LinkedList<>();
        if (x313 == null) {
            x313 = new x31();
        }
        linkedList.add(x313);
        oy02.f32485j = linkedList;
        oy02.f32486n = str2;
        jz0 jz02 = new jz0();
        jz02.f26773d = str;
        jz02.f26774e = i16;
        oy02.f32483h = xv3.b.a(jz02.toByteArray());
        oy02.f32480e = 20017;
        oy02.f32481f = a5.f118672a.o();
        n94.f h15 = new cr1.h(j15, j16, str4, bArr, i15, oy02, aVar).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void y(long j15, long j16, String str, byte[] bArr, String str2) {
        n94.f h15 = new e1(j15, j16, str, bArr, str2).h();
        if (n0() != null && (n0() instanceof MMActivity)) {
            Context n05 = n0();
            lh4.m.e(n05, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            h15.n((MMActivity) n05);
        }
    }

    @Override // br1.y5
    public void z(Context context, long j15, String str, Long l15, int i15) {
        lh4.m.g(context, "context");
        lh4.m.g(str, "username");
        ((ft1.o) i0(ft1.o.class)).X0 = false;
        ((w2) yz3.j.c(w2.class)).j50(context, j15, str, l15, i15);
    }

    @Override // br1.y5
    public void a(Activity activity, wf1 wf12, ResultReceiver resultReceiver, kh4.l<? super Integer, wg4.b0> lVar) {
        cs1.h0 h0Var = cs1.h0.UNKNOWN;
        cs1.i0 i0Var = cs1.i0.f193381o;
        lh4.m.g(activity, "context");
        lh4.m.g(wf12, "luckyMoneySendInfo");
        Log.i(this.f14913d, "goReceiveLuckyMoney hashCode: " + ((ft1.o) i0(ft1.o.class)).hashCode() + " visitorRole:" + ((ft1.o) i0(ft1.o.class)).s6().f33534f);
        Bundle bundle = new Bundle();
        int i15 = 1;
        if (((ft1.o) i0(ft1.o.class)).s6().f33534f == 3 && !rs1.d.f297303a.S0()) {
            if (lVar != null) {
                lVar.invoke(1);
            }
            yz3.d c15 = yz3.j.c(cs1.w.class);
            lh4.m.f(c15, "getService(HellLiveVisitorReoprter::class.java)");
            r.a.c((ds.r) c15, i0Var, h0Var, true, 0, 8, null);
        } else if (((ft1.o) i0(ft1.o.class)).s6().f33534f != 2 || rs1.d.f297303a.S0()) {
            String str = null;
            String string = (((ft1.o) i0(ft1.o.class)).s6().f33534f == 1 || rs1.d.f297303a.S0()) ? null : activity.getResources().getString(R.string.e2f);
            String tI0 = ((ie1.i) yz3.j.c(ie1.i.class)).tI0();
            if (tI0 == null) {
                tI0 = "";
            }
            l.b v15 = l.b.v(wf12.f41006i, null);
            if (!Util.isNullOrNil(wf12.f41005h)) {
                i15 = 2;
            }
            bundle.putInt("key_live_anchor_type", i15);
            bundle.putString("key_live_error_msg", string);
            bundle.putString("key_live_id", m60.d.p(((ft1.u) i0(ft1.u.class)).f217412q.f35027d));
            bundle.putString("key_live_attach", ((ft1.o) i0(ft1.o.class)).R2.f202480b);
            bundle.putInt("key_from", 3);
            bundle.putString("key_session_id", tI0);
            bundle.putString("key_username", ((ft1.o) i0(ft1.o.class)).f217278o);
            if (resultReceiver == null) {
                resultReceiver = new ResultReceiver(MMHandler.createFreeHandler(Looper.getMainLooper()));
            }
            bundle.putParcelable("key_open_result_receiver", resultReceiver);
            ft1.u uVar = (ft1.u) FinderLiveService.f112934d.e(ft1.u.class);
            if (uVar != null) {
                str = uVar.f217416u;
            }
            bundle.putString("key_live_session_buff", str);
            bundle.putLong("key_live_start_time", ((cs1.w) yz3.j.c(cs1.w.class)).f193568d);
            bundle.putString("key_live_feed_id", m60.d.p(((ft1.u) i0(ft1.u.class)).f217408j));
            bundle.putLong("key_live_enter_session_id", ((cs1.w) yz3.j.c(cs1.w.class)).f193586p);
            cs1.w wVar = (cs1.w) yz3.j.c(cs1.w.class);
            wVar.getClass();
            long currentTimeMillis = System.currentTimeMillis();
            long j15 = wVar.f193568d;
            bundle.putLong("key_live_now_live_time", currentTimeMillis > j15 ? currentTimeMillis - j15 : 0);
            ((j10.d) yz3.j.c(j10.d.class)).G0(activity, bundle, v15);
            Log.i(this.f14913d, "goReceiveLuckyMoney liveId:" + ((ft1.u) i0(ft1.u.class)).f217412q.f35027d + ", clientBuff:" + ((ft1.o) i0(ft1.o.class)).R2.f202480b + ", sessionId:" + tI0 + ", anchorUsername:" + ((ft1.o) i0(ft1.o.class)).f217278o + ", appMsgContent:" + v15);
            if (lVar != null) {
                lVar.invoke(0);
            }
        } else {
            if (lVar != null) {
                lVar.invoke(2);
            }
            yz3.d c16 = yz3.j.c(cs1.w.class);
            lh4.m.f(c16, "getService(HellLiveVisitorReoprter::class.java)");
            r.a.c((ds.r) c16, i0Var, h0Var, true, 0, 8, null);
        }
    }
}