package uo3; import android.content.Context; import android.content.DialogInterface; import android.graphics.Bitmap; import android.os.Bundle; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewPropertyAnimator; import android.view.Window; import android.widget.ImageView; import android.widget.TextView; import androidx.appcompat.app.m; import bw3.el4; import bw3.fl4; import bw3.h45; import bw3.jw1; import bw3.km4; import bw3.lw1; import bw3.pm4; import bw3.ql4; import bw3.qm4; import bw3.rl2; import bw3.rl4; import bw3.sl4; import com.google.android.gms.common.internal.ServiceSpecificExtraArgs; import com.tencent.mm.R; import com.tencent.mm.autogen.mmdata.rpt.WCTopicSearchShareActionReportStruct; import com.tencent.mm.message.l; import com.tencent.mm.message.q; import com.tencent.mm.plugin.appbrand.service.m0; import com.tencent.mm.sdk.platformtools.BitmapUtil; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MMApplicationContext; import com.tencent.mm.sdk.platformtools.Util; import com.tencent.mm.storage.z1; import cu3.w; import hh2.k; import hh2.n; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.Locale; import jo3.l1; import jo3.z; import lh4.o; import nf0.e6; import p64.i0; import t32.f; import to3.d; import wg4.b0; import xg4.v; import yt.u; import yz3.j; public final class g extends m { /* renamed from: f reason: collision with root package name */ public h45 f319672f; /* renamed from: g reason: collision with root package name */ public final a f319673g; /* renamed from: h reason: collision with root package name */ public final String f319674h = "MicroMsg.WebSearch.TagSearchDialog"; /* renamed from: i reason: collision with root package name */ public View f319675i; /* renamed from: j reason: collision with root package name */ public boolean f319676j; /* renamed from: n reason: collision with root package name */ public j f319677n; /* renamed from: o reason: collision with root package name */ public k f319678o; /* renamed from: p reason: collision with root package name */ public i0 f319679p; public static final class a extends o implements kh4.a<b0> { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ g f319680d; /* renamed from: e reason: collision with root package name */ public final /* synthetic */ rl2 f319681e; /* renamed from: f reason: collision with root package name */ public final /* synthetic */ Bitmap f319682f; /* renamed from: g reason: collision with root package name */ public final /* synthetic */ String f319683g; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public a(g gVar, rl2 rl22, Bitmap bitmap, String str) { super(0); this.f319680d = gVar; this.f319681e = rl22; this.f319682f = bitmap; this.f319683g = str; } /* Return type fixed from 'java.lang.Object' to match base method */ @Override // kh4.a public b0 invoke() { g gVar = this.f319680d; rl2 rl22 = this.f319681e; Bitmap bitmap = this.f319682f; String str = this.f319683g; gVar.getClass(); lh4.m.g(rl22, "shareContent"); if (rl22.f35458j != null) { l.b bVar = new l.b(); t32.g gVar2 = new t32.g(); rl4 rl42 = rl22.f35458j; lw1 lw12 = new lw1(); lw12.f28997d = rl42.f35462e; lw12.f29005o = rl42.f35466i; lw12.f29002i = rl42.f35463f; lw12.f29000g = rl42.f35465h; lw12.f28999f = rl42.f35464g; lw12.f29001h = rl42.f35461d; lw12.f29003j = rl42.f35468n.size(); LinkedList<jw1> linkedList = lw12.f29004n; LinkedList<sl4> linkedList2 = rl42.f35468n; lh4.m.f(linkedList2, "feedObject.MediaList"); ArrayList arrayList = new ArrayList(v.m(linkedList2, 10)); for (T t15 : linkedList2) { jw1 jw12 = new jw1(); jw12.f26651d = t15.f36579d; jw12.f26652e = String.valueOf(t15.f36580e); jw12.f26653f = t15.f36583h; jw12.f26654g = (float) t15.f36581f; jw12.f26655h = (float) t15.f36582g; jw12.f26656i = t15.f36584i; arrayList.add(jw12); } linkedList.addAll(arrayList); gVar2.f309487b = lw12; bVar.f(gVar2); bVar.f76866i = 51; bVar.f76854f = MMApplicationContext.getContext().getString(R.string.giz); bVar.f76870j = MMApplicationContext.getContext().getString(R.string.f368791gj0); q.a.a().EK(bVar, "", "", gVar.f319672f.f23357o, "", null); gVar.K(rl22, str); } else { String str2 = ""; if (rl22.f35457i != null) { l.b bVar2 = new l.b(); f fVar = new f(); String str3 = rl22.f35457i.f34365e; if (str3 == null) { str3 = str2; } fVar.j(str3); String str4 = rl22.f35457i.f34364d; if (str4 == null) { str4 = str2; } fVar.i(str4); ql4 ql42 = rl22.f35457i; String str5 = ql42.f34369i; if (str5 == null) { str5 = str2; } fVar.f309478h = str5; String str6 = ql42.f34368h; if (str6 == null) { str6 = str2; } fVar.g(str6); String str7 = rl22.f35457i.f34366f; if (str7 != null) { str2 = str7; } fVar.h(str2); bVar2.f(fVar); bVar2.f76866i = 50; bVar2.f76854f = MMApplicationContext.getContext().getString(R.string.giz); bVar2.f76870j = MMApplicationContext.getContext().getString(R.string.f368791gj0); q.a.a().EK(bVar2, "", "", gVar.f319672f.f23357o, "", null); gVar.K(rl22, str); } else if (rl22.f35453e != null) { l.b bVar3 = new l.b(); fl4 fl42 = rl22.f35453e; bVar3.f76854f = fl42.f21755d; bVar3.f76930y = fl42.f21757f; bVar3.f76870j = fl42.f21758g; bVar3.f76858g = fl42.f21756e; bVar3.f76862h = "view"; bVar3.f76902r = 3; bVar3.f76918v = fl42.f21760i; bVar3.f76922w = fl42.f21761j; bVar3.f76866i = 5; com.tencent.mm.message.f fVar2 = new com.tencent.mm.message.f(); fVar2.f76793b = 0; bVar3.f(fVar2); q.a.a().EK(bVar3, "", "", gVar.f319672f.f23357o, "", null); gVar.K(rl22, str); } else { el4 el42 = rl22.f35454f; if (el42 != null) { String format = String.format("<msg username=\"%s\" nickname=\"%s\" alias=\"%s\" fullpy=\"%s\" shortpy=\"%s\" imagestatus=\"%d\" scene=\"17\" province=\"%s\" city=\"%s\" sign=\"%s\" percard=\"%d\" sex=\"%d\" certflag=\"%d\" certinfo=\"%s\" certinfoext=\"\" brandIconUrl=\"%s\" brandHomeUrl=\"\" brandSubscriptConfigUrl=\"\" brandFlags=\"\" regionCode=\"%s\"/>", Arrays.copyOf(new Object[]{Util.escapeStringForXml(el42.f20653d), Util.escapeStringForXml(el42.f20654e), Util.escapeStringForXml(el42.f20656g), Util.escapeStringForXml(el42.f20655f), Util.escapeStringForXml(str2), 0, Util.escapeStringForXml(el42.f20658i), Util.escapeStringForXml(el42.f20659j), Util.escapeStringForXml(el42.f20660n), 0, Integer.valueOf(el42.f20661o), Integer.valueOf(el42.f20662p), str2, el42.f20668v, Util.escapeStringForXml(el42.f20657h)}, 15)); lh4.m.f(format, "format(format, *args)"); k a15 = n.a(); String str8 = rl22.f35454f.f20653d; String str9 = gVar.f319672f.f23357o; a15.yI0(str8, str9, format, z1.Y5(str9)); gVar.K(rl22, str); } else { pm4 pm42 = rl22.f35455g; if (pm42 != null) { l.b bVar4 = new l.b(); bVar4.f76854f = pm42.f33165e; bVar4.f76857f2 = pm42.f33168h; bVar4.f76853e2 = pm42.f33169i; bVar4.f76861g2 = pm42.f33167g; bVar4.f76937z2 = 0; bVar4.A2 = pm42.f33171n; bVar4.f76865h2 = 2; bVar4.f76870j = ((m0) j.c(m0.class)).e9(pm42.f33167g); bVar4.B2 = pm42.f33170j; bVar4.H1 = "wxapp_" + pm42.f33167g + pm42.f33169i; bVar4.f76918v = pm42.f33168h; bVar4.f76922w = pm42.f33164d; bVar4.f(new com.tencent.mm.message.a()); bVar4.f76866i = 33; if (!TextUtils.isEmpty(pm42.f33166f)) { ((u) j.c(u.class)).ik(pm42.f33166f, new h(bVar4, pm42, gVar, rl22, str)); } else { q.a.a().EK(bVar4, pm42.f33167g, "", gVar.f319672f.f23357o, "", BitmapUtil.Bitmap2Bytes(bitmap)); gVar.K(rl22, str); } } else if (rl22.f35456h != null) { l.b bVar5 = new l.b(); qm4 qm42 = rl22.f35456h; bVar5.f76854f = qm42.f34400e; bVar5.f76866i = 33; bVar5.f76857f2 = qm42.f34399d; bVar5.f76861g2 = qm42.f34402g; bVar5.f76865h2 = 1; bVar5.H1 = "wxapp_" + rl22.f35456h.f34402g; qm4 qm43 = rl22.f35456h; bVar5.f76930y = qm43.f34401f; String format2 = String.format(Locale.US, "https://mp.weixin.qq.com/mp/waerrpage?appid=%s&type=upgrade&upgradetype=%d#wechat_redirect", Arrays.copyOf(new Object[]{qm43.f34402g, 3}, 2)); lh4.m.f(format2, "format(locale, format, *args)"); bVar5.f76870j = format2; qm4 qm44 = rl22.f35456h; bVar5.f76918v = qm44.f34399d; bVar5.f76922w = qm44.f34400e; com.tencent.mm.message.a aVar = new com.tencent.mm.message.a(); aVar.f76724o = 0; bVar5.f(aVar); q a16 = q.a.a(); qm4 qm45 = rl22.f35456h; a16.EK(bVar5, qm45.f34402g, qm45.f34400e, gVar.f319672f.f23357o, null, null); gVar.K(rl22, str); } else if (rl22.f35459n != null) { ((w) j.c(w.class)).dm0(gVar.getContext(), gVar.f319672f.f23357o, rl22.f35459n.toByteArray(), null, 0, 0, null); gVar.K(rl22, str); } } } } return b0.f332794a; } } public static final class b implements DialogInterface.OnCancelListener { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ g f319684d; public b(g gVar) { this.f319684d = gVar; } public final void onCancel(DialogInterface dialogInterface) { d dVar; z zVar; d dVar2; z zVar2; j jVar = this.f319684d.f319677n; if (!(jVar == null || (dVar2 = jVar.f319699n) == null || (zVar2 = dVar2.f313934j) == null)) { d60.z.d().d(zVar2); dVar2.f313934j = null; } k kVar = this.f319684d.f319678o; if (kVar != null && (dVar = kVar.f319709j) != null && (zVar = dVar.f313934j) != null) { d60.z.d().d(zVar); dVar.f313934j = null; } } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public g(Context context, h45 h45, a aVar) { super(context, R.style.f370242pz); lh4.m.g(context, "context"); lh4.m.g(h45, "homeContext"); lh4.m.g(aVar, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER); this.f319672f = h45; this.f319673g = aVar; } public final void J(rl2 rl22, Bitmap bitmap, String str) { lh4.m.g(rl22, "shareContent"); String str2 = this.f319674h; StringBuilder sb5 = new StringBuilder(); sb5.append("onSearchShare BusinessType:"); sb5.append(rl22.f35452d.f27542g); sb5.append(" SubType:"); sb5.append(rl22.f35452d.f27543h); sb5.append(" BrandFeed:"); boolean z15 = true; sb5.append(rl22.f35453e != null); sb5.append(" WeappFeed:"); sb5.append(rl22.f35455g != null); sb5.append(" WeappProfile:"); sb5.append(rl22.f35456h != null); sb5.append(" BrandProfile:"); sb5.append(rl22.f35454f != null); sb5.append(" FinderFeed:"); sb5.append(rl22.f35458j != null); sb5.append(" FinderProfile:"); sb5.append(rl22.f35457i != null); sb5.append(" Emoticon:"); if (rl22.f35459n == null) { z15 = false; } sb5.append(z15); Log.i(str2, sb5.toString()); m60.d.O(new a(this, rl22, bitmap, str)); } public final void K(rl2 rl22, String str) { lh4.m.g(rl22, "shareContent"); i0 i0Var = this.f319679p; if (i0Var != null) { i0Var.dismiss(); } this.f319673g.b(rl22); dismiss(); WCTopicSearchShareActionReportStruct wCTopicSearchShareActionReportStruct = new WCTopicSearchShareActionReportStruct(); wCTopicSearchShareActionReportStruct.f71468e = (long) e6.e(); long j15 = 2; wCTopicSearchShareActionReportStruct.f71467d = 2; wCTopicSearchShareActionReportStruct.f71469f = 2; String str2 = ""; if (str == null) { str = str2; } wCTopicSearchShareActionReportStruct.f71470g = wCTopicSearchShareActionReportStruct.b("ResultQuery", str, true); if (!z1.Y5(this.f319672f.f23357o)) { j15 = 1; } wCTopicSearchShareActionReportStruct.f71471h = j15; wCTopicSearchShareActionReportStruct.f71472i = wCTopicSearchShareActionReportStruct.b("ShareSceneId", this.f319672f.f23357o, true); String str3 = rl22.f35452d.f27539d; if (str3 == null) { str3 = str2; } wCTopicSearchShareActionReportStruct.f71473j = wCTopicSearchShareActionReportStruct.b("ShareSessionId", str3, true); String str4 = rl22.f35452d.f27540e; if (str4 == null) { str4 = str2; } wCTopicSearchShareActionReportStruct.f71474k = wCTopicSearchShareActionReportStruct.b("ShareSearchId", str4, true); String str5 = rl22.f35452d.f27541f; if (str5 == null) { str5 = str2; } wCTopicSearchShareActionReportStruct.f71475l = wCTopicSearchShareActionReportStruct.b("ShareRequestId", str5, true); String str6 = rl22.f35452d.f27544i; if (str6 != null) { str2 = str6; } wCTopicSearchShareActionReportStruct.f71476m = wCTopicSearchShareActionReportStruct.b("ShareDocId", str2, true); km4 km42 = rl22.f35452d; wCTopicSearchShareActionReportStruct.f71478o = (long) km42.f27543h; wCTopicSearchShareActionReportStruct.f71477n = (long) km42.f27542g; wCTopicSearchShareActionReportStruct.n(); l1.l(wCTopicSearchShareActionReportStruct); } public final void L(String str) { lh4.m.g(str, "id"); if (this.f319679p == null) { this.f319679p = i0.e(getContext(), getContext().getString(R.string.ggc), true, 0, new b(this)); } i0 i0Var = this.f319679p; if (i0Var != null && !i0Var.isShowing()) { i0Var.show(); } } public void onBackPressed() { View findViewById; ViewPropertyAnimator animate; ViewPropertyAnimator rotation; ViewPropertyAnimator duration; TextView textView; if (this.f319676j) { View view = this.f319675i; if (!(view == null || (textView = (TextView) view.findViewById(R.id.odf)) == null)) { textView.setText(R.string.jo6); } View view2 = this.f319675i; if (!(view2 == null || (findViewById = view2.findViewById(R.id.f362701bz2)) == null || (animate = findViewById.animate()) == null || (rotation = animate.rotation(0.0f)) == null || (duration = rotation.setDuration(200)) == null)) { duration.start(); } k kVar = this.f319678o; if (kVar != null) { kVar.f319706g.animate().translationX((float) gy3.a.A(kVar.t())).setDuration(300).start(); } this.f319676j = false; return; } dismiss(); } @Override // androidx.appcompat.app.m public void onCreate(Bundle bundle) { super.onCreate(bundle); Window window = getWindow(); if (window != null) { window.setLayout(-1, -1); } Window window2 = getWindow(); if (window2 != null) { window2.addFlags(67108864); } Window window3 = getWindow(); if (window3 != null) { window3.setDimAmount(0.5f); } Window window4 = getWindow(); if (window4 != null) { window4.setWindowAnimations(R.style.f369793dq); } View inflate = LayoutInflater.from(getContext()).inflate(R.layout.cxl, (ViewGroup) null); setContentView(inflate, new ViewGroup.LayoutParams(-1, -1)); inflate.findViewById(R.id.f362954df2).setOnTouchListener(new c(this)); inflate.findViewById(R.id.f362701bz2).setOnClickListener(new d(this)); ((ImageView) inflate.findViewById(R.id.meb)).setOnClickListener(new e(inflate)); ((TextView) inflate.findViewById(R.id.odf)).setTextSize(0, ((float) gy3.a.f(getContext(), R.dimen.f359231gz)) * gy3.a.l(getContext())); this.f319677n = new j(this, this.f319672f, this.f319673g, inflate); setOnDismissListener(new f(this)); setCancelable(true); this.f319675i = inflate; } }