正在查看: BodyTech v7.6.4 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: BodyTech v7.6.4 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package s2;
import androidx.fragment.app.Fragment;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.mindbodyonline.domain.ClassTypeObject;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Iterator;
import java.util.List;
import org.koin.core.Application;
import org.koin.core.core.data.remote.model.GymSettings;
import org.koin.core.exception.ApplicationException;
import org.koin.core.model.AddClientsToClassesResponse;
import org.koin.core.model.ClassData;
import org.koin.core.model.ClassSchedule;
import org.koin.core.model.GetClassScheduleResponse;
import org.koin.core.model.GetClassesResponse;
import s2.b;
public class i extends b<AddClientsToClassesResponse, a> {
private n6.a i;
private n6.e f3609j;
public interface a extends b.InterfaceC0223b {
void d(Exception exc);
void i();
void j(ClassSchedule classSchedule);
void l(Integer[] numArr, boolean z7, AddClientsToClassesResponse addClientsToClassesResponse);
}
public i(Fragment fragment, h1.a aVar, a aVar2) {
super(fragment, aVar, aVar2);
}
public static List<Date> F(String[] strArr, String str, boolean[] zArr, String str2, ClassSchedule classSchedule, Date date, Date date2) {
ArrayList arrayList = new ArrayList();
GregorianCalendar gregorianCalendar = new GregorianCalendar();
GregorianCalendar gregorianCalendar2 = new GregorianCalendar();
org.koin.core.util.i.h(gregorianCalendar2);
GregorianCalendar gregorianCalendar3 = new GregorianCalendar();
gregorianCalendar3.setTime(date2);
org.koin.core.util.i.g(gregorianCalendar3);
if (classSchedule.getStartTime() != null) {
gregorianCalendar2.setTime(classSchedule.getStartTime());
}
int parseInt = Integer.parseInt(str);
String string = Application.d().getString(2132017417);
String[] strArr2 = new String[strArr.length];
int i = 0;
for (int i8 = 0; i8 < strArr.length; i8++) {
if (zArr[i8]) {
strArr2[i] = strArr[i8];
i++;
}
}
String[] strArr3 = new String[i];
System.arraycopy(strArr2, 0, strArr3, 0, i);
for (int i9 = 0; i9 < i; i9++) {
String str3 = strArr3[i9];
gregorianCalendar.setTime(date);
org.koin.core.util.i.h(gregorianCalendar);
gregorianCalendar.set(11, gregorianCalendar2.get(11));
gregorianCalendar.set(12, gregorianCalendar2.get(12));
N(gregorianCalendar, str3);
while (gregorianCalendar.compareTo((Calendar) gregorianCalendar3) <= 0) {
arrayList.add(gregorianCalendar.getTime());
if (string.equals(str2)) {
gregorianCalendar.add(3, parseInt);
} else {
gregorianCalendar.add(3, parseInt * 4);
}
}
}
return arrayList;
}
public static boolean G(ClassData classData, List<Date> list) {
Date startDateTime = classData.getStartDateTime();
GregorianCalendar gregorianCalendar = new GregorianCalendar();
gregorianCalendar.setTime(startDateTime);
boolean z7 = false;
gregorianCalendar.set(13, 0);
gregorianCalendar.set(14, 0);
Iterator<Date> it = list.iterator();
while (it.hasNext()) {
z7 |= gregorianCalendar.getTime().equals(it.next());
if (z7) {
break;
}
}
return z7;
}
public void H(VolleyError volleyError) {
this.f3609j = null;
t(false);
if (o() != null) {
o().d(volleyError);
}
}
public void I(Integer num, List list, GetClassesResponse getClassesResponse) {
this.f3609j = null;
List<ClassData> classes = getClassesResponse.getClasses();
ArrayList arrayList = new ArrayList();
if (classes.size() > 0) {
for (ClassData classData : classes) {
if (num == null || num.equals(classData.getClassScheduleId())) {
if (G(classData, list)) {
arrayList.add(classData);
}
}
}
}
Collections.sort(arrayList, GetClassesResponse.getClassDataComparatorByDate());
int size = arrayList.size();
Integer[] numArr = new Integer[size];
for (int i = 0; i < size; i++) {
numArr[i] = ((ClassData) arrayList.get(i)).getId();
}
if (size > 0) {
C(numArr, false, true);
return;
}
ApplicationException applicationException = new ApplicationException(Application.d().getString(2132017547));
t(false);
if (o() != null) {
o().d(applicationException);
}
}
public void J(VolleyError volleyError) {
this.i = null;
t(false);
if (o() != null) {
o().f(volleyError);
}
}
public void K(Integer[] numArr, boolean z7, AddClientsToClassesResponse addClientsToClassesResponse) {
this.i = null;
t(false);
if (o() != null) {
o().l(numArr, z7, addClientsToClassesResponse);
}
}
public void L(VolleyError volleyError) {
this.f3609j = null;
t(false);
if (o() != null) {
o().d(volleyError);
}
}
public void M(GetClassScheduleResponse getClassScheduleResponse) {
t(false);
if (getClassScheduleResponse.isSuccess() && getClassScheduleResponse.getClassSchedule() != null) {
if (o() != null) {
o().j(getClassScheduleResponse.getClassSchedule());
}
} else if (o() != null) {
o().d(new ApplicationException(Application.d().getString(2132017547)));
}
}
private static void N(Calendar calendar, String str) {
while (!String.format("%ta", calendar.getTime()).equalsIgnoreCase(str)) {
calendar.add(5, 1);
}
}
public void B(h1.a aVar, final List<Date> list, Date date, Date date2, Integer num, final Integer num2) {
n6.e eVar = this.f3609j;
if (eVar != null) {
eVar.cancel();
}
GymSettings settings = aVar.h() != null ? aVar.h().getSettings() : null;
boolean z7 = (settings == null || settings.getShowWorkshopsInClassesTab().booleanValue()) ? false : true;
t(true);
n6.e eVar2 = new n6.e(z7, true, date, date2, num, new Response.ErrorListener() {
@Override
public final void onErrorResponse(VolleyError volleyError) {
i.this.H(volleyError);
}
}, new Response.Listener() {
@Override
public final void onResponse(Object obj) {
i.this.I(num2, list, (GetClassesResponse) obj);
}
});
this.f3609j = eVar2;
eVar2.i();
}
public void C(final Integer[] numArr, final boolean z7, boolean z8) {
t(true);
this.i = new n6.a(numArr, z7, z8, new Response.ErrorListener() {
@Override
public final void onErrorResponse(VolleyError volleyError) {
i.this.J(volleyError);
}
}, new Response.Listener() {
@Override
public final void onResponse(Object obj) {
i.this.K(numArr, z7, (AddClientsToClassesResponse) obj);
}
});
u();
}
public void D() {
t(true);
n6.a aVar = this.i;
if (aVar != null) {
aVar.i();
return;
}
t(false);
if (o() != null) {
o().f(new ApplicationException(Application.d().getString(2132018243)));
}
}
public void E(ClassTypeObject classTypeObject) {
Integer valueOf = Integer.valueOf(classTypeObject.getClassTypeId());
t(true);
new n6.d(valueOf, classTypeObject.getStartDate(), classTypeObject.getEndDate(), new Response.ErrorListener() {
@Override
public final void onErrorResponse(VolleyError volleyError) {
i.this.L(volleyError);
}
}, new Response.Listener() {
@Override
public final void onResponse(Object obj) {
i.this.M((GetClassScheduleResponse) obj);
}
}).i();
}
@Override
protected void q() {
t(false);
if (o() != null) {
o().i();
}
}
}