/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.failover.FailoverStrategy
 *  com.l7tech.common.io.failover.FailoverStrategyFactory
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobId
 *  com.l7tech.gateway.common.InvalidLicenseException
 *  com.l7tech.gateway.common.LicenseException
 *  com.l7tech.gateway.common.LicenseManager
 *  com.l7tech.gateway.common.admin.LicenseRuntimeException
 *  com.l7tech.gateway.common.cluster.ClusterNodeInfo
 *  com.l7tech.gateway.common.cluster.ClusterProperty
 *  com.l7tech.gateway.common.cluster.ClusterPropertyDescriptor
 *  com.l7tech.gateway.common.cluster.ClusterStatusAdmin
 *  com.l7tech.gateway.common.cluster.ClusterStatusAdmin$ModuleNotFoundException
 *  com.l7tech.gateway.common.cluster.ClusterStatusAdmin$NoSuchCapabilityException
 *  com.l7tech.gateway.common.cluster.ClusterStatusAdmin$NoSuchPropertyException
 *  com.l7tech.gateway.common.cluster.ServiceUsage
 *  com.l7tech.gateway.common.licensing.CompositeLicense
 *  com.l7tech.gateway.common.licensing.FeatureLicense
 *  com.l7tech.gateway.common.licensing.LicenseDocument
 *  com.l7tech.gateway.common.module.AssertionModuleInfo
 *  com.l7tech.gateway.common.module.CustomAssertionsScannerHelper
 *  com.l7tech.gateway.common.module.ModularAssertionsScannerHelper
 *  com.l7tech.gateway.common.module.ModuleState
 *  com.l7tech.gateway.common.module.ServerModuleConfig
 *  com.l7tech.gateway.common.module.ServerModuleFile
 *  com.l7tech.gateway.common.module.ServerModuleFilePayload
 *  com.l7tech.gateway.common.module.ServerModuleFilePayloadFactory
 *  com.l7tech.gateway.common.module.ServerModuleFileStateDifferentiator
 *  com.l7tech.gateway.common.security.rbac.OperationType
 *  com.l7tech.gateway.common.security.rbac.PermissionDeniedException
 *  com.l7tech.gateway.common.security.signer.InnerPayloadFactory
 *  com.l7tech.gateway.common.security.signer.SignerUtils$SignedZip
 *  com.l7tech.gateway.common.security.signer.TrustedSignerCertsHelper
 *  com.l7tech.gateway.common.security.signer.TrustedSignerCertsManager
 *  com.l7tech.gateway.common.service.MetricsSummaryBin
 *  com.l7tech.objectmodel.DeleteException
 *  com.l7tech.objectmodel.EntityType
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.ObjectModelException
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.objectmodel.SaveException
 *  com.l7tech.objectmodel.UpdateException
 *  com.l7tech.policy.AssertionRegistry
 *  com.l7tech.policy.assertion.Assertion
 *  com.l7tech.policy.assertion.ExtensionInterfaceBinding
 *  com.l7tech.security.prov.luna.LunaConstants$Config
 *  com.l7tech.util.ArrayUtils
 *  com.l7tech.util.CollectionUpdate
 *  com.l7tech.util.CollectionUpdate$Differentiator
 *  com.l7tech.util.CollectionUpdateProducer
 *  com.l7tech.util.Config
 *  com.l7tech.util.ConfigFactory
 *  com.l7tech.util.DateTimeConfigUtils
 *  com.l7tech.util.Either
 *  com.l7tech.util.ExceptionUtils
 *  com.l7tech.util.GoidUpgradeMapper
 *  com.l7tech.util.Option
 *  com.l7tech.util.Pair
 *  com.l7tech.util.TimeUnit
 *  com.l7tech.util.ValidationUtils$Validator
 *  jakarta.inject.Inject
 *  jakarta.inject.Named
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 *  org.springframework.beans.BeansException
 *  org.springframework.context.ApplicationContext
 *  org.springframework.context.ApplicationContextAware
 *  org.springframework.context.ApplicationEvent
 *  org.springframework.transaction.annotation.Propagation
 *  org.springframework.transaction.annotation.Transactional
 */
package com.l7tech.server.cluster;

import com.l7tech.common.io.failover.FailoverStrategy;
import com.l7tech.common.io.failover.FailoverStrategyFactory;
import com.l7tech.gateway.common.AsyncAdminMethods;
import com.l7tech.gateway.common.InvalidLicenseException;
import com.l7tech.gateway.common.LicenseException;
import com.l7tech.gateway.common.LicenseManager;
import com.l7tech.gateway.common.admin.LicenseRuntimeException;
import com.l7tech.gateway.common.cluster.ClusterNodeInfo;
import com.l7tech.gateway.common.cluster.ClusterProperty;
import com.l7tech.gateway.common.cluster.ClusterPropertyDescriptor;
import com.l7tech.gateway.common.cluster.ClusterStatusAdmin;
import com.l7tech.gateway.common.cluster.ServiceUsage;
import com.l7tech.gateway.common.licensing.CompositeLicense;
import com.l7tech.gateway.common.licensing.FeatureLicense;
import com.l7tech.gateway.common.licensing.LicenseDocument;
import com.l7tech.gateway.common.module.AssertionModuleInfo;
import com.l7tech.gateway.common.module.CustomAssertionsScannerHelper;
import com.l7tech.gateway.common.module.ModularAssertionsScannerHelper;
import com.l7tech.gateway.common.module.ModuleState;
import com.l7tech.gateway.common.module.ServerModuleConfig;
import com.l7tech.gateway.common.module.ServerModuleFile;
import com.l7tech.gateway.common.module.ServerModuleFilePayload;
import com.l7tech.gateway.common.module.ServerModuleFilePayloadFactory;
import com.l7tech.gateway.common.module.ServerModuleFileStateDifferentiator;
import com.l7tech.gateway.common.security.rbac.OperationType;
import com.l7tech.gateway.common.security.rbac.PermissionDeniedException;
import com.l7tech.gateway.common.security.signer.InnerPayloadFactory;
import com.l7tech.gateway.common.security.signer.SignerUtils;
import com.l7tech.gateway.common.security.signer.TrustedSignerCertsHelper;
import com.l7tech.gateway.common.security.signer.TrustedSignerCertsManager;
import com.l7tech.gateway.common.service.MetricsSummaryBin;
import com.l7tech.objectmodel.DeleteException;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.ObjectModelException;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.policy.AssertionRegistry;
import com.l7tech.policy.assertion.Assertion;
import com.l7tech.policy.assertion.ExtensionInterfaceBinding;
import com.l7tech.security.prov.luna.LunaConstants;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.admin.AsyncAdminMethodsImpl;
import com.l7tech.server.admin.ExtensionInterfaceManager;
import com.l7tech.server.cluster.ClusterInfoManager;
import com.l7tech.server.cluster.ClusterPropertyManager;
import com.l7tech.server.cluster.ServiceUsageManager;
import com.l7tech.server.cluster.a;
import com.l7tech.server.cluster.b;
import com.l7tech.server.cluster.k;
import com.l7tech.server.cluster.l;
import com.l7tech.server.cluster.x;
import com.l7tech.server.cluster.y;
import com.l7tech.server.event.AdminInfo;
import com.l7tech.server.event.EntityChangeSet;
import com.l7tech.server.event.admin.Deleted;
import com.l7tech.server.event.admin.PersistenceEvent;
import com.l7tech.server.event.admin.Updated;
import com.l7tech.server.licensing.UpdatableCompositeLicenseManager;
import com.l7tech.server.module.ServerModuleFileManager;
import com.l7tech.server.policy.ServerAssertionRegistry;
import com.l7tech.server.policy.module.CustomAssertionModulesConfig;
import com.l7tech.server.policy.module.ModularAssertionModule;
import com.l7tech.server.policy.module.ModularAssertionModulesConfig;
import com.l7tech.server.security.keystore.luna.GatewayLunaPinFinder;
import com.l7tech.server.security.keystore.luna.LunaProber;
import com.l7tech.server.security.rbac.RbacServices;
import com.l7tech.server.service.ServiceMetricsManager;
import com.l7tech.server.service.ServiceMetricsServices;
import com.l7tech.server.util.JaasUtils;
import com.l7tech.util.ArrayUtils;
import com.l7tech.util.CollectionUpdate;
import com.l7tech.util.CollectionUpdateProducer;
import com.l7tech.util.Config;
import com.l7tech.util.ConfigFactory;
import com.l7tech.util.DateTimeConfigUtils;
import com.l7tech.util.Either;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.GoidUpgradeMapper;
import com.l7tech.util.Option;
import com.l7tech.util.Pair;
import com.l7tech.util.TimeUnit;
import com.l7tech.util.ValidationUtils;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.security.KeyStoreException;
import java.security.SignatureException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.FutureTask;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationEvent;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/*
 * Exception performing whole class analysis ignored.
 */
public class ClusterStatusAdminImp
extends AsyncAdminMethodsImpl
implements ClusterStatusAdmin,
ApplicationContextAware {
    private final CollectionUpdateProducer<ServerModuleFile, FindException> e = new a(this, 300000L, 100, (CollectionUpdate.Differentiator)new ServerModuleFileStateDifferentiator());
    private CollectionUpdateProducer<ClusterNodeInfo, FindException> f = new b(this, 300000L, 100, null);
    private ApplicationContext g;
    private final ClusterInfoManager h;
    private final ServiceUsageManager i;
    private final ClusterPropertyManager j;
    private final UpdatableCompositeLicenseManager k;
    private final ServiceMetricsManager l;
    private final ServiceMetricsServices m;
    private final ServerConfig n;
    private final ServerAssertionRegistry o;
    private final RbacServices p;
    private final ExtensionInterfaceManager q;
    private final DateTimeConfigUtils r;
    private final Timer s;
    private ServerModuleFileManager t;
    private TrustedSignerCertsManager u;
    private final Logger v;
    private static final String[] w;

    public ClusterStatusAdminImp(ClusterInfoManager clusterInfoManager, ServiceUsageManager serviceUsageManager, ClusterPropertyManager clusterPropertyManager, UpdatableCompositeLicenseManager updatableCompositeLicenseManager, ServiceMetricsManager serviceMetricsManager, ServiceMetricsServices serviceMetricsServices, ServerConfig serverConfig, AssertionRegistry assertionRegistry, RbacServices rbacServices, ExtensionInterfaceManager extensionInterfaceManager, DateTimeConfigUtils dateTimeConfigUtils) {
        String[] stringArray = w;
        this.s = new Timer(stringArray[46], false);
        this.v = Logger.getLogger(this.getClass().getName());
        this.h = clusterInfoManager;
        this.i = serviceUsageManager;
        this.j = clusterPropertyManager;
        this.m = serviceMetricsServices;
        this.k = updatableCompositeLicenseManager;
        this.l = serviceMetricsManager;
        this.n = serverConfig;
        this.o = (ServerAssertionRegistry)assertionRegistry;
        this.p = rbacServices;
        this.q = extensionInterfaceManager;
        this.r = dateTimeConfigUtils;
        if (clusterInfoManager == null) {
            throw new IllegalArgumentException(stringArray[32]);
        }
        try {
            if (serviceUsageManager == null) {
                throw new IllegalArgumentException(w[49]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
        try {
            if (clusterPropertyManager == null) {
                throw new IllegalArgumentException(w[20]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
        try {
            if (updatableCompositeLicenseManager == null) {
                throw new IllegalArgumentException(w[37]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
        try {
            if (serviceMetricsManager == null) {
                throw new IllegalArgumentException(w[12]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
        try {
            if (serverConfig == null) {
                throw new IllegalArgumentException(w[45]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
    }

    private void b() {
        try {
            this.k.requireFeature(w[35]);
        }
        catch (LicenseException licenseException) {
            throw new LicenseRuntimeException(licenseException);
        }
    }

    public boolean isCluster() {
        try {
            boolean bl2;
            try {
                bl2 = this.getClusterStatus().length > 1;
            }
            catch (FindException findException) {
                throw ClusterStatusAdminImp.a(findException);
            }
            return bl2;
        }
        catch (FindException findException) {
            return false;
        }
    }

    public ClusterNodeInfo[] getClusterStatus() throws FindException {
        Collection<ClusterNodeInfo> collection = this.h.retrieveClusterStatus();
        Object[] objectArray = collection.toArray();
        ClusterNodeInfo[] clusterNodeInfoArray = new ClusterNodeInfo[collection.size()];
        try {
            for (int i2 = 0; i2 < objectArray.length; ++i2) {
                clusterNodeInfoArray[i2] = (ClusterNodeInfo)objectArray[i2];
            }
        }
        catch (FindException findException) {
            throw ClusterStatusAdminImp.a(findException);
        }
        return clusterNodeInfoArray;
    }

    public CollectionUpdate<ClusterNodeInfo> getClusterNodesUpdate(int n2) throws FindException {
        return this.f.createUpdate(n2);
    }

    public ServiceUsage[] getServiceUsage() throws FindException {
        Collection<ServiceUsage> collection = this.i.getAll();
        Object[] objectArray = collection.toArray();
        ServiceUsage[] serviceUsageArray = new ServiceUsage[collection.size()];
        try {
            for (int i2 = 0; i2 < objectArray.length; ++i2) {
                serviceUsageArray[i2] = (ServiceUsage)objectArray[i2];
            }
        }
        catch (FindException findException) {
            throw ClusterStatusAdminImp.a(findException);
        }
        return serviceUsageArray;
    }

    public void changeNodeName(String string, String string2) throws UpdateException {
        String string3 = this.h.renameNode(string, string2);
        EntityChangeSet entityChangeSet = new EntityChangeSet(new String[]{w[55]}, new Object[]{string3}, new Object[]{string2});
        this.a(new Updated<ClusterNodeInfo>(this.a(string, string2), entityChangeSet));
    }

    public void removeStaleNode(String string) throws DeleteException {
        this.v.info(w[21] + string);
        String string2 = this.h.deleteNode(string);
        this.i.clear(string);
        this.a(new Deleted<ClusterNodeInfo>(this.a(string, string2)));
    }

    public Date getCurrentClusterSystemTime() {
        return Calendar.getInstance().getTime();
    }

    public String getCurrentClusterTimeZone() {
        return TimeZone.getDefault().getID();
    }

    public String getSelfNodeName() {
        return this.h.getSelfNodeInf().getName();
    }

    public ClusterNodeInfo getSelfNode() {
        return this.h.getSelfNodeInf();
    }

    public Collection<ClusterProperty> getAllProperties() throws FindException {
        return this.j.findAll();
    }

    public Map<String, String[]> getKnownProperties() {
        Map<String, String> map = this.n.getClusterPropertyNames();
        Map<String, String> map2 = this.n.getClusterPropertyDefaults();
        LinkedHashMap<String, String[]> linkedHashMap = new LinkedHashMap<String, String[]>();
        for (String string : map.keySet()) {
            linkedHashMap.put(string, new String[]{map.get(string), map2.get(string)});
        }
        return Collections.unmodifiableMap(linkedHashMap);
    }

    public Set<String> getRegisteredPropertyNames() {
        return this.n.getClusterPropertyNames().keySet();
    }

    public Collection<ClusterPropertyDescriptor> getAllPropertyDescriptors() {
        Map<String, String> map = this.n.getClusterPropertyNames();
        Map<String, String> map2 = this.n.getClusterPropertyDefaults();
        Map<String, String> map3 = this.n.getClusterPropertyVisibilities();
        Map<String, ValidationUtils.Validator<String>> map4 = this.n.getClusterPropertyValidators();
        ArrayList<ClusterPropertyDescriptor> arrayList = new ArrayList<ClusterPropertyDescriptor>();
        for (String string : map.keySet()) {
            String string2;
            String string3;
            String string4;
            String string5;
            ClusterPropertyDescriptor clusterPropertyDescriptor;
            ClusterPropertyDescriptor clusterPropertyDescriptor2;
            ArrayList<ClusterPropertyDescriptor> arrayList2;
            String string6 = map3.get(string);
            try {
                ClusterPropertyDescriptor clusterPropertyDescriptor3;
                arrayList2 = arrayList;
                clusterPropertyDescriptor2 = clusterPropertyDescriptor3;
                clusterPropertyDescriptor = clusterPropertyDescriptor3;
                string5 = string;
                string4 = map.get(string);
                string3 = map2.get(string);
                string2 = string6 == null ? w[13] : string6;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw ClusterStatusAdminImp.a(illegalArgumentException);
            }
            clusterPropertyDescriptor2(string5, string4, string3, Boolean.parseBoolean(string2), Option.optional(map4.get(string)));
            arrayList2.add(clusterPropertyDescriptor);
        }
        return Collections.unmodifiableCollection(arrayList);
    }

    public ClusterPropertyDescriptor getPropertyDescriptorByName(String string) {
        return this.n.getClusterPropertyDescriptor(string);
    }

    public ClusterProperty findPropertyByName(String string) throws FindException {
        return (ClusterProperty)this.j.findByUniqueName(string);
    }

    public Goid saveProperty(ClusterProperty clusterProperty) throws SaveException, UpdateException, DeleteException {
        try {
            if (!w[4].equals(clusterProperty.getName())) {
                this.b();
            }
        }
        catch (SaveException saveException) {
            throw ClusterStatusAdminImp.a(saveException);
        }
        Goid goid = clusterProperty.getGoid();
        try {
            if (ClusterProperty.DEFAULT_GOID.equals((Object)goid)) {
                return this.j.save((PersistentEntity)clusterProperty);
            }
        }
        catch (SaveException saveException) {
            throw ClusterStatusAdminImp.a(saveException);
        }
        this.j.update((PersistentEntity)clusterProperty);
        return goid;
    }

    public void deleteProperty(ClusterProperty clusterProperty) throws DeleteException {
        this.j.delete((PersistentEntity)clusterProperty);
    }

    public void deleteBulkProperties(Collection<ClusterProperty> collection) throws DeleteException {
        for (ClusterProperty clusterProperty : collection) {
            this.j.delete((PersistentEntity)clusterProperty);
        }
    }

    public CompositeLicense getCompositeLicense() {
        return this.k.getCurrentCompositeLicense();
    }

    public long getLicenseExpiryWarningPeriod() {
        long l2 = 0L;
        String[] stringArray = w;
        String string = stringArray[2];
        String string2 = this.n.getProperty(string);
        if (string2 != null) {
            try {
                l2 = TimeUnit.parse((String)string2, (TimeUnit)TimeUnit.DAYS);
            }
            catch (NumberFormatException numberFormatException) {
                stringArray = w;
                this.v.warning(stringArray[16] + string + stringArray[43] + string2 + stringArray[9]);
            }
        }
        return l2;
    }

    public FeatureLicense createLicense(LicenseDocument licenseDocument) throws InvalidLicenseException {
        return this.k.createFeatureLicense(licenseDocument);
    }

    public void validateLicense(FeatureLicense featureLicense) throws InvalidLicenseException {
        this.k.validateLicense(featureLicense);
    }

    public AsyncAdminMethods.JobId<Boolean> installLicense(FeatureLicense featureLicense) {
        FutureTask<Boolean> futureTask = new FutureTask<Boolean>(AdminInfo.find(false).wrapCallable(new k(this, featureLicense)));
        this.s.schedule((TimerTask)new x(this, futureTask), 0L);
        return this.registerJob(futureTask, Boolean.class);
    }

    public AsyncAdminMethods.JobId<Boolean> uninstallLicense(LicenseDocument licenseDocument) {
        FutureTask<Boolean> futureTask = new FutureTask<Boolean>(AdminInfo.find(false).wrapCallable(new l(this, licenseDocument)));
        this.s.schedule((TimerTask)new y(this, futureTask), 0L);
        return this.registerJob(futureTask, Boolean.class);
    }

    public Map<String, Long> getGoidUpgradeMap() {
        return GoidUpgradeMapper.getTableNamePrefixMap();
    }

    public boolean isMetricsEnabled() {
        return this.m.isEnabled();
    }

    public boolean isServiceUsageEnabled() {
        return this.i.isEnabled();
    }

    public int getMetricsFineInterval() {
        return this.m.getFineInterval();
    }

    public Collection<MetricsSummaryBin> summarizeByPeriod(String string, Goid[] goidArray, Integer n2, Long l2, Long l3, boolean bl2) throws FindException {
        return this.l.summarizeByPeriod(string, goidArray, n2, l2, l3, bl2);
    }

    public Collection<MetricsSummaryBin> summarizeLatestByPeriod(String string, Goid[] goidArray, Integer n2, long l2, boolean bl2) throws FindException {
        long l3 = System.currentTimeMillis() - l2;
        return this.l.summarizeByPeriod(string, goidArray, n2, l3, null, bl2);
    }

    public MetricsSummaryBin summarizeLatest(String string, Goid[] goidArray, int n2, int n3, boolean bl2) throws FindException {
        return this.l.summarizeLatest(string, goidArray, n2, n3, bl2);
    }

    @NotNull
    public List<String> getConfiguredDateFormats() {
        List list;
        try {
            list = this.r.getConfiguredDateFormats();
            if (list == null) {
                ClusterStatusAdminImp.a(0);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
        return list;
    }

    @NotNull
    public List<Pair<String, Pattern>> getAutoDateFormats() {
        List list;
        try {
            list = this.r.getAutoDateFormats();
            if (list == null) {
                ClusterStatusAdminImp.a(1);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
        return list;
    }

    @Transactional(propagation=Propagation.SUPPORTS)
    public Collection<AssertionModuleInfo> getAssertionModuleInfo() {
        ArrayList<AssertionModuleInfo> arrayList = new ArrayList<AssertionModuleInfo>();
        Set<ModularAssertionModule> set = this.o.getLoadedModules();
        for (ModularAssertionModule modularAssertionModule : set) {
            arrayList.add(new AssertionModuleInfo(modularAssertionModule.getName(), modularAssertionModule.getEntityName(), modularAssertionModule.getDigest(), this.a(modularAssertionModule)));
        }
        return arrayList;
    }

    @Transactional(propagation=Propagation.SUPPORTS)
    @Nullable
    public AssertionModuleInfo getModuleInfoForAssertionClass(@NotNull String string) throws ClusterStatusAdmin.ModuleNotFoundException {
        try {
            if (string == null) {
                ClusterStatusAdminImp.a(2);
            }
        }
        catch (ClusterStatusAdmin.ModuleNotFoundException moduleNotFoundException) {
            throw ClusterStatusAdminImp.a(moduleNotFoundException);
        }
        ModularAssertionModule modularAssertionModule = this.o.getModuleForAssertion(string);
        try {
            if (modularAssertionModule != null) {
                return new AssertionModuleInfo(modularAssertionModule.getName(), modularAssertionModule.getEntityName(), modularAssertionModule.getDigest(), this.a(modularAssertionModule));
            }
        }
        catch (ClusterStatusAdmin.ModuleNotFoundException moduleNotFoundException) {
            throw ClusterStatusAdminImp.a(moduleNotFoundException);
        }
        throw new ClusterStatusAdmin.ModuleNotFoundException();
    }

    private Collection<String> a(@NotNull ModularAssertionModule modularAssertionModule) {
        try {
            if (modularAssertionModule == null) {
                ClusterStatusAdminImp.a(3);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
        ArrayList<String> arrayList = new ArrayList<String>();
        for (Assertion assertion : modularAssertionModule.getAssertionPrototypes()) {
            arrayList.add(assertion.getClass().getName());
        }
        return Collections.unmodifiableCollection(arrayList);
    }

    public Collection<Pair<String, String>> getExtensionInterfaceInstances() {
        Collection<ExtensionInterfaceBinding<?>> collection = this.q.getRegisteredInterfaces();
        ArrayList<Pair<String, String>> arrayList = new ArrayList<Pair<String, String>>();
        for (ExtensionInterfaceBinding<?> extensionInterfaceBinding : collection) {
            arrayList.add((Pair<String, String>)new Pair((Object)extensionInterfaceBinding.getInterfaceClass().getName(), (Object)extensionInterfaceBinding.getInstanceIdentifier()));
        }
        return arrayList;
    }

    public boolean isExtensionInterfaceAvailable(String string, String string2) {
        return this.q.isInterfaceRegistered(string, string2);
    }

    public Either<Throwable, Option<Object>> invokeExtensionMethod(String string, String string2, String string3, Class[] classArray, Object[] objectArray) throws ClassNotFoundException, NoSuchMethodException {
        return this.q.invokeExtensionMethod(string, string2, string3, classArray, objectArray);
    }

    private static boolean a(String string) {
        boolean bl2;
        block8: {
            block7: {
                try {
                    block6: {
                        try {
                            try {
                                if (w[54].equals(string) || w[26].equals(string)) break block6;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw ClusterStatusAdminImp.a(illegalArgumentException);
                            }
                            if (!w[40].equals(string)) break block7;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw ClusterStatusAdminImp.a(illegalArgumentException);
                        }
                    }
                    bl2 = true;
                    break block8;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw ClusterStatusAdminImp.a(illegalArgumentException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    public String getHardwareCapability(String string) {
        block16: {
            block13: {
                String string2;
                block15: {
                    block14: {
                        try {
                            if (!ClusterStatusAdminImp.a(string)) {
                                return null;
                            }
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw ClusterStatusAdminImp.a(illegalArgumentException);
                        }
                        try {
                            try {
                                if (!w[0].equals(string)) break block13;
                                if (!LunaProber.isLunaClientLibraryAvailable()) break block14;
                            }
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw ClusterStatusAdminImp.a(illegalArgumentException);
                            }
                            string2 = w[7];
                            break block15;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw ClusterStatusAdminImp.a(illegalArgumentException);
                        }
                    }
                    string2 = null;
                }
                return string2;
            }
            String[] stringArray = w;
            if (stringArray[25].equals(string)) {
                File file = new File(stringArray[47]);
                try {
                    try {
                        if (!file.exists() || !file.isDirectory()) break block16;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw ClusterStatusAdminImp.a(illegalArgumentException);
                    }
                    return w[7];
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw ClusterStatusAdminImp.a(illegalArgumentException);
                }
            }
            stringArray = w;
            if (stringArray[33].equals(string)) {
                boolean bl2 = ConfigFactory.getBooleanProperty((String)stringArray[38], (boolean)false);
                return Boolean.toString(bl2);
            }
        }
        return null;
    }

    public Serializable getHardwareCapabilityProperty(String string, String string2) throws ClusterStatusAdmin.NoSuchCapabilityException, ClusterStatusAdmin.NoSuchPropertyException {
        try {
            if (!ClusterStatusAdminImp.a(string)) {
                throw new ClusterStatusAdmin.NoSuchCapabilityException();
            }
        }
        catch (ClusterStatusAdmin.NoSuchCapabilityException noSuchCapabilityException) {
            throw ClusterStatusAdminImp.a(noSuchCapabilityException);
        }
        throw new ClusterStatusAdmin.NoSuchPropertyException();
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     * Loose catch block
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public void putHardwareCapabilityProperty(String string, String string2, Serializable serializable) throws ClusterStatusAdmin.NoSuchCapabilityException, ClusterStatusAdmin.NoSuchPropertyException, ClassCastException, IllegalArgumentException {
        block13: {
            try {
                if (!ClusterStatusAdminImp.a(string)) {
                    throw new ClusterStatusAdmin.NoSuchCapabilityException();
                }
            }
            catch (ClusterStatusAdmin.NoSuchCapabilityException noSuchCapabilityException) {
                throw ClusterStatusAdminImp.a(noSuchCapabilityException);
            }
            if (!w[54].equals(string)) throw new ClusterStatusAdmin.NoSuchPropertyException();
            try {
                if (w[41].equals(string2)) break block13;
                throw new ClusterStatusAdmin.NoSuchPropertyException();
                catch (ClusterStatusAdmin.NoSuchCapabilityException noSuchCapabilityException) {
                    throw ClusterStatusAdminImp.a(noSuchCapabilityException);
                }
            }
            catch (ClusterStatusAdmin.NoSuchCapabilityException noSuchCapabilityException) {
                throw ClusterStatusAdminImp.a(noSuchCapabilityException);
            }
        }
        if (serializable instanceof char[]) {
            char[] cArray = (char[])serializable;
            try {
                this.a(cArray);
                return;
            }
            finally {
                ArrayUtils.zero((char[])cArray);
            }
        }
        try {
            if (!(serializable instanceof CharSequence)) throw new IllegalArgumentException(w[29]);
            this.a(serializable.toString().toCharArray());
            return;
        }
        catch (ClusterStatusAdmin.NoSuchCapabilityException noSuchCapabilityException) {
            throw ClusterStatusAdminImp.a(noSuchCapabilityException);
        }
    }

    /*
     * WARNING - Removed try catching itself - possible behaviour change.
     */
    public void testHardwareTokenAvailability(String string, String string2, char[] cArray) throws ClusterStatusAdmin.NoSuchCapabilityException, KeyStoreException {
        try {
            try {
                if (!w[54].equals(string)) {
                    throw new ClusterStatusAdmin.NoSuchCapabilityException();
                }
            }
            catch (ClusterStatusAdmin.NoSuchCapabilityException noSuchCapabilityException) {
                throw ClusterStatusAdminImp.a(noSuchCapabilityException);
            }
            LunaProber.testHardwareTokenAvailability(string2, cArray);
        }
        finally {
            ArrayUtils.zero((char[])cArray);
        }
    }

    private void a(char[] cArray) {
        try {
            try {
                if (!this.p.isPermittedForAnyEntityOfType(JaasUtils.getCurrentUser(), OperationType.DELETE, EntityType.SSG_KEY_ENTRY)) {
                    throw new PermissionDeniedException(OperationType.DELETE, EntityType.SSG_KEY_ENTRY, w[11]);
                }
            }
            catch (ObjectModelException objectModelException) {
                throw ClusterStatusAdminImp.a(objectModelException);
            }
            this.j.putProperty(LunaConstants.Config.ENCRYPTED_PIN, GatewayLunaPinFinder.encryptLunaPin(cArray));
        }
        catch (ObjectModelException objectModelException) {
            throw new RuntimeException(w[30] + ExceptionUtils.getMessage((Throwable)objectModelException), ExceptionUtils.getDebugException((Throwable)objectModelException));
        }
    }

    public FailoverStrategy[] getAllFailoverStrategies() {
        return ((FailoverStrategyFactory)this.g.getBean(w[51])).getAllFailoverStrategy();
    }

    @NotNull
    public List<ServerModuleFile> findAllServerModuleFiles() throws FindException {
        ArrayList<ServerModuleFile> arrayList;
        ArrayList<ServerModuleFile> arrayList2 = new ArrayList<ServerModuleFile>();
        Collection collection = this.t.findAll();
        for (ServerModuleFile serverModuleFile : collection) {
            ServerModuleFile serverModuleFile2 = new ServerModuleFile();
            serverModuleFile2.copyFrom(serverModuleFile, false, true, true);
            arrayList2.add(serverModuleFile2);
        }
        try {
            arrayList = arrayList2;
            if (arrayList == null) {
                ClusterStatusAdminImp.a(4);
            }
        }
        catch (FindException findException) {
            throw ClusterStatusAdminImp.a(findException);
        }
        return arrayList;
    }

    public CollectionUpdate<ServerModuleFile> getServerModuleFileUpdate(int n2) throws FindException {
        return this.e.createUpdate(n2);
    }

    @Nullable
    public ServerModuleFile findServerModuleFileById(@NotNull Goid goid, boolean bl2) throws FindException {
        try {
            if (goid == null) {
                ClusterStatusAdminImp.a(5);
            }
        }
        catch (FindException findException) {
            throw ClusterStatusAdminImp.a(findException);
        }
        ServerModuleFile serverModuleFile = (ServerModuleFile)this.t.findByPrimaryKey(goid);
        if (serverModuleFile != null) {
            ServerModuleFile serverModuleFile2 = new ServerModuleFile();
            serverModuleFile2.copyFrom(serverModuleFile, bl2, true, true);
            return serverModuleFile2;
        }
        return null;
    }

    /*
     * Loose catch block
     */
    @NotNull
    public Goid saveServerModuleFile(@NotNull byte[] byArray, @NotNull String string, @Nullable String string2) throws SaveException {
        Goid goid;
        try {
            if (byArray == null) {
                ClusterStatusAdminImp.a(6);
            }
        }
        catch (Throwable throwable) {
            throw ClusterStatusAdminImp.a(throwable);
        }
        try {
            if (string == null) {
                ClusterStatusAdminImp.a(7);
            }
        }
        catch (Throwable throwable) {
            throw ClusterStatusAdminImp.a(throwable);
        }
        SignerUtils.SignedZip signedZip = new SignerUtils.SignedZip(TrustedSignerCertsHelper.getTrustedCertificates((TrustedSignerCertsManager)this.u));
        ServerModuleFilePayload serverModuleFilePayload = (ServerModuleFilePayload)signedZip.load((InputStream)new ByteArrayInputStream(byArray), (InnerPayloadFactory)new ServerModuleFilePayloadFactory(new CustomAssertionsScannerHelper(this.getServerModuleConfig().getCustomAssertionPropertyFileName()), new ModularAssertionsScannerHelper(this.getServerModuleConfig().getModularAssertionManifestAssertionListKey()), string2));
        ServerModuleFile serverModuleFile = serverModuleFilePayload.create();
        serverModuleFile.setName(string);
        serverModuleFile.setStateForNode(this.h.thisNodeId(), ModuleState.UPLOADED);
        Goid goid2 = this.t.save((PersistentEntity)serverModuleFile);
        try {
            if (serverModuleFilePayload != null) {
                serverModuleFilePayload.close();
            }
        }
        catch (Throwable throwable) {
            throw ClusterStatusAdminImp.a(throwable);
        }
        try {
            goid = goid2;
            if (goid == null) {
                ClusterStatusAdminImp.a(8);
            }
        }
        catch (Throwable throwable) {
            throw ClusterStatusAdminImp.a(throwable);
        }
        return goid;
        {
            catch (Throwable throwable) {
                try {
                    if (serverModuleFilePayload != null) {
                        try {
                            serverModuleFilePayload.close();
                        }
                        catch (Throwable throwable2) {
                            throwable.addSuppressed(throwable2);
                        }
                    }
                    throw throwable;
                }
                catch (SignatureException signatureException) {
                    String[] stringArray = w;
                    throw new SaveException(stringArray[34], (Throwable)signatureException);
                }
                catch (IOException iOException) {
                    throw new SaveException(w[1] + ExceptionUtils.getMessage((Throwable)iOException), (Throwable)iOException);
                }
            }
        }
    }

    public void updateServerModuleFileName(@NotNull Goid goid, @NotNull String string) throws FindException, UpdateException {
        try {
            if (goid == null) {
                ClusterStatusAdminImp.a(9);
            }
        }
        catch (FindException findException) {
            throw ClusterStatusAdminImp.a(findException);
        }
        try {
            if (string == null) {
                ClusterStatusAdminImp.a(10);
            }
        }
        catch (FindException findException) {
            throw ClusterStatusAdminImp.a(findException);
        }
        ServerModuleFile serverModuleFile = (ServerModuleFile)this.t.findByPrimaryKey(goid);
        try {
            if (serverModuleFile == null) {
                throw new UpdateException(w[15] + String.valueOf(goid) + w[36]);
            }
        }
        catch (FindException findException) {
            throw ClusterStatusAdminImp.a(findException);
        }
        serverModuleFile.setName(string);
        this.t.update((PersistentEntity)serverModuleFile);
    }

    public void deleteServerModuleFile(@NotNull Goid goid) throws DeleteException {
        try {
            if (goid == null) {
                ClusterStatusAdminImp.a(11);
            }
        }
        catch (FindException findException) {
            throw ClusterStatusAdminImp.a(findException);
        }
        try {
            this.t.delete(goid);
        }
        catch (FindException findException) {
            throw new DeleteException(findException.getMessage(), (Throwable)findException);
        }
    }

    @NotNull
    public ServerModuleConfig getServerModuleConfig() {
        ServerModuleConfig serverModuleConfig;
        CustomAssertionModulesConfig customAssertionModulesConfig = new CustomAssertionModulesConfig((Config)this.n);
        ModularAssertionModulesConfig modularAssertionModulesConfig = new ModularAssertionModulesConfig(this.n, (LicenseManager)this.k);
        ServerModuleConfig serverModuleConfig2 = new ServerModuleConfig();
        try {
            serverModuleConfig2.setCustomAssertionPropertyFileName(customAssertionModulesConfig.getCustomAssertionPropertyFileName());
            serverModuleConfig2.setModularAssertionManifestAssertionListKey(modularAssertionModulesConfig.getManifestHdrAssertionList());
            serverModuleConfig2.setCustomAssertionModulesExt(customAssertionModulesConfig.getModulesExt());
            serverModuleConfig2.setModularAssertionModulesExt(modularAssertionModulesConfig.getModulesExt());
            serverModuleConfig = serverModuleConfig2;
            if (serverModuleConfig == null) {
                ClusterStatusAdminImp.a(12);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
        return serverModuleConfig;
    }

    private ClusterNodeInfo a(String string, String string2) {
        ClusterNodeInfo clusterNodeInfo = new ClusterNodeInfo();
        clusterNodeInfo.setNodeIdentifier(string);
        clusterNodeInfo.setName(string2);
        return clusterNodeInfo;
    }

    private void a(PersistenceEvent persistenceEvent) {
        ApplicationContext applicationContext = this.g;
        try {
            if (applicationContext != null) {
                applicationContext.publishEvent((ApplicationEvent)persistenceEvent);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw ClusterStatusAdminImp.a(illegalArgumentException);
        }
    }

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.g = applicationContext;
    }

    @Inject
    @Named(value="serverModuleFileManager")
    final void a(ServerModuleFileManager serverModuleFileManager) {
        this.t = serverModuleFileManager;
    }

    @Inject
    @Named(value="trustedSignerCertsManager")
    final void a(TrustedSignerCertsManager trustedSignerCertsManager) {
        this.u = trustedSignerCertsManager;
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void a(int var0) {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [0[TRYBLOCK]], but top level block is 6[SWITCH]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1050)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    private static Throwable a(Throwable throwable) {
        return throwable;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[57];
                var3_1 = 0;
                var2_2 = "KBl}W\u0003|E\ty{M\r(eUgaQLyHNyk\u0003\u001akRNswJ\u0002i\u0000JzjV\u0000k\u0000T|iM\rzUUp4\u0003\u0015LNvkM\u001fk\u000eBm~J\u001ewwFg`b\u000bk\u0016DBykW\t]EUckQ!aDRyke\u0005bE\u0007LNvkM\u001fk\u0018GBaML\u0002hI@`|F\bJASpHL\u001ecASf\u0007NBb@B\u0001k\u0004TU`k*`izzm\u0019bL\u0007xkW\u0004aD\u00070}\rI}\u0000J`}WL`OS5|F\u0018{RI5`V\u0000b\u0002\u0007\t/CHx!O[zED}!P\t|VBg!@\u0000{SSp|\f/bUTakQ?zAS`}b\bcII\\cS4uItlO\t.TH5mK\r`GB5zK\t.lR{o\u0003\u000fbIB{z\u0003<Gn\u0007z`\u0003\u0018fIT5mO\u0019}TBg\u001bmBa|J\u000f}\u0000Jt`B\u000bkR\u0007|}\u0003\u001ekQR||F\b\u0004TU`k\u0018FN{jp\t|VBgCL\b{LBSgO\tLYnq\u001cnH5k[\u0005}TN{i\u0003\u0001aDRyk\u0003\u001bgTO5GgL,\u001auItlO\t.TH5~B\u001e}E\u0007e|L\u001ckRSl.\u0004\u0015GBa]F\u001exEUXaG\u0019bEdz`E\u0005i/CHx!O[zED}!P\t|VBg!@\u0000{SSp|\f/bUTakQ?zAS`}b\bcII\\cS\u0002IC$cK`}W\t|\u0000wgaS\t|T^5cB\u0002oGBg.J\u001f.RBd{J\u001ekD\u0015RBxaU\u0005`G\u0007fzB\u0000k\u0000IzjFV.\nEIagW\u0015@AJp\u001aUWqoW\t]EUckQ!aDRyke\u0005bEitcF\u0018FN{jb\u0000bsBgxF\u001eCOC`bF*gLBf\u0012AWebJ\r`CB;hJ\u001ekWFyb\u0012AWebJ\r`CB;hJ\u001ekWFyb\u000fSNr`F\bJAStLZ\u0018kS\u0004GH|jbvFy{FLhOU5fB\u001ejWFgk\u0003\u000foPFwgO\u0005zY\u0007e|L\u001ckR^5eF\u0015}THgk\r\u0000{NF;mO\u0005kNSEgMLcUTa.A\t.A\u0007vfB\u001e.AUgoZLaR\u0007VfB\u001e]EV`kM\u000fk2uItlO\t.TH5mK\r`GB5BV\u0002o\u0000DygF\u0002z\u0000w\\@\u0003\u0003`\u0000S}gPLmLRfzF\u001e4\u0000\u0013GBaOP\u001fkRS|aM/bATfkP cK`}W\t|\u0000n{hLLcAItiF\u001e.IT5|F\u001d{IUpj\nSNakN\u0005`DBg7MHq{O\t.FNyk\u0003\u0005}\u0000UpdF\u000fzEC5oPL}I@{oW\u0019|E\u0007voM\u0002aT\u0007wk\u0003\u001akRNsgF\b\rSBgxJ\u000fk\u001afqcJ\u0002=\u0002\t5.m\ty\u0000JzjV\u0000k\u0000J`}WL{SB5jF\noUKa.j(.AIq.N\u0019}T\u0007|`@\u0000{DB5jB\u0018oB^akP\u001blNvkM\u001fk\u0000Jt`B\u000bkR\u0007|}\u0003\u001ekQR||F\b$CHx O[zED} P\t|VBg P\u0005zEJ|`G\t|\u000eB{oA\u0000kD\tCKt}P\"oMB\nSNakN\u0005`DBg\u0017KBl}W\u0003|E\ty{M\r CK|kM\u0018^II\u0014SFckp\t|VBgCL\b{LBSgO\t\u000e\u0007\u0007bgW\u0004.VFy{FL)\u001eGBaCL\b{LB\\`E\u0003HOUT}P\t|TNz``\u0000oST!sBgxF\u001e.cH{hJ\u000b.MF{oD\t|\u0000Nf.Q\t\u007fUNgkG\u0014lNvkM\u001fk\u0000rejB\u0018kR\u0007AoP\u0007\u0019\u000fHez\f?kCRgkp\u001coN\bT~S\u0000gAIvk\u0012GBaOV\u0018adFake\u0003|MFa}!sBgxJ\u000fk\u0000rfoD\t.MF{oD\t|\u0000Nf.Q\t\u007fUNgkG\nMHq{O\tIONq\u0017FF|bL\u001akRta|B\u0018kG^So@\u0018aR^\u0006MHq{O\t\u0014SFckp\t|VBgCL\b{LBSgO\t\rKBl}W\u0003|E\ty{M\r";
                var4_3 = "KBl}W\u0003|E\ty{M\r(eUgaQLyHNyk\u0003\u001akRNswJ\u0002i\u0000JzjV\u0000k\u0000T|iM\rzUUp4\u0003\u0015LNvkM\u001fk\u000eBm~J\u001ewwFg`b\u000bk\u0016DBykW\t]EUckQ!aDRyke\u0005bE\u0007LNvkM\u001fk\u0018GBaML\u0002hI@`|F\bJASpHL\u001ecASf\u0007NBb@B\u0001k\u0004TU`k*`izzm\u0019bL\u0007xkW\u0004aD\u00070}\rI}\u0000J`}WL`OS5|F\u0018{RI5`V\u0000b\u0002\u0007\t/CHx!O[zED}!P\t|VBg!@\u0000{SSp|\f/bUTakQ?zAS`}b\bcII\\cS4uItlO\t.TH5mK\r`GB5zK\t.lR{o\u0003\u000fbIB{z\u0003<Gn\u0007z`\u0003\u0018fIT5mO\u0019}TBg\u001bmBa|J\u000f}\u0000Jt`B\u000bkR\u0007|}\u0003\u001ekQR||F\b\u0004TU`k\u0018FN{jp\t|VBgCL\b{LBSgO\tLYnq\u001cnH5k[\u0005}TN{i\u0003\u0001aDRyk\u0003\u001bgTO5GgL,\u001auItlO\t.TH5~B\u001e}E\u0007e|L\u001ckRSl.\u0004\u0015GBa]F\u001exEUXaG\u0019bEdz`E\u0005i/CHx!O[zED}!P\t|VBg!@\u0000{SSp|\f/bUTakQ?zAS`}b\bcII\\cS\u0002IC$cK`}W\t|\u0000wgaS\t|T^5cB\u0002oGBg.J\u001f.RBd{J\u001ekD\u0015RBxaU\u0005`G\u0007fzB\u0000k\u0000IzjFV.\nEIagW\u0015@AJp\u001aUWqoW\t]EUckQ!aDRyke\u0005bEitcF\u0018FN{jb\u0000bsBgxF\u001eCOC`bF*gLBf\u0012AWebJ\r`CB;hJ\u001ekWFyb\u0012AWebJ\r`CB;hJ\u001ekWFyb\u000fSNr`F\bJAStLZ\u0018kS\u0004GH|jbvFy{FLhOU5fB\u001ejWFgk\u0003\u000foPFwgO\u0005zY\u0007e|L\u001ckR^5eF\u0015}THgk\r\u0000{NF;mO\u0005kNSEgMLcUTa.A\t.A\u0007vfB\u001e.AUgoZLaR\u0007VfB\u001e]EV`kM\u000fk2uItlO\t.TH5mK\r`GB5BV\u0002o\u0000DygF\u0002z\u0000w\\@\u0003\u0003`\u0000S}gPLmLRfzF\u001e4\u0000\u0013GBaOP\u001fkRS|aM/bATfkP cK`}W\t|\u0000n{hLLcAItiF\u001e.IT5|F\u001d{IUpj\nSNakN\u0005`DBg7MHq{O\t.FNyk\u0003\u0005}\u0000UpdF\u000fzEC5oPL}I@{oW\u0019|E\u0007voM\u0002aT\u0007wk\u0003\u001akRNsgF\b\rSBgxJ\u000fk\u001afqcJ\u0002=\u0002\t5.m\ty\u0000JzjV\u0000k\u0000J`}WL{SB5jF\noUKa.j(.AIq.N\u0019}T\u0007|`@\u0000{DB5jB\u0018oB^akP\u001blNvkM\u001fk\u0000Jt`B\u000bkR\u0007|}\u0003\u001ekQR||F\b$CHx O[zED} P\t|VBg P\u0005zEJ|`G\t|\u000eB{oA\u0000kD\tCKt}P\"oMB\nSNakN\u0005`DBg\u0017KBl}W\u0003|E\ty{M\r CK|kM\u0018^II\u0014SFckp\t|VBgCL\b{LBSgO\t\u000e\u0007\u0007bgW\u0004.VFy{FL)\u001eGBaCL\b{LB\\`E\u0003HOUT}P\t|TNz``\u0000oST!sBgxF\u001e.cH{hJ\u000b.MF{oD\t|\u0000Nf.Q\t\u007fUNgkG\u0014lNvkM\u001fk\u0000rejB\u0018kR\u0007AoP\u0007\u0019\u000fHez\f?kCRgkp\u001coN\bT~S\u0000gAIvk\u0012GBaOV\u0018adFake\u0003|MFa}!sBgxJ\u000fk\u0000rfoD\t.MF{oD\t|\u0000Nf.Q\t\u007fUNgkG\nMHq{O\tIONq\u0017FF|bL\u001akRta|B\u0018kG^So@\u0018aR^\u0006MHq{O\t\u0014SFckp\t|VBgCL\b{LBSgO\t\rKBl}W\u0003|E\ty{M\r".length();
                var1_4 = 13;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = ClusterStatusAdminImp.b(v0, ClusterStatusAdminImp.c(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "~vH[>QeBK~9Pd7CQa|~^xQpf0R0gDLr1[drW\u001e4yM77JX3yM>2V\u001e~)Md7KQg|\\u7KK\u007f0";
                    var4_3 = "~vH[>QeBK~9Pd7CQa|~^xQpf0R0gDLr1[drW\u001e4yM77JX3yM>2V\u001e~)Md7KQg|\\u7KK\u007f0".length();
                    var1_4 = 4;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 114;
                        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++] = ClusterStatusAdminImp.b(v0, ClusterStatusAdminImp.c(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;
            }
        }
        ClusterStatusAdminImp.w = var5;
    }

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

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String b(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 -> 98;
                    case 1 -> 101;
                    case 2 -> 87;
                    case 3 -> 76;
                    case 4 -> 97;
                    case 5 -> 46;
                    default -> 76;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

