十八摸 v1.2.0版本的 MD5 值为:124d0569983b1a978779bc818002364d

以下内容为反编译后的 FileRepository.java 源代码,内容仅作参考


package com.caoliu.lib_common.repository;

import android.content.Context;
import app.a.module_stream.Cdo;
import com.blankj.utilcode.util.ToastUtils;
import com.blankj.utilcode.util.Utils;
import com.bumptech.glide.load.engine.Cfinal;
import com.caoliu.lib_common.ExKt;
import com.caoliu.lib_common.dialog.CoinPayDialog;
import com.caoliu.lib_common.entity.FileResponse;
import com.caoliu.lib_http.APIException;
import com.caoliu.lib_http.BaseResp;
import e3.Cif;
import java.io.File;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;
import kotlin.Cclass;
import kotlin.coroutines.Cfor;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.text.Cbreak;
import kotlin.text.Regex;
import n.Ctry;
import okhttp3.Cimport;
import okhttp3.Cnative;
public final class FileRepository {
    public final Object m1484case(File file, Ctry ctry, Cfor<? super String> cfor) {
        FileRepository$uploadAiContentImg$1 fileRepository$uploadAiContentImg$1;
        int i7;
        if (cfor instanceof FileRepository$uploadAiContentImg$1) {
            fileRepository$uploadAiContentImg$1 = (FileRepository$uploadAiContentImg$1) cfor;
            int i8 = fileRepository$uploadAiContentImg$1.label;
            if ((i8 & Integer.MIN_VALUE) != 0) {
                fileRepository$uploadAiContentImg$1.label = i8 - Integer.MIN_VALUE;
                Object obj = fileRepository$uploadAiContentImg$1.result;
                CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
                i7 = fileRepository$uploadAiContentImg$1.label;
                if (i7 != 0) {
                    Cdo.m(obj);
                    String name = file.getName();
                    Cfinal.m1142super(name, "it.name");
                    Cnative.Cfor m5722if = Cnative.Cfor.m5722if("file", file.getName(), new n.Cfor(file, String.valueOf(m1492try(name)), ctry));
                    i.Cfor cfor2 = i.Cdo.f11141if;
                    fileRepository$uploadAiContentImg$1.label = 1;
                    obj = cfor2.m4442else(m5722if, fileRepository$uploadAiContentImg$1);
                    if (obj == coroutineSingletons) {
                        return coroutineSingletons;
                    }
                } else if (i7 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                } else {
                    Cdo.m(obj);
                }
                return Cif.m4082new((BaseResp) obj);
            }
        }
        fileRepository$uploadAiContentImg$1 = new FileRepository$uploadAiContentImg$1(this, cfor);
        Object obj2 = fileRepository$uploadAiContentImg$1.result;
        CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
        i7 = fileRepository$uploadAiContentImg$1.label;
        if (i7 != 0) {
        }
        return Cif.m4082new((BaseResp) obj2);
    }

    public final Object m1485do(File file, Ctry ctry, Cfor<? super String> cfor) {
        FileRepository$doUploadAIFile$1 fileRepository$doUploadAIFile$1;
        int i7;
        if (cfor instanceof FileRepository$doUploadAIFile$1) {
            fileRepository$doUploadAIFile$1 = (FileRepository$doUploadAIFile$1) cfor;
            int i8 = fileRepository$doUploadAIFile$1.label;
            if ((i8 & Integer.MIN_VALUE) != 0) {
                fileRepository$doUploadAIFile$1.label = i8 - Integer.MIN_VALUE;
                Object obj = fileRepository$doUploadAIFile$1.result;
                CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
                i7 = fileRepository$doUploadAIFile$1.label;
                if (i7 != 0) {
                    Cdo.m(obj);
                    String name = file.getName();
                    Cfinal.m1142super(name, "it.name");
                    Cnative.Cfor m5722if = Cnative.Cfor.m5722if("file", file.getName(), new n.Cfor(file, String.valueOf(m1492try(name)), ctry));
                    i.Cfor cfor2 = i.Cdo.f11141if;
                    fileRepository$doUploadAIFile$1.label = 1;
                    obj = cfor2.m4443for(m5722if, fileRepository$doUploadAIFile$1);
                    if (obj == coroutineSingletons) {
                        return coroutineSingletons;
                    }
                } else if (i7 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                } else {
                    Cdo.m(obj);
                }
                return Cif.m4082new((BaseResp) obj);
            }
        }
        fileRepository$doUploadAIFile$1 = new FileRepository$doUploadAIFile$1(this, cfor);
        Object obj2 = fileRepository$doUploadAIFile$1.result;
        CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
        i7 = fileRepository$doUploadAIFile$1.label;
        if (i7 != 0) {
        }
        return Cif.m4082new((BaseResp) obj2);
    }

    public final Object m1486else(File file, Ctry ctry, Cfor<? super String> cfor) {
        FileRepository$uploadAiUndressImg$1 fileRepository$uploadAiUndressImg$1;
        int i7;
        if (cfor instanceof FileRepository$uploadAiUndressImg$1) {
            fileRepository$uploadAiUndressImg$1 = (FileRepository$uploadAiUndressImg$1) cfor;
            int i8 = fileRepository$uploadAiUndressImg$1.label;
            if ((i8 & Integer.MIN_VALUE) != 0) {
                fileRepository$uploadAiUndressImg$1.label = i8 - Integer.MIN_VALUE;
                Object obj = fileRepository$uploadAiUndressImg$1.result;
                CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
                i7 = fileRepository$uploadAiUndressImg$1.label;
                if (i7 != 0) {
                    Cdo.m(obj);
                    String name = file.getName();
                    Cfinal.m1142super(name, "it.name");
                    Cnative.Cfor m5722if = Cnative.Cfor.m5722if("file", file.getName(), new n.Cfor(file, String.valueOf(m1492try(name)), ctry));
                    i.Cfor cfor2 = i.Cdo.f11141if;
                    fileRepository$uploadAiUndressImg$1.label = 1;
                    obj = cfor2.m4446try(m5722if, fileRepository$uploadAiUndressImg$1);
                    if (obj == coroutineSingletons) {
                        return coroutineSingletons;
                    }
                } else if (i7 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                } else {
                    Cdo.m(obj);
                }
                return Cif.m4082new((BaseResp) obj);
            }
        }
        fileRepository$uploadAiUndressImg$1 = new FileRepository$uploadAiUndressImg$1(this, cfor);
        Object obj2 = fileRepository$uploadAiUndressImg$1.result;
        CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
        i7 = fileRepository$uploadAiUndressImg$1.label;
        if (i7 != 0) {
        }
        return Cif.m4082new((BaseResp) obj2);
    }

    public final Object m1487for(File file, Ctry ctry, Cfor<? super BaseResp<FileResponse>> cfor) {
        FileRepository$doUploadFileBase$1 fileRepository$doUploadFileBase$1;
        int i7;
        if (cfor instanceof FileRepository$doUploadFileBase$1) {
            fileRepository$doUploadFileBase$1 = (FileRepository$doUploadFileBase$1) cfor;
            int i8 = fileRepository$doUploadFileBase$1.label;
            if ((i8 & Integer.MIN_VALUE) != 0) {
                fileRepository$doUploadFileBase$1.label = i8 - Integer.MIN_VALUE;
                Object obj = fileRepository$doUploadFileBase$1.result;
                CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
                i7 = fileRepository$doUploadFileBase$1.label;
                if (i7 != 0) {
                    Cdo.m(obj);
                    String name = file.getName();
                    Cfinal.m1142super(name, "it.name");
                    Cnative.Cfor m5722if = Cnative.Cfor.m5722if("file", file.getName(), new n.Cfor(file, String.valueOf(m1492try(name)), ctry));
                    i.Cfor cfor2 = i.Cdo.f11141if;
                    fileRepository$doUploadFileBase$1.label = 1;
                    obj = cfor2.m4445new(m5722if, fileRepository$doUploadFileBase$1);
                    if (obj == coroutineSingletons) {
                        return coroutineSingletons;
                    }
                } else if (i7 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                } else {
                    Cdo.m(obj);
                }
                return (BaseResp) obj;
            }
        }
        fileRepository$doUploadFileBase$1 = new FileRepository$doUploadFileBase$1(this, cfor);
        Object obj2 = fileRepository$doUploadFileBase$1.result;
        CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
        i7 = fileRepository$doUploadFileBase$1.label;
        if (i7 != 0) {
        }
        return (BaseResp) obj2;
    }

    public final Object m1488goto(File file, String str, Cfor<? super String> cfor) {
        FileRepository$uploadChatFile$1 fileRepository$uploadChatFile$1;
        int i7;
        BaseResp baseResp;
        if (cfor instanceof FileRepository$uploadChatFile$1) {
            fileRepository$uploadChatFile$1 = (FileRepository$uploadChatFile$1) cfor;
            int i8 = fileRepository$uploadChatFile$1.label;
            if ((i8 & Integer.MIN_VALUE) != 0) {
                fileRepository$uploadChatFile$1.label = i8 - Integer.MIN_VALUE;
                Object obj = fileRepository$uploadChatFile$1.result;
                CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
                i7 = fileRepository$uploadChatFile$1.label;
                if (i7 != 0) {
                    Cdo.m(obj);
                    String name = file.getName();
                    Cfinal.m1142super(name, "it.name");
                    Cnative.Cfor m5722if = Cnative.Cfor.m5722if("file", file.getName(), new n.Cfor(file, String.valueOf(m1492try(name)), null));
                    fileRepository$uploadChatFile$1.label = 1;
                    obj = ((i.Cfor) com.caoliu.lib_common.manager.Cif.f3021for.m1438if("https://52kbhl.com/").m6163if(i.Cfor.class)).m4441do(str, m5722if, fileRepository$uploadChatFile$1);
                    if (obj == coroutineSingletons) {
                        return coroutineSingletons;
                    }
                } else if (i7 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                } else {
                    Cdo.m(obj);
                }
                baseResp = (BaseResp) obj;
                if (baseResp.getCode() != 0) {
                    return baseResp.getData();
                }
                throw new APIException(500, baseResp.getMsg());
            }
        }
        fileRepository$uploadChatFile$1 = new FileRepository$uploadChatFile$1(this, cfor);
        Object obj2 = fileRepository$uploadChatFile$1.result;
        CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
        i7 = fileRepository$uploadChatFile$1.label;
        if (i7 != 0) {
        }
        baseResp = (BaseResp) obj2;
        if (baseResp.getCode() != 0) {
        }
    }

    public final Object m1489if(File file, Ctry ctry, Cfor<? super FileResponse> cfor) {
        FileRepository$doUploadFile$1 fileRepository$doUploadFile$1;
        int i7;
        if (cfor instanceof FileRepository$doUploadFile$1) {
            fileRepository$doUploadFile$1 = (FileRepository$doUploadFile$1) cfor;
            int i8 = fileRepository$doUploadFile$1.label;
            if ((i8 & Integer.MIN_VALUE) != 0) {
                fileRepository$doUploadFile$1.label = i8 - Integer.MIN_VALUE;
                Object obj = fileRepository$doUploadFile$1.result;
                CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
                i7 = fileRepository$doUploadFile$1.label;
                if (i7 != 0) {
                    Cdo.m(obj);
                    String name = file.getName();
                    Cfinal.m1142super(name, "it.name");
                    Cnative.Cfor m5722if = Cnative.Cfor.m5722if("file", file.getName(), new n.Cfor(file, String.valueOf(m1492try(name)), ctry));
                    i.Cfor cfor2 = i.Cdo.f11141if;
                    fileRepository$doUploadFile$1.label = 1;
                    obj = cfor2.m4445new(m5722if, fileRepository$doUploadFile$1);
                    if (obj == coroutineSingletons) {
                        return coroutineSingletons;
                    }
                } else if (i7 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                } else {
                    Cdo.m(obj);
                }
                return Cif.m4082new((BaseResp) obj);
            }
        }
        fileRepository$doUploadFile$1 = new FileRepository$doUploadFile$1(this, cfor);
        Object obj2 = fileRepository$doUploadFile$1.result;
        CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
        i7 = fileRepository$doUploadFile$1.label;
        if (i7 != 0) {
        }
        return Cif.m4082new((BaseResp) obj2);
    }

    public final Object m1490new(ArrayList<File> arrayList, Ctry ctry, Cfor<? super List<FileResponse>> cfor) {
        FileRepository$doUploadFiles$1 fileRepository$doUploadFiles$1;
        int i7;
        if (cfor instanceof FileRepository$doUploadFiles$1) {
            fileRepository$doUploadFiles$1 = (FileRepository$doUploadFiles$1) cfor;
            int i8 = fileRepository$doUploadFiles$1.label;
            if ((i8 & Integer.MIN_VALUE) != 0) {
                fileRepository$doUploadFiles$1.label = i8 - Integer.MIN_VALUE;
                Object obj = fileRepository$doUploadFiles$1.result;
                CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
                i7 = fileRepository$doUploadFiles$1.label;
                if (i7 != 0) {
                    Cdo.m(obj);
                    ArrayList arrayList2 = new ArrayList();
                    for (File file : arrayList) {
                        String name = file.getName();
                        Cfinal.m1142super(name, "it.name");
                        arrayList2.add(Cnative.Cfor.m5722if("files", file.getName(), new n.Cfor(file, String.valueOf(m1492try(name)), ctry)));
                    }
                    i.Cfor cfor2 = i.Cdo.f11141if;
                    fileRepository$doUploadFiles$1.label = 1;
                    obj = cfor2.m4444if(arrayList2, fileRepository$doUploadFiles$1);
                    if (obj == coroutineSingletons) {
                        return coroutineSingletons;
                    }
                } else if (i7 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                } else {
                    Cdo.m(obj);
                }
                return Cif.m4082new((BaseResp) obj);
            }
        }
        fileRepository$doUploadFiles$1 = new FileRepository$doUploadFiles$1(this, cfor);
        Object obj2 = fileRepository$doUploadFiles$1.result;
        CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
        i7 = fileRepository$doUploadFiles$1.label;
        if (i7 != 0) {
        }
        return Cif.m4082new((BaseResp) obj2);
    }

    public final Object m1491this(final Context context, File file, int i7, String str, Ctry ctry, Cfor<? super String> cfor) {
        FileRepository$uploadFacePIc$1 fileRepository$uploadFacePIc$1;
        int i8;
        try {
            if (cfor instanceof FileRepository$uploadFacePIc$1) {
                fileRepository$uploadFacePIc$1 = (FileRepository$uploadFacePIc$1) cfor;
                int i9 = fileRepository$uploadFacePIc$1.label;
                if ((i9 & Integer.MIN_VALUE) != 0) {
                    fileRepository$uploadFacePIc$1.label = i9 - Integer.MIN_VALUE;
                    Object obj = fileRepository$uploadFacePIc$1.result;
                    CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
                    i8 = fileRepository$uploadFacePIc$1.label;
                    if (i8 != 0) {
                        Cdo.m(obj);
                        String name = file.getName();
                        Cfinal.m1142super(name, "it.name");
                        Cnative.Cfor m5722if = Cnative.Cfor.m5722if("file", file.getName(), new n.Cfor(file, String.valueOf(m1492try(name)), ctry));
                        i.Cfor cfor2 = i.Cdo.f11141if;
                        fileRepository$uploadFacePIc$1.L$0 = context;
                        fileRepository$uploadFacePIc$1.label = 1;
                        obj = cfor2.m4440case(m5722if, i7, str, fileRepository$uploadFacePIc$1);
                        if (obj == coroutineSingletons) {
                            return coroutineSingletons;
                        }
                    } else if (i8 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    } else {
                        Context context2 = (Context) fileRepository$uploadFacePIc$1.L$0;
                        Cdo.m(obj);
                    }
                    return Cif.m4082new((BaseResp) obj);
                }
            }
            if (i8 != 0) {
            }
            return Cif.m4082new((BaseResp) obj);
        } catch (APIException e7) {
            if (e7.getCode() == 5100) {
                ExKt.m1311protected(0L, new d6.Cdo<Cclass>() {
                    {
                        super(0);
                    }

                    @Override
                    public Cclass invoke() {
                        invoke2();
                        return Cclass.f12043do;
                    }

                    public final void invoke2() {
                        CoinPayDialog coinPayDialog = new CoinPayDialog(context);
                        Utils.getApp();
                        b4.Ctry ctry2 = new b4.Ctry();
                        ctry2.f1338for = Boolean.FALSE;
                        coinPayDialog.f8614break = ctry2;
                        coinPayDialog.m3635import();
                        coinPayDialog.m1366switch();
                    }
                }, 1);
                return "";
            }
            ToastUtils.showShort(e7.getMsg(), new Object[0]);
            return "";
        }
        fileRepository$uploadFacePIc$1 = new FileRepository$uploadFacePIc$1(this, cfor);
        Object obj2 = fileRepository$uploadFacePIc$1.result;
        CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
        i8 = fileRepository$uploadFacePIc$1.label;
    }

    public final Cimport m1492try(String str) {
        String contentTypeFor = URLConnection.getFileNameMap().getContentTypeFor(Cbreak.F(str, "#", "", false, 4));
        if (contentTypeFor == null) {
            contentTypeFor = "application/octet-stream";
        }
        Regex regex = j6.Cfor.f11752do;
        try {
            return j6.Cfor.m4842do(contentTypeFor);
        } catch (IllegalArgumentException unused) {
            return null;
        }
    }
}