导航菜单

页面标题

页面副标题

BodyTech v7.6.4 - c.java 源代码

正在查看: BodyTech v7.6.4 应用的 c.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package o6;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.koin.core.core.domain.SubscriberClientId;
import org.koin.core.model.BaseMindBodyResponse;
import org.koin.core.model.Client;
import org.koin.core.model.ClientCreditCard;
import org.koin.core.model.GetRequiredClientFieldsResponse;
import org.koin.core.model.Location;
import org.koin.core.util.u0;

public class c {

    class a implements h1.b {
        final String c;
        final String d;
        final String e;

        a(String str, String str2, String str3) {
            this.c = str;
            this.d = str2;
            this.e = str3;
        }

        @Override
        public String getLocationId() {
            return this.e;
        }

        @Override
        public String getSiteId() {
            String str = this.c;
            return str != null ? str : this.d;
        }
    }

    public static class b {
        private final Integer[] a;
        private final Boolean b;
        private final boolean c;

        public b(Integer[] numArr, Boolean bool, boolean z7) {
            this.a = numArr;
            this.b = bool;
            this.c = z7;
        }

        public Integer[] a() {
            return this.a;
        }

        public Boolean b() {
            return this.b;
        }

        public boolean c() {
            return this.c;
        }
    }

    public static class C0208c {
        private final Client a;
        private final Map<String, String> b;

        public C0208c(Client client, Map<String, String> map) {
            this.a = client;
            this.b = map;
        }

        public Map<String, String> b() {
            return this.b;
        }
    }

    public static class d {
        private final Integer a;
        private final Date b;
        private final Date c;

        public d(Integer num, Date date, Date date2) {
            this.a = num;
            this.b = date;
            this.c = date2;
        }

        public Date a() {
            return this.b;
        }

        public Integer b() {
            return this.a;
        }

        public Date c() {
            return this.c;
        }
    }

    public static class e {
        private final Integer a;
        private final Date b;
        private final Date c;

        public e(Integer num, Date date, Date date2) {
            this.a = num;
            this.b = date;
            this.c = date2;
        }

        public Integer a() {
            return this.a;
        }

        public Date b() {
            return this.b;
        }

        public Date c() {
            return this.c;
        }
    }

    public static class f {
        private final Integer a;
        private final Integer b;
        private final boolean c;
        private final Date d;
        private final Date e;
        private final String f;
        private final boolean g;

        public f(Integer num, Date date, Date date2, boolean z7) {
            this(num, null, true, date, date2, null, z7);
        }

        public Integer a() {
            return this.a;
        }

        public Integer b() {
            return this.b;
        }

        public Date c() {
            return this.e;
        }

        public String d() {
            return this.f;
        }

        public Date e() {
            return this.d;
        }

        public boolean f() {
            return this.g;
        }

        public boolean g() {
            return this.c;
        }

        public f(Integer num, Integer num2, boolean z7, Date date, Date date2, String str, boolean z8) {
            this.a = num;
            this.b = num2;
            this.c = z7;
            this.d = date;
            this.e = date2;
            this.f = str;
            this.g = z8;
        }
    }

    public static class g {
    }

    public static class h {
        private final Date a;
        private final Date b;

        public h(Date date, Date date2) {
            this.a = date;
            this.b = date2;
        }

        public Date a() {
            return this.a;
        }

        public Date b() {
            return this.b;
        }
    }

    public static class i {
        private final boolean a;
        private final String b;

        public i(boolean z7, String str) {
            this.a = z7;
            this.b = str;
        }

        public String a() {
            return this.b;
        }

        public boolean b() {
            return this.a;
        }
    }

    public static class j {
        private final Date a;
        private final String b;

        public j(Date date, String str) {
            this.a = date;
            this.b = str;
        }

        public Date b() {
            return this.a;
        }

        public String c() {
            return this.b;
        }
    }

    public static class k {
        private String a;

        public k(String str) {
            this.a = str;
        }

        public String a() {
            return this.a;
        }
    }

    public static class l {
        private static l a;

        private l() {
        }

        public static l a() {
            if (a == null) {
                a = new l();
            }
            return a;
        }
    }

    private static String a(C0208c c0208c) {
        Client client = c0208c.a;
        StringBuilder sb = new StringBuilder();
        HashMap hashMap = new HashMap(c0208c.b());
        if (client != null) {
            if (client.getId() != null && client.getId().getValue().length() > 0) {
                sb.append(String.format(Locale.US, "<ID>%s</ID>\n", client.getId()));
                hashMap.remove("ID");
            }
            if (client.getGender() != null) {
                String gender = client.getGender();
                Locale locale = Locale.US;
                String lowerCase = gender.toLowerCase(locale);
                String str = (String) hashMap.get("Gender");
                if (lowerCase.equals(str != null ? str.toLowerCase(locale) : null)) {
                    hashMap.remove("Gender");
                }
            }
            if (!u0.b(client.getFirstName()) && client.getFirstName().equals(hashMap.get("FirstName"))) {
                hashMap.remove("FirstName");
            }
            if (!u0.b(client.getMiddleName()) && client.getMiddleName().equals(hashMap.get(GetRequiredClientFieldsResponse.MIDDLE_NAME))) {
                hashMap.remove(GetRequiredClientFieldsResponse.MIDDLE_NAME);
            }
            if (!u0.b(client.getLastName()) && client.getLastName().equals(hashMap.get("LastName"))) {
                hashMap.remove("LastName");
            }
            if (!u0.b(client.getEmail()) && client.getEmail().equals(hashMap.get("Email"))) {
                hashMap.remove("Email");
            }
            if (!u0.b(client.getAddressLine1()) && client.getAddressLine1().equals(hashMap.get(GetRequiredClientFieldsResponse.ADDRESS_LINE))) {
                hashMap.remove(GetRequiredClientFieldsResponse.ADDRESS_LINE);
            }
            if (client.getBirthDate() != null && new SimpleDateFormat("yyyy-MM-dd", Locale.US).format(client.getBirthDate()).equals(hashMap.get(GetRequiredClientFieldsResponse.BIRTH_DATE))) {
                hashMap.remove(GetRequiredClientFieldsResponse.BIRTH_DATE);
            }
            if (!u0.b(client.getCity()) && client.getCity().equals(hashMap.get(GetRequiredClientFieldsResponse.CITY))) {
                hashMap.remove(GetRequiredClientFieldsResponse.CITY);
            }
            if (!u0.b(client.getState()) && client.getState().equals(hashMap.get(GetRequiredClientFieldsResponse.STATE))) {
                hashMap.remove(GetRequiredClientFieldsResponse.STATE);
            }
            if (!u0.b(client.getPostalCode()) && client.getPostalCode().equals(hashMap.get(GetRequiredClientFieldsResponse.POSTAL_CODE))) {
                hashMap.remove(GetRequiredClientFieldsResponse.POSTAL_CODE);
            }
            if (!u0.b(client.getCountry()) && client.getCountry().equals(hashMap.get("Country"))) {
                hashMap.remove("Country");
            }
            if (!u0.b(client.getMobilePhone()) && client.getMobilePhone().equals(hashMap.get(GetRequiredClientFieldsResponse.MOBILE_PHONE))) {
                hashMap.remove(GetRequiredClientFieldsResponse.MOBILE_PHONE);
            }
            if (!u0.b(client.getEmailOptIn()) && !u0.b((String) hashMap.get("EmailOptIn"))) {
                String emailOptIn = client.getEmailOptIn();
                Locale locale2 = Locale.US;
                if (emailOptIn.toLowerCase(locale2).equals(((String) hashMap.get("EmailOptIn")).toLowerCase(locale2))) {
                    hashMap.remove("EmailOptIn");
                }
            }
            if (!u0.b(client.getHomePhone()) && client.getHomePhone().equals(hashMap.get(GetRequiredClientFieldsResponse.HOME_PHONE))) {
                hashMap.remove(GetRequiredClientFieldsResponse.HOME_PHONE);
            }
            if (!u0.b(client.getWorkPhone()) && client.getWorkPhone().equals(hashMap.get(GetRequiredClientFieldsResponse.WORK_PHONE))) {
                hashMap.remove(GetRequiredClientFieldsResponse.WORK_PHONE);
            }
            if (!u0.b(client.getReferredBy()) && client.getReferredBy().equals(hashMap.get(GetRequiredClientFieldsResponse.REFERRED_BY))) {
                hashMap.remove(GetRequiredClientFieldsResponse.REFERRED_BY);
            }
            if (!u0.b(client.getEmergencyContactInfoName()) && client.getEmergencyContactInfoName().equals(hashMap.get("EmergencyContactInfoName"))) {
                hashMap.remove("EmergencyContactInfoName");
            }
            if (!u0.b(client.getEmergencyContactInfoPhone()) && client.getEmergencyContactInfoPhone().equals(hashMap.get("EmergencyContactInfoPhone"))) {
                hashMap.remove("EmergencyContactInfoPhone");
            }
            if (!u0.b(client.getEmergencyContactInfoRelationship()) && client.getEmergencyContactInfoRelationship().equals(hashMap.get("EmergencyContactInfoRelationship"))) {
                hashMap.remove("EmergencyContactInfoRelationship");
            }
            if (!u0.b(client.getEmergencyContactInfoEmail()) && client.getEmergencyContactInfoEmail().equals(hashMap.get("EmergencyContactInfoEmail"))) {
                hashMap.remove("EmergencyContactInfoEmail");
            }
            Location homeLocation = client.getHomeLocation();
            if (homeLocation != null && homeLocation.getId() != null && String.valueOf(homeLocation.getId()).equals(hashMap.get("HomeLocation"))) {
                hashMap.remove("HomeLocation");
            }
            ClientCreditCard clientCreditCard = client.getClientCreditCard();
            if (hashMap.containsKey("ClientCreditCard") && clientCreditCard != null) {
                StringBuilder sb2 = new StringBuilder();
                if (!u0.b(clientCreditCard.getLastFour())) {
                    sb2.append(String.format(Locale.US, "<CardNumber>%1$s</CardNumber>\n", clientCreditCard.getLastFour()));
                }
                if (!u0.b(clientCreditCard.getCardHolder())) {
                    sb2.append(String.format(Locale.US, "<CardHolder>%1$s</CardHolder>\n", clientCreditCard.getCardHolder()));
                }
                if (!u0.b(clientCreditCard.getCity())) {
                    sb2.append(String.format(Locale.US, "<City>%1$s</City>\n", clientCreditCard.getCity()));
                }
                if (!u0.b(clientCreditCard.getAddress())) {
                    sb2.append(String.format(Locale.US, "<Address>%1$s</Address>\n", clientCreditCard.getAddress()));
                }
                if (!u0.b(clientCreditCard.getState())) {
                    sb2.append(String.format(Locale.US, "<State>%1$s</State>\n", clientCreditCard.getState()));
                }
                if (!u0.b(clientCreditCard.getPostalCode())) {
                    sb2.append(String.format(Locale.US, "<PostalCode>%1$s</PostalCode>\n", clientCreditCard.getPostalCode()));
                }
                if (!u0.b(clientCreditCard.getExpMonth())) {
                    sb2.append(String.format(Locale.US, "<ExpMonth>%1$s</ExpMonth>\n", clientCreditCard.getExpMonth()));
                }
                if (!u0.b(clientCreditCard.getExpYear())) {
                    sb2.append(String.format(Locale.US, "<ExpYear>%1$s</ExpYear>\n", clientCreditCard.getExpYear()));
                }
                hashMap.put("ClientCreditCard", sb2.toString());
            }
        }
        if (hashMap.containsKey("HomeLocation")) {
            hashMap.put("HomeLocation", String.format(Locale.US, "<ID>%1$s</ID>\n", hashMap.get("HomeLocation")));
        }
        for (String str2 : hashMap.keySet()) {
            sb.append(String.format(Locale.US, "<%s>%s</%s>\n", str2, hashMap.get(str2), str2));
        }
        return sb.toString();
    }

    private static void b(Map<String, String> map, h1.b bVar) {
        c(map, bVar, true);
    }

    private static void c(Map<String, String> map, h1.b bVar, boolean z7) {
        map.put("{SiteID}", bVar.getSiteId());
        String locationId = bVar.getLocationId();
        String str = "";
        if (locationId != null && !"".equals(locationId) && !"0".equals(locationId) && z7) {
            str = "<LocationIDs>\n<int>{LocationID}</int>\n</LocationIDs>\n".replace("{LocationID}", locationId);
        }
        map.put("{OptionalLocationIDs}", str);
    }

    public static String d(h1.b bVar, b bVar2) {
        HashMap hashMap = new HashMap();
        StringBuilder sb = new StringBuilder();
        for (Integer num : bVar2.a()) {
            sb.append("<int>");
            sb.append(num);
            sb.append("</int>");
        }
        hashMap.put("{ClassIDs}", sb.toString());
        hashMap.put("{Waitlist}", bVar2.b().toString());
        hashMap.put("{sendEmail}", Boolean.toString(bVar2.c()));
        b(hashMap, bVar);
        return t("<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n\t<soap:Header/>\n\t<soap:Body>\n\t\t<AddClientsToClasses xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t\t<ClassIDs>{ClassIDs}</ClassIDs>\n\t\t\t\t<RequirePayment>false</RequirePayment>\n\t\t\t\t<Waitlist>{Waitlist}</Waitlist>\n\t\t\t\t<SendEmail>{sendEmail}</SendEmail>\n\t\t\t</Request>\n\t\t</AddClientsToClasses>\n\t</soap:Body>\n</soap:Envelope>", hashMap);
    }

    public static String e(h1.b bVar, C0208c c0208c) {
        HashMap hashMap = new HashMap();
        SubscriberClientId uniqueId = c0208c.a == null ? null : c0208c.a.getUniqueId();
        hashMap.put("{AddOrUpdateAction}", (uniqueId == null || uniqueId.getValue().isEmpty()) ? "AddNew" : "Update");
        hashMap.put("{Client}", a(c0208c));
        b(hashMap, bVar);
        return t("<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n\t<soap:Body>\n\t\t<AddOrUpdateClients xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t\t<UpdateAction>{AddOrUpdateAction}</UpdateAction>\n\t\t\t\t<Clients>\n\t\t\t\t\t<Client>{Client}</Client>\n\t\t\t\t</Clients>\n\t\t\t</Request>\n\t\t</AddOrUpdateClients>\n\t</soap:Body>\n</soap:Envelope>", hashMap);
    }

    private static String f(String str, String str2, String str3) {
        return "<FunctionParam>\n\t<ParamName>{DataFunctionParamName}</ParamName>\n\t<ParamValue>{DataFunctionParamValue}</ParamValue>\n\t<ParamDataType>{DataFunctionParamDataType}</ParamDataType>\n</FunctionParam>\n".replace("{DataFunctionParamName}", str).replace("{DataFunctionParamValue}", str2).replace("{DataFunctionParamDataType}", str3);
    }

    public static String g(h1.b bVar, d dVar) {
        HashMap hashMap = new HashMap();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US);
        hashMap.put("{StartDateTime}", simpleDateFormat.format(dVar.a()));
        hashMap.put("{EndDateTime}", simpleDateFormat.format(dVar.c()));
        hashMap.put("{SessionTypeIDs}", dVar.b().toString());
        b(hashMap, bVar);
        return t("<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n\t<soap:Body>\n\t\t<GetActiveSessionTimes xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n{OptionalLocationIDs}\t\t\t\t<SessionTypeIDs><int>{SessionTypeIDs}</int></SessionTypeIDs>\n\t\t\t\t<StartTime>{StartDateTime}</StartTime>\n\t\t\t\t<EndTime>{EndDateTime}</EndTime>\n\t\t\t</Request>\n\t\t</GetActiveSessionTimes>\n\t</soap:Body>\n</soap:Envelope>\n", hashMap);
    }

    public static String h(h1.b bVar, e eVar) {
        HashMap hashMap = new HashMap();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
        hashMap.put("{StartDateTime}", simpleDateFormat.format(eVar.b()));
        hashMap.put("{EndDateTime}", simpleDateFormat.format(eVar.c()));
        hashMap.put("{ClassScheduleID}", eVar.a().toString());
        b(hashMap, bVar);
        return t("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t<soapenv:Header/>\n\t<soapenv:Body>\n\t\t<GetClassSchedules xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t\t<StartDate>{StartDateTime}</StartDate>\n\t\t\t\t<EndDate>{EndDateTime}</EndDate>\n\t\t\t\t<ClassScheduleIDs><int>{ClassScheduleID}</int></ClassScheduleIDs>\n\t\t\t</Request>\n\t\t</GetClassSchedules>\n\t</soapenv:Body>\n</soapenv:Envelope>", hashMap);
    }

    public static String i(h1.b bVar, f fVar) {
        String replace;
        String str;
        String str2;
        HashMap hashMap = new HashMap();
        String bool = Boolean.toString(fVar.f());
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
        hashMap.put("{StartDateTime}", simpleDateFormat.format(fVar.e()));
        hashMap.put("{EndDateTime}", simpleDateFormat.format(fVar.c()));
        Integer a8 = fVar.a();
        Integer b8 = fVar.b();
        if (a8 == null) {
            str = BaseMindBodyResponse.XML_DETAIL_FULL;
            replace = "";
        } else {
            replace = "<ClassDescriptionIDs>\n<int>{DescriptionID}</int>\n</ClassDescriptionIDs>\n".replace("{DescriptionID}", a8.toString());
            str = BaseMindBodyResponse.XML_DETAIL_BASIC;
        }
        if (fVar.d() != null) {
            StringBuilder sb = new StringBuilder();
            for (String str3 : fVar.d().split(",")) {
                sb.append("<int>");
                sb.append(str3.trim());
                sb.append("</int>\n");
            }
            str2 = "<ProgramIDs>{ProgramIDs}</ProgramIDs>\n".replace("{ProgramIDs}", sb.toString());
        } else {
            str2 = "";
        }
        String replace2 = b8 != null ? "<ClassIDs>\n<int>{ClassID}</int>\n</ClassIDs>\n".replace("{ClassID}", b8.toString()) : "";
        hashMap.put("{XmlDetail}", str);
        hashMap.put("{OptionalClassDescriptionsIDs}", replace);
        hashMap.put("{OptionalProgramIDS}", str2);
        hashMap.put("{OptionalClassID}", replace2);
        hashMap.put("{HideCancel}", bool);
        c(hashMap, bVar, fVar.g());
        return t("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n<soapenv:Header/>\n<soapenv:Body>\n\t<GetClasses>\n\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n{OptionalClassDescriptionsIDs}{OptionalLocationIDs}{OptionalClassID}{OptionalProgramIDS}\t\t\t<XMLDetail>{XmlDetail}</XMLDetail>\n\t\t\t<StartDateTime>{StartDateTime}</StartDateTime>\n\t\t\t<EndDateTime>{EndDateTime}</EndDateTime>\n\t\t\t<HideCanceledClasses>{HideCancel}</HideCanceledClasses>\n\t\t\t<Fields>\t\t\t\t<string>Classes.Resource</string>\t\t\t</Fields>\t\t</Request>\n\t</GetClasses>\n</soapenv:Body>\n</soapenv:Envelope>", hashMap);
    }

    public static String j(h1.b bVar) {
        HashMap hashMap = new HashMap();
        b(hashMap, bVar);
        return t("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t<soapenv:Header/>\n\t<soapenv:Body>\n\t\t<GetClientAccountBalances xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t</Request>\n\t\t</GetClientAccountBalances>\n\t</soapenv:Body>\n</soapenv:Envelope>", hashMap);
    }

    public static String k(h1.b bVar) {
        HashMap hashMap = new HashMap();
        b(hashMap, bVar);
        return t("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n\t<soap:Body>\n\t\t<GetClientReferralTypes xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t</Request>\n\t\t</GetClientReferralTypes>\n\t</soap:Body>\n</soap:Envelope>", hashMap);
    }

    public static String l(h1.b bVar, h hVar) {
        HashMap hashMap = new HashMap();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
        hashMap.put("{StartDateTime}", simpleDateFormat.format(hVar.a()));
        hashMap.put("{EndDateTime}", simpleDateFormat.format(hVar.b()));
        b(hashMap, bVar);
        return t("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t<soapenv:Header/>\n\t<soapenv:Body>\n\t\t<GetClientSchedule xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t\t<StartDate>{StartDateTime}</StartDate>\n\t\t\t\t<EndDate>{EndDateTime}</EndDate>\n\t\t\t</Request>\n\t\t</GetClientSchedule>\n\t</soapenv:Body>\n</soapenv:Envelope>", hashMap);
    }

    public static String m(h1.b bVar, i iVar) {
        HashMap hashMap = new HashMap();
        a aVar = new a(iVar.a(), bVar.getSiteId(), bVar.getLocationId());
        hashMap.put("{Clients.ClientCreditCard}", iVar.b() ? "\t\t\t\t<Fields>\n\t\t\t\t\t<string>Clients.ClientCreditCard</string>\n\t\t\t\t</Fields>\n" : "");
        b(hashMap, aVar);
        return t("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t<soapenv:Header/>\n\t<soapenv:Body>\n\t\t<GetClients xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t\t<Fields><string>Client.Inactive</string></Fields>\n{Clients.ClientCreditCard}\t\t\t</Request>\n\t\t</GetClients>\n\t</soapenv:Body>\n</soapenv:Envelope>", hashMap);
    }

    public static String n(h1.b bVar, j jVar) {
        String str;
        HashMap hashMap = new HashMap();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(jVar.a);
        calendar.add(1, 1);
        Date time = calendar.getTime();
        hashMap.put("{StartDateTime}", simpleDateFormat.format(jVar.b()));
        hashMap.put("{EndDateTime}", simpleDateFormat.format(time));
        if (jVar.c() == null || jVar.c().isEmpty()) {
            str = "";
        } else {
            StringBuilder sb = new StringBuilder();
            for (String str2 : jVar.c().split(",")) {
                sb.append("<int>");
                sb.append(str2.trim());
                sb.append("</int>\n");
            }
            str = "<ProgramIDs>{ProgramIDs}</ProgramIDs>\n".replace("{ProgramIDs}", sb.toString());
        }
        hashMap.put("{OptionalProgramIDS}", str);
        b(hashMap, bVar);
        return t("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">\n\t<soapenv:Header/>\n\t<soapenv:Body>\n\t\t<GetEnrollments xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n{OptionalLocationIDs}\t\t\t\t<StartDate>{StartDateTime}</StartDate>\n\t\t\t\t<EndDate>{EndDateTime}</EndDate>\n{OptionalProgramIDS}\t\t\t</Request>\n\t\t</GetEnrollments>\n\t</soapenv:Body>\n</soapenv:Envelope>", hashMap);
    }

    public static String o(h1.b bVar) {
        HashMap hashMap = new HashMap();
        b(hashMap, bVar);
        return t("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t<soapenv:Header/>\n\t<soapenv:Body>\n\t\t<GetLocations xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t</Request>\n\t\t</GetLocations>\n\t</soapenv:Body>\n</soapenv:Envelope>", hashMap);
    }

    public static String p(h1.b bVar) {
        HashMap hashMap = new HashMap();
        b(hashMap, bVar);
        return t("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n\t<soap:Body>\n\t\t<GetRequiredClientFields xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t</Request>\n\t\t</GetRequiredClientFields>\n\t</soap:Body>\n</soap:Envelope>", hashMap);
    }

    public static String q(h1.b bVar, k kVar) {
        HashMap hashMap = new HashMap();
        hashMap.put("{FunctionParams}", "");
        hashMap.put("{FunctionName}", "FitnessMobile_GetSessionTypesFilteredID");
        if (kVar.a() != null && !kVar.a().isEmpty()) {
            String[] split = kVar.a().split(",");
            StringBuilder sb = new StringBuilder();
            for (int i8 = 0; i8 < split.length; i8++) {
                sb.append(f("@typegroup" + i8, split[i8], "int"));
            }
            hashMap.put("{FunctionParams}", "<FunctionParams>\n{FunctionParam}</FunctionParams>\n".replace("{FunctionParam}", sb.toString()));
        }
        b(hashMap, bVar);
        return t("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n<soap:Body>\n\t<FunctionDataXml xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t<FunctionName>{FunctionName}</FunctionName>\n\t\t\t{FunctionParams}\t\t</Request>\n\t</FunctionDataXml>\n</soap:Body>\n</soap:Envelope>", hashMap);
    }

    public static String r(h1.b bVar) {
        HashMap hashMap = new HashMap();
        hashMap.put("{FunctionParams}", "<FunctionParams>\n{FunctionParam}</FunctionParams>\n".replace("{FunctionParam}", ""));
        hashMap.put("{FunctionName}", "FitnessMobile_getStudioBillingInfoRequired");
        b(hashMap, bVar);
        return t("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n<soap:Body>\n\t<FunctionDataXml xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t<XMLDetail>Full</XMLDetail>\n\t\t\t<FunctionName>{FunctionName}</FunctionName>\n\t\t\t{FunctionParams}\t\t</Request>\n\t</FunctionDataXml>\n</soap:Body>\n</soap:Envelope>", hashMap);
    }

    public static String s(h1.b bVar, Long l8) {
        HashMap hashMap = new HashMap();
        hashMap.put("{VisitID}", l8.toString());
        b(hashMap, bVar);
        return t("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns=\"http://clients.mindbodyonline.com/api/0_5\">\n\t<soapenv:Header/>\n\t<soapenv:Body>\n\t\t<UpdateClientVisits>\n\t\t\t<Request>\n\t\t\t\t<SourceCredentials>\n\t\t\t\t\t<SiteIDs>\n\t\t\t\t\t\t<int>{SiteID}</int>\n\t\t\t\t\t</SiteIDs>\n\t\t\t\t</SourceCredentials>\n\t\t\t\t<XMLDetail>Basic</XMLDetail>\n\t\t\t\t<Visits>\n\t\t\t\t\t<Visit>\n\t\t\t\t\t\t<ID>{VisitID}</ID>\n\t\t\t\t\t\t<SignedIn>true</SignedIn>\n\t\t\t\t\t</Visit>\n\t\t\t\t</Visits>\n\t\t\t</Request>\n\t\t</UpdateClientVisits>\n\t</soapenv:Body>\n</soapenv:Envelope>", hashMap);
    }

    private static String t(String str, Map<String, String> map) {
        Matcher matcher = Pattern.compile("(\\{.+?\\})").matcher(str);
        StringBuffer stringBuffer = new StringBuffer();
        while (matcher.find()) {
            String group = matcher.group(1);
            String str2 = map.get(group);
            if (str2 != null) {
                matcher.appendReplacement(stringBuffer, "");
                stringBuffer.append(str2);
            } else {
                mo.a.d("No replacement was found for placeholder = %1$s", new Object[]{group});
                matcher.appendReplacement(stringBuffer, "");
            }
        }
        matcher.appendTail(stringBuffer);
        return stringBuffer.toString();
    }
}