/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.audit.MessageSummaryAuditRecord
 *  com.l7tech.gateway.common.cluster.ServiceUsage
 *  com.l7tech.gateway.common.security.rbac.OperationType
 *  com.l7tech.gateway.common.security.rbac.OtherOperationName
 *  com.l7tech.gateway.common.security.rbac.Role
 *  com.l7tech.gateway.common.service.MetricsBin
 *  com.l7tech.gateway.common.service.PublishedService
 *  com.l7tech.gateway.common.service.SampleMessage
 *  com.l7tech.gateway.common.service.ServiceHeader
 *  com.l7tech.gateway.common.uddi.UDDIProxiedServiceInfo
 *  com.l7tech.gateway.common.uddi.UDDIServiceControl
 *  com.l7tech.identity.User
 *  com.l7tech.objectmodel.DeleteException
 *  com.l7tech.objectmodel.EntityHeaderSet
 *  com.l7tech.objectmodel.EntityManager$UniqueType
 *  com.l7tech.objectmodel.EntityType
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.objectmodel.SaveException
 *  com.l7tech.objectmodel.StaleUpdateException
 *  com.l7tech.objectmodel.UpdateException
 *  com.l7tech.objectmodel.folder.Folder
 *  com.l7tech.objectmodel.imp.NamedEntityImp
 *  com.l7tech.policy.Policy
 *  com.l7tech.util.Config
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.TextUtils
 *  javax.wsdl.WSDLException
 *  org.hibernate.StaleObjectStateException
 *  org.jetbrains.annotations.NotNull
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.transaction.annotation.Propagation
 *  org.springframework.transaction.annotation.Transactional
 */
package com.l7tech.server.service;

import com.l7tech.gateway.common.audit.MessageSummaryAuditRecord;
import com.l7tech.gateway.common.cluster.ServiceUsage;
import com.l7tech.gateway.common.security.rbac.OperationType;
import com.l7tech.gateway.common.security.rbac.OtherOperationName;
import com.l7tech.gateway.common.security.rbac.Role;
import com.l7tech.gateway.common.service.MetricsBin;
import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.gateway.common.service.SampleMessage;
import com.l7tech.gateway.common.service.ServiceHeader;
import com.l7tech.gateway.common.uddi.UDDIProxiedServiceInfo;
import com.l7tech.gateway.common.uddi.UDDIServiceControl;
import com.l7tech.identity.User;
import com.l7tech.objectmodel.DeleteException;
import com.l7tech.objectmodel.EntityHeaderSet;
import com.l7tech.objectmodel.EntityManager;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.objectmodel.StaleUpdateException;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.objectmodel.folder.Folder;
import com.l7tech.objectmodel.imp.NamedEntityImp;
import com.l7tech.policy.Policy;
import com.l7tech.server.FolderSupportHibernateEntityManager;
import com.l7tech.server.event.system.ServiceCacheEvent;
import com.l7tech.server.security.rbac.RoleManager;
import com.l7tech.server.service.ServiceAliasManager;
import com.l7tech.server.service.ServiceManager;
import com.l7tech.server.util.JaasUtils;
import com.l7tech.util.Config;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.TextUtils;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import javax.wsdl.WSDLException;
import org.hibernate.StaleObjectStateException;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.ApplicationEvent;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Transactional(propagation=Propagation.REQUIRED, rollbackFor={Throwable.class})
public class ServiceManagerImp
extends FolderSupportHibernateEntityManager<PublishedService, ServiceHeader>
implements ServiceManager {
    private static final Logger n;
    private static final Pattern o;
    private final RoleManager p;
    private final ServiceAliasManager q;
    private final Config r;
    static final String s;
    private static final String[] t;

    public ServiceManagerImp(RoleManager roleManager, ServiceAliasManager serviceAliasManager, @NotNull Config config) {
        if (config == null) {
            ServiceManagerImp.c(0);
        }
        this.p = roleManager;
        this.q = serviceAliasManager;
        this.r = config;
    }

    @Override
    protected ServiceHeader newHeader(PublishedService publishedService) {
        return new ServiceHeader(publishedService);
    }

    @Override
    @Transactional(propagation=Propagation.SUPPORTS)
    public String resolveWsdlTarget(String string) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Collection<ServiceHeader> findAllHeaders(boolean bl2) throws FindException {
        EntityHeaderSet entityHeaderSet = super.findAllHeaders();
        try {
            if (!bl2) {
                return entityHeaderSet;
            }
        }
        catch (FindException findException) {
            throw ServiceManagerImp.a((Exception)((Object)findException));
        }
        return this.q.expandEntityWithAliases(entityHeaderSet);
    }

    @Override
    public Collection<PublishedService> findByRoutingUri(String string) throws FindException {
        return this.findByPropertyMaybeNull(t[30], string);
    }

    @Override
    public Collection<PublishedService> findByName(String string) throws FindException {
        return this.findByPropertyMaybeNull(t[27], string);
    }

    public Collection<ServiceHeader> findHeaders(int n2, int n3, Map<String, String> map) throws FindException {
        Map<String, String> map2;
        block2: {
            map2 = map;
            String[] stringArray = t;
            String string = map.get(stringArray[5]);
            try {
                if (string == null || string.isEmpty()) break block2;
            }
            catch (FindException findException) {
                throw ServiceManagerImp.a((Exception)((Object)findException));
            }
            map2 = new HashMap<String, String>(map);
            stringArray = t;
            map2.put(stringArray[2], string);
            map2.put(stringArray[11], string);
        }
        map2.remove(t[4]);
        return this.doFindHeaders(n2, n3, map2, true);
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    @Override
    public Goid save(PublishedService publishedService) throws SaveException {
        Policy policy;
        block9: {
            policy = publishedService.getPolicy();
            publishedService.setPolicy(null);
            Goid goid = super.save(publishedService);
            try {
                n.info(t[22] + String.valueOf(goid));
                publishedService.setGoid(goid);
                if (!publishedService.isSoap()) break block9;
                try {
                    publishedService.parsedWsdl();
                }
                catch (WSDLException wSDLException) {
                    String[] stringArray = t;
                    throw new SaveException(stringArray[1] + ExceptionUtils.getMessage((Throwable)wSDLException));
                }
            }
            catch (RuntimeException runtimeException) {
                throw ServiceManagerImp.a(runtimeException);
            }
        }
        try {
            this.a(publishedService, policy);
            this.b(publishedService, policy);
            Serializable serializable = this.getHibernateTemplate().save((Object)policy);
            try {
                if (!(serializable instanceof Goid)) {
                    throw new SaveException(t[20] + serializable.getClass().getName() + t[9]);
                }
            }
            catch (WSDLException wSDLException) {
                throw ServiceManagerImp.a((Exception)((Object)wSDLException));
            }
            policy.setGoid((Goid)serializable);
            publishedService.setPolicy(policy);
            this.getHibernateTemplate().update((Object)publishedService);
        }
        catch (RuntimeException runtimeException) {
            String string = t[19];
            n.log(Level.WARNING, string, runtimeException);
            throw new SaveException(string, (Throwable)runtimeException);
        }
        this.applicationContext.publishEvent((ApplicationEvent)new ServiceCacheEvent.Updated(publishedService));
        return publishedService.getGoid();
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    @Override
    public void update(PublishedService publishedService) throws UpdateException {
        block10: {
            try {
                if (!publishedService.isSoap()) break block10;
                try {
                    publishedService.parsedWsdl();
                }
                catch (WSDLException wSDLException) {
                    String[] stringArray = t;
                    throw new UpdateException(stringArray[21] + ExceptionUtils.getMessage((Throwable)wSDLException));
                }
            }
            catch (UpdateException updateException) {
                throw ServiceManagerImp.a((Exception)((Object)updateException));
            }
        }
        this.a(publishedService, publishedService.getPolicy());
        this.b(publishedService, publishedService.getPolicy());
        try {
            super.update(publishedService);
        }
        catch (UpdateException updateException) {
            try {
                if (!ExceptionUtils.causedBy((Throwable)updateException, StaleObjectStateException.class)) throw updateException;
                throw new StaleUpdateException(t[6], (Throwable)updateException);
            }
            catch (WSDLException wSDLException) {
                throw ServiceManagerImp.a((Exception)((Object)wSDLException));
            }
        }
        try {
            this.p.renameEntitySpecificRoles(EntityType.SERVICE, (NamedEntityImp)publishedService, o);
        }
        catch (FindException findException) {
            throw new UpdateException(t[0], (Throwable)findException);
        }
        this.applicationContext.publishEvent((ApplicationEvent)new ServiceCacheEvent.Updated(publishedService));
    }

    public void updateFolder(Goid goid, Folder folder) throws UpdateException {
        this.setParentFolderForEntity(goid, folder);
    }

    public void updateFolder(PublishedService publishedService, Folder folder) throws UpdateException {
        try {
            if (publishedService == null) {
                throw new UpdateException(t[29]);
            }
        }
        catch (UpdateException updateException) {
            throw ServiceManagerImp.a((Exception)((Object)updateException));
        }
        this.setParentFolderForEntity(publishedService.getGoid(), folder);
    }

    @Override
    public void delete(Goid goid) throws DeleteException, FindException {
        this.findAndDelete(goid);
    }

    @Override
    public void delete(PublishedService publishedService) throws DeleteException {
        super.delete(publishedService);
        String[] stringArray = t;
        n.info(stringArray[17] + publishedService.getName() + stringArray[13] + String.valueOf(publishedService.getGoid()));
        this.applicationContext.publishEvent((ApplicationEvent)new ServiceCacheEvent.Deleted(publishedService));
    }

    @Transactional(propagation=Propagation.SUPPORTS)
    public Class<PublishedService> getImpClass() {
        return PublishedService.class;
    }

    @Override
    @Transactional(propagation=Propagation.SUPPORTS)
    public Class<PublishedService> getInterfaceClass() {
        return PublishedService.class;
    }

    @Override
    @Transactional(propagation=Propagation.SUPPORTS)
    public String getTableName() {
        return t[26];
    }

    @Override
    @Transactional(propagation=Propagation.SUPPORTS)
    public EntityType getEntityType() {
        return EntityType.SERVICE;
    }

    @Override
    protected EntityManager.UniqueType getUniqueType() {
        return EntityManager.UniqueType.NONE;
    }

    public void createRoles(PublishedService publishedService) throws SaveException {
        try {
            if (this.r.getBooleanProperty(t[8], true)) {
                this.addManageServiceRole(publishedService);
            }
        }
        catch (SaveException saveException) {
            throw ServiceManagerImp.a((Exception)((Object)saveException));
        }
    }

    public void updateRoles(PublishedService publishedService) throws UpdateException {
    }

    @Override
    public void addManageServiceRole(PublishedService publishedService) throws SaveException {
        Role role;
        block7: {
            User user = JaasUtils.getCurrentUser();
            String string = publishedService.getName();
            string = TextUtils.truncStringMiddle((String)string, (int)50);
            String[] stringArray = t;
            String string2 = MessageFormat.format(stringArray[28], string, publishedService.getGoid());
            n.info(stringArray[10] + string2);
            role = new Role();
            role.setName(string2);
            role.addEntityPermission(OperationType.READ, EntityType.SERVICE, publishedService.getId());
            role.addEntityPermission(OperationType.UPDATE, EntityType.SERVICE, publishedService.getId());
            role.addEntityPermission(OperationType.DELETE, EntityType.SERVICE, publishedService.getId());
            role.addEntityPermission(OperationType.READ, EntityType.POLICY, publishedService.getPolicy().getId());
            role.addEntityPermission(OperationType.UPDATE, EntityType.POLICY, publishedService.getPolicy().getId());
            role.addEntityOtherPermission(EntityType.POLICY, publishedService.getPolicy().getId(), OtherOperationName.DEBUGGER.getOperationName());
            role.addEntityPermission(OperationType.READ, EntityType.CLUSTER_INFO, null);
            role.addAttributePermission(OperationType.READ, EntityType.METRICS_BIN, MetricsBin.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.READ, EntityType.AUDIT_MESSAGE, MessageSummaryAuditRecord.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.READ, EntityType.SERVICE_USAGE, ServiceUsage.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.CREATE, EntityType.SAMPLE_MESSAGE, SampleMessage.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.READ, EntityType.SAMPLE_MESSAGE, SampleMessage.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.UPDATE, EntityType.SAMPLE_MESSAGE, SampleMessage.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.DELETE, EntityType.SAMPLE_MESSAGE, SampleMessage.ATTR_SERVICE_GOID, publishedService.getId());
            role.addEntityPermission(OperationType.READ, EntityType.ID_PROVIDER_CONFIG, null);
            role.addEntityPermission(OperationType.READ, EntityType.USER, null);
            role.addEntityPermission(OperationType.READ, EntityType.GROUP, null);
            role.addEntityPermission(OperationType.READ, EntityType.JMS_CONNECTION, null);
            role.addEntityPermission(OperationType.READ, EntityType.JMS_ENDPOINT, null);
            role.addEntityPermission(OperationType.READ, EntityType.JDBC_CONNECTION, null);
            role.addEntityPermission(OperationType.READ, EntityType.HTTP_CONFIGURATION, null);
            role.addEntityFolderAncestryPermission(EntityType.SERVICE, publishedService.getGoid());
            role.setEntityType(EntityType.SERVICE);
            role.setEntityGoid(publishedService.getGoid());
            role.setDescription(stringArray[15]);
            role.addEntityPermission(OperationType.READ, EntityType.UDDI_REGISTRY, null);
            role.addAttributePermission(OperationType.CREATE, EntityType.UDDI_PROXIED_SERVICE_INFO, UDDIProxiedServiceInfo.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.READ, EntityType.UDDI_PROXIED_SERVICE_INFO, UDDIProxiedServiceInfo.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.UPDATE, EntityType.UDDI_PROXIED_SERVICE_INFO, UDDIProxiedServiceInfo.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.DELETE, EntityType.UDDI_PROXIED_SERVICE_INFO, UDDIProxiedServiceInfo.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.CREATE, EntityType.UDDI_SERVICE_CONTROL, UDDIServiceControl.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.READ, EntityType.UDDI_SERVICE_CONTROL, UDDIServiceControl.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.UPDATE, EntityType.UDDI_SERVICE_CONTROL, UDDIServiceControl.ATTR_SERVICE_GOID, publishedService.getId());
            role.addAttributePermission(OperationType.DELETE, EntityType.UDDI_SERVICE_CONTROL, UDDIServiceControl.ATTR_SERVICE_GOID, publishedService.getId());
            role.addEntityPermission(OperationType.READ, EntityType.ENCAPSULATED_ASSERTION, null);
            role.addEntityPermission(OperationType.READ, EntityType.ASSERTION_ACCESS, null);
            if (user != null) {
                boolean bl2;
                try {
                    bl2 = this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.SERVICE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.UPDATE, EntityType.SERVICE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.DELETE, EntityType.SERVICE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.POLICY);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.UPDATE, EntityType.POLICY);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.METRICS_BIN);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.AUDIT_MESSAGE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.ID_PROVIDER_CONFIG);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.USER);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.GROUP);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.CLUSTER_INFO);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.SERVICE_USAGE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.JMS_CONNECTION);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.JMS_ENDPOINT);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.JDBC_CONNECTION);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.CREATE, EntityType.SAMPLE_MESSAGE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.SAMPLE_MESSAGE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.UPDATE, EntityType.SAMPLE_MESSAGE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.DELETE, EntityType.SAMPLE_MESSAGE);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.UDDI_REGISTRY);
                    bl2 &= this.p.isPermittedForAnyEntityOfType(user, OperationType.READ, EntityType.ENCAPSULATED_ASSERTION);
                }
                catch (FindException findException) {
                    stringArray = t;
                    throw new SaveException(stringArray[25], (Throwable)findException);
                }
                try {
                    try {
                        if (bl2 || !this.a()) break block7;
                    }
                    catch (FindException findException) {
                        throw ServiceManagerImp.a((Exception)((Object)findException));
                    }
                    n.info(t[12]);
                    role.addAssignedUser(user);
                }
                catch (FindException findException) {
                    throw ServiceManagerImp.a((Exception)((Object)findException));
                }
            }
        }
        this.p.save((PersistentEntity)role);
    }

    private boolean a() {
        return ConfigFactory.getBooleanProperty((String)t[23], (boolean)true);
    }

    private void a(PublishedService publishedService, Policy policy) {
        if (policy != null) {
            String string = publishedService.generatePolicyName();
            policy.setName(string);
        }
    }

    private void b(PublishedService publishedService, Policy policy) {
        try {
            if (policy != null) {
                policy.setSecurityZone(publishedService.getSecurityZone());
            }
        }
        catch (UnsupportedOperationException unsupportedOperationException) {
            throw ServiceManagerImp.a(unsupportedOperationException);
        }
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[32];
                var3_1 = 0;
                var2_2 = "3+A\u0005\u0006}5\u0004dR\u0000\fw2\"+X\fBg}P6Q\u0007\u0003~w!56F\u0006\u00103s\u0013'Q\u001a\u0011z|\u0017dc:&_2\u0016+FI\u0011v`\u0006-W\fX\u0004\u001e%Y\f\u0006L-Z\u0000\u0016-\tL Q\u000f\u0003f~\u0004z\tL Q\u000f\u0003f~\u0004z\u0010\u0006!F\u001a\u000b||P)]\u001a\u000frf\u0013,+\u0013+YF\u000e$f\u0015'\\F\u0011v`\u0006!FF\u0011v`\u0006-W\fM@w\u00022]\n\u0007^s\u001e%S\f\u0010Z\u007f\u0000&\u0002&U\nLrg\u0004+f\u0006\u000ev<\u001d%Z\b\u0005vA\u00156B\u0000\u0001v<\u00111@\u0006!aw\u00110Q\f\\dZ\u0006\u00163sP\u0003[\u0000\u0006\u001336Q\b\u0016z|\u0017dZ\f\u00153@\u001f(QSB\n\u0002+A\u001d\u000b}u%6]\"17G\u0000\u0005}{\u001e#\u0014\n\u0017a`\u0015*@I7`w\u0002d@\u0006B}w\u0007df\u0006\u000ev\u0002Pg\u0006\u0013+Z\u000f\u000bt[%7Q\u001b\u00113s\u00037]\u000e\fvvP0[I\u0016{wP?\u0004\u0014Ba}\u001c!\u0014\u0001\u0003ewP0\\\fBrp\u0019(]\u001d\u001b3f\u001fdF\f\u0003w>P1D\r\u0003gwP%Z\rBww\u001c!@\fBgz\u0015dOX\u001f3a\u00156B\u0000\u0001v<=X{\bT<OeW?\u0013XN\" HcINB:<Z{\u001cV_3i@9\u00145J0I, o5\u0006?2-8o(OIs]>\u0004D[NOZ\u0018\u001dMK\u00104!X\f\u0016vvP7Q\u001b\u0014zq\u0015d\u0007#!F\u001f\u000bpw056F\u0006\u00103g\u0000 U\u001d\u000b}uP4[\u0005\u000bpkP*U\u0004\u00073s\u00160Q\u001bB`s\u0006-Z\u000eB`w\u00022]\n\u0007=\u0012 6]\u0004\u0003akP/Q\u0010Bds\u0003dUI!56F\u0006\u00103s\u0013'Q\u001a\u0011z|\u0017dc:&_2\u0016+FI\u0011v`\u0006-W\fX\u000f#%B\f\u00063a\u00156B\u0000\u0001v2S&\u0002&U\nLrg\u0004+f\u0006\u000ev<\u001d%Z\b\u0005vA\u00156B\u0000\u0001v<\u00111@\u0006#`a\u0019#Z&\u0002&U\nLrg\u0004+f\u0006\u000ev<\u001d%Z\b\u0005vA\u00156B\u0000\u0001v<\u00111@\u0006!aw\u00110Q!3+A\u0005\u0006}5\u0004dS\f\u00163w\b-G\u001d\u000b}uP4Q\u001b\u000fza\u0003-[\u0007\u0011\u0011\u00001V\u0005\u000b`z\u0015 k\u001a\u0007ad\u0019'Q\u0004\u001e%Y\f\u0019=%Z\b\u0005v2\u000btII1v`\u0006-W\fB;1\u000buI@ #!F\u001f\u000bpwP-GI\u0010vc\u0005-F\f\u00063p\u00050\u0014\u0004\u000b`a\u0019*SG";
                var4_3 = "3+A\u0005\u0006}5\u0004dR\u0000\fw2\"+X\fBg}P6Q\u0007\u0003~w!56F\u0006\u00103s\u0013'Q\u001a\u0011z|\u0017dc:&_2\u0016+FI\u0011v`\u0006-W\fX\u0004\u001e%Y\f\u0006L-Z\u0000\u0016-\tL Q\u000f\u0003f~\u0004z\tL Q\u000f\u0003f~\u0004z\u0010\u0006!F\u001a\u000b||P)]\u001a\u000frf\u0013,+\u0013+YF\u000e$f\u0015'\\F\u0011v`\u0006!FF\u0011v`\u0006-W\fM@w\u00022]\n\u0007^s\u001e%S\f\u0010Z\u007f\u0000&\u0002&U\nLrg\u0004+f\u0006\u000ev<\u001d%Z\b\u0005vA\u00156B\u0000\u0001v<\u00111@\u0006!aw\u00110Q\f\\dZ\u0006\u00163sP\u0003[\u0000\u0006\u001336Q\b\u0016z|\u0017dZ\f\u00153@\u001f(QSB\n\u0002+A\u001d\u000b}u%6]\"17G\u0000\u0005}{\u001e#\u0014\n\u0017a`\u0015*@I7`w\u0002d@\u0006B}w\u0007df\u0006\u000ev\u0002Pg\u0006\u0013+Z\u000f\u000bt[%7Q\u001b\u00113s\u00037]\u000e\fvvP0[I\u0016{wP?\u0004\u0014Ba}\u001c!\u0014\u0001\u0003ewP0\\\fBrp\u0019(]\u001d\u001b3f\u001fdF\f\u0003w>P1D\r\u0003gwP%Z\rBww\u001c!@\fBgz\u0015dOX\u001f3a\u00156B\u0000\u0001v<=X{\bT<OeW?\u0013XN\" HcINB:<Z{\u001cV_3i@9\u00145J0I, o5\u0006?2-8o(OIs]>\u0004D[NOZ\u0018\u001dMK\u00104!X\f\u0016vvP7Q\u001b\u0014zq\u0015d\u0007#!F\u001f\u000bpw056F\u0006\u00103g\u0000 U\u001d\u000b}uP4[\u0005\u000bpkP*U\u0004\u00073s\u00160Q\u001bB`s\u0006-Z\u000eB`w\u00022]\n\u0007=\u0012 6]\u0004\u0003akP/Q\u0010Bds\u0003dUI!56F\u0006\u00103s\u0013'Q\u001a\u0011z|\u0017dc:&_2\u0016+FI\u0011v`\u0006-W\fX\u000f#%B\f\u00063a\u00156B\u0000\u0001v2S&\u0002&U\nLrg\u0004+f\u0006\u000ev<\u001d%Z\b\u0005vA\u00156B\u0000\u0001v<\u00111@\u0006#`a\u0019#Z&\u0002&U\nLrg\u0004+f\u0006\u000ev<\u001d%Z\b\u0005vA\u00156B\u0000\u0001v<\u00111@\u0006!aw\u00110Q!3+A\u0005\u0006}5\u0004dS\f\u00163w\b-G\u001d\u000b}uP4Q\u001b\u000fza\u0003-[\u0007\u0011\u0011\u00001V\u0005\u000b`z\u0015 k\u001a\u0007ad\u0019'Q\u0004\u001e%Y\f\u0019=%Z\b\u0005v2\u000btII1v`\u0006-W\fB;1\u000buI@ #!F\u001f\u000bpwP-GI\u0010vc\u0005-F\f\u00063p\u00050\u0014\u0004\u000b`a\u0019*SG".length();
                var1_4 = 28;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 89;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = ServiceManagerImp.c(v0, ServiceManagerImp.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "gN$xn\u0018\u0010@S8>TS6yj\u0013\u0019a\u00017cuV7[N%Br\u001a\u001b5Q0~f\u001b\u0012aD#, S\u00042\u0001>j'S\u0004;\u0004\",j\u0003\u0004a\u0001?csV\u0015p\u0001?yk\u001a";
                    var4_3 = "gN$xn\u0018\u0010@S8>TS6yj\u0013\u0019a\u00017cuV7[N%Br\u001a\u001b5Q0~f\u001b\u0012aD#, S\u00042\u0001>j'S\u0004;\u0004\",j\u0003\u0004a\u0001?csV\u0015p\u0001?yk\u001a".length();
                    var1_4 = 10;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 60;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = ServiceManagerImp.c(v0, ServiceManagerImp.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        ServiceManagerImp.t = var5;
        ServiceManagerImp.s = ServiceManagerImp.t[24];
        ServiceManagerImp.n = Logger.getLogger(ServiceManagerImp.class.getName());
        var0_6 = ServiceManagerImp.t;
        ServiceManagerImp.o = Pattern.compile(MessageFormat.format(var0_6[16], new Object[]{var0_6[18]}));
    }

    private static /* synthetic */ void c(int n2) {
        String[] stringArray = t;
        throw new IllegalArgumentException(String.format(stringArray[31], stringArray[14], stringArray[7], stringArray[3]));
    }

    private static Exception a(Exception exception) {
        return exception;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x4B);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String c(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 41;
                    case 1 -> 29;
                    case 2 -> 109;
                    case 3 -> 48;
                    case 4 -> 59;
                    case 5 -> 74;
                    default -> 75;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

