package fn; import al1.h1; import android.animation.Animator; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.graphics.Rect; import android.hardware.Camera; import android.net.Uri; import android.view.View; import androidx.biometric.g0; import androidx.lifecycle.b1; import androidx.lifecycle.o0; import ci2.f; import com.linecorp.line.admolin.vast4.LadVastData; import com.linecorp.line.admolin.view.asset.LadVideoAssetViewV2; import com.linecorp.line.avatar.v2.customization.AvatarCustomizationFragmentV2; import com.linecorp.line.constants.BuildConfig; import com.linecorp.line.pay.impl.biz.payment.offline.OneTimeKeyCodeDebugView; import com.linecorp.line.pay.impl.biz.signup.camera.PayCardScanPreview; import com.linecorp.line.pay.impl.biz.splitbill.data.dto.PaySplitbillDetailResDto; import com.linecorp.line.timeline.activity.mytimeline.ProfileController; import com.linecorp.line.timeline.activity.relay.feed.RelayPostFeedStartCoverView; import com.linecorp.line.timeline.activity.timeline.TimelineHeader; import com.linecorp.shop.impl.subscription.mypremiumstickersticon.MySubscriptionStickerSticonListActivity; import com.linecorp.square.v2.view.settings.common.SquareEditDescriptionActivity; import dm3.l; import dm3.p; import dx0.n; import em3.l0; import em3.q; import ga3.u; import ic2.w; import iu.g; import java.util.ArrayList; import java.util.Set; import jp.naver.line.android.activity.channel.permission.ChannelPermissionApprovalActivity; import jp.naver.line.android.activity.chathistory.l3; import jp.naver.line.android.activity.services.ServiceListActivity; import jp.naver.line.android.activity.setting.fragment.SettingsWebViewFragment; import jp.naver.line.android.apprating.AppRatingDialogFragment; import jp.naver.line.android.dialog.LineTooltipDialog; import kotlin.NoWhenBranchMatchedException; import kotlin.Pair; import kotlin.Unit; import no.b; import p73.e; import qp0.a; import ra.h0; import rx.e; import sj2.e; import t23.a; import t63.a; import ux.g; import w63.c0; import xv.c; import y23.a; import zi1.h; public final /* synthetic */ class d implements View.OnClickListener { /* renamed from: b reason: collision with root package name */ public final /* synthetic */ int f72543b; /* renamed from: c reason: collision with root package name */ public final /* synthetic */ Object f72544c; public /* synthetic */ d(Object obj, int i14) { this.f72543b = i14; this.f72544c = obj; } public final void onClick(View view) { int i14; p<? super Activity, ? super c, Unit> pVar; g gVar; LadVastData a14; LadVastData.TrackingEventData trackingEventData; Set<LadVastData.TrackingKey> sentEvents; Pair pair; double d14; double d15; int i15; l<? super a.b, Unit> lVar; String str; b.a aVar; c cVar = null; boolean z14 = false; switch (this.f72543b) { case 0: l lVar2 = (l) this.f72544c; q.f(lVar2, "this$0"); lVar2.c(true); return; case 1: LadVideoAssetViewV2 ladVideoAssetViewV2 = (LadVideoAssetViewV2) this.f72544c; int i16 = LadVideoAssetViewV2.f33913l; q.f(ladVideoAssetViewV2, "this$0"); q.e(view, "it"); int hashCode = view.hashCode(); long currentTimeMillis = System.currentTimeMillis(); if (wv.c.f179074a != hashCode || currentTimeMillis - wv.c.f179075b >= 500) { wv.c.f179074a = hashCode; wv.c.f179075b = currentTimeMillis; z14 = true; } if (z14) { Context context = view.getContext(); Activity activity = context instanceof Activity ? (Activity) context : null; if (activity != null) { if (ladVideoAssetViewV2.getVideoView().i()) { i14 = ladVideoAssetViewV2.getVideoView().getCurrentPosition(); } else { i14 = ladVideoAssetViewV2.getMmVideoState().f41001c; } iu.c cVar2 = ladVideoAssetViewV2.f33917e; if (!(cVar2 == null || (gVar = cVar2.f89123k) == null || (a14 = gVar.a()) == null || (trackingEventData = a14.getTrackingEventData()) == null || (sentEvents = trackingEventData.getSentEvents()) == null)) { cVar = new c(cVar2, cVar2.f89115c, ladVideoAssetViewV2.getPlayerKey(), i14, new ArrayList(sentEvents), null, 32); } if (cVar != null && (pVar = ladVideoAssetViewV2.f33922j) != null) { pVar.invoke(activity, cVar); return; } return; } return; } return; case 2: e eVar = (e) this.f72544c; int i17 = rx.d.f140714d; q.f(eVar, "$viewModel"); eVar.f140719c.f104633a.onNext(new g.c(eVar.f140718b)); return; case 3: AvatarCustomizationFragmentV2 avatarCustomizationFragmentV2 = (AvatarCustomizationFragmentV2) this.f72544c; int i18 = AvatarCustomizationFragmentV2.f34860v; q.f(avatarCustomizationFragmentV2, "this$0"); AvatarCustomizationFragmentV2.b bVar = avatarCustomizationFragmentV2.f34869j; if (bVar != null) { bVar.j8(); return; } return; case 4: vd0.b bVar2 = (vd0.b) this.f72544c; q.f(bVar2, "this$0"); bVar2.a(); return; case 5: cm0.d dVar = (cm0.d) this.f72544c; q.f(dVar, "this$0"); dVar.f21105a.startActivity(SettingsWebViewFragment.a5(dVar.f21105a, Uri.parse(BuildConfig.URL_PASSWORDLESS_LOGIN_UNREQUESTED_LOGIN), -1, true)); return; case 6: OneTimeKeyCodeDebugView.d((OneTimeKeyCodeDebugView) this.f72544c, view); return; case 7: np0.c cVar3 = (np0.c) this.f72544c; int i19 = np0.c.f119284d; q.f(cVar3, "this$0"); PayCardScanPreview payCardScanPreview = cVar3.f119285b; if (payCardScanPreview != null) { int[] iArr = new int[2]; View view2 = cVar3.f119286c; if (view2 != null) { view2.getLocationInWindow(iArr); int[] iArr2 = new int[2]; PayCardScanPreview payCardScanPreview2 = cVar3.f119285b; if (payCardScanPreview2 != null) { payCardScanPreview2.getLocationInWindow(iArr2); PayCardScanPreview payCardScanPreview3 = cVar3.f119285b; if (payCardScanPreview3 != null) { Camera.Size previewSize = payCardScanPreview3.getPreviewSize(); if (previewSize == null) { pair = new Pair(Double.valueOf(1.0d), Double.valueOf(1.0d)); } else { if (cVar3.a(cVar3) == 90 || cVar3.a(cVar3) == 270) { double d16 = (double) previewSize.height; PayCardScanPreview payCardScanPreview4 = cVar3.f119285b; if (payCardScanPreview4 != null) { d15 = d16 / ((double) payCardScanPreview4.getWidth()); d14 = (double) previewSize.width; PayCardScanPreview payCardScanPreview5 = cVar3.f119285b; if (payCardScanPreview5 != null) { i15 = payCardScanPreview5.getHeight(); } else { q.l("mPreview"); throw null; } } else { q.l("mPreview"); throw null; } } else { double d17 = (double) previewSize.width; PayCardScanPreview payCardScanPreview6 = cVar3.f119285b; if (payCardScanPreview6 != null) { d15 = d17 / ((double) payCardScanPreview6.getWidth()); d14 = (double) previewSize.height; PayCardScanPreview payCardScanPreview7 = cVar3.f119285b; if (payCardScanPreview7 != null) { i15 = payCardScanPreview7.getHeight(); } else { q.l("mPreview"); throw null; } } else { q.l("mPreview"); throw null; } } pair = new Pair(Double.valueOf(d15), Double.valueOf(d14 / ((double) i15))); } double doubleValue = ((Number) pair.component1()).doubleValue(); double doubleValue2 = ((Number) pair.component2()).doubleValue(); int i24 = iArr[0] - iArr2[0]; int i25 = iArr[1] - iArr2[1]; int i26 = (int) (((double) i24) * doubleValue); int i27 = (int) (((double) i25) * doubleValue2); View view3 = cVar3.f119286c; if (view3 != null) { int width = (int) (doubleValue * ((double) (view3.getWidth() + i24))); View view4 = cVar3.f119286c; if (view4 != null) { Rect rect = new Rect(i26, i27, width, (int) (doubleValue2 * ((double) (view4.getHeight() + i25)))); np0.b bVar3 = new np0.b(cVar3); payCardScanPreview.f39063i.removeCallbacks(payCardScanPreview.f39057c); if (payCardScanPreview.f39061g) { payCardScanPreview.f39062h = new PayCardScanPreview.a(bVar3, rect); payCardScanPreview.e(); return; } Camera camera = payCardScanPreview.f39058d; if (camera != null) { camera.addCallbackBuffer(payCardScanPreview.f39059e); camera.setOneShotPreviewCallback(new np0.e(bVar3, payCardScanPreview, rect)); return; } return; } q.l("mGuideView"); throw null; } q.l("mGuideView"); throw null; } q.l("mPreview"); throw null; } q.l("mPreview"); throw null; } q.l("mGuideView"); throw null; } q.l("mPreview"); throw null; case 8: a aVar2 = (a) this.f72544c; int i28 = a.C2513a.f133945c; q.f(aVar2, "this$0"); PaySplitbillDetailResDto.Info info = aVar2.f133963f; if (info != null && (lVar = aVar2.f133944k) != null) { q.e(view, "it"); lVar.invoke(new a.b.d(view, info, aVar2.f133962e)); return; } return; case 9: m51.g gVar2 = (m51.g) this.f72544c; q.f(gVar2, "this$0"); gVar2.f110146i.k(); return; case 10: ProfileController profileController = (ProfileController) this.f72544c; h[] hVarArr = ProfileController.f43459v; q.f(profileController, "this$0"); ik1.e eVar2 = ik1.e.f88101a; Activity activity2 = profileController.f43461b; q.f(activity2, "context"); if (!ik1.e.a(activity2)) { String str2 = ik1.e.f88102b; String str3 = cq1.l.CREATE_OA.value; q.e(str3, "CREATE_OA.value"); ik1.e.b(activity2, str2, str3); return; } return; case 11: RelayPostFeedStartCoverView relayPostFeedStartCoverView = (RelayPostFeedStartCoverView) this.f72544c; if (relayPostFeedStartCoverView.f43754n != null) { Animator animator = relayPostFeedStartCoverView.f43758r; if (animator != null) { animator.cancel(); } relayPostFeedStartCoverView.f43754n.q0(view, relayPostFeedStartCoverView.f43742b); im1.a.M(u.TIMELINE_LIST_RELAYPOST_CONTENTS_CLICK_COVER); return; } return; case 12: com.linecorp.line.timeline.activity.relay.write.c cVar4 = (com.linecorp.line.timeline.activity.relay.write.c) this.f72544c; cVar4.b(cVar4.f44043w.getText().length() == 0 ? "#" : " #"); return; case 13: l lVar3 = (l) this.f72544c; int i29 = TimelineHeader.M; q.f(lVar3, "$onTitleClick"); lVar3.invoke(h1.DISCOVER); return; case 14: cs1.e eVar3 = (cs1.e) this.f72544c; int i34 = cs1.e.f60208o; q.f(eVar3, "this$0"); if (dz.a.n(view)) { eVar3.f60212e.finish(); return; } return; case 15: MySubscriptionStickerSticonListActivity mySubscriptionStickerSticonListActivity = (MySubscriptionStickerSticonListActivity) this.f72544c; int i35 = MySubscriptionStickerSticonListActivity.f50345t; q.f(mySubscriptionStickerSticonListActivity, "this$0"); w wVar = mySubscriptionStickerSticonListActivity.f50354s; if (wVar != null) { o0<Boolean> o0Var = wVar.f86347a.f86287k; o0Var.setValue(Boolean.valueOf(!h0.K(o0Var.getValue()))); o0<Boolean> o0Var2 = wVar.f86348b.f86326h; o0Var2.setValue(Boolean.valueOf(!h0.K(o0Var2.getValue()))); return; } return; case 16: SquareEditDescriptionActivity squareEditDescriptionActivity = (SquareEditDescriptionActivity) this.f72544c; int i36 = SquareEditDescriptionActivity.f56945n; q.f(squareEditDescriptionActivity, "this$0"); squareEditDescriptionActivity.A8(); return; case 17: f.a((f) this.f72544c, view); return; case 18: fn2.c cVar5 = (fn2.c) this.f72544c; q.f(cVar5, "this$0"); sj2.b j04 = cVar5.f64219b.j0(); q.f(j04, "provider"); e.b bVar4 = new e.b(j04); bVar4.f143282d = "freecall"; bVar4.f143283e = "click"; bVar4.a("screen", "call"); bVar4.a("mediatype", "audio"); bVar4.a("clicktarget", "startvideo"); sj2.e e14 = bVar4.e(); if (e14 != null) { b1.d(e14); } an2.a aVar3 = (an2.a) g0.e(l0.a(an2.a.class), cVar5.f64219b); if (aVar3 != null) { aVar3.u(cVar5.f64219b); return; } return; case 19: yo2.e eVar4 = (yo2.e) this.f72544c; int i37 = yo2.e.f195510l; q.f(eVar4, "this$0"); eVar4.a(eVar4.f195511i, eVar4.f195513k.f171769p.getText()); sj2.b j05 = eVar4.f195512j.j0(); q.f(j05, "provider"); e.b bVar5 = new e.b(j05); bVar5.f143282d = "freecall"; bVar5.f143283e = "click"; bVar5.a("screen", "oa.noti.pip"); bVar5.a("mediatype", "audio"); bVar5.a("clicktarget", "message3"); bVar5.b("search_id", false); sj2.e e15 = bVar5.e(); if (e15 != null) { b1.d(e15); return; } return; case 20: ChannelPermissionApprovalActivity channelPermissionApprovalActivity = (ChannelPermissionApprovalActivity) this.f72544c; ChannelPermissionApprovalActivity.b bVar6 = ChannelPermissionApprovalActivity.f93669m; q.f(channelPermissionApprovalActivity, "this$0"); channelPermissionApprovalActivity.b(); return; case 21: y23.a aVar4 = (y23.a) this.f72544c; a.C3401a aVar5 = aVar4.f185356n; if (aVar5 != null && (str = aVar5.f185359b) != null) { aVar4.c(a.EnumC2802a.JOIN); aVar4.d(l3.g.JOIN); aVar4.f185355m.a(n53.d.a(aVar4.f185343a, str)); return; } return; case 22: p73.e eVar5 = (p73.e) this.f72544c; e.a aVar6 = p73.e.f126704x; q.f(eVar5, "this$0"); if (eVar5.j0()) { c0 c0Var = eVar5.f126724v; if (c0Var != null) { if (c0Var.f176265f == wi1.b.NONE) { n.f65514u.a(eVar5.f198527b, c0Var.f176260a, null).j(null); } else { ((zg1.g) rb.a.d(eVar5.f198527b, zg1.g.f199208x3)).c(eVar5.f198527b, yo1.p.HOME, c0Var.f176260a); } } c0 c0Var2 = eVar5.f126724v; if (c0Var2 != null) { t63.a aVar7 = eVar5.f126711i; a.EnumC2815a aVar8 = a.EnumC2815a.FRIEND_IMAGE; Boolean valueOf = Boolean.valueOf(c0Var2.c()); long j14 = 0; if (c0Var2.f176270k > 0) { j14 = System.currentTimeMillis() - c0Var2.f176270k; } aVar7.d(aVar8, new a.b(valueOf, Integer.valueOf((int) j14), a.b.EnumC2816a.Companion.a(c0Var2.f176265f), null, null, null, null, 120)); int i38 = e.b.$EnumSwitchMapping$0[c0Var2.f176265f.ordinal()]; if (i38 == 1 || i38 == 2) { aVar = new b.a.m.g(c0Var2.f176265f); } else if (i38 == 3) { aVar = new b.a.m.d(1, 0); } else { throw new NoWhenBranchMatchedException(); } eVar5.f126710h.a(aVar); return; } return; } return; case 23: ServiceListActivity serviceListActivity = (ServiceListActivity) this.f72544c; ServiceListActivity serviceListActivity2 = ServiceListActivity.f96138i; q.f(serviceListActivity, "this$0"); no.a aVar9 = no.a.f118970a; LineTooltipDialog lineTooltipDialog = serviceListActivity.A8().f176441b; if (lineTooltipDialog != null) { lineTooltipDialog.a(true); } uf3.c.m(uf3.a.HOME_TAB_V2_EDIT_SERVICE_LIST_TOOLTIP_SHOWN, true); serviceListActivity.z8().i(!serviceListActivity.z8().h()); return; case 24: f93.e eVar6 = (f93.e) this.f72544c; h[] hVarArr2 = f93.e.f71444n; q.f(eVar6, "this$0"); eVar6.f71447c.invoke(); return; default: AppRatingDialogFragment appRatingDialogFragment = (AppRatingDialogFragment) this.f72544c; int i39 = AppRatingDialogFragment.f96689b; q.f(appRatingDialogFragment, "this$0"); appRatingDialogFragment.dismiss(); androidx.fragment.app.n requireActivity = appRatingDialogFragment.requireActivity(); q.e(requireActivity, "requireActivity()"); if (!requireActivity.isFinishing()) { Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + BuildConfig.APPLICATION_ID)).addFlags(268435456).addFlags(67108864).addFlags(2097152).setPackage("com.android.vending"); q.e(intent, "Intent(Intent.ACTION_VIE…ge(\"com.android.vending\")"); try { requireActivity.startActivity(intent); return; } catch (ActivityNotFoundException unused) { requireActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + BuildConfig.APPLICATION_ID))); return; } } else { return; } } } }