正在查看: SpeedCash v6.5.1482 应用的 ExtKt.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: SpeedCash v6.5.1482 应用的 ExtKt.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bm.sc.auth.helper;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.Editable;
import android.util.TypedValue;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.PopupMenu;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.coroutines.MutableLiveData;
import androidx.coroutines.Observer;
import androidx.coroutines.SavedStateHandle;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import androidx.view.NavBackStackEntry;
import androidx.view.fragment.FragmentKt;
import cn.pedant.SweetAlert.SweetAlertDialog;
import com.bm.sc.auth.helper.ExtKt;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.handler.FirebaseProcessor;
import com.bm.sc.bebasbayar.message.qr.DataMessage;
import com.bm.sc.bebasbayar.service.BBDonwloadPdfService;
import com.bm.sc.bebasbayar.setting.session.ConfigSession;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.load.model.LazyHeaders;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.CustomTarget;
import com.bumptech.glide.request.transition.Transition;
import com.google.android.material.snackbar.Snackbar;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import kotlin.Function;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.io.ByteStreamsKt;
import kotlin.io.CloseableKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.FunctionAdapter;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.SequencesKt___SequencesKt;
import kotlin.text.StringsKt__StringsKt;
import kotlin.text.StringsKt___StringsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(d1 = {"\u0000\u009a\u0001\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u000f\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\u0010\u0006\n\u0002\b\u0003\u001a\u0016\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u0001\u001a\u001d\u0010\u0004\u001a\u00020\u0005\"\n\b\u0000\u0010\u0006\u0018\u0001*\u00020\u00072\u0006\u0010\b\u001a\u00020\tH\u0086\b\u001a\u0016\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000f\u001a\n\u0010\u0010\u001a\u00020\u000b*\u00020\u000f\u001a\n\u0010\u0011\u001a\u00020\u000b*\u00020\u000f\u001a\u0012\u0010\u0012\u001a\u00020\u000b*\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u0015\u001a\u0012\u0010\u0016\u001a\u00020\u000b*\u00020\r2\u0006\u0010\u0017\u001a\u00020\u0001\u001a\u0012\u0010\u0016\u001a\u00020\u000b*\u00020\u00182\u0006\u0010\u0017\u001a\u00020\u0001\u001a\n\u0010\u0019\u001a\u00020\u001a*\u00020\u001a\u001a0\u0010\u001b\u001a\u00020\u000b\"\b\b\u0000\u0010\u0006*\u00020\u0007*\u00020\u00182\u0006\u0010\u001c\u001a\u00020\u00012\u0012\u0010\u001d\u001a\u000e\u0012\u0004\u0012\u0002H\u0006\u0012\u0004\u0012\u00020\u000b0\u001e\u001a\n\u0010\u001f\u001a\u00020\u000b*\u00020\u000f\u001a\n\u0010 \u001a\u00020\u000b*\u00020\r\u001a\u0012\u0010 \u001a\u00020\u000b*\u00020\t2\u0006\u0010\u000e\u001a\u00020\u000f\u001a \u0010 \u001a\u00020\u000b*\u00020\u000f2\b\b\u0002\u0010!\u001a\u00020\"2\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000f\u001a\n\u0010 \u001a\u00020\u000b*\u00020\u0018\u001a\n\u0010#\u001a\u00020\u000b*\u00020\u000f\u001a\n\u0010$\u001a\u00020\"*\u00020\u0001\u001aM\u0010%\u001a\u00020\u000b\"\n\b\u0000\u0010\u0006\u0018\u0001*\u00020\u0007*\u00020\r2\b\b\u0002\u0010&\u001a\u00020\u001a2\n\b\u0002\u0010'\u001a\u0004\u0018\u00010(2\u0019\b\n\u0010)\u001a\u0013\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u000b0\u001e¢\u0006\u0002\b*H\u0086\bø\u0001\u0000\u001aU\u0010%\u001a\u00020\u000b\"\n\b\u0000\u0010\u0006\u0018\u0001*\u00020\u0007*\u00020\r2\b\b\u0002\u0010&\u001a\u00020\u001a2\n\b\u0002\u0010'\u001a\u0004\u0018\u00010(2\u0006\u0010+\u001a\u00020\u001a2\u0019\b\n\u0010)\u001a\u0013\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u000b0\u001e¢\u0006\u0002\b*H\u0086\bø\u0001\u0000\u001a\u0012\u0010,\u001a\u00020\u000b*\u00020-2\u0006\u0010.\u001a\u00020\u0001\u001a\u0012\u0010/\u001a\u00020\u000b*\u00020-2\u0006\u0010.\u001a\u00020\u0001\u001a0\u00100\u001a\u00020\u000b*\u00020-2\b\b\u0002\u00101\u001a\u00020\u00012\u0006\u0010.\u001a\u00020\u00012\b\b\u0002\u00102\u001a\u00020\u00012\b\b\u0002\u00103\u001a\u00020\u0001\u001a\u0012\u00104\u001a\u00020\u000b*\u00020-2\u0006\u0010.\u001a\u00020\u0001\u001a\n\u00105\u001a\u00020\u0001*\u00020\u0001\u001a(\u00106\u001a\u0004\u0018\u0001H\u0006\"\n\b\u0000\u0010\u0006\u0018\u0001*\u000207*\u00020\u00052\u0006\u0010\u001c\u001a\u00020\u0001H\u0086\b¢\u0006\u0002\u00108\u001a(\u00106\u001a\u0004\u0018\u0001H\u0006\"\n\b\u0000\u0010\u0006\u0018\u0001*\u000207*\u00020(2\u0006\u0010\u001c\u001a\u00020\u0001H\u0086\b¢\u0006\u0002\u00109\u001a\n\u0010:\u001a\u00020\u000f*\u00020\u000f\u001a3\u0010;\u001a\u00020\u000b\"\b\b\u0000\u0010\u0006*\u00020\u0007*\u00020\u00182\u0006\u0010\u001c\u001a\u00020\u00012\u0006\u0010<\u001a\u0002H\u00062\b\b\u0002\u0010=\u001a\u00020\"¢\u0006\u0002\u0010>\u001a.\u0010?\u001a\u00020\u000b*\u00020\r2\u0006\u0010@\u001a\u00020\u00012\u0006\u0010A\u001a\u00020\u00012\u0012\u0010B\u001a\u000e\u0012\u0004\u0012\u00020\"\u0012\u0004\u0012\u00020\u000b0\u001e\u001a.\u0010?\u001a\u00020\u000b*\u00020\u00182\u0006\u0010@\u001a\u00020\u00012\u0006\u0010A\u001a\u00020\u00012\u0012\u0010B\u001a\u000e\u0012\u0004\u0012\u00020\"\u0012\u0004\u0012\u00020\u000b0\u001e\u001a>\u0010C\u001a\u00020\u000b*\u00020\r2\u0006\u0010D\u001a\u00020\u000f2\u0006\u0010A\u001a\u00020\u00012\n\b\u0002\u0010E\u001a\u0004\u0018\u00010\u000f2\n\b\u0002\u0010F\u001a\u0004\u0018\u00010G2\n\b\u0002\u0010H\u001a\u0004\u0018\u00010\u0001\u001a>\u0010C\u001a\u00020\u000b*\u00020\u00182\u0006\u0010D\u001a\u00020\u000f2\u0006\u0010A\u001a\u00020\u00012\n\b\u0002\u0010E\u001a\u0004\u0018\u00010\u000f2\n\b\u0002\u0010F\u001a\u0004\u0018\u00010G2\n\b\u0002\u0010H\u001a\u0004\u0018\u00010\u0001\u001a.\u0010I\u001a\u00020\u000b*\u00020\r2\u0006\u0010@\u001a\u00020\u00012\u0006\u0010A\u001a\u00020\u00012\u0012\u0010B\u001a\u000e\u0012\u0004\u0012\u00020\"\u0012\u0004\u0012\u00020\u000b0\u001e\u001a.\u0010I\u001a\u00020\u000b*\u00020\u00182\u0006\u0010@\u001a\u00020\u00012\u0006\u0010A\u001a\u00020\u00012\u0012\u0010B\u001a\u000e\u0012\u0004\u0012\u00020\"\u0012\u0004\u0012\u00020\u000b0\u001e\u001a.\u0010J\u001a\u00020\u000b*\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010K\u001a\u00020\u001a2\u0012\u0010L\u001a\u000e\u0012\u0004\u0012\u00020M\u0012\u0004\u0012\u00020\"0\u001e\u001a.\u0010J\u001a\u00020\u000b*\u00020\u00182\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010K\u001a\u00020\u001a2\u0012\u0010L\u001a\u000e\u0012\u0004\u0012\u00020M\u0012\u0004\u0012\u00020\"0\u001e\u001a\n\u0010N\u001a\u00020O*\u00020\u0001\u001a\u0014\u0010P\u001a\u00020Q*\u00020R2\b\b\u0002\u0010S\u001a\u00020Q\u001a\u0014\u0010P\u001a\u00020Q*\u00020\u00012\b\b\u0002\u0010S\u001a\u00020Q\u001a\n\u0010T\u001a\u00020\u000b*\u00020\u000f\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006U"}, d2 = {"getUserPhotoProfile", "", "baseImgUrl", "idOutlet", "newIntent", "Landroid/content/Intent;", "T", "", "context", "Landroid/content/Context;", "showKeyboard", "", "activity", "Landroid/app/Activity;", "view", "Landroid/view/View;", "animateGone", "animateVisible", "copyInputStreamToFile", "Ljava/io/File;", "inputStream", "Ljava/io/InputStream;", "copyToClipboard", "text", "Landroidx/fragment/app/Fragment;", "dpToPx", "", "getBackStackData", "key", BBDonwloadPdfService.EXTRA_RESULT, "Lkotlin/Function1;", "gone", "hideKeyboard", "hide", "", "invisible", "isNotError", "launchActivity", "requestCode", "options", "Landroid/os/Bundle;", "init", "Lkotlin/ExtensionFunctionType;", "flag", "load", "Landroid/widget/ImageView;", "imgUrl", "loadImageChat", "loadUsrImg", "nickname", "customColorBackground", "customColorFont", "loadWithCredentials", "onlyAlphanumeric", "parcelable", "Landroid/os/Parcelable;", "(Landroid/content/Intent;Ljava/lang/String;)Landroid/os/Parcelable;", "(Landroid/os/Bundle;Ljava/lang/String;)Landroid/os/Parcelable;", "ripple", "setBackStackData", "data", "doBack", "(Landroidx/fragment/app/Fragment;Ljava/lang/String;Ljava/lang/Object;Z)V", "showConfirm", FirebaseProcessor.KEY_TITLE, FirebaseProcessor.KEY_MESSAGE, "onClicked", "showError", "parent", "anchorView", DataMessage.ACTION, "Landroid/view/View$OnClickListener;", "btnWording", "showInfo", "showPopUpMenu", FirebaseProcessor.TYPE_MENU, "callback", "Landroid/view/MenuItem;", "toEditable", "Landroid/text/Editable;", "toSafeLong", "", "", "defaultValue", "visible", "app_release"}, k = 2, mv = {1, 8, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nExt.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Ext.kt\ncom/bm/sc/kotlin/helper/ExtKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,506:1\n168#1:507\n168#1:508\n1#2:509\n*S KotlinDebug\n*F\n+ 1 Ext.kt\ncom/bm/sc/kotlin/helper/ExtKt\n*L\n152#1:507\n161#1:508\n*E\n"})
public final class ExtKt {
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0004\u0010\u0000\u001a\u00020\u0001\"\b\b\u0000\u0010\u0002*\u00020\u00032\u000e\u0010\u0004\u001a\n \u0005*\u0004\u0018\u0001H\u0002H\u0002H\n¢\u0006\u0004\b\u0006\u0010\u0007"}, d2 = {"<anonymous>", "", "T", "", "it", "kotlin.jvm.PlatformType", "invoke", "(Ljava/lang/Object;)V"}, k = 3, mv = {1, 8, 0}, xi = 48)
public static final class a<T> extends Lambda implements Function1<T, Unit> {
public final Function1<T, Unit> a;
public a(Function1<? super T, Unit> function1) {
super(1);
this.a = function1;
}
public Object invoke(Object obj) {
m546invoke((a<T>) obj);
return Unit.INSTANCE;
}
public final void m546invoke(T t) {
Function1<T, Unit> function1 = this.a;
Intrinsics.checkNotNullExpressionValue(t, "it");
function1.invoke(t);
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0010\f\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"", "it", "", "a", "(C)Ljava/lang/Boolean;"}, k = 3, mv = {1, 8, 0})
public static final class b extends Lambda implements Function1<Character, Boolean> {
public static final b a = new b();
public b() {
super(1);
}
@NotNull
public final Boolean a(char c) {
return Boolean.valueOf(Character.isDigit(c));
}
public Object invoke(Object obj) {
return a(((Character) obj).charValue());
}
}
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
public static final class c implements Observer, FunctionAdapter {
public final Function1 a;
public c(Function1 function1) {
Intrinsics.checkNotNullParameter(function1, "function");
this.a = function1;
}
public final boolean equals(@Nullable Object obj) {
if ((obj instanceof Observer) && (obj instanceof FunctionAdapter)) {
return Intrinsics.areEqual(getFunctionDelegate(), ((FunctionAdapter) obj).getFunctionDelegate());
}
return false;
}
@NotNull
public final Function<?> getFunctionDelegate() {
return this.a;
}
public final int hashCode() {
return getFunctionDelegate().hashCode();
}
@Override
public final void onChanged(Object obj) {
this.a.invoke(obj);
}
}
public static final void animateGone(@NotNull View view) {
Intrinsics.checkNotNullParameter(view, "<this>");
view.animate().alpha(RecyclerView.G0);
gone(view);
}
public static final void animateVisible(@NotNull View view) {
Intrinsics.checkNotNullParameter(view, "<this>");
view.animate().alpha(1.0f);
visible(view);
}
public static final void copyInputStreamToFile(@NotNull File file, @NotNull InputStream inputStream) {
Intrinsics.checkNotNullParameter(file, "<this>");
Intrinsics.checkNotNullParameter(inputStream, "inputStream");
FileOutputStream fileOutputStream = new FileOutputStream(file);
try {
ByteStreamsKt.copyTo$default(inputStream, fileOutputStream, 0, 2, (Object) null);
CloseableKt.closeFinally(fileOutputStream, (Throwable) null);
} finally {
}
}
public static final void copyToClipboard(@org.jetbrains.annotations.NotNull android.app.Activity r4, @org.jetbrains.annotations.NotNull java.lang.String r5) {
throw new UnsupportedOperationException("Method not decompiled: com.bm.sc.auth.helper.ExtKt.copyToClipboard(android.app.Activity, java.lang.String):void");
}
public static final int dpToPx(int i) {
return (int) (i * Resources.getSystem().getDisplayMetrics().density);
}
public static final void g(Function1 function1, SweetAlertDialog sweetAlertDialog, SweetAlertDialog sweetAlertDialog2) {
Intrinsics.checkNotNullParameter(function1, "$onClicked");
Intrinsics.checkNotNullParameter(sweetAlertDialog, "$dialog");
function1.invoke(Boolean.TRUE);
sweetAlertDialog.dismissWithAnimation();
}
public static final <T> void getBackStackData(@NotNull Fragment fragment, @NotNull String str, @NotNull Function1<? super T, Unit> function1) {
SavedStateHandle savedStateHandle;
MutableLiveData<T> liveData;
Intrinsics.checkNotNullParameter(fragment, "<this>");
Intrinsics.checkNotNullParameter(str, "key");
Intrinsics.checkNotNullParameter(function1, BBDonwloadPdfService.EXTRA_RESULT);
NavBackStackEntry currentBackStackEntry = FragmentKt.findNavController(fragment).getCurrentBackStackEntry();
if (currentBackStackEntry == null || (savedStateHandle = currentBackStackEntry.getSavedStateHandle()) == null || (liveData = savedStateHandle.getLiveData(str)) == null) {
return;
}
liveData.observe(fragment.getViewLifecycleOwner(), new c(new a(function1)));
}
@NotNull
public static final String getUserPhotoProfile(@NotNull String str, @NotNull String str2) {
Intrinsics.checkNotNullParameter(str, "baseImgUrl");
Intrinsics.checkNotNullParameter(str2, "idOutlet");
if (str.length() > 0) {
if (str2.length() > 0) {
return str + "profile/" + str2;
}
}
return "";
}
public static final void gone(@NotNull View view) {
Intrinsics.checkNotNullParameter(view, "<this>");
view.setVisibility(8);
}
public static final void h(Function1 function1, SweetAlertDialog sweetAlertDialog, SweetAlertDialog sweetAlertDialog2) {
Intrinsics.checkNotNullParameter(function1, "$onClicked");
Intrinsics.checkNotNullParameter(sweetAlertDialog, "$dialog");
function1.invoke(Boolean.FALSE);
sweetAlertDialog.dismissWithAnimation();
}
public static final void hideKeyboard(@NotNull Fragment fragment) {
ComponentActivity activity;
Intrinsics.checkNotNullParameter(fragment, "<this>");
View view = fragment.getView();
if (view == null || (activity = fragment.getActivity()) == null) {
return;
}
Intrinsics.checkNotNullExpressionValue(activity, "activity");
hideKeyboard(activity, view);
}
public static void hideKeyboard$default(View view, boolean z, View view2, int i, Object obj) {
if ((i & 1) != 0) {
z = true;
}
if ((i & 2) != 0) {
view2 = null;
}
hideKeyboard(view, z, view2);
}
public static final void i(Function1 function1, SweetAlertDialog sweetAlertDialog, SweetAlertDialog sweetAlertDialog2) {
Intrinsics.checkNotNullParameter(function1, "$onClicked");
Intrinsics.checkNotNullParameter(sweetAlertDialog, "$dialog");
function1.invoke(Boolean.TRUE);
sweetAlertDialog.dismissWithAnimation();
}
public static final void invisible(@NotNull View view) {
Intrinsics.checkNotNullParameter(view, "<this>");
view.setVisibility(4);
}
public static final boolean isNotError(@NotNull String str) {
Intrinsics.checkNotNullParameter(str, "<this>");
return !Intrinsics.areEqual(str, "Error");
}
public static final void j(Function1 function1, SweetAlertDialog sweetAlertDialog, SweetAlertDialog sweetAlertDialog2) {
Intrinsics.checkNotNullParameter(function1, "$onClicked");
Intrinsics.checkNotNullParameter(sweetAlertDialog, "$dialog");
function1.invoke(Boolean.FALSE);
sweetAlertDialog.dismissWithAnimation();
}
public static final boolean k(Function1 function1, MenuItem menuItem) {
Intrinsics.checkNotNullParameter(function1, "$tmp0");
return ((Boolean) function1.invoke(menuItem)).booleanValue();
}
public static final boolean l(Function1 function1, MenuItem menuItem) {
Intrinsics.checkNotNullParameter(function1, "$tmp0");
return ((Boolean) function1.invoke(menuItem)).booleanValue();
}
public static final <T> void launchActivity(Activity activity, int i, Bundle bundle, Function1<? super Intent, Unit> function1) {
Intrinsics.checkNotNullParameter(activity, "<this>");
Intrinsics.checkNotNullParameter(function1, "init");
Intrinsics.reifiedOperationMarker(4, "T");
Intent intent = new Intent(activity, (Class<?>) Object.class);
function1.invoke(intent);
activity.startActivityForResult(intent, i, bundle);
}
public static void launchActivity$default(Activity activity, int i, Bundle bundle, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
i = -1;
}
if ((i2 & 2) != 0) {
bundle = null;
}
if ((i2 & 4) != 0) {
function1 = new Function1<Intent, Unit>() {
public Object invoke(Object obj2) {
invoke((Intent) obj2);
return Unit.INSTANCE;
}
public final void invoke(@NotNull Intent intent) {
Intrinsics.checkNotNullParameter(intent, "$this$null");
}
};
}
Intrinsics.checkNotNullParameter(activity, "<this>");
Intrinsics.checkNotNullParameter(function1, "init");
Intrinsics.reifiedOperationMarker(4, "T");
Intent intent = new Intent(activity, (Class<?>) Object.class);
function1.invoke(intent);
activity.startActivityForResult(intent, i, bundle);
}
public static final void load(@NotNull ImageView imageView, @NotNull String str) {
Intrinsics.checkNotNullParameter(imageView, "<this>");
Intrinsics.checkNotNullParameter(str, "imgUrl");
RequestOptions override = new RequestOptions().placeholder(new ColorDrawable(ContextCompat.getColor(imageView.getContext(), R.color.ecm_colorSubHeadingInverse))).error(new ColorDrawable(ContextCompat.getColor(imageView.getContext(), R.color.ecm_colorSubHeadingInverse))).override(imageView.getWidth(), imageView.getHeight());
Intrinsics.checkNotNullExpressionValue(override, "requestOptions.placehold….width, this.height\n )");
Glide.with(imageView.getContext()).load(str).apply(override).into(imageView);
}
public static final void loadImageChat(@NotNull final ImageView imageView, @NotNull String str) {
Intrinsics.checkNotNullParameter(imageView, "<this>");
Intrinsics.checkNotNullParameter(str, "imgUrl");
RequestOptions override = new RequestOptions().placeholder(new ColorDrawable(ContextCompat.getColor(imageView.getContext(), R.color.ecm_colorSubHeadingInverse))).error(new ColorDrawable(ContextCompat.getColor(imageView.getContext(), R.color.ecm_colorSubHeadingInverse))).override(imageView.getWidth(), imageView.getHeight());
Intrinsics.checkNotNullExpressionValue(override, "requestOptions.placehold….width, this.height\n )");
Glide.with(imageView.getContext()).asBitmap().load(str).apply(override).into(new CustomTarget<Bitmap>() {
public void onLoadCleared(@Nullable Drawable placeholder) {
}
public void onResourceReady(Object obj, Transition transition) {
onResourceReady((Bitmap) obj, (Transition<? super Bitmap>) transition);
}
public void onResourceReady(@NotNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
Intrinsics.checkNotNullParameter(resource, "resource");
imageView.setImageBitmap(resource);
}
});
}
public static final void loadUsrImg(@NotNull final ImageView imageView, @NotNull String str, @NotNull String str2, @NotNull String str3, @NotNull String str4) {
Intrinsics.checkNotNullParameter(imageView, "<this>");
Intrinsics.checkNotNullParameter(str, "nickname");
Intrinsics.checkNotNullParameter(str2, "imgUrl");
Intrinsics.checkNotNullParameter(str3, "customColorBackground");
Intrinsics.checkNotNullParameter(str4, "customColorFont");
if (str2.length() == 0) {
if (HelperKt.isNumeric(str)) {
str2 = "https://ui-avatars.com/api/?font-size=0.3&background=" + str3 + "&color=" + str4 + "&size=128&name=62";
} else {
str2 = "https://ui-avatars.com/api/?font-size=0.3&background=" + str3 + "&color=" + str4 + "&size=128&name=" + b25.replace$default(str, " ", "+", false, 4, (Object) null);
}
} else if (StringsKt__StringsKt.contains$default(str2, "ui-avatars.com/api/?background", false, 2, (Object) null)) {
str2 = "https://ui-avatars.com/api/?background=008967&color=fff&size=64&name=" + b25.replace$default(str, " ", "+", false, 4, (Object) null);
}
RequestOptions override = new RequestOptions().placeholder(R.drawable.ic_jay_user_icon).error(R.drawable.ic_jay_user_icon).override(imageView.getWidth(), imageView.getHeight());
Intrinsics.checkNotNullExpressionValue(override, "requestOptions\n .…(this.width, this.height)");
Glide.with(imageView.getContext()).asBitmap().load(str2).apply(override).into(new CustomTarget<Bitmap>() {
public void onLoadCleared(@Nullable Drawable placeholder) {
}
public void onResourceReady(Object obj, Transition transition) {
onResourceReady((Bitmap) obj, (Transition<? super Bitmap>) transition);
}
public void onResourceReady(@NotNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
Intrinsics.checkNotNullParameter(resource, "resource");
if (resource.getHeight() <= resource.getWidth()) {
imageView.setImageBitmap(resource);
} else {
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
imageView.setImageBitmap(resource);
}
}
});
}
public static void loadUsrImg$default(ImageView imageView, String str, String str2, String str3, String str4, int i, Object obj) {
if ((i & 1) != 0) {
str = "";
}
if ((i & 4) != 0) {
str3 = "008967";
}
if ((i & 8) != 0) {
str4 = "fff";
}
loadUsrImg(imageView, str, str2, str3, str4);
}
public static final void loadWithCredentials(@NotNull ImageView imageView, @NotNull String str) {
Intrinsics.checkNotNullParameter(imageView, "<this>");
Intrinsics.checkNotNullParameter(str, "imgUrl");
GlideUrl glideUrl = new GlideUrl(str, new LazyHeaders.Builder().addHeader("Authorization", "Bearer " + new ConfigSession(imageView.getContext()).retrieve(ConfigSession.PROPERTY_APP_CENTRAL_API_2)).build());
RequestOptions override = new RequestOptions().placeholder(new ColorDrawable(ContextCompat.getColor(imageView.getContext(), R.color.ecm_colorSubHeadingInverse))).error(ResourcesCompat.getDrawable(imageView.getContext().getResources(), R.drawable.baseline_cloud_off_24, (Resources.Theme) null)).override(imageView.getWidth(), imageView.getHeight());
Intrinsics.checkNotNullExpressionValue(override, "requestOptions.placehold….width, this.height\n )");
Glide.with(imageView.getContext()).load(glideUrl).diskCacheStrategy(DiskCacheStrategy.NONE).skipMemoryCache(true).apply(override).into(imageView);
}
public static final <T> Intent newIntent(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.reifiedOperationMarker(4, "T");
return new Intent(context, (Class<?>) Object.class);
}
@NotNull
public static final String onlyAlphanumeric(@NotNull String str) {
Intrinsics.checkNotNullParameter(str, "<this>");
return SequencesKt___SequencesKt.joinToString$default(SequencesKt___SequencesKt.filter(StringsKt___StringsKt.asSequence(str), b.a), "", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 62, (Object) null);
}
public static final <T extends Parcelable> T parcelable(Intent intent, String str) {
Intrinsics.checkNotNullParameter(intent, "<this>");
Intrinsics.checkNotNullParameter(str, "key");
if (Build.VERSION.SDK_INT >= 33) {
Intrinsics.reifiedOperationMarker(4, "T");
return (T) intent.getParcelableExtra(str, Parcelable.class);
}
T t = (T) intent.getParcelableExtra(str);
Intrinsics.reifiedOperationMarker(2, "T");
return t;
}
@NotNull
public static final View ripple(@NotNull View view) {
Intrinsics.checkNotNullParameter(view, "<this>");
TypedValue typedValue = new TypedValue();
view.getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, typedValue, true);
view.setBackgroundResource(typedValue.resourceId);
view.setFocusable(true);
return view;
}
public static final <T> void setBackStackData(@NotNull Fragment fragment, @NotNull String str, @NotNull T t, boolean z) {
SavedStateHandle savedStateHandle;
Intrinsics.checkNotNullParameter(fragment, "<this>");
Intrinsics.checkNotNullParameter(str, "key");
Intrinsics.checkNotNullParameter(t, "data");
NavBackStackEntry previousBackStackEntry = FragmentKt.findNavController(fragment).getPreviousBackStackEntry();
if (previousBackStackEntry != null && (savedStateHandle = previousBackStackEntry.getSavedStateHandle()) != null) {
savedStateHandle.set(str, t);
}
if (z) {
FragmentKt.findNavController(fragment).navigateUp();
}
}
public static void setBackStackData$default(Fragment fragment, String str, Object obj, boolean z, int i, Object obj2) {
if ((i & 4) != 0) {
z = true;
}
setBackStackData(fragment, str, obj, z);
}
public static final void showConfirm(@NotNull Activity activity, @NotNull String str, @NotNull String str2, @NotNull final Function1<? super Boolean, Unit> function1) {
Intrinsics.checkNotNullParameter(activity, "<this>");
Intrinsics.checkNotNullParameter(str, FirebaseProcessor.KEY_TITLE);
Intrinsics.checkNotNullParameter(str2, FirebaseProcessor.KEY_MESSAGE);
Intrinsics.checkNotNullParameter(function1, "onClicked");
final SweetAlertDialog sweetAlertDialog = new SweetAlertDialog(activity, 4);
sweetAlertDialog.setTitleText(str);
sweetAlertDialog.setConfirmText(activity.getString(R.string.btn_ok));
sweetAlertDialog.setContentText(str2);
sweetAlertDialog.setCancelText(activity.getString(R.string.btn_cancel));
sweetAlertDialog.setCustomImage(R.drawable.ic_fi_alert_confirm);
sweetAlertDialog.setCancelable(false);
sweetAlertDialog.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public final void onClick(SweetAlertDialog sweetAlertDialog2) {
ExtKt.g(function1, sweetAlertDialog, sweetAlertDialog2);
}
});
sweetAlertDialog.setCancelClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public final void onClick(SweetAlertDialog sweetAlertDialog2) {
ExtKt.h(function1, sweetAlertDialog, sweetAlertDialog2);
}
});
sweetAlertDialog.show();
((TextView) sweetAlertDialog.findViewById(2131366302)).setTextAppearance(R.style.title_extra_large);
TextView textView = (TextView) sweetAlertDialog.findViewById(cn.pedant.SweetAlert.R.id.content_text);
textView.setTypeface(ResourcesCompat.getFont(activity, R.font.metropolis_regular));
textView.setTextSize(0, activity.getResources().getDimension(R.dimen.sc_text_size_small_dp));
textView.setMaxLines(1000);
Button button = sweetAlertDialog.getButton(-1);
Button button2 = sweetAlertDialog.getButton(-2);
if (button != null) {
button.setBackground(AppCompatResources.getDrawable(activity, R.drawable.panel_primary_rounded));
button.setAllCaps(true);
button.setTextColor(ResourcesCompat.getColor(activity.getResources(), R.color.colorButtonText, (Resources.Theme) null));
button.setTextAppearance(R.style.subtitle_large);
}
if (button2 != null) {
button2.setBackground(AppCompatResources.getDrawable(activity, R.drawable.ecm_panel_disable_rounded));
button2.setAllCaps(true);
button2.setTextColor(ResourcesCompat.getColor(activity.getResources(), R.color.colorButtonText, (Resources.Theme) null));
button2.setTextAppearance(R.style.subtitle_large);
}
}
public static final void showError(@NotNull Activity activity, @NotNull View view, @NotNull String str, @Nullable View view2, @Nullable View.OnClickListener onClickListener, @Nullable String str2) {
Intrinsics.checkNotNullParameter(activity, "<this>");
Intrinsics.checkNotNullParameter(view, "parent");
Intrinsics.checkNotNullParameter(str, FirebaseProcessor.KEY_MESSAGE);
View inflate = activity.getLayoutInflater().inflate(R.layout.widget_snackbar_error, (ViewGroup) null);
Snackbar make = Snackbar.make(view, "", -1);
make.getView().setBackgroundColor(0);
Snackbar.SnackbarLayout view3 = make.getView();
Intrinsics.checkNotNull(view3, "null cannot be cast to non-null type com.google.android.material.snackbar.Snackbar.SnackbarLayout");
Snackbar.SnackbarLayout snackbarLayout = view3;
snackbarLayout.setPadding(0, 0, 0, 0);
snackbarLayout.addView(inflate);
if (view2 != null) {
make.setAnchorView(view2);
}
((TextView) inflate.findViewById(R.id.toast_text)).setText(str);
if (onClickListener != null && str2 != null) {
TextView textView = (TextView) inflate.findViewById(R.id.toast_action_btn_tv);
Intrinsics.checkNotNullExpressionValue(textView, "showError$lambda$8$lambda$7");
visible(textView);
textView.setText(str2);
textView.setOnClickListener(onClickListener);
}
make.show();
}
public static final void showInfo(@NotNull Activity activity, @NotNull String str, @NotNull String str2, @NotNull final Function1<? super Boolean, Unit> function1) {
Intrinsics.checkNotNullParameter(activity, "<this>");
Intrinsics.checkNotNullParameter(str, FirebaseProcessor.KEY_TITLE);
Intrinsics.checkNotNullParameter(str2, FirebaseProcessor.KEY_MESSAGE);
Intrinsics.checkNotNullParameter(function1, "onClicked");
final SweetAlertDialog sweetAlertDialog = new SweetAlertDialog(activity, 4);
sweetAlertDialog.setTitleText(str);
sweetAlertDialog.setConfirmText(activity.getString(R.string.btn_ok));
sweetAlertDialog.setContentText(str2);
sweetAlertDialog.setCustomImage(R.drawable.ic_fi_info);
sweetAlertDialog.setCancelable(false);
sweetAlertDialog.setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public final void onClick(SweetAlertDialog sweetAlertDialog2) {
ExtKt.i(function1, sweetAlertDialog, sweetAlertDialog2);
}
});
sweetAlertDialog.setCancelClickListener(new SweetAlertDialog.OnSweetClickListener() {
@Override
public final void onClick(SweetAlertDialog sweetAlertDialog2) {
ExtKt.j(function1, sweetAlertDialog, sweetAlertDialog2);
}
});
sweetAlertDialog.show();
((TextView) sweetAlertDialog.findViewById(2131366302)).setTextAppearance(R.style.title_extra_large);
TextView textView = (TextView) sweetAlertDialog.findViewById(cn.pedant.SweetAlert.R.id.content_text);
textView.setTypeface(ResourcesCompat.getFont(activity, R.font.metropolis_regular));
textView.setTextSize(0, activity.getResources().getDimension(R.dimen.sc_text_size_small_dp));
textView.setMaxLines(1000);
Button button = sweetAlertDialog.getButton(-1);
if (button != null) {
button.setBackground(AppCompatResources.getDrawable(activity, R.drawable.panel_primary_rounded_color_primary));
button.setAllCaps(true);
button.setTextColor(ResourcesCompat.getColor(activity.getResources(), R.color.colorButtonText, (Resources.Theme) null));
button.setTextAppearance(R.style.subtitle_large);
}
}
public static final void showKeyboard(@NotNull Activity activity, @NotNull View view) {
Intrinsics.checkNotNullParameter(activity, "activity");
Intrinsics.checkNotNullParameter(view, "view");
view.requestFocus();
Object systemService = activity.getSystemService("input_method");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
((InputMethodManager) systemService).showSoftInput(view, 1);
}
public static final void showPopUpMenu(@NotNull Activity activity, @NotNull View view, int i, @NotNull final Function1<? super MenuItem, Boolean> function1) {
Intrinsics.checkNotNullParameter(activity, "<this>");
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(function1, "callback");
PopupMenu popupMenu = new PopupMenu(activity, view);
MenuInflater menuInflater = popupMenu.getMenuInflater();
Intrinsics.checkNotNullExpressionValue(menuInflater, "popUp.menuInflater");
menuInflater.inflate(i, popupMenu.getMenu());
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean k;
k = ExtKt.k(function1, menuItem);
return k;
}
});
popupMenu.show();
}
@NotNull
public static final Editable toEditable(@NotNull String str) {
Intrinsics.checkNotNullParameter(str, "<this>");
Editable newEditable = Editable.Factory.getInstance().newEditable(str);
Intrinsics.checkNotNullExpressionValue(newEditable, "getInstance().newEditable(this)");
return newEditable;
}
public static final long toSafeLong(double d, long j) {
return (long) d;
}
public static final long toSafeLong(@NotNull String str, long j) {
Intrinsics.checkNotNullParameter(str, "<this>");
try {
Double doubleOrNull = z15.toDoubleOrNull(StringsKt__StringsKt.trim(str).toString());
return doubleOrNull != null ? (long) doubleOrNull.doubleValue() : j;
} catch (Exception unused) {
return j;
}
}
public static long toSafeLong$default(String str, long j, int i, Object obj) {
if ((i & 1) != 0) {
j = 0;
}
return toSafeLong(str, j);
}
public static final void visible(@NotNull View view) {
Intrinsics.checkNotNullParameter(view, "<this>");
view.setVisibility(0);
}
public static final void hideKeyboard(@NotNull Activity activity) {
Intrinsics.checkNotNullParameter(activity, "<this>");
View currentFocus = activity.getCurrentFocus();
if (currentFocus == null) {
currentFocus = new View(activity);
}
hideKeyboard(activity, currentFocus);
}
public static long toSafeLong$default(double d, long j, int i, Object obj) {
if ((i & 1) != 0) {
j = 0;
}
return toSafeLong(d, j);
}
public static final void hideKeyboard(@NotNull Context context, @NotNull View view) {
Intrinsics.checkNotNullParameter(context, "<this>");
Intrinsics.checkNotNullParameter(view, "view");
Object systemService = context.getSystemService("input_method");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
((InputMethodManager) systemService).hideSoftInputFromWindow(view.getWindowToken(), 0);
}
public static final <T extends Parcelable> T parcelable(Bundle bundle, String str) {
Intrinsics.checkNotNullParameter(bundle, "<this>");
Intrinsics.checkNotNullParameter(str, "key");
if (Build.VERSION.SDK_INT >= 33) {
Intrinsics.reifiedOperationMarker(4, "T");
return (T) bundle.getParcelable(str, Parcelable.class);
}
T t = (T) bundle.getParcelable(str);
Intrinsics.reifiedOperationMarker(2, "T");
return t;
}
public static final <T> void launchActivity(Activity activity, int i, Bundle bundle, int i2, Function1<? super Intent, Unit> function1) {
Intrinsics.checkNotNullParameter(activity, "<this>");
Intrinsics.checkNotNullParameter(function1, "init");
Intrinsics.reifiedOperationMarker(4, "T");
Intent intent = new Intent(activity, (Class<?>) Object.class);
intent.addFlags(i2);
function1.invoke(intent);
activity.startActivityForResult(intent, i, bundle);
}
public static final void hideKeyboard(@NotNull View view, boolean z, @Nullable View view2) {
Intrinsics.checkNotNullParameter(view, "<this>");
Object systemService = view.getContext().getSystemService("input_method");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
InputMethodManager inputMethodManager = (InputMethodManager) systemService;
if (z) {
inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
} else {
inputMethodManager.showSoftInput(view2, 1);
}
}
public static void launchActivity$default(Activity activity, int i, Bundle bundle, int i2, Function1 function1, int i3, Object obj) {
if ((i3 & 1) != 0) {
i = -1;
}
if ((i3 & 2) != 0) {
bundle = null;
}
if ((i3 & 8) != 0) {
function1 = new Function1<Intent, Unit>() {
public Object invoke(Object obj2) {
invoke((Intent) obj2);
return Unit.INSTANCE;
}
public final void invoke(@NotNull Intent intent) {
Intrinsics.checkNotNullParameter(intent, "$this$null");
}
};
}
Intrinsics.checkNotNullParameter(activity, "<this>");
Intrinsics.checkNotNullParameter(function1, "init");
Intrinsics.reifiedOperationMarker(4, "T");
Intent intent = new Intent(activity, (Class<?>) Object.class);
intent.addFlags(i2);
function1.invoke(intent);
activity.startActivityForResult(intent, i, bundle);
}
public static final void showPopUpMenu(@NotNull Fragment fragment, @NotNull View view, int i, @NotNull final Function1<? super MenuItem, Boolean> function1) {
Intrinsics.checkNotNullParameter(fragment, "<this>");
Intrinsics.checkNotNullParameter(view, "view");
Intrinsics.checkNotNullParameter(function1, "callback");
PopupMenu popupMenu = new PopupMenu(fragment.getActivity(), view);
MenuInflater menuInflater = popupMenu.getMenuInflater();
Intrinsics.checkNotNullExpressionValue(menuInflater, "popUp.menuInflater");
menuInflater.inflate(i, popupMenu.getMenu());
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean l;
l = ExtKt.l(function1, menuItem);
return l;
}
});
popupMenu.show();
}
public static final void copyToClipboard(@NotNull Fragment fragment, @NotNull String str) {
Intrinsics.checkNotNullParameter(fragment, "<this>");
Intrinsics.checkNotNullParameter(str, "text");
ComponentActivity activity = fragment.getActivity();
if (activity != null) {
copyToClipboard((Activity) activity, str);
}
}
public static final void showError(@NotNull Fragment fragment, @NotNull View view, @NotNull String str, @Nullable View view2, @Nullable View.OnClickListener onClickListener, @Nullable String str2) {
Intrinsics.checkNotNullParameter(fragment, "<this>");
Intrinsics.checkNotNullParameter(view, "parent");
Intrinsics.checkNotNullParameter(str, FirebaseProcessor.KEY_MESSAGE);
ComponentActivity activity = fragment.getActivity();
if (activity != null) {
showError((Activity) activity, view, str, view2, onClickListener, str2);
}
}
public static final void showInfo(@NotNull Fragment fragment, @NotNull String str, @NotNull String str2, @NotNull Function1<? super Boolean, Unit> function1) {
Intrinsics.checkNotNullParameter(fragment, "<this>");
Intrinsics.checkNotNullParameter(str, FirebaseProcessor.KEY_TITLE);
Intrinsics.checkNotNullParameter(str2, FirebaseProcessor.KEY_MESSAGE);
Intrinsics.checkNotNullParameter(function1, "onClicked");
ComponentActivity activity = fragment.getActivity();
if (activity != null) {
showInfo((Activity) activity, str, str2, function1);
}
}
public static final void showConfirm(@NotNull Fragment fragment, @NotNull String str, @NotNull String str2, @NotNull Function1<? super Boolean, Unit> function1) {
Intrinsics.checkNotNullParameter(fragment, "<this>");
Intrinsics.checkNotNullParameter(str, FirebaseProcessor.KEY_TITLE);
Intrinsics.checkNotNullParameter(str2, FirebaseProcessor.KEY_MESSAGE);
Intrinsics.checkNotNullParameter(function1, "onClicked");
ComponentActivity activity = fragment.getActivity();
if (activity != null) {
showConfirm((Activity) activity, str, str2, function1);
}
}
}