diff --git a/api/pom.xml b/api/pom.xml index 7044b3c5531..b8bdcfdf790 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -16,7 +16,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 4.0.0 diff --git a/api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java b/api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java index 3d7e24fd4ae..e22b70948ac 100644 --- a/api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java +++ b/api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java @@ -32,6 +32,8 @@ public class PropertyKeyConst { public final static String SECRET_KEY = "secretKey"; + public final static String RAM_ROLE_NAME = "ramRoleName"; + public final static String SERVER_ADDR = "serverAddr"; public final static String CONTEXT_PATH = "contextPath"; diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java index 8a42df09192..06cb467daab 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java @@ -138,6 +138,16 @@ public interface NamingService { */ void deregisterInstance(String serviceName, String groupName, String ip, int port, String clusterName) throws NacosException; + /** + * deregister instance with full instance information + * + * @param serviceName name of service + * @param groupName group of service + * @param instance instance information + * @throws NacosException + */ + void deregisterInstance(String serviceName, String groupName, Instance instance) throws NacosException; + /** * get all instances of a service * diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/PreservedMetadataKeys.java b/api/src/main/java/com/alibaba/nacos/api/naming/PreservedMetadataKeys.java new file mode 100644 index 00000000000..21dc8ccd220 --- /dev/null +++ b/api/src/main/java/com/alibaba/nacos/api/naming/PreservedMetadataKeys.java @@ -0,0 +1,30 @@ +/* + * Copyright 1999-2018 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.alibaba.nacos.api.naming; + +/** + * Some keys of metadata that are recognized by Nacos + * + * @author nkorange + * @since 1.0.0 + */ +public class PreservedMetadataKeys { + + /** + * The key to indicate the registry source of service instance, such as Dubbo, SpringCloud, etc. + */ + public static final String REGISTER_SOURCE = "preserved.register.source"; +} diff --git a/client/pom.xml b/client/pom.xml index d68db24e94e..9bfadceb5a5 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -16,7 +16,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 ../pom.xml @@ -85,18 +85,18 @@ - org.codehaus.jackson - jackson-mapper-lgpl + com.fasterxml.jackson.core + jackson-core + - net.jcip - jcip-annotations - true + com.fasterxml.jackson.core + jackson-databind - com.github.spotbugs - spotbugs-annotations + net.jcip + jcip-annotations true diff --git a/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java b/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java index 1b44fce4ef1..f26135c1248 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java @@ -29,10 +29,9 @@ import com.alibaba.nacos.client.utils.LogUtils; import com.alibaba.nacos.client.utils.ParamUtil; import com.alibaba.nacos.client.utils.StringUtils; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.type.TypeReference; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; import org.slf4j.Logger; - import java.io.IOException; import java.net.ConnectException; import java.net.HttpURLConnection; @@ -222,6 +221,11 @@ public String call() throws Exception { } private void initAkSk(Properties properties) { + String ramRoleName = properties.getProperty(PropertyKeyConst.RAM_ROLE_NAME); + if (!StringUtils.isBlank(ramRoleName)) { + STSConfig.getInstance().setRamRoleName(ramRoleName); + } + String ak = properties.getProperty(PropertyKeyConst.ACCESS_KEY); if (StringUtils.isBlank(ak)) { accessKey = SpasAdapter.getAk(); diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java index 10037d1f715..7490404f6a8 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java @@ -29,7 +29,6 @@ import com.alibaba.nacos.client.utils.LogUtils; import com.alibaba.nacos.client.utils.ParamUtil; import com.alibaba.nacos.client.utils.StringUtils; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.slf4j.Logger; import java.io.File; @@ -102,7 +101,6 @@ public void removeTenantListener(String dataId, String group, Listener listener) } } - @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER") void removeCache(String dataId, String group) { String groupKey = GroupKey.getKey(dataId, group); synchronized (cacheMap) { @@ -115,7 +113,6 @@ void removeCache(String dataId, String group) { MetricsMonitor.getListenConfigCountMonitor().set(cacheMap.get().size()); } - @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER") void removeCache(String dataId, String group, String tenant) { String groupKey = GroupKey.getKeyTenant(dataId, group, tenant); synchronized (cacheMap) { @@ -128,7 +125,6 @@ void removeCache(String dataId, String group, String tenant) { MetricsMonitor.getListenConfigCountMonitor().set(cacheMap.get().size()); } - @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER") public CacheData addCacheDataIfAbsent(String dataId, String group) { CacheData cache = getCache(dataId, group); if (null != cache) { @@ -163,7 +159,6 @@ public CacheData addCacheDataIfAbsent(String dataId, String group) { return cache; } - @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER") public CacheData addCacheDataIfAbsent(String dataId, String group, String tenant) { CacheData cache = getCache(dataId, group, tenant); if (null != cache) { diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java index 6907bec1a7f..d3b48e24adb 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java @@ -21,7 +21,6 @@ import com.alibaba.nacos.client.config.impl.HttpSimpleClient.HttpResult; import com.alibaba.nacos.client.config.utils.IOUtils; import com.alibaba.nacos.client.utils.*; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.slf4j.Logger; import java.io.IOException; @@ -396,7 +395,6 @@ public RandomizedServerAddress(String ip) { } @Override - @SuppressFBWarnings("EQ_COMPARETO_USE_OBJECT_EQUALS") public int compareTo(RandomizedServerAddress other) { if (this.priority != other.priority) { return other.priority - this.priority; diff --git a/client/src/main/java/com/alibaba/nacos/client/identify/STSConfig.java b/client/src/main/java/com/alibaba/nacos/client/identify/STSConfig.java index 1398774689f..dfc76b14127 100644 --- a/client/src/main/java/com/alibaba/nacos/client/identify/STSConfig.java +++ b/client/src/main/java/com/alibaba/nacos/client/identify/STSConfig.java @@ -25,7 +25,7 @@ @SuppressWarnings("PMD.ClassNamingShouldBeCamelRule") public class STSConfig { private static final String RAM_SECURITY_CREDENTIALS_URL - = ""; + = "http://100.100.100.200/latest/meta-data/ram/security-credentials/"; private String ramRoleName; /** * STS 临时凭证有效期剩余多少时开始刷新(允许本地时间比 STS 服务时间最多慢多久) diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java index dc5b0e7bf97..271a44f4ec0 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java @@ -104,14 +104,11 @@ private void init(Properties properties) { private int initClientBeatThreadCount(Properties properties) { if (properties == null) { - return UtilAndComs.DEFAULT_CLIENT_BEAT_THREAD_COUNT; } - int clientBeatThreadCount = NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_CLIENT_BEAT_THREAD_COUNT), + return NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_CLIENT_BEAT_THREAD_COUNT), UtilAndComs.DEFAULT_CLIENT_BEAT_THREAD_COUNT); - - return clientBeatThreadCount; } private int initPollingThreadCount(Properties properties) { @@ -120,10 +117,8 @@ private int initPollingThreadCount(Properties properties) { return UtilAndComs.DEFAULT_POLLING_THREAD_COUNT; } - int pollingThreadCount = NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_POLLING_THREAD_COUNT), + return NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_POLLING_THREAD_COUNT), UtilAndComs.DEFAULT_POLLING_THREAD_COUNT); - - return pollingThreadCount; } private boolean isLoadCacheAtStart(Properties properties) { @@ -283,16 +278,18 @@ public void registerInstance(String serviceName, Instance instance) throws Nacos @Override public void registerInstance(String serviceName, String groupName, Instance instance) throws NacosException { - BeatInfo beatInfo = new BeatInfo(); - beatInfo.setServiceName(NamingUtils.getGroupedName(serviceName, groupName)); - beatInfo.setIp(instance.getIp()); - beatInfo.setPort(instance.getPort()); - beatInfo.setCluster(instance.getClusterName()); - beatInfo.setWeight(instance.getWeight()); - beatInfo.setMetadata(instance.getMetadata()); - beatInfo.setScheduled(false); - - beatReactor.addBeatInfo(NamingUtils.getGroupedName(serviceName, groupName), beatInfo); + if (instance.isEphemeral()) { + BeatInfo beatInfo = new BeatInfo(); + beatInfo.setServiceName(NamingUtils.getGroupedName(serviceName, groupName)); + beatInfo.setIp(instance.getIp()); + beatInfo.setPort(instance.getPort()); + beatInfo.setCluster(instance.getClusterName()); + beatInfo.setWeight(instance.getWeight()); + beatInfo.setMetadata(instance.getMetadata()); + beatInfo.setScheduled(false); + + beatReactor.addBeatInfo(NamingUtils.getGroupedName(serviceName, groupName), beatInfo); + } serverProxy.registerService(NamingUtils.getGroupedName(serviceName, groupName), groupName, instance); } @@ -314,8 +311,18 @@ public void deregisterInstance(String serviceName, String ip, int port, String c @Override public void deregisterInstance(String serviceName, String groupName, String ip, int port, String clusterName) throws NacosException { - beatReactor.removeBeatInfo(NamingUtils.getGroupedName(serviceName, groupName), ip, port); - serverProxy.deregisterService(NamingUtils.getGroupedName(serviceName, groupName), ip, port, clusterName); + Instance instance = new Instance(); + instance.setIp(ip); + instance.setPort(port); + instance.setClusterName(clusterName); + + deregisterInstance(serviceName, groupName, instance); + } + + @Override + public void deregisterInstance(String serviceName, String groupName, Instance instance) throws NacosException { + beatReactor.removeBeatInfo(NamingUtils.getGroupedName(serviceName, groupName), instance.getIp(), instance.getPort()); + serverProxy.deregisterService(NamingUtils.getGroupedName(serviceName, groupName), instance); } @Override diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java b/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java index 1d93980ae8c..ba5a7a25677 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java @@ -25,7 +25,6 @@ import com.alibaba.nacos.client.naming.net.NamingProxy; import com.alibaba.nacos.client.naming.utils.StringUtils; import com.alibaba.nacos.client.naming.utils.UtilAndComs; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.*; import java.util.concurrent.*; @@ -267,7 +266,6 @@ public void scheduleUpdateIfAbsent(String serviceName, String clusters) { } } - @SuppressFBWarnings("NN_NAKED_NOTIFY") public void updateServiceNow(String serviceName, String clusters) { ServiceInfo oldService = getSerivceInfo0(serviceName, clusters); try { diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/net/NamingProxy.java b/client/src/main/java/com/alibaba/nacos/client/naming/net/NamingProxy.java index 536cca57f3d..5aa070aa66c 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/net/NamingProxy.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/net/NamingProxy.java @@ -187,17 +187,18 @@ public void registerService(String serviceName, String groupName, Instance insta } - public void deregisterService(String serviceName, String ip, int port, String clusterName) throws NacosException { + public void deregisterService(String serviceName, Instance instance) throws NacosException { - NAMING_LOGGER.info("[DEREGISTER-SERVICE] {} deregistering service {} with instance: {}:{}@{}", - namespaceId, serviceName, ip, port, clusterName); + NAMING_LOGGER.info("[DEREGISTER-SERVICE] {} deregistering service {} with instance: {}", + namespaceId, serviceName, instance); final Map params = new HashMap(8); params.put(CommonParams.NAMESPACE_ID, namespaceId); - params.put("ip", ip); - params.put("port", String.valueOf(port)); params.put(CommonParams.SERVICE_NAME, serviceName); - params.put(CommonParams.CLUSTER_NAME, clusterName); + params.put(CommonParams.CLUSTER_NAME, instance.getClusterName()); + params.put("ip", instance.getIp()); + params.put("port", String.valueOf(instance.getPort())); + params.put("ephemeral", String.valueOf(instance.isEphemeral())); reqAPI(UtilAndComs.NACOS_URL_INSTANCE, params, HttpMethod.DELETE); } diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/utils/IoUtils.java b/client/src/main/java/com/alibaba/nacos/client/naming/utils/IoUtils.java index 28e0048b594..f0b4a01c102 100644 --- a/client/src/main/java/com/alibaba/nacos/client/naming/utils/IoUtils.java +++ b/client/src/main/java/com/alibaba/nacos/client/naming/utils/IoUtils.java @@ -15,7 +15,6 @@ */ package com.alibaba.nacos.client.naming.utils; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.*; import java.nio.channels.FileChannel; @@ -163,7 +162,6 @@ public static void cleanDirectory(File directory) throws IOException { } } - @SuppressFBWarnings("BIT_IOR_OF_SIGNED_BYTE") public static boolean isGzipStream(byte[] bytes) { int minByteArraySize = 2; diff --git a/client/src/main/java/com/alibaba/nacos/client/utils/JSONUtils.java b/client/src/main/java/com/alibaba/nacos/client/utils/JSONUtils.java index 2a75beaf9f2..017a05df1e1 100644 --- a/client/src/main/java/com/alibaba/nacos/client/utils/JSONUtils.java +++ b/client/src/main/java/com/alibaba/nacos/client/utils/JSONUtils.java @@ -16,11 +16,9 @@ package com.alibaba.nacos.client.utils; import java.io.IOException; - -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.DeserializationConfig.Feature; -import org.codehaus.jackson.type.JavaType; -import org.codehaus.jackson.type.TypeReference; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; /** * Json tool @@ -33,7 +31,7 @@ public class JSONUtils { static ObjectMapper mapper = new ObjectMapper(); static { - mapper.disable(Feature.FAIL_ON_UNKNOWN_PROPERTIES); + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); } public static String serializeObject(Object o) throws IOException { @@ -49,12 +47,4 @@ public static Object deserializeObject(String s, TypeReference typeReference) return mapper.readValue(s, typeReference); } - public static JavaType getCollectionType(Class collectionClass, Class... elementClasses) { - return mapper.getTypeFactory().constructParametricType(collectionClass, elementClasses); - } - - public static Object deserializeCollection(String s, JavaType type) throws IOException { - return mapper.readValue(s, type); - } - } diff --git a/cmdb/pom.xml b/cmdb/pom.xml index 8629aee9054..b0f933659de 100644 --- a/cmdb/pom.xml +++ b/cmdb/pom.xml @@ -18,7 +18,7 @@ nacos-all com.alibaba.nacos - 1.0.0-RC2 + 1.0.0-RC3 ../pom.xml 4.0.0 diff --git a/common/pom.xml b/common/pom.xml index ce76bc3f98b..1c0aec9f194 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -18,7 +18,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 ../pom.xml 4.0.0 diff --git a/common/src/main/java/com/alibaba/nacos/common/util/VersionUtils.java b/common/src/main/java/com/alibaba/nacos/common/util/VersionUtils.java index 304b33018eb..d877c47ca72 100644 --- a/common/src/main/java/com/alibaba/nacos/common/util/VersionUtils.java +++ b/common/src/main/java/com/alibaba/nacos/common/util/VersionUtils.java @@ -30,8 +30,9 @@ public class VersionUtils { static{ + InputStream in = null; try{ - InputStream in = VersionUtils.class.getClassLoader() + in = VersionUtils.class.getClassLoader() .getResourceAsStream("nacos-version.txt"); Properties props = new Properties(); props.load(in); @@ -41,6 +42,14 @@ public class VersionUtils { } } catch(Exception e) { e.printStackTrace(); + } finally { + try { + if (in != null) { + in.close(); + } + } catch (Exception e) { + e.printStackTrace(); + } } } } diff --git a/config/pom.xml b/config/pom.xml index e3a34d7b58e..303e41715d4 100644 --- a/config/pom.xml +++ b/config/pom.xml @@ -17,7 +17,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 4.0.0 @@ -103,19 +103,20 @@ org.springframework.boot spring-boot-starter-tomcat + + + com.fasterxml.jackson.core + jackson-core + - org.codehaus.jackson - jackson-mapper-lgpl + com.fasterxml.jackson.core + jackson-databind net.jcip jcip-annotations true - - com.github.spotbugs - spotbugs-annotations - org.mockito mockito-core diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java index 86f3e32b349..3a69043e2f5 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java @@ -23,10 +23,9 @@ import com.alibaba.nacos.config.server.utils.RunningConfigUtils; import com.alibaba.nacos.config.server.utils.ThreadUtil; import org.apache.commons.lang3.StringUtils; -import org.codehaus.jackson.type.TypeReference; +import com.fasterxml.jackson.core.type.TypeReference; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; - import java.net.HttpURLConnection; import java.net.URLEncoder; import java.util.ArrayList; diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/DiskUtil.java b/config/src/main/java/com/alibaba/nacos/config/server/service/DiskUtil.java index 3e35fcdb6e1..838f06d5fcd 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/DiskUtil.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/DiskUtil.java @@ -157,16 +157,17 @@ static public File targetTagFile(String dataId, String group, String tenant, Str static public String getConfig(String dataId, String group, String tenant) throws IOException { - FileInputStream fis = null; File file = targetFile(dataId, group, tenant); if (file.exists()) { + FileInputStream fis = null; try { fis = new FileInputStream(file); + return IOUtils.toString(fis, Constants.ENCODE); } catch (FileNotFoundException e) { return StringUtils.EMPTY; + } finally { + IOUtils.closeQuietly(fis); } - String content = IOUtils.toString(fis, Constants.ENCODE); - return content; } else { return StringUtils.EMPTY; } diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java index 28d0256b027..7e1429d6792 100755 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java @@ -60,8 +60,6 @@ import com.alibaba.nacos.config.server.utils.event.EventDispatcher; import com.google.common.collect.Lists; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; - /** * 数据库服务,提供ConfigInfo在数据库的存取
3.0开始增加数据版本号, 并将物理删除改为逻辑删除
3.0增加数据库切换功能 * @@ -2639,9 +2637,6 @@ private long addConfigInfoAtomic(final String srcIp, final String srcUser, final try { jt.update(new PreparedStatementCreator() { - @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE", - "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"}, - justification = "findbugs does not trust jdbctemplate, sql is constant in practice") public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { PreparedStatement ps = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); ps.setString(1, configInfo.getDataId()); diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistService.java index 2dd248c93bc..3fe4e11bf8d 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistService.java @@ -22,7 +22,6 @@ import com.alibaba.nacos.config.server.utils.PropertyUtil; import com.alibaba.nacos.config.server.utils.TimeUtils; import com.google.common.collect.Lists; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.CannotGetJdbcConnectionException; import org.springframework.jdbc.core.JdbcTemplate; @@ -128,9 +127,6 @@ private boolean insertGroupCapacity(final String sql, final GroupCapacity capaci GeneratedKeyHolder generatedKeyHolder = new GeneratedKeyHolder(); PreparedStatementCreator preparedStatementCreator = new PreparedStatementCreator() { @Override - @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE", - "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"}, - justification = "findbugs does not trust jdbctemplate, sql is constant in practice") public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { PreparedStatement ps = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); String group = capacity.getGroup(); @@ -306,9 +302,6 @@ public boolean deleteGroupCapacity(final String group) { try { PreparedStatementCreator preparedStatementCreator = new PreparedStatementCreator() { @Override - @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE", - "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"}, - justification = "findbugs does not trust jdbctemplate, sql is constant in practice") public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { PreparedStatement ps = connection.prepareStatement( "DELETE FROM group_capacity WHERE group_id = ?;"); diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java index ac97dc75d17..12ede847bf4 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java @@ -21,7 +21,6 @@ import com.alibaba.nacos.config.server.utils.PropertyUtil; import com.alibaba.nacos.config.server.utils.TimeUtils; import com.google.common.collect.Lists; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.CannotGetJdbcConnectionException; import org.springframework.jdbc.core.JdbcTemplate; @@ -96,9 +95,6 @@ public boolean insertTenantCapacity(final TenantCapacity tenantCapacity) { GeneratedKeyHolder generatedKeyHolder = new GeneratedKeyHolder(); PreparedStatementCreator preparedStatementCreator = new PreparedStatementCreator() { @Override - @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE", - "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"}, - justification = "findbugs does not trust jdbctemplate, sql is constant in practice") public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { PreparedStatement ps = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); String tenant = tenantCapacity.getTenant(); @@ -257,9 +253,6 @@ public boolean deleteTenantCapacity(final String tenant) { try { PreparedStatementCreator preparedStatementCreator = new PreparedStatementCreator() { @Override - @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE", - "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"}, - justification = "findbugs does not trust jdbctemplate, sql is constant in practice") public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { PreparedStatement ps = connection.prepareStatement( "DELETE FROM tenant_capacity WHERE tenant_id = ?;"); diff --git a/config/src/main/java/com/alibaba/nacos/config/server/utils/JSONUtils.java b/config/src/main/java/com/alibaba/nacos/config/server/utils/JSONUtils.java index 9ae850fb55e..231fd4846ef 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/utils/JSONUtils.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/utils/JSONUtils.java @@ -15,12 +15,11 @@ */ package com.alibaba.nacos.config.server.utils; -import org.codehaus.jackson.map.DeserializationConfig.Feature; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.type.JavaType; -import org.codehaus.jackson.type.TypeReference; - import java.io.IOException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; + /** * json util @@ -33,7 +32,7 @@ public class JSONUtils { static ObjectMapper mapper = new ObjectMapper(); static { - mapper.disable(Feature.FAIL_ON_UNKNOWN_PROPERTIES); + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); } public static String serializeObject(Object o) throws IOException { @@ -49,12 +48,4 @@ public static Object deserializeObject(String s, TypeReference typeReference) return mapper.readValue(s, typeReference); } - public static JavaType getCollectionType(Class collectionClass, Class... elementClasses) { - return mapper.getTypeFactory().constructParametricType(collectionClass, elementClasses); - } - - public static Object deserializeCollection(String s, JavaType type) throws IOException { - return mapper.readValue(s, type); - } - } diff --git a/console/pom.xml b/console/pom.xml index cbe64a65431..e6fa7fff3cd 100644 --- a/console/pom.xml +++ b/console/pom.xml @@ -18,7 +18,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 nacos-console diff --git a/console/src/main/resources/static/console-fe/src/i18ndoc.js b/console/src/main/resources/static/console-fe/src/i18ndoc.js index a5a72802f5e..4f6d4b37373 100644 --- a/console/src/main/resources/static/console-fe/src/i18ndoc.js +++ b/console/src/main/resources/static/console-fe/src/i18ndoc.js @@ -161,7 +161,7 @@ module.exports = { 'com.alibaba.nacos.page.newconfig.the_more_advanced': 'Group不能为空', 'nacos.page.namespace.ACM_special_SecretKey_will_be_abandoned,_not_recommended_for_use4': 'ACM专用SecretKey(即将废弃,不建议使用):', - 'com.alibaba.nacos.page.namespace.public': 'public(保留控件)', + 'com.alibaba.nacos.page.namespace.public': 'public(保留空间)', 'com.alibaba.nacos.page.configsync.error': '错误', 'nacos.page.namespace.AccessKey_recommended1': 'AccessKey(开发环境推荐):', 'com.alibaba.nacos.page.pushTrajectory.configuration': '配置', diff --git a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js index 772558cea8b..84edb7e22ce 100644 --- a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js +++ b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js @@ -64,7 +64,7 @@ const I18N_CONF = { namespaceDelete: '删除', details: '详情', edit: '编辑', - namespacePublic: 'public(保留控件)', + namespacePublic: 'public(保留空间)', pubNoData: '没有数据', namespaceAdd: '新建命名空间', namespaceNames: '命名空间名称', diff --git a/console/src/main/resources/static/index.html b/console/src/main/resources/static/index.html index 527553130f6..2354ff5beed 100644 --- a/console/src/main/resources/static/index.html +++ b/console/src/main/resources/static/index.html @@ -19,16 +19,19 @@ Nacos - - - + + + + - - - - + + + + + - + +
@@ -36,18 +39,19 @@
- - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/console/src/main/resources/static/js/main.js b/console/src/main/resources/static/js/main.js index 463af95993a..99617e497bd 100644 --- a/console/src/main/resources/static/js/main.js +++ b/console/src/main/resources/static/js/main.js @@ -47,7 +47,7 @@ * * Date: 2016-08-08 */ -function(n){var e,p,b,r,o,h,d,m,M,l,u,w,k,i,S,g,s,c,y,T="sizzle"+1*new Date,_=n.document,x=0,a=0,f=ie(),v=ie(),L=ie(),C=function(e,t){return e===t&&(u=!0),0},D={}.hasOwnProperty,t=[],E=t.pop,O=t.push,N=t.push,Y=t.slice,j=function(e,t){for(var n=0,a=e.length;n+~]|"+I+")"+I+"*"),K=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),B=new RegExp(R),U=new RegExp("^"+A+"$"),q={ID:new RegExp("^#("+A+")"),CLASS:new RegExp("^\\.("+A+")"),TAG:new RegExp("^("+A+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){w()},oe=_e(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{N.apply(t=Y.call(_.childNodes),_.childNodes),t[_.childNodes.length].nodeType}catch(e){N={apply:t.length?function(e,t){O.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function re(e,t,n,a){var o,r,i,s,l,u,c,d=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!a&&((t?t.ownerDocument||t:_)!==k&&w(t),t=t||k,S)){if(11!==f&&(l=Q.exec(e)))if(o=l[1]){if(9===f){if(!(i=t.getElementById(o)))return n;if(i.id===o)return n.push(i),n}else if(d&&(i=d.getElementById(o))&&y(t,i)&&i.id===o)return n.push(i),n}else{if(l[2])return N.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return N.apply(n,t.getElementsByClassName(o)),n}if(p.qsa&&!L[e+" "]&&(!g||!g.test(e))){if(1!==f)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(te,ne):t.setAttribute("id",s=T),r=(u=h(e)).length;r--;)u[r]="#"+s+" "+ye(u[r]);c=u.join(","),d=X.test(e)&&me(t.parentNode)||t}if(c)try{return N.apply(n,d.querySelectorAll(c)),n}catch(e){}finally{s===T&&t.removeAttribute("id")}}}return m(e.replace(F,"$1"),t,n,a)}function ie(){var a=[];return function e(t,n){return a.push(t+" ")>b.cacheLength&&delete e[a.shift()],e[t+" "]=n}}function se(e){return e[T]=!0,e}function le(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),a=n.length;a--;)b.attrHandle[n[a]]=t}function ce(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function fe(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function pe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&oe(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function he(i){return se(function(r){return r=+r,se(function(e,t){for(var n,a=i([],e.length,r),o=a.length;o--;)e[n=a[o]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=re.setDocument=function(e){var t,n,a=e?e.ownerDocument||e:_;return a!==k&&9===a.nodeType&&a.documentElement&&(i=(k=a).documentElement,S=!o(k),_!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ae,!1):n.attachEvent&&n.attachEvent("onunload",ae)),p.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=le(function(e){return e.appendChild(k.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=$.test(k.getElementsByClassName),p.getById=le(function(e){return i.appendChild(e).id=T,!k.getElementsByName||!k.getElementsByName(T).length}),p.getById?(b.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(Z,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,a,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),a=0;r=o[a++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),b.find.TAG=p.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,a=[],o=0,r=t.getElementsByTagName(e);if("*"!==e)return r;for(;n=r[o++];)1===n.nodeType&&a.push(n);return a},b.find.CLASS=p.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],g=[],(p.qsa=$.test(k.querySelectorAll))&&(le(function(e){i.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+I+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+T+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="";var t=k.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),i.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(p.matchesSelector=$.test(c=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&le(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",R)}),g=g.length&&new RegExp(g.join("|")),s=s.length&&new RegExp(s.join("|")),t=$.test(i.compareDocumentPosition),y=t||$.test(i.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,a=t&&t.parentNode;return e===a||!(!a||1!==a.nodeType||!(n.contains?n.contains(a):e.compareDocumentPosition&&16&e.compareDocumentPosition(a)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=t?function(e,t){if(e===t)return u=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===k||e.ownerDocument===_&&y(_,e)?-1:t===k||t.ownerDocument===_&&y(_,t)?1:l?j(l,e)-j(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,a=0,o=e.parentNode,r=t.parentNode,i=[e],s=[t];if(!o||!r)return e===k?-1:t===k?1:o?-1:r?1:l?j(l,e)-j(l,t):0;if(o===r)return ce(e,t);for(n=e;n=n.parentNode;)i.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;i[a]===s[a];)a++;return a?ce(i[a],s[a]):i[a]===_?-1:s[a]===_?1:0}),k},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==k&&w(e),t=t.replace(K,"='$1']"),p.matchesSelector&&S&&!L[t+" "]&&(!s||!s.test(t))&&(!g||!g.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=f[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&f(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,a,o){return function(e){var t=re.attr(e,n);return null==t?"!="===a:!a||(t+="","="===a?t===o:"!="===a?t!==o:"^="===a?o&&0===t.indexOf(o):"*="===a?o&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,a){return _(n)?T.grep(e,function(e,t){return!!n.call(e,t,e)!==a}):n.nodeType?T.grep(e,function(e){return e===n!==a}):"string"!=typeof n?T.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var a,o;if(!e)return this;if(n=n||E,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):_(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this);if(!(a="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:O.exec(e))||!a[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(a[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(a[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),C.test(a[1])&&T.isPlainObject(t))for(a in t)_(this[a])?this[a](t[a]):this.attr(a,t[a]);return this}return(o=S.getElementById(a[2]))&&(this[0]=o,this.length=1),this}).prototype=T.fn,E=T(S);var N=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,ce=/^$|^module$|\/(?:java|ecma)script/i,de={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function fe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&L(e,t)?T.merge([e],n):n}function pe(e,t){for(var n=0,a=e.length;nx",y.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue;var _e=S.documentElement,ve=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Me=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function ke(){return!1}function Se(){try{return S.activeElement}catch(e){}}function Te(e,t,n,a,o,r){var i,s;if("object"==typeof t){for(s in"string"!=typeof n&&(a=a||n,n=void 0),t)Te(e,s,n,a,t[s],r);return e}if(null==a&&null==o?(o=n,a=n=void 0):null==o&&("string"==typeof n?(o=a,a=void 0):(o=a,a=n,n=void 0)),!1===o)o=ke;else if(!o)return e;return 1===r&&(i=o,(o=function(e){return T().off(e),i.apply(this,arguments)}).guid=i.guid||(i.guid=T.guid++)),e.each(function(){T.event.add(this,t,o,a,n)})}T.event={global:{},add:function(t,e,n,a,o){var r,i,s,l,u,c,d,f,p,h,m,g=J.get(t);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&T.find.matchesSelector(_e,o),n.guid||(n.guid=T.guid++),(l=g.events)||(l=g.events={}),(i=g.handle)||(i=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(P)||[""]).length;u--;)p=m=(s=Me.exec(e[u])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=T.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=T.event.special[p]||{},c=T.extend({type:p,origType:m,data:a,handler:n,guid:n.guid,selector:o,needsContext:o&&T.expr.match.needsContext.test(o),namespace:h.join(".")},r),(f=l[p])||((f=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,a,h,i)||t.addEventListener&&t.addEventListener(p,i)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,c):f.push(c),T.event.global[p]=!0)},remove:function(e,t,n,a,o){var r,i,s,l,u,c,d,f,p,h,m,g=J.hasData(e)&&J.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(P)||[""]).length;u--;)if(p=m=(s=Me.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=T.event.special[p]||{},f=l[p=(a?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=r=f.length;r--;)c=f[r],!o&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||a&&a!==c.selector&&("**"!==a||!c.selector)||(f.splice(r,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));i&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||T.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)T.event.remove(e,p+t[u],n,a,!0);T.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,a,o,r,i,s=T.event.fix(e),l=new Array(arguments.length),u=(J.get(this,"events")||{})[s.type]||[],c=T.event.special[s.type]||{};for(l[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/\s*$/g;function Ee(e,t){return L(e,"table")&&L(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ne(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ye(e,t){var n,a,o,r,i,s,l,u;if(1===t.nodeType){if(J.hasData(e)&&(r=J.access(e),i=J.set(t,r),u=r.events))for(o in delete i.handle,i.events={},u)for(n=0,a=u[o].length;n")},clone:function(e,t,n){var a,o,r,i,s,l,u,c=e.cloneNode(!0),d=T.contains(e.ownerDocument,e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(i=fe(c),a=0,o=(r=fe(e)).length;a").prop({charset:n.scriptCharset,src:n.url}).on("load error",o=function(e){a.remove(),o=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(a[0])},abort:function(){o&&o()}}});var Wt,Vt=[],Kt=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||T.expando+"_"+bt++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var a,o,r,i=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(i||"jsonp"===e.dataTypes[0])return a=e.jsonpCallback=_(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,i?e[i]=e[i].replace(Kt,"$1"+a):!1!==e.jsonp&&(e.url+=(Mt.test(e.url)?"&":"?")+e.jsonp+"="+a),e.converters["script json"]=function(){return r||T.error(a+" was not called"),r[0]},e.dataTypes[0]="json",o=k[a],k[a]=function(){r=arguments},n.always(function(){void 0===o?T(k).removeProp(a):k[a]=o,e[a]&&(e.jsonpCallback=t.jsonpCallback,Vt.push(a)),r&&_(o)&&o(r[0]),r=o=void 0}),"script"}),y.createHTMLDocument=((Wt=S.implementation.createHTMLDocument("").body).innerHTML="
",2===Wt.childNodes.length),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((a=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(a)):t=S),r=!n&&[],(o=C.exec(e))?[t.createElement(o[1])]:(o=ye([e],t,r),r&&r.length&&T(r).remove(),T.merge([],o.childNodes)));var a,o,r},T.fn.load=function(e,t,n){var a,o,r,i=this,s=e.indexOf(" ");return-1").append(T.parseHTML(e)).find(a):e)}).always(n&&function(e,t){i.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.pseudos.animated=function(t){return T.grep(T.timers,function(e){return t===e.elem}).length},T.offset={setOffset:function(e,t,n){var a,o,r,i,s,l,u=T.css(e,"position"),c=T(e),d={};"static"===u&&(e.style.position="relative"),s=c.offset(),r=T.css(e,"top"),l=T.css(e,"left"),o=("absolute"===u||"fixed"===u)&&-1<(r+l).indexOf("auto")?(i=(a=c.position()).top,a.left):(i=parseFloat(r)||0,parseFloat(l)||0),_(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(d.top=t.top-s.top+i),null!=t.left&&(d.left=t.left-s.left+o),"using"in t?t.using.call(e,d):c.css(d)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){T.offset.setOffset(this,t,e)});var e,n,a=this[0];return a?a.getClientRects().length?(e=a.getBoundingClientRect(),n=a.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,a=this[0],o={top:0,left:0};if("fixed"===T.css(a,"position"))t=a.getBoundingClientRect();else{for(t=this.offset(),n=a.ownerDocument,e=a.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==a&&1===e.nodeType&&((o=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),o.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-T.css(a,"marginTop",!0),left:t.left-o.left-T.css(a,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||_e})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,o){var r="pageYOffset"===o;T.fn[t]=function(e){return W(this,function(e,t,n){var a;if(v(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===n)return a?a[o]:e[t];a?a.scrollTo(r?a.pageXOffset:n,r?n:a.pageYOffset):e[t]=n},t,e,arguments.length)}}),T.each(["top","left"],function(e,n){T.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=Re(e,n),Ie.test(t)?T(e).position()[n]+"px":t})}),T.each({Height:"height",Width:"width"},function(i,s){T.each({padding:"inner"+i,content:s,"":"outer"+i},function(a,r){T.fn[r]=function(e,t){var n=arguments.length&&(a||"boolean"!=typeof e),o=a||(!0===e||!0===t?"margin":"border");return W(this,function(e,t,n){var a;return v(e)?0===r.indexOf("outer")?e["inner"+i]:e.document.documentElement["client"+i]:9===e.nodeType?(a=e.documentElement,Math.max(e.body["scroll"+i],a["scroll"+i],e.body["offset"+i],a["offset"+i],a["client"+i])):void 0===n?T.css(e,t,o):T.style(e,t,n,o)},s,n?e:void 0,n)}})}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){T.fn[n]=function(e,t){return 0, or explicitly pass "'+h+'" as a prop to "'+o+'".'),n.initSelector(),n.initSubscription(),n}w(e,a);var t=e.prototype;return t.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[_]=t||this.context[_],e},t.componentDidMount=function(){f&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},t.componentWillReceiveProps=function(e){this.selector.run(e)},t.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},t.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=P,this.store=null,this.selector.run=P,this.selector.shouldComponentUpdate=!1},t.getWrappedInstance=function(){return E()(g,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+l+"() call."),this.wrappedInstance},t.setWrappedInstance=function(e){this.wrappedInstance=e},t.initSelector=function(){var n,a,o,e=i(this.store.dispatch,r);this.selector=(n=e,a=this.store,o={run:function(e){try{var t=n(a.getState(),e);(t!==o.props||o.error)&&(o.shouldComponentUpdate=!0,o.props=t,o.error=null)}catch(e){o.shouldComponentUpdate=!0,o.error=e}}}),this.selector.run(this.props)},t.initSubscription=function(){if(f){var e=(this.propsMode?this.props:this.context)[_];this.subscription=new N(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},t.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(j)):this.notifyNestedSubs()},t.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},t.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},t.addExtraProps=function(e){if(!(g||c||this.propsMode&&this.subscription))return e;var t=L({},e);return g&&(t.ref=this.setWrappedInstance),c&&(t[c]=this.renderCount++),this.propsMode&&this.subscription&&(t[_]=this.subscription),t},t.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(k.createElement)(n,this.addExtraProps(e.props))},e}(k.Component);return t.WrappedComponent=n,t.displayName=o,t.childContextTypes=M,t.contextTypes=b,t.propTypes=b,D()(t,n)}}var c=Object.prototype.hasOwnProperty;function d(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function v(e,t){if(d(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var o=0;othis.menuNode.clientHeight)){var e=this.menuNode.clientHeight+this.menuNode.scrollTop,t=this.itemNode.offsetTop+this.itemNode.offsetHeight;e or withRouter() outside a ");var l=t.route,u=(a||l.location).pathname;return Object(f.a)(u,{path:o,strict:r,exact:i,sensitive:s},l.match)},i.prototype.componentWillMount=function(){o()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),o()(!(this.props.component&&this.props.children&&!h(this.props.children)),"You should not use and in the same route; will be ignored"),o()(!(this.props.render&&this.props.children&&!h(this.props.children)),"You should not use and in the same route; will be ignored")},i.prototype.componentWillReceiveProps=function(e,t){o()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),o()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},i.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,a=t.component,o=t.render,r=this.context.router,i=r.history,s=r.route,l=r.staticContext,u={match:e,location:this.props.location||s.location,history:i,staticContext:l};return a?e?d.a.createElement(a,u):null:o?e?o(u):null:"function"==typeof n?n(u):n&&!h(n)?d.a.Children.only(n):null},i}(d.a.Component);m.propTypes={computedMatch:l.a.object,path:l.a.string,exact:l.a.bool,strict:l.a.bool,sensitive:l.a.bool,component:l.a.func,render:l.a.func,children:l.a.oneOfType([l.a.func,l.a.node]),location:l.a.object},m.contextTypes={router:l.a.shape({history:l.a.object.isRequired,route:l.a.object.isRequired,staticContext:l.a.object})},m.childContextTypes={router:l.a.object.isRequired},t.a=m},function(e,t,n){"use strict";var a=n(108),y=n.n(a),_={},v=0;t.a=function(e){var t=1document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[u][i[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=o(e),n=new l,l[u]=null,n[s]=e):n=c(),void 0===t?n:r(n,t)}},function(e,t,n){var a=n(70).f,o=n(64),r=n(74)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,r)&&a(e,r,{configurable:!0,value:t})}},function(e,t,n){t.f=n(74)},function(e,t,n){var a=n(57),o=n(63),r=n(95),i=n(126),s=n(70).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=r?{}:a.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(t,e){if(!t)return null;if("string"==typeof t)return document.getElementById(t);"function"==typeof t&&(t=t(e));if(!t)return null;try{return(0,a.findDOMNode)(t)}catch(e){return t}};var a=n(24);e.exports=t.default},function(e,t,n){"use strict";n(62),n(428)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,h=f(n(5)),r=f(n(4)),i=f(n(6)),s=f(n(7)),l=n(0),m=f(l),u=f(n(2)),g=f(n(12)),c=f(n(23)),d=n(11),y=f(n(90));function f(e){return e&&e.__esModule?e:{default:e}}var _=d.func.bindCtx,v=d.obj.pickOthers,p=(o=a=function(n){function p(e){(0,r.default)(this,p);var t=(0,i.default)(this,n.call(this,e));return _(t,["handleKeyDown","handleClick"]),t}return(0,s.default)(p,n),p.prototype.getSelected=function(){var e=this.props,t=e._key,n=e.root,a=e.selected,o=n.props.selectMode,r=n.state.selectedKeys;return a||!!o&&-1o;)i(a,n=t[o++])&&(~l(r,n)||r.push(n));return r}},function(e,t,n){var a=n(149);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==a(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var a=n(117);e.exports=function(e){return Object(a(e))}},function(e,t,n){"use strict";var v=n(95),b=n(87),M=n(152),w=n(69),k=n(123),S=n(379),T=n(125),x=n(382),L=n(74)("iterator"),C=!([].keys&&"next"in[].keys()),D="values",E=function(){return this};e.exports=function(e,t,n,a,o,r,i){S(n,t,a);var s,l,u,c=function(e){if(!C&&e in h)return h[e];switch(e){case"keys":case D:return function(){return new n(this,e)}}return function(){return new n(this,e)}},d=t+" Iterator",f=o==D,p=!1,h=e.prototype,m=h[L]||h["@@iterator"]||o&&h[o],g=m||c(o),y=o?f?c("entries"):g:void 0,_="Array"==t&&h.entries||m;if(_&&(u=x(_.call(new e)))!==Object.prototype&&u.next&&(T(u,d,!0),v||"function"==typeof u[L]||w(u,L,E)),f&&m&&m.name!==D&&(p=!0,g=function(){return m.call(this)}),v&&!i||!C&&!p&&h[L]||w(h,L,g),k[t]=g,k[d]=E,o)if(s={values:f?g:c(D),keys:r?g:c("keys"),entries:y},i)for(l in s)l in h||M(h,l,s[l]);else b(b.P+b.F*(C||p),t,s);return s}},function(e,t,n){e.exports=n(69)},function(e,t,n){var a=n(147),o=n(121).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,o)}},function(e,t,n){var a=n(97),o=n(93),r=n(73),i=n(116),s=n(64),l=n(145),u=Object.getOwnPropertyDescriptor;t.f=n(72)?u:function(e,t){if(e=r(e),t=i(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return o(!a.f.call(e,t),e[t])}},function(e,t,n){"use strict"; +function(n){var e,p,b,r,o,h,d,m,M,l,u,w,k,i,S,g,s,c,y,T="sizzle"+1*new Date,_=n.document,x=0,a=0,f=ie(),v=ie(),L=ie(),C=function(e,t){return e===t&&(u=!0),0},D={}.hasOwnProperty,t=[],E=t.pop,O=t.push,N=t.push,Y=t.slice,j=function(e,t){for(var n=0,a=e.length;n+~]|"+I+")"+I+"*"),K=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),B=new RegExp(R),U=new RegExp("^"+A+"$"),q={ID:new RegExp("^#("+A+")"),CLASS:new RegExp("^\\.("+A+")"),TAG:new RegExp("^("+A+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){w()},oe=_e(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{N.apply(t=Y.call(_.childNodes),_.childNodes),t[_.childNodes.length].nodeType}catch(e){N={apply:t.length?function(e,t){O.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function re(e,t,n,a){var o,r,i,s,l,u,c,d=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!a&&((t?t.ownerDocument||t:_)!==k&&w(t),t=t||k,S)){if(11!==f&&(l=Q.exec(e)))if(o=l[1]){if(9===f){if(!(i=t.getElementById(o)))return n;if(i.id===o)return n.push(i),n}else if(d&&(i=d.getElementById(o))&&y(t,i)&&i.id===o)return n.push(i),n}else{if(l[2])return N.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return N.apply(n,t.getElementsByClassName(o)),n}if(p.qsa&&!L[e+" "]&&(!g||!g.test(e))){if(1!==f)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(te,ne):t.setAttribute("id",s=T),r=(u=h(e)).length;r--;)u[r]="#"+s+" "+ye(u[r]);c=u.join(","),d=X.test(e)&&me(t.parentNode)||t}if(c)try{return N.apply(n,d.querySelectorAll(c)),n}catch(e){}finally{s===T&&t.removeAttribute("id")}}}return m(e.replace(F,"$1"),t,n,a)}function ie(){var a=[];return function e(t,n){return a.push(t+" ")>b.cacheLength&&delete e[a.shift()],e[t+" "]=n}}function se(e){return e[T]=!0,e}function le(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),a=n.length;a--;)b.attrHandle[n[a]]=t}function ce(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function fe(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function pe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&oe(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function he(i){return se(function(r){return r=+r,se(function(e,t){for(var n,a=i([],e.length,r),o=a.length;o--;)e[n=a[o]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=re.setDocument=function(e){var t,n,a=e?e.ownerDocument||e:_;return a!==k&&9===a.nodeType&&a.documentElement&&(i=(k=a).documentElement,S=!o(k),_!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ae,!1):n.attachEvent&&n.attachEvent("onunload",ae)),p.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=le(function(e){return e.appendChild(k.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=$.test(k.getElementsByClassName),p.getById=le(function(e){return i.appendChild(e).id=T,!k.getElementsByName||!k.getElementsByName(T).length}),p.getById?(b.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(Z,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,a,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),a=0;r=o[a++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),b.find.TAG=p.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,a=[],o=0,r=t.getElementsByTagName(e);if("*"!==e)return r;for(;n=r[o++];)1===n.nodeType&&a.push(n);return a},b.find.CLASS=p.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],g=[],(p.qsa=$.test(k.querySelectorAll))&&(le(function(e){i.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+I+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+T+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="";var t=k.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),i.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(p.matchesSelector=$.test(c=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&le(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",R)}),g=g.length&&new RegExp(g.join("|")),s=s.length&&new RegExp(s.join("|")),t=$.test(i.compareDocumentPosition),y=t||$.test(i.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,a=t&&t.parentNode;return e===a||!(!a||1!==a.nodeType||!(n.contains?n.contains(a):e.compareDocumentPosition&&16&e.compareDocumentPosition(a)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=t?function(e,t){if(e===t)return u=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===k||e.ownerDocument===_&&y(_,e)?-1:t===k||t.ownerDocument===_&&y(_,t)?1:l?j(l,e)-j(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,a=0,o=e.parentNode,r=t.parentNode,i=[e],s=[t];if(!o||!r)return e===k?-1:t===k?1:o?-1:r?1:l?j(l,e)-j(l,t):0;if(o===r)return ce(e,t);for(n=e;n=n.parentNode;)i.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;i[a]===s[a];)a++;return a?ce(i[a],s[a]):i[a]===_?-1:s[a]===_?1:0}),k},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==k&&w(e),t=t.replace(K,"='$1']"),p.matchesSelector&&S&&!L[t+" "]&&(!s||!s.test(t))&&(!g||!g.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=f[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&f(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,a,o){return function(e){var t=re.attr(e,n);return null==t?"!="===a:!a||(t+="","="===a?t===o:"!="===a?t!==o:"^="===a?o&&0===t.indexOf(o):"*="===a?o&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,a){return _(n)?T.grep(e,function(e,t){return!!n.call(e,t,e)!==a}):n.nodeType?T.grep(e,function(e){return e===n!==a}):"string"!=typeof n?T.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var a,o;if(!e)return this;if(n=n||E,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):_(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this);if(!(a="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:O.exec(e))||!a[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(a[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(a[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),C.test(a[1])&&T.isPlainObject(t))for(a in t)_(this[a])?this[a](t[a]):this.attr(a,t[a]);return this}return(o=S.getElementById(a[2]))&&(this[0]=o,this.length=1),this}).prototype=T.fn,E=T(S);var N=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,ce=/^$|^module$|\/(?:java|ecma)script/i,de={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function fe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&L(e,t)?T.merge([e],n):n}function pe(e,t){for(var n=0,a=e.length;nx",y.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue;var _e=S.documentElement,ve=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Me=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function ke(){return!1}function Se(){try{return S.activeElement}catch(e){}}function Te(e,t,n,a,o,r){var i,s;if("object"==typeof t){for(s in"string"!=typeof n&&(a=a||n,n=void 0),t)Te(e,s,n,a,t[s],r);return e}if(null==a&&null==o?(o=n,a=n=void 0):null==o&&("string"==typeof n?(o=a,a=void 0):(o=a,a=n,n=void 0)),!1===o)o=ke;else if(!o)return e;return 1===r&&(i=o,(o=function(e){return T().off(e),i.apply(this,arguments)}).guid=i.guid||(i.guid=T.guid++)),e.each(function(){T.event.add(this,t,o,a,n)})}T.event={global:{},add:function(t,e,n,a,o){var r,i,s,l,u,c,d,f,p,h,m,g=J.get(t);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&T.find.matchesSelector(_e,o),n.guid||(n.guid=T.guid++),(l=g.events)||(l=g.events={}),(i=g.handle)||(i=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(P)||[""]).length;u--;)p=m=(s=Me.exec(e[u])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=T.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=T.event.special[p]||{},c=T.extend({type:p,origType:m,data:a,handler:n,guid:n.guid,selector:o,needsContext:o&&T.expr.match.needsContext.test(o),namespace:h.join(".")},r),(f=l[p])||((f=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,a,h,i)||t.addEventListener&&t.addEventListener(p,i)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,c):f.push(c),T.event.global[p]=!0)},remove:function(e,t,n,a,o){var r,i,s,l,u,c,d,f,p,h,m,g=J.hasData(e)&&J.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(P)||[""]).length;u--;)if(p=m=(s=Me.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=T.event.special[p]||{},f=l[p=(a?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=r=f.length;r--;)c=f[r],!o&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||a&&a!==c.selector&&("**"!==a||!c.selector)||(f.splice(r,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));i&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||T.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)T.event.remove(e,p+t[u],n,a,!0);T.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,a,o,r,i,s=T.event.fix(e),l=new Array(arguments.length),u=(J.get(this,"events")||{})[s.type]||[],c=T.event.special[s.type]||{};for(l[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/\s*$/g;function Ee(e,t){return L(e,"table")&&L(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ne(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ye(e,t){var n,a,o,r,i,s,l,u;if(1===t.nodeType){if(J.hasData(e)&&(r=J.access(e),i=J.set(t,r),u=r.events))for(o in delete i.handle,i.events={},u)for(n=0,a=u[o].length;n")},clone:function(e,t,n){var a,o,r,i,s,l,u,c=e.cloneNode(!0),d=T.contains(e.ownerDocument,e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(i=fe(c),a=0,o=(r=fe(e)).length;a").prop({charset:n.scriptCharset,src:n.url}).on("load error",o=function(e){a.remove(),o=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(a[0])},abort:function(){o&&o()}}});var Wt,Vt=[],Kt=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||T.expando+"_"+bt++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var a,o,r,i=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(i||"jsonp"===e.dataTypes[0])return a=e.jsonpCallback=_(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,i?e[i]=e[i].replace(Kt,"$1"+a):!1!==e.jsonp&&(e.url+=(Mt.test(e.url)?"&":"?")+e.jsonp+"="+a),e.converters["script json"]=function(){return r||T.error(a+" was not called"),r[0]},e.dataTypes[0]="json",o=k[a],k[a]=function(){r=arguments},n.always(function(){void 0===o?T(k).removeProp(a):k[a]=o,e[a]&&(e.jsonpCallback=t.jsonpCallback,Vt.push(a)),r&&_(o)&&o(r[0]),r=o=void 0}),"script"}),y.createHTMLDocument=((Wt=S.implementation.createHTMLDocument("").body).innerHTML="
",2===Wt.childNodes.length),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((a=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(a)):t=S),r=!n&&[],(o=C.exec(e))?[t.createElement(o[1])]:(o=ye([e],t,r),r&&r.length&&T(r).remove(),T.merge([],o.childNodes)));var a,o,r},T.fn.load=function(e,t,n){var a,o,r,i=this,s=e.indexOf(" ");return-1").append(T.parseHTML(e)).find(a):e)}).always(n&&function(e,t){i.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.pseudos.animated=function(t){return T.grep(T.timers,function(e){return t===e.elem}).length},T.offset={setOffset:function(e,t,n){var a,o,r,i,s,l,u=T.css(e,"position"),c=T(e),d={};"static"===u&&(e.style.position="relative"),s=c.offset(),r=T.css(e,"top"),l=T.css(e,"left"),o=("absolute"===u||"fixed"===u)&&-1<(r+l).indexOf("auto")?(i=(a=c.position()).top,a.left):(i=parseFloat(r)||0,parseFloat(l)||0),_(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(d.top=t.top-s.top+i),null!=t.left&&(d.left=t.left-s.left+o),"using"in t?t.using.call(e,d):c.css(d)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){T.offset.setOffset(this,t,e)});var e,n,a=this[0];return a?a.getClientRects().length?(e=a.getBoundingClientRect(),n=a.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,a=this[0],o={top:0,left:0};if("fixed"===T.css(a,"position"))t=a.getBoundingClientRect();else{for(t=this.offset(),n=a.ownerDocument,e=a.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==a&&1===e.nodeType&&((o=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),o.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-T.css(a,"marginTop",!0),left:t.left-o.left-T.css(a,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||_e})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,o){var r="pageYOffset"===o;T.fn[t]=function(e){return W(this,function(e,t,n){var a;if(v(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===n)return a?a[o]:e[t];a?a.scrollTo(r?a.pageXOffset:n,r?n:a.pageYOffset):e[t]=n},t,e,arguments.length)}}),T.each(["top","left"],function(e,n){T.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=Re(e,n),Ie.test(t)?T(e).position()[n]+"px":t})}),T.each({Height:"height",Width:"width"},function(i,s){T.each({padding:"inner"+i,content:s,"":"outer"+i},function(a,r){T.fn[r]=function(e,t){var n=arguments.length&&(a||"boolean"!=typeof e),o=a||(!0===e||!0===t?"margin":"border");return W(this,function(e,t,n){var a;return v(e)?0===r.indexOf("outer")?e["inner"+i]:e.document.documentElement["client"+i]:9===e.nodeType?(a=e.documentElement,Math.max(e.body["scroll"+i],a["scroll"+i],e.body["offset"+i],a["offset"+i],a["client"+i])):void 0===n?T.css(e,t,o):T.style(e,t,n,o)},s,n?e:void 0,n)}})}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){T.fn[n]=function(e,t){return 0, or explicitly pass "'+h+'" as a prop to "'+o+'".'),n.initSelector(),n.initSubscription(),n}w(e,a);var t=e.prototype;return t.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[_]=t||this.context[_],e},t.componentDidMount=function(){f&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},t.componentWillReceiveProps=function(e){this.selector.run(e)},t.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},t.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=P,this.store=null,this.selector.run=P,this.selector.shouldComponentUpdate=!1},t.getWrappedInstance=function(){return E()(g,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+l+"() call."),this.wrappedInstance},t.setWrappedInstance=function(e){this.wrappedInstance=e},t.initSelector=function(){var n,a,o,e=i(this.store.dispatch,r);this.selector=(n=e,a=this.store,o={run:function(e){try{var t=n(a.getState(),e);(t!==o.props||o.error)&&(o.shouldComponentUpdate=!0,o.props=t,o.error=null)}catch(e){o.shouldComponentUpdate=!0,o.error=e}}}),this.selector.run(this.props)},t.initSubscription=function(){if(f){var e=(this.propsMode?this.props:this.context)[_];this.subscription=new N(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},t.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(j)):this.notifyNestedSubs()},t.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},t.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},t.addExtraProps=function(e){if(!(g||c||this.propsMode&&this.subscription))return e;var t=L({},e);return g&&(t.ref=this.setWrappedInstance),c&&(t[c]=this.renderCount++),this.propsMode&&this.subscription&&(t[_]=this.subscription),t},t.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(k.createElement)(n,this.addExtraProps(e.props))},e}(k.Component);return t.WrappedComponent=n,t.displayName=o,t.childContextTypes=M,t.contextTypes=b,t.propTypes=b,D()(t,n)}}var c=Object.prototype.hasOwnProperty;function d(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function v(e,t){if(d(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var o=0;othis.menuNode.clientHeight)){var e=this.menuNode.clientHeight+this.menuNode.scrollTop,t=this.itemNode.offsetTop+this.itemNode.offsetHeight;e or withRouter() outside a ");var l=t.route,u=(a||l.location).pathname;return Object(f.a)(u,{path:o,strict:r,exact:i,sensitive:s},l.match)},i.prototype.componentWillMount=function(){o()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),o()(!(this.props.component&&this.props.children&&!h(this.props.children)),"You should not use and in the same route; will be ignored"),o()(!(this.props.render&&this.props.children&&!h(this.props.children)),"You should not use and in the same route; will be ignored")},i.prototype.componentWillReceiveProps=function(e,t){o()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),o()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},i.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,a=t.component,o=t.render,r=this.context.router,i=r.history,s=r.route,l=r.staticContext,u={match:e,location:this.props.location||s.location,history:i,staticContext:l};return a?e?d.a.createElement(a,u):null:o?e?o(u):null:"function"==typeof n?n(u):n&&!h(n)?d.a.Children.only(n):null},i}(d.a.Component);m.propTypes={computedMatch:l.a.object,path:l.a.string,exact:l.a.bool,strict:l.a.bool,sensitive:l.a.bool,component:l.a.func,render:l.a.func,children:l.a.oneOfType([l.a.func,l.a.node]),location:l.a.object},m.contextTypes={router:l.a.shape({history:l.a.object.isRequired,route:l.a.object.isRequired,staticContext:l.a.object})},m.childContextTypes={router:l.a.object.isRequired},t.a=m},function(e,t,n){"use strict";var a=n(108),y=n.n(a),_={},v=0;t.a=function(e){var t=1document.F=Object<\/script>"),e.close(),c=e.F;n--;)delete c[u][i[n]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(l[u]=o(e),n=new l,l[u]=null,n[s]=e):n=c(),void 0===t?n:r(n,t)}},function(e,t,n){var a=n(70).f,o=n(64),r=n(74)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,r)&&a(e,r,{configurable:!0,value:t})}},function(e,t,n){t.f=n(74)},function(e,t,n){var a=n(57),o=n(63),r=n(95),i=n(126),s=n(70).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=r?{}:a.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(t,e){if(!t)return null;if("string"==typeof t)return document.getElementById(t);"function"==typeof t&&(t=t(e));if(!t)return null;try{return(0,a.findDOMNode)(t)}catch(e){return t}};var a=n(24);e.exports=t.default},function(e,t,n){"use strict";n(62),n(428)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,h=f(n(5)),r=f(n(4)),i=f(n(6)),s=f(n(7)),l=n(0),m=f(l),u=f(n(2)),g=f(n(12)),c=f(n(23)),d=n(11),y=f(n(90));function f(e){return e&&e.__esModule?e:{default:e}}var _=d.func.bindCtx,v=d.obj.pickOthers,p=(o=a=function(n){function p(e){(0,r.default)(this,p);var t=(0,i.default)(this,n.call(this,e));return _(t,["handleKeyDown","handleClick"]),t}return(0,s.default)(p,n),p.prototype.getSelected=function(){var e=this.props,t=e._key,n=e.root,a=e.selected,o=n.props.selectMode,r=n.state.selectedKeys;return a||!!o&&-1o;)i(a,n=t[o++])&&(~l(r,n)||r.push(n));return r}},function(e,t,n){var a=n(149);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==a(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var a=n(117);e.exports=function(e){return Object(a(e))}},function(e,t,n){"use strict";var v=n(95),b=n(87),M=n(152),w=n(69),k=n(123),S=n(379),T=n(125),x=n(382),L=n(74)("iterator"),C=!([].keys&&"next"in[].keys()),D="values",E=function(){return this};e.exports=function(e,t,n,a,o,r,i){S(n,t,a);var s,l,u,c=function(e){if(!C&&e in h)return h[e];switch(e){case"keys":case D:return function(){return new n(this,e)}}return function(){return new n(this,e)}},d=t+" Iterator",f=o==D,p=!1,h=e.prototype,m=h[L]||h["@@iterator"]||o&&h[o],g=m||c(o),y=o?f?c("entries"):g:void 0,_="Array"==t&&h.entries||m;if(_&&(u=x(_.call(new e)))!==Object.prototype&&u.next&&(T(u,d,!0),v||"function"==typeof u[L]||w(u,L,E)),f&&m&&m.name!==D&&(p=!0,g=function(){return m.call(this)}),v&&!i||!C&&!p&&h[L]||w(h,L,g),k[t]=g,k[d]=E,o)if(s={values:f?g:c(D),keys:r?g:c("keys"),entries:y},i)for(l in s)l in h||M(h,l,s[l]);else b(b.P+b.F*(C||p),t,s);return s}},function(e,t,n){e.exports=n(69)},function(e,t,n){var a=n(147),o=n(121).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,o)}},function(e,t,n){var a=n(97),o=n(93),r=n(73),i=n(116),s=n(64),l=n(145),u=Object.getOwnPropertyDescriptor;t.f=n(72)?u:function(e,t){if(e=r(e),t=i(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return o(!a.f.call(e,t),e[t])}},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @@ -92,4 +92,4 @@ Object.defineProperty(R,"__esModule",{value:!0});var i=null,a=!1,s=3,o=-1,l=-1,r * @author Feross Aboukhadijeh * @license MIT */ -e.exports=function(e){return null!=e&&(n(e)||"function"==typeof(t=e).readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))||!!e._isBuffer);var t}},function(e,t,n){"use strict";var a=n(131),o=n(47),r=n(464),i=n(465);function s(e){this.defaults=e,this.interceptors={request:new r,response:new r}}s.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(a,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[i,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},o.forEach(["delete","get","head","options"],function(n){s.prototype[n]=function(e,t){return this.request(o.merge(t||{},{method:n,url:e}))}}),o.forEach(["post","put","patch"],function(a){s.prototype[a]=function(e,t,n){return this.request(o.merge(n||{},{method:a,url:e,data:t}))}}),e.exports=s},function(e,t){var n,a,o=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(e){n=r}try{a="function"==typeof clearTimeout?clearTimeout:i}catch(e){a=i}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d>8-r%1*8)){if(255<(n=a.charCodeAt(r+=.75)))throw new s;t=t<<8|n}return o}},function(e,t,n){"use strict";var s=n(47);e.exports=s.isStandardBrowserEnv()?{write:function(e,t,n,a,o,r){var i=[];i.push(e+"="+encodeURIComponent(t)),s.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),s.isString(a)&&i.push("path="+a),s.isString(o)&&i.push("domain="+o),!0===r&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var a=n(47);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(t){a.forEach(this.handlers,function(e){null!==e&&t(e)})},e.exports=o},function(e,t,n){"use strict";var a=n(47),o=n(466),r=n(312),i=n(131),s=n(467),l=n(468);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=l(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=a.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),a.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||i.adapter)(t).then(function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return r(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(e,t,n){"use strict";var a=n(47);e.exports=function(t,n,e){return a.forEach(e,function(e){t=e(t,n)}),t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var a=n(313);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new a(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},e.exports=o},function(e,t,n){"use strict";e.exports=function(t){return function(e){return t.apply(null,e)}}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,M=d(n(5)),r=d(n(4)),i=d(n(6)),s=d(n(7)),w=d(n(0)),l=d(n(24)),u=d(n(2)),k=d(n(12)),S=d(n(23)),T=d(n(19)),c=d(n(45));function d(e){return e&&e.__esModule?e:{default:e}}var x=n(11).obj.pickOthers,f=(o=a=function(a){function b(e,t){(0,r.default)(this,b);var n=(0,i.default)(this,a.call(this,e,t));return n.handleToggle=function(){n.setState(function(e){return{expand:!e.expand}})},n._contentRefHandler=function(e){n.content=e},n.saveFooter=function(e){n.footer=e},n.state={needMore:!1,expand:!1,contentHeight:"auto"},n}return(0,s.default)(b,a),b.prototype.componentDidMount=function(){this._setNeedMore(),this._setContentHeight()},b.prototype.componentDidUpdate=function(){this._setContentHeight()},b.prototype._setNeedMore=function(){var e=this.props.contentHeight,t=this._getNodeChildrenHeight(this.content);this.setState({needMore:"auto"!==e&&e=a.length)return n;var i=a[o],s=e(t&&t[i],n,a,o+1);if(!t){var l=isNaN(i)?{}:[];return l[i]=s,l}if(Array.isArray(t)){var u=[].concat(t);return u[i]=s,u}return(0,c.default)({},t,((r={})[i]=s,r))}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,y=c(n(5)),r=c(n(4)),i=c(n(6)),s=c(n(7)),_=c(n(0)),l=c(n(2)),v=c(n(12)),b=n(11),u=c(n(28));function c(e){return e&&e.__esModule?e:{default:e}}var d=(o=a=function(o){function g(e){(0,r.default)(this,g);var n=(0,i.default)(this,o.call(this,e));n.onChange=function(e,t){n.props.onChange(n._formField.getValues(),{name:e,value:t,field:n._formField})};var t=(0,y.default)({},e.fieldOptions,{onChange:n.onChange});if(e.field){n._formField=e.field;var a=n._formField.options.onChange;t.onChange=b.func.makeChain(a,n.onChange),n._formField.setOptions&&n._formField.setOptions(t)}else"value"in e&&(t.values=e.value),n._formField=new u.default(n,t);return e.saveField(n._formField),n}return(0,s.default)(g,o),g.prototype.getChildContext=function(){return{_formField:this.props.field?this.props.field:this._formField,_formSize:this.props.size}},g.prototype.componentWillReceiveProps=function(e){"value"in e&&this._formField.setValues(e.value),"error"in e&&this._formField.setErrors(e.error)},g.prototype.render=function(){var e,t=this.props,n=t.className,a=t.inline,o=t.size,r=t.labelAlign,i=t.labelTextAlign,s=t.onSubmit,l=t.children,u=t.labelCol,c=t.wrapperCol,d=t.style,f=t.prefix,p=t.rtl,h=t.component,m=(0,v.default)(((e={})[f+"form"]=!0,e[f+"inline"]=a,e[""+f+o]=o,e[n]=!!n,e));return _.default.createElement(h,(0,y.default)({role:"grid"},b.obj.pickOthers(g.propTypes,this.props),{className:m,style:d,dir:p?"rtl":void 0,onSubmit:s}),_.default.Children.map(l,function(e){if(e&&"function"==typeof e.type&&"form_item"===e.type._typeMark){var t={labelCol:e.props.labelCol?e.props.labelCol:u,wrapperCol:e.props.wrapperCol?e.props.wrapperCol:c,labelAlign:e.props.labelAlign?e.props.labelAlign:r,labelTextAlign:e.props.labelTextAlign?e.props.labelTextAlign:i,size:e.props.size?e.props.size:o};return _.default.cloneElement(e,(n=t,a={},Object.keys(n).forEach(function(e){void 0!==n[e]&&(a[e]=n[e])}),a))}var n,a;return e}))},g}(_.default.Component),a.propTypes={prefix:l.default.string,inline:l.default.bool,size:l.default.oneOf(["large","medium","small"]),labelAlign:l.default.oneOf(["top","left","inset"]),labelTextAlign:l.default.oneOf(["left","right"]),field:l.default.any,saveField:l.default.func,labelCol:l.default.object,wrapperCol:l.default.object,onSubmit:l.default.func,children:l.default.any,className:l.default.string,style:l.default.object,value:l.default.object,onChange:l.default.func,component:l.default.string,fieldOptions:l.default.object,rtl:l.default.bool},a.defaultProps={prefix:"next-",onSubmit:function(e){e.preventDefault()},size:"medium",labelAlign:"left",onChange:b.func.noop,component:"form",saveField:b.func.noop},a.childContextTypes={_formField:l.default.object,_formSize:l.default.string},o);d.displayName="Form",t.default=d,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,h=d(n(5)),r=d(n(4)),i=d(n(6)),s=d(n(7)),m=d(n(0)),l=d(n(2)),g=d(n(12)),u=d(n(39)),y=n(11),c=d(n(317)),_=n(496);function d(e){return e&&e.__esModule?e:{default:e}}var v=u.default.Row,b=u.default.Col,f=(o=a=function(e){function p(){return(0,r.default)(this,p),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(p,e),p.prototype.getNames=function(){return m.default.Children.toArray(this.props.children).filter(function(e){return e.props&&("name"in e.props||"data-meta"in e.props)}).map(function(e){return e.props.name||e.props.id})},p.prototype.getHelper=function(){var e=this.props.help,t=this.context._formField;return m.default.createElement(c.default,{name:void 0===e?this.getNames():void 0,field:t},e)},p.prototype.getState=function(){var e=this.props.validateState;if(e)return e;if(this.context._formField){var t=this.context._formField.getState,n=this.getNames();return n.length?t(n[0]):""}},p.prototype.getSize=function(){return this.props.size||this.context._formSize},p.prototype.getItemLabel=function(){var e,t=this.props,n=t.id,a=t.required,o=t.asterisk,r=void 0===o?a:o,i=t.label,s=t.labelCol,l=t.wrapperCol,u=t.prefix,c=t.labelAlign,d=t.labelTextAlign;if(!i)return null;var f=m.default.createElement("label",{htmlFor:n||this.getNames()[0],required:r,key:"label"},i),p=(0,g.default)(((e={})[u+"form-item-label"]=!0,e[u+"left"]="left"===d,e));return(l||s)&&"top"!==c?m.default.createElement(b,(0,h.default)({},s,{className:p}),f):m.default.createElement("div",{className:p},f)},p.prototype.getItemWrapper=function(){var n=this,e=this.props,t=e.hasFeedback,a=e.labelCol,o=e.wrapperCol,r=e.children,i=e.extra,s=e.labelAlign,l=e.prefix,u=this.getState(),c={size:this.getSize()};u&&("error"===u||t)&&(c.state=u),"inset"===s&&(c.label=this.getItemLabel());var d=r;"function"==typeof r&&this.context._formField&&(d=r(this.context._formField.getValues()));var f=m.default.Children.map(d,function(e){if(e&&"function"==typeof e.type&&"form_item"!==e.type._typeMark&&"form_error"!==e.type._typeMark){var t=c;return t=n.context._formField&&"name"in e.props&&!("data-meta"in e.props)?n.context._formField.init(e.props.name,(0,h.default)({},(0,_.getFieldInitCfg)(n.props,e.type.displayName),{props:e.props}),c):(0,h.default)({},e.props,t),m.default.cloneElement(e,t)}return e}),p=this.getHelper();return(o||a)&&"top"!==s?m.default.createElement(b,(0,h.default)({},o,{className:l+"form-item-control",key:"item"}),f," ",p," ",i):m.default.createElement("div",{className:l+"form-item-control"},f," ",p," ",i)},p.prototype.render=function(){var e,t=this.props,n=t.className,a=t.labelAlign,o=t.style,r=t.prefix,i=t.wrapperCol,s=t.labelCol,l=this.getState(),u=this.getSize(),c=(0,g.default)(((e={})[r+"form-item"]=!0,e[""+r+a]=a,e["has-"+l]=!!l,e[""+r+u]=!!u,e[""+n]=!!n,e)),d=(i||s)&&"top"!==a?v:"div",f="inset"===a?null:this.getItemLabel();return m.default.createElement(d,(0,h.default)({},y.obj.pickOthers(p.propTypes,this.props),{className:c,style:o}),f,this.getItemWrapper())},p}(m.default.Component),a.propTypes={prefix:l.default.string,rtl:l.default.bool,label:l.default.node,labelCol:l.default.object,wrapperCol:l.default.object,help:l.default.node,extra:l.default.node,validateState:l.default.oneOf(["error","success","loading"]),hasFeedback:l.default.bool,style:l.default.object,id:l.default.string,children:l.default.oneOfType([l.default.node,l.default.func]),size:l.default.oneOf(["large","small","medium"]),labelAlign:l.default.oneOf(["top","left","inset"]),labelTextAlign:l.default.oneOf(["left","right"]),className:l.default.string,required:l.default.bool,asterisk:l.default.bool,requiredMessage:l.default.string,requiredTrigger:l.default.oneOfType([l.default.string,l.default.array]),min:l.default.number,max:l.default.number,minmaxMessage:l.default.string,minmaxTrigger:l.default.oneOfType([l.default.string,l.default.array]),minLength:l.default.number,maxLength:l.default.number,minmaxLengthMessage:l.default.string,minmaxLengthTrigger:l.default.oneOfType([l.default.string,l.default.array]),length:l.default.number,lengthMessage:l.default.string,lengthTrigger:l.default.oneOfType([l.default.string,l.default.array]),pattern:l.default.any,patternMessage:l.default.string,patternTrigger:l.default.oneOfType([l.default.string,l.default.array]),format:l.default.oneOf(["number","email","url","tel"]),formatMessage:l.default.string,formatTrigger:l.default.oneOfType([l.default.string,l.default.array]),validator:l.default.func,validatorTrigger:l.default.oneOfType([l.default.string,l.default.array]),autoValidate:l.default.bool},a.defaultProps={prefix:"next-",hasFeedback:!1},a.contextTypes={_formField:l.default.object,_formSize:l.default.oneOf(["large","small","medium"])},a._typeMark="form_item",o);f.displayName="Item",t.default=f,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,k=u(n(5)),S=u(n(13)),r=u(n(4)),i=u(n(6)),s=u(n(7)),T=n(0),x=u(T),l=u(n(2)),L=u(n(12));function u(e){return e&&e.__esModule?e:{default:e}}var c=(o=a=function(e){function t(){return(0,r.default)(this,t),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e,t,n,a=this.props,o=a.prefix,r=(a.pure,a.wrap),i=a.fixed,s=a.gutter,l=a.fixedWidth,u=a.align,c=a.justify,d=a.hidden,f=a.className,p=a.component,h=a.children,m=a.rtl,g=(0,S.default)(a,["prefix","pure","wrap","fixed","gutter","fixedWidth","align","justify","hidden","className","component","children","rtl"]),y=void 0;if(!0===d)(n={})[o+"row-hidden"]=!0,y=n;else if("string"==typeof d){var _;(_={})[o+"row-"+d+"-hidden"]=!!d,y=_}else Array.isArray(d)&&(y=d.reduce(function(e,t){return e[o+"row-"+t+"-hidden"]=!!t,e},{}));var v=(0,L.default)((0,k.default)(((e={})[o+"row"]=!0,e[o+"row-wrap"]=r,e[o+"row-fixed"]=i,e[o+"row-fixed-"+l]=!!l,e[o+"row-justify-"+c]=!!c,e[o+"row-align-"+u]=!!u,e),y,((t={})[f]=!!f,t))),b=h,M=parseInt(s,10);if(0!==M){var w=M/2+"px";g.style=(0,k.default)({marginLeft:"-"+w,marginRight:"-"+w},g.style||{}),b=T.Children.map(h,function(e){return e&&e.type&&"function"==typeof e.type&&e.type.isNextCol?(0,T.cloneElement)(e,{style:(0,k.default)({paddingLeft:w,paddingRight:w},e.style||{})}):e})}return x.default.createElement(p,(0,k.default)({dir:m?"rtl":"ltr",role:"row",className:v},g),b)},t}(T.Component),a.propTypes={prefix:l.default.string,pure:l.default.bool,rtl:l.default.bool,className:l.default.string,style:l.default.object,children:l.default.node,gutter:l.default.oneOfType([l.default.string,l.default.number]),wrap:l.default.bool,fixed:l.default.bool,fixedWidth:l.default.oneOf(["xxs","xs","s","m","l","xl"]),align:l.default.oneOf(["top","center","bottom","baseline","stretch"]),justify:l.default.oneOf(["start","center","end","space-between","space-around"]),hidden:l.default.oneOfType([l.default.bool,l.default.string,l.default.array]),component:l.default.string},a.defaultProps={prefix:"next-",pure:!1,fixed:!1,gutter:0,wrap:!1,component:"div"},o);c.displayName="Row",t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,M=c(n(5)),w=c(n(51)),k=c(n(13)),r=c(n(4)),i=c(n(6)),s=c(n(7)),l=n(0),S=c(l),u=c(n(2)),T=c(n(12));function c(e){return e&&e.__esModule?e:{default:e}}var x=["xxs","xs","s","m","l","xl"],d=(o=a=function(e){function t(){return(0,r.default)(this,t),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e,t,n,a=this,o=this.props,r=o.prefix,i=(o.pure,o.span),s=o.offset,l=o.fixedSpan,u=o.fixedOffset,c=o.hidden,d=o.align,f=(o.xxs,o.xs,o.s,o.m,o.l,o.xl,o.component),p=o.className,h=o.children,m=o.rtl,g=(0,k.default)(o,["prefix","pure","span","offset","fixedSpan","fixedOffset","hidden","align","xxs","xs","s","m","l","xl","component","className","children","rtl"]),y=x.reduce(function(e,t){var n={};return"object"===(0,w.default)(a.props[t])?n=a.props[t]:n.span=a.props[t],e[r+"col-"+t+"-"+n.span]=!!n.span,e[r+"col-"+t+"-offset-"+n.offset]=!!n.offset,e},{}),_=void 0;if(!0===c)(n={})[r+"col-hidden"]=!0,_=n;else if("string"==typeof c){var v;(v={})[r+"col-"+c+"-hidden"]=!!c,_=v}else Array.isArray(c)&&(_=c.reduce(function(e,t){return e[r+"col-"+t+"-hidden"]=!!t,e},{}));var b=(0,T.default)((0,M.default)(((e={})[r+"col"]=!0,e[r+"col-"+i]=!!i,e[r+"col-fixed-"+l]=!!l,e[r+"col-offset-"+s]=!!s,e[r+"col-offset-fixed-"+u]=!!u,e[r+"col-"+d]=!!d,e),y,_,((t={})[p]=p,t)));return S.default.createElement(f,(0,M.default)({dir:m?"rtl":"ltr",role:"gridcell",className:b},g),h)},t}(l.Component),a.isNextCol=!0,a.propTypes={prefix:u.default.string,pure:u.default.bool,rtl:u.default.bool,className:u.default.string,children:u.default.node,span:u.default.oneOfType([u.default.string,u.default.number]),fixedSpan:u.default.oneOfType([u.default.string,u.default.number]),offset:u.default.oneOfType([u.default.string,u.default.number]),fixedOffset:u.default.oneOfType([u.default.string,u.default.number]),align:u.default.oneOf(["top","center","bottom","baseline","stretch"]),hidden:u.default.oneOfType([u.default.bool,u.default.string,u.default.array]),xxs:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),xs:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),s:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),m:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),l:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),xl:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),component:u.default.string},a.defaultProps={prefix:"next-",pure:!1,component:"div"},o);d.displayName="Col",t.default=d,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(t in e)return e[t]}function s(e,t){var n;return(n={})[e]=t[e],n.message=i(t,e+"Message"),n.trigger=i(t,e+"Trigger"),n}function a(e){var t=[];e.required&&t.push(s("required",e));var n=Number(e.maxLength),a=Number(e.minLength);(a||n)&&t.push({minLength:a,maxLength:n,message:i(e,"minmaxLengthMessage")||i(e,"minLengthMessage")||i(e,"maxLengthMessage"),trigger:i(e,"minmaxLengthTrigger")||i(e,"minLengthTrigger")||i(e,"maxLengthTrigger")}),e.length&&t.push(s("length",e)),e.pattern&&t.push(s("pattern",e)),-1<["number","tel","url","email"].indexOf(e.format)&&t.push(s("format",e));var o=Number(e.max),r=Number(e.min);return(o||r)&&t.push({min:r,max:o,message:i(e,"minmaxMessage")||i(e,"minMessage")||i(e,"maxMessage"),trigger:i(e,"minmaxTrigger")||i(e,"minTrigger")||i(e,"maxTrigger")}),e.validator&&"function"==typeof e.validator&&t.push({validator:e.validator,trigger:i(e,"validatorTrigger")}),t}t.__esModule=!0,t.getRules=a,t.getFieldInitCfg=function(e,t){return{valueName:function(e,t){if(e.valueName)return e.valueName;if("string"==typeof t){var n=t.replace(/Config\(/,"").replace(")","");if(-1!==["Switch","Checkbox","Radio"].indexOf(n))return"checked"}return"value"}(e,t),trigger:e.trigger?e.trigger:"onChange",autoValidate:e.autoValidate,rules:a(e)}}},function(e,t,n){"use strict";t.__esModule=!0;var a,o,r=s(n(5)),l=s(n(4)),u=s(n(6)),c=s(n(7)),d=s(n(0)),i=s(n(2)),f=s(n(19)),p=n(11);function s(e){return e&&e.__esModule?e:{default:e}}var h=(o=a=function(i){function s(){var e,o,t;(0,l.default)(this,s);for(var n=arguments.length,a=Array(n),r=0;r, as child."),a.push(t),e.props.children&&(t.children=n(e.props.children))}}),a}(e.children)),t},s.prototype.fetchInfoFromBinaryChildren=function(e){var a=!1,o=[],r=[];return function t(e,n){r[n]=r[n]||[],e.forEach(function(e){e.children?(a=!0,t(e.children,n+1)):o.push(e),r[n].push(e)})}(e,0),r.forEach(function(e,o){e.forEach(function(e,t){var n=void 0,a=e.children;a&&(n=function t(e,n){return n=n||0,e.forEach(function(e){e.children?n=t(e.children,n):n+=1}),n}(a),e.colSpan=n,r[o][t]=e)})}),{flatChildren:o,groupChildren:r,hasGroupHeader:a}},s.prototype.renderColGroup=function(e){var t=e.map(function(e,t){var n=e.width,a={};return n&&(a={width:n}),C.default.createElement("col",{style:a,key:t})});return C.default.createElement("colgroup",{key:"table-colgroup"},t)},s.prototype.renderTable=function(e,t){if(t.length||!t.length&&!this.props.lockType){var n=this.props,a=n.hasHeader,o=n.components,r=n.prefix,i=n.wrapperContent,s=n.filterParams,l=n.locale,u=n.dataSource,c=n.emptyContent,d=n.loading,f=n.getCellProps,p=n.primaryKey,h=n.getRowProps,m=n.onRowClick,g=n.onRowMouseEnter,y=n.onRowMouseLeave,_=n.pure,v=n.rtl,b=this.state.sort,M=o.Header,w=void 0===M?E.default:M,k=o.Wrapper,S=void 0===k?O.default:k,T=o.Body,x=void 0===T?D.default:T,L=this.renderColGroup(t);return C.default.createElement(S,{colGroup:L,ref:this.getWrapperRef,prefix:r},a?C.default.createElement(w,{prefix:r,rtl:v,pure:_,affixRef:this.getAffixRef,colGroup:L,className:r+"table-header",filterParams:s,columns:e,locale:l,headerCellRef:this.getHeaderCellRef,components:o,onFilter:this.onFilter,sort:b,onResizeChange:this.onResizeChange,onSort:this.onSort}):null,C.default.createElement(x,{prefix:r,rtl:v,pure:_,colGroup:L,className:r+"table-body",components:o,loading:d,emptyContent:c,getCellProps:f,primaryKey:p,getRowProps:h,columns:t,rowRef:this.getRowRef,cellRef:this.getCellRef,onRowClick:m,onRowMouseEnter:g,onRowMouseLeave:y,dataSource:u,locale:l}),i)}return null},s.prototype.render=function(){var e,t=this.normalizeChildrenState(this.props);this.groupChildren=t.groupChildren,this.flatChildren=t.flatChildren;var n=this.renderTable(t.groupChildren,t.flatChildren),a=this.props,o=a.className,r=a.hasBorder,i=a.isZebra,s=a.loading,l=a.hasHeader,u=a.prefix,c=(a.dataSource,a.entireDataSource,a.onSort,a.onResizeChange,a.onRowClick,a.onRowMouseEnter,a.onRowMouseLeave,a.onFilter,a.getRowProps,a.getCellProps,a.primaryKey,a.components,a.wrapperContent,a.lockType,a.locale,a.expandedIndexSimulate,a.refs,a.pure,a.rtl),d=(a.emptyContent,a.filterParams,a.columns,a.loadingComponent),f=void 0===d?b.default:d,p=(0,y.default)(a,["className","hasBorder","isZebra","loading","hasHeader","prefix","dataSource","entireDataSource","onSort","onResizeChange","onRowClick","onRowMouseEnter","onRowMouseLeave","onFilter","getRowProps","getCellProps","primaryKey","components","wrapperContent","lockType","locale","expandedIndexSimulate","refs","pure","rtl","emptyContent","filterParams","columns","loadingComponent"]),h=(0,v.default)(((e={})[u+"table"]=!0,e["only-bottom-border"]=!r,e["no-header"]=!l,e.zebra=i,e[o]=o,e));c&&(p.dir="rtl");var m=C.default.createElement("div",(0,_.default)({className:h},p),n);if(s){var g=u+"table-loading";return C.default.createElement(f,{className:g},m)}return m},s}(C.default.Component),a.Column=g.default,a.ColumnGroup=M.default,a.Header=E.default,a.Body=D.default,a.Wrapper=O.default,a.Row=f.default,a.Cell=p.default,a.Filter=h.default,a.Sort=m.default,a.propTypes={prefix:i.default.string,pure:i.default.bool,rtl:i.default.bool,className:i.default.string,style:i.default.object,dataSource:i.default.array,entireDataSource:i.default.array,onRowClick:i.default.func,onRowMouseEnter:i.default.func,onRowMouseLeave:i.default.func,onSort:i.default.func,onFilter:i.default.func,onResizeChange:i.default.func,getRowProps:i.default.func,getCellProps:i.default.func,hasBorder:i.default.bool,hasHeader:i.default.bool,isZebra:i.default.bool,loading:i.default.bool,loadingComponent:i.default.func,filterParams:i.default.object,sort:i.default.object,locale:i.default.object,components:i.default.object,columns:i.default.array,emptyContent:i.default.node,primaryKey:i.default.string,lockType:i.default.oneOf(["left","right"]),wrapperContent:i.default.any,refs:i.default.object,expandedRowRender:i.default.func,expandedRowIndent:i.default.array,openRowKeys:i.default.array,hasExpandedRowCtrl:i.default.bool,getExpandedColProps:i.default.func,onRowOpen:i.default.func,onExpandedRowClick:i.default.func,fixedHeader:i.default.bool,maxBodyHeight:i.default.oneOfType([i.default.number,i.default.string]),rowSelection:i.default.object,stickyHeader:i.default.bool,offsetTop:i.default.number,affixProps:i.default.object,indent:i.default.number,isTree:i.default.bool,useVirtual:i.default.bool,rowHeight:i.default.oneOfType([i.default.number,i.default.func]),onBodyScroll:i.default.func,expandedIndexSimulate:i.default.bool},a.defaultProps={dataSource:[],onRowClick:S,onRowMouseEnter:S,onRowMouseLeave:S,onSort:S,onFilter:S,onResizeChange:S,getRowProps:S,getCellProps:S,prefix:"next-",hasBorder:!0,hasHeader:!0,isZebra:!1,loading:!1,expandedIndexSimulate:!1,primaryKey:"id",components:{},locale:s.default.Table},a.childContextTypes={notRenderCellIndex:i.default.array,lockType:i.default.oneOf(["left","right"])},a.contextTypes={getTableInstance:i.default.func,getTableInstanceForVirtual:i.default.func},o);T.displayName="Table",t.default=T,e.exports=t.default},function(e,t){var i=Object.prototype.hasOwnProperty;function a(e,t){for(var n in e)if(i.call(e,n))return e[n]===t[n];return!1}function s(e,t){if(!e&&!t||e===t)return!0;if(!e!=!t)return!1;if(e.length!==t.length)return!1;for(var n=0;nt.clientWidth,l=t.scrollHeight>t.clientHeight,u=l?r.width:0,c=i-(s?r.height:0);n&&g.dom.setStyle(n,"max-height",c),a&&g.dom.setStyle(a,"max-height",c),o&&g.dom.setStyle(o,e?"left":"right",u)}},a.prototype.adjustHeaderSize=function(){var u=this;this.isLock()&&this.tableInc.groupChildren.forEach(function(e,t){var n=u.tableInc.groupChildren[t].length-1,a=u.getHeaderCellNode(t,n),o=u.getHeaderCellNode(t,0),r=u.getHeaderCellNode(t,0,"right"),i=u.getHeaderCellNode(t,0,"left");if(a&&r){var s=a.offsetHeight;g.dom.setStyle(r,"height",s),setTimeout(function(){u.tableRightInc.affixRef&&u.tableRightInc.affixRef.getInstance().updatePosition()})}if(o&&i){var l=o.offsetHeight;g.dom.setStyle(i,"height",l),setTimeout(function(){u.tableLeftInc.affixRef&&u.tableLeftInc.affixRef.getInstance().updatePosition()})}})},a.prototype.adjustCellSize=function(){var l=this;this.isLock()&&this.tableInc.props.dataSource.forEach(function(e,t){var n=l.getCellNode(t,0,"left"),a=l.getCellNode(t,0,"right"),o=l.getFirstNormalCellNode(t),r=o&&parseFloat(getComputedStyle(o).height)||0,i=0,s=0;n&&(i=n.offsetHeight),a&&(s=a.offsetHeight),n&&r!==i&&g.dom.setStyle(n,"height",r),a&&r!==s&&g.dom.setStyle(a,"height",r)})},a.prototype.getWrapperNode=function(e){e=e?e.charAt(0).toUpperCase()+e.substr(1):"";try{return(0,l.findDOMNode)(this.refs["lock"+e])}catch(e){return null}},a.prototype.getFirstNormalCellNode=function(e){for(var t=0,n=void 0;n=this.getCellNode(e,t),t++,(!n||n&&n.rowSpan&&1t;);return n},a.prototype.getRowNode=function(e,t){var n=this["table"+(t=t?t.charAt(0).toUpperCase()+t.substr(1):"")+"Inc"];try{return(0,l.findDOMNode)(n.getRowRef(e))}catch(e){return null}},a.prototype.getHeaderCellNode=function(e,t,n){var a=this["table"+(n=n?n.charAt(0).toUpperCase()+n.substr(1):"")+"Inc"];try{return(0,l.findDOMNode)(a.getHeaderCellRef(e,t))}catch(e){return null}},a.prototype.getCellNode=function(e,t,n){var a=this["table"+(n=n?n.charAt(0).toUpperCase()+n.substr(1):"")+"Inc"];try{return(0,l.findDOMNode)(a.getCellRef(e,t))}catch(e){return null}},a.prototype.render=function(){var e=this.props,t=(e.children,e.prefix),n=e.components,a=e.className,o=(0,f.default)(e,["children","prefix","components","className"]),r=this.normalizeChildrenState(this.props),i=r.lockLeftChildren,s=r.lockRightChildren,l=r.children;if(this._notNeedAdjustLockLeft&&(i=[]),this._notNeedAdjustLockRight&&(s=[]),this.lockLeftChildren=i,this.lockRightChildren=s,this.isOriginLock()){var u;(n=(0,p.default)({},n)).Body=n.Body||_.default,n.Header=n.Header||v.default,n.Wrapper=n.Wrapper||b.default,n.Row=n.Row||y.default,a=(0,m.default)(((u={})[t+"table-lock"]=!0,u[a]=a,u));var c=[h.default.createElement(d,(0,p.default)({},o,{key:"lock-left",columns:i,className:t+"table-lock-left",prefix:t,lockType:"left",components:n,ref:"lockLeft",loading:!1})),h.default.createElement(d,(0,p.default)({},o,{key:"lock-right",columns:s,className:t+"table-lock-right",prefix:t,lockType:"right",components:n,ref:"lockRight",loading:!1}))];return h.default.createElement(d,(0,p.default)({},o,{columns:l,prefix:t,wrapperContent:c,components:n,className:a}))}return h.default.createElement(d,this.props)},a}(h.default.Component),e.LockRow=y.default,e.LockBody=_.default,e.LockHeader=v.default,e.propTypes=(0,p.default)({scrollToCol:a.default.number,scrollToRow:a.default.number},d.propTypes),e.defaultProps=(0,p.default)({},d.defaultProps),e.childContextTypes={getTableInstance:a.default.func,getLockNode:a.default.func,onLockBodyScroll:a.default.func,onLockBodyWheel:a.default.func,onRowMouseEnter:a.default.func,onRowMouseLeave:a.default.func},t);return n.displayName="LockTable",(0,c.statics)(n,d),n};var s=n(0),h=d(s),l=n(24),a=d(n(2)),m=d(n(12)),u=d(n(318)),g=n(11),y=d(n(324)),_=d(n(515)),v=d(n(516)),b=d(n(133)),c=n(55);function d(e){return e&&e.__esModule?e:{default:e}}function M(e){return function n(e){return e.map(function(e){var t=(0,p.default)({},e);return e.children&&(e.children=n(e.children)),t})}(e)}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,r=s(n(5)),l=s(n(4)),u=s(n(6)),c=s(n(7)),d=s(n(0)),f=n(24),i=s(n(2)),p=s(n(325));function s(e){return e&&e.__esModule?e:{default:e}}var h=(o=a=function(i){function s(){var e,t,n;(0,l.default)(this,s);for(var a=arguments.length,o=Array(a),r=0;rr.top-c.offset?(n?(d.position="absolute",d.top=o-(r.top-c.offset),f.position="relative"):(d.position="fixed",d.top=c.offset+l.top),p._setAffixStyle(d,!0),p._setContainerStyle(f)):c.bottom&&ox',"Tag"),"readonly"!==n&&"interactive"!==n||o.log.warning("Warning: [ shape="+n+" ] is deprecated at [ Tag ]"),"secondary"===a&&o.log.warning("Warning: [ type=secondary ] is deprecated at [ Tag ]"),["count","marked","value","onChange"].forEach(function(e){e in t&&o.log.warning("Warning: [ "+e+" ] is deprecated at [ Tag ]")}),("selected"in t||"defaultSelected"in t)&&o.log.warning("Warning: [ selected|defaultSelected ] is deprecated at [ Tag ], use [ checked|defaultChecked ] at [ Tag.Selectable ] instead of it"),"closed"in t&&o.log.warning("Warning: [ closed ] is deprecated at [ Tag ], use [ onClose ] at [ Tag.Closeable ] instead of it"),"onSelect"in t&&e("onSelect","","Tag"),"afterClose"in t&&o.log.warning("Warning: [ afterClose ] is deprecated at [ Tag ], use [ afterClose ] at [ Tag.Closeable ] instead of it"),t}});c.Group=a.default.config(i.default),c.Selectable=a.default.config(s.default),c.Closable=a.default.config(l.default),c.Closeable=c.Closable,t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,o,s=h(n(5)),l=h(n(13)),r=h(n(4)),i=h(n(6)),u=h(n(7)),c=n(0),d=h(c),f=h(n(2)),p=h(n(12));function h(e){return e&&e.__esModule?e:{default:e}}var m=(o=a=function(e){function t(){return(0,r.default)(this,t),(0,i.default)(this,e.apply(this,arguments))}return(0,u.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.prefix,a=e.children,o=e.rtl,r=(0,l.default)(e,["className","prefix","children","rtl"]),i=(0,p.default)((n||"next-")+"tag-group",t);return d.default.createElement("div",(0,s.default)({className:i,dir:o?"rtl":void 0},r),a)},t}(c.Component),a.propTypes={prefix:f.default.string,className:f.default.any,children:f.default.node,rtl:f.default.bool},a.defaultProps={prefix:"next-",rtl:!1},o);m.displayName="Group",t.default=m,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,o,r=m(n(5)),i=m(n(4)),s=m(n(6)),l=m(n(7)),u=n(0),c=m(u),d=m(n(2)),f=m(n(12)),p=n(11),h=m(n(136));function m(e){return e&&e.__esModule?e:{default:e}}var g=p.func.noop,y=p.func.bindCtx,_=(o=a=function(n){function a(e){(0,i.default)(this,a);var t=(0,s.default)(this,n.call(this,e));return t.state={checked:"checked"in e?e.checked:e.defaultChecked||!1},y(t,["handleClick"]),t}return(0,l.default)(a,n),a.prototype.handleClick=function(e){if(e&&e.preventDefault(),this.props.disabled)return!1;this.setState(function(e){return{checked:!e.checked}}),this.props.onChange(!this.props.checked,e)},a.prototype.render=function(){var e=p.obj.pickOthers(["checked","defaultChecked","onChange","className","_shape","closable"],this.props),t="checked"in this.props?this.props.checked:this.state.checked,n=(0,f.default)(this.props.className,{checked:t});return c.default.createElement(h.default,(0,r.default)({},e,{role:"checkbox",_shape:"checkable","aria-checked":t,className:n,onClick:this.handleClick}))},a}(u.Component),a.propTypes={checked:d.default.bool,defaultChecked:d.default.bool,onChange:d.default.func,disabled:d.default.bool,className:d.default.any},a.defaultProps={onChange:g},o);_.displayName="Selectable",t.default=_,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,o,r=c(n(4)),i=c(n(6)),s=c(n(7)),l=n(0),d=c(l),u=c(n(2)),f=c(n(136));function c(e){return e&&e.__esModule?e:{default:e}}var p=(o=a=function(e){function t(){return(0,r.default)(this,t),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.className,a=e.closeArea,o=e.onClose,r=e.afterClose,i=e.onClick,s=e.type,l=e.size,u=e.children,c=e.rtl;return d.default.createElement(f.default,{rtl:c,disabled:t,className:n,closeArea:a,onClose:o,afterClose:r,onClick:i,type:s,size:l,closable:!0},u)},t}(l.Component),a.propTypes={disabled:u.default.bool,className:u.default.any,closeArea:u.default.oneOf(["tag","tail"]),onClose:u.default.func,afterClose:u.default.func,onClick:u.default.func,type:u.default.oneOf(["normal","primary"]),size:u.default.oneOf(["small","medium","large"]),children:u.default.any,rtl:u.default.bool},a.defaultProps={disabled:!1,type:"normal"},o);p.displayName="Closeable",t.default=p,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a=i(n(5)),o=i(n(4)),r=n(137);function i(e){return e&&e.__esModule?e:{default:e}}var s=function(){function t(e){(0,o.default)(this,t),this.options=(0,a.default)({filter:r.filter,key:void 0,addonKey:!1,filterLocal:!0},e),this.dataSource=[],this.menuDataSource=[],this.mapDataSource={},this.enabledDataSource=[]}return t.prototype.setOptions=function(e){(0,a.default)(this.options,e)},t.prototype.updateByDS=function(e){var t=1=j.KEYCODE.LEFT&&t<=j.KEYCODE.DOWN&&e.preventDefault();var n=void 0;t===j.KEYCODE.RIGHT||t===j.KEYCODE.DOWN?(n=i.getNextActiveKey(!0),i.handleTriggerEvent(i.props.triggerType,n)):t!==j.KEYCODE.LEFT&&t!==j.KEYCODE.UP||(n=i.getNextActiveKey(!1),i.handleTriggerEvent(i.props.triggerType,n))},i.state={activeKey:i.getDefaultActiveKey(e)},i}return(0,i.default)(D,n),D.prototype.componentWillReceiveProps=function(e){e.activeKey&&this.state.activeKey!==e.activeKey&&this.setState({activeKey:e.activeKey})},D.prototype.getDefaultActiveKey=function(e){var n=e.activeKey||e.defaultActiveKey;return n||N.default.Children.forEach(e.children,function(e,t){N.default.isValidElement(e)&&(null!=n||e.props.disabled||(n=e.key||t))}),n},D.prototype.getNextActiveKey=function(t){var n=this,a=[];N.default.Children.forEach(this.props.children,function(e){N.default.isValidElement(e)&&(e.props.disabled||(t?a.push(e):a.unshift(e)))});var o=a.length,r=o&&a[0].key;return a.forEach(function(e,t){e.key===n.state.activeKey&&(r=t===o-1?a[0].key:a[t+1].key)}),r},D.prototype.setActiveKey=function(e){e===this.state.activeKey||"activeKey"in this.props||this.setState({activeKey:e})},D.prototype.render=function(){var e,t=this.props,n=t.prefix,a=t.animation,o=t.shape,r=t.size,i=t.extra,s=t.excessMode,l=t.tabPosition,u=t.tabRender,c=t.triggerType,d=t.lazyLoad,f=t.unmountInactiveTabs,p=t.popupProps,h=t.navStyle,m=t.navClassName,g=t.contentStyle,y=t.contentClassName,_=t.className,v=t.onClose,b=t.children,M=t.rtl,w=(0,O.default)(t,["prefix","animation","shape","size","extra","excessMode","tabPosition","tabRender","triggerType","lazyLoad","unmountInactiveTabs","popupProps","navStyle","navClassName","contentStyle","contentClassName","className","onClose","children","rtl"]),k=this.state.activeKey,S=(0,A.toArray)(b),T=(0,Y.default)(((e={})[n+"tabs"]=!0,e[n+"tabs-"+o]=o,e[n+"tabs-vertical"]="wrapped"===o&&0<=["left","right"].indexOf(l),e[n+"tabs-"+l]="wrapped"===o,e[""+(n+r)]=r,e),_),x={prefix:n,rtl:M,animation:a,activeKey:k,excessMode:s,extra:i,tabs:S,tabPosition:l,tabRender:u,triggerType:c,popupProps:p,onClose:v,onTriggerEvent:this.handleTriggerEvent,onKeyDown:this.onNavKeyDown,style:h,className:m},L={prefix:n,activeKey:k,lazyLoad:d,unmountInactiveTabs:f,style:g,className:y},C=[N.default.createElement(P.default,(0,E.default)({key:"tab-nav"},x)),N.default.createElement(I.default,(0,E.default)({key:"tab-content"},L),S)];return"bottom"===l&&C.reverse(),N.default.createElement("div",(0,E.default)({dir:M?"rtl":void 0,className:T},j.obj.pickOthers(D.propTypes,w)),C)},D}(l.Component),a.propTypes={prefix:u.default.string,rtl:u.default.bool,activeKey:u.default.oneOfType([u.default.number,u.default.string]),defaultActiveKey:u.default.oneOfType([u.default.number,u.default.string]),shape:u.default.oneOf(["pure","wrapped","text","capsule"]),animation:u.default.bool,excessMode:u.default.oneOf(["slide","dropdown"]),tabPosition:u.default.oneOf(["top","bottom","left","right"]),size:u.default.oneOf(["small","medium"]),triggerType:u.default.oneOf(["hover","click"]),lazyLoad:u.default.bool,unmountInactiveTabs:u.default.bool,navStyle:u.default.object,navClassName:u.default.string,contentStyle:u.default.object,contentClassName:u.default.string,extra:u.default.node,onClick:u.default.func,onChange:u.default.func,onClose:u.default.func,tabRender:u.default.func,children:u.default.any,className:u.default.string},a.defaultProps={prefix:"next-",shape:"pure",size:"medium",animation:!0,tabPosition:"top",excessMode:"slide",triggerType:"click",lazyLoad:!0,unmountInactiveTabs:!1,onClick:f,onChange:f,onClose:f},o);p.displayName="Tab",(t.default=p).Item=c.default,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,o,C=h(n(5)),i=h(n(4)),s=h(n(6)),r=h(n(7)),D=h(n(0)),l=n(24),u=h(n(2)),E=h(n(12)),O=h(n(23)),c=h(n(52)),d=h(n(48)),N=h(n(100)),f=n(11),p=n(332);function h(e){return e&&e.__esModule?e:{default:e}}var Y=function(){},j={float:"right",zIndex:1},P={float:"left",zIndex:1},m=c.default.Popup,g=(o=a=function(n){function a(e,t){(0,i.default)(this,a);var r=(0,s.default)(this,n.call(this,e,t));return r.removeTab=function(e,t){t&&t.stopPropagation(),r.props.onClose(e)},r.defaultTabTemplateRender=function(t,e){var n=e.prefix,a=e.title,o=e.closeable?D.default.createElement(O.default,{type:"close",onClick:function(e){return r.removeTab(t,e)},className:n+"tabs-tab-close"}):null;return D.default.createElement("div",{className:r.props.prefix+"tabs-tab-inner"},a,o)},r.scrollToActiveTab=function(){if(r.activeTab&&"slide"===r.props.excessMode){var e=(0,p.getOffsetWH)(r.activeTab),t=(0,p.getOffsetWH)(r.wrapper),n=(0,p.getOffsetLT)(r.activeTab),a=(0,p.getOffsetLT)(r.wrapper),o=r.offset;a+t<=n||n+e<=a||a+tn&&(t.current=n),this.setState(t),this.props.onPageSizeChange(e)},l.prototype.renderPageTotal=function(){var e=this.props,t=e.prefix,n=e.total,a=e.totalRender,o=this.state,r=o.currentPageSize,i=o.current,s=[(i-1)*r+1,i*r];return j.default.createElement("div",{className:t+"pagination-total"},a(n,s))},l.prototype.renderPageItem=function(e){var t,n=this.props,a=n.prefix,o=n.size,r=n.link,i=n.pageNumberRender,s=n.total,l=n.pageSize,u=n.locale,c=this.state.current,d=this.getTotalPage(s,l),f=parseInt(e,10)===c,p={size:o,className:(0,P.default)((t={},t[a+"pagination-item"]=!0,t[a+"current"]=f,t)),onClick:f?v:this.onPageItemClick.bind(this,e)};return r&&(p.component="a",p.href=r.replace("{page}",e)),j.default.createElement(h.default,(0,Y.default)({"aria-label":m.str.template(u.total,{current:e,total:d})},p,{key:e}),i(e))},l.prototype.renderPageFirst=function(e){var t,n=this.props,a=n.prefix,o=n.size,r=n.shape,i=n.locale,s={disabled:e<=1,size:o,className:(0,P.default)((t={},t[a+"pagination-item"]=!0,t[a+"prev"]=!0,t)),onClick:this.onPageItemClick.bind(this,e-1)},l=j.default.createElement(d.default,{type:"arrow-left"});return j.default.createElement(h.default,(0,Y.default)({},s,{"aria-label":m.str.template(i.labelPrev,{current:e})}),l,"arrow-only"===r||"arrow-prev-only"===r||"no-border"===r?"":i.prev)},l.prototype.renderPageLast=function(e,t){var n,a=this.props,o=a.prefix,r=a.size,i=a.shape,s=a.locale,l={disabled:t<=e,size:r,className:(0,P.default)((n={},n[o+"pagination-item"]=!0,n[o+"next"]=!0,n)),onClick:this.onPageItemClick.bind(this,e+1)},u=j.default.createElement(d.default,{type:"arrow-right"});return j.default.createElement(h.default,(0,Y.default)({},l,{"aria-label":m.str.template(s.labelNext,{current:e})}),"arrow-only"===i||"no-border"===i?"":s.next,u)},l.prototype.renderPageEllipsis=function(e){var t=this.props.prefix;return j.default.createElement(d.default,{className:t+"pagination-ellipsis",type:"ellipsis",key:"ellipsis-"+e})},l.prototype.renderPageJump=function(){var t=this,e=this.props,n=e.prefix,a=e.size,o=e.locale;return[j.default.createElement("span",{className:n+"pagination-jump-text"},o.goTo),j.default.createElement(f.default,{className:n+"pagination-jump-input",type:"text",size:a,onChange:this.onInputChange.bind(this),onKeyDown:function(e){e.keyCode===m.KEYCODE.ENTER&&t.onJump(e)}}),j.default.createElement("span",{className:n+"pagination-jump-text"},o.page),j.default.createElement(h.default,{className:n+"pagination-jump-go",size:a,onClick:this.onJump},o.go)]},l.prototype.renderPageDisplay=function(e,t){var n=this.props,a=n.prefix,o=n.pageNumberRender;return j.default.createElement("span",{className:a+"pagination-display"},j.default.createElement("em",null,o(e)),"/",o(t))},l.prototype.renderPageList=function(e,t){var n=this.props,a=n.prefix,o=n.pageShowCount,r=[];if(t<=o)for(var i=1;i<=t;i++)r.push(this.renderPageItem(i));else{var s=o-3,l=parseInt(s/2,10),u=void 0,c=void 0;r.push(this.renderPageItem(1)),c=e+l,(u=e-l)<=1&&(c=(u=2)+s),2=e.length&&-1=e.children.length)this.update(e),this.changeSlide({message:"index",index:e.children.length-e.slidesToShow,currentSlide:this.state.currentSlide});else{var t=["children"];!u.obj.shallowEqual(u.obj.pickOthers(t,this.props),u.obj.pickOthers(t,e))&&this.update(e)}},a.prototype.componentDidUpdate=function(){this.adaptHeight()},a.prototype.componentWillUnmount=function(){this.animationEndCallback&&clearTimeout(this.animationEndCallback),u.events.off(window,"resize",this.onWindowResized),this.state.autoPlayTimer&&clearInterval(this.state.autoPlayTimer)},a.prototype.onWindowResized=function(){this.update(this.props),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},a.prototype.slickGoTo=function(e){"number"==typeof e&&this.changeSlide({message:"index",index:e,currentSlide:this.state.currentSlide})},a.prototype.onEnterArrow=function(e){this.arrowHoverHandler(e)},a.prototype.onLeaveArrow=function(){this.arrowHoverHandler()},a.prototype._instanceRefHandler=function(e,t){this[e]=t},a.prototype.render=function(){var e=this.props,t=e.prefix,n=e.animation,a=e.arrows,o=e.arrowSize,r=e.arrowPosition,i=e.arrowDirection,s=e.dots,l=e.dotsClass,u=e.cssEase,c=e.speed,d=e.infinite,f=e.centerMode,p=e.centerPadding,h=e.lazyLoad,m=e.dotsDirection,g=e.rtl,y=e.slidesToShow,_=e.slidesToScroll,v=e.variableWidth,b=e.vertical,M=e.verticalSwiping,w=e.focusOnSelect,k=e.children,S=e.dotsRender,T=e.triggerType,x=this.state,L=x.currentSlide,C=x.lazyLoadedList,D=x.slideCount,E=x.slideWidth,O=x.slideHeight,N=x.trackStyle,Y=x.listHeight,j=x.dragging,P={prefix:t,animation:n,cssEase:u,speed:c,infinite:d,centerMode:f,focusOnSelect:w?this.selectHandler:null,currentSlide:L,lazyLoad:h,lazyLoadedList:C,rtl:g,slideWidth:E,slideHeight:O,slidesToShow:y,slidesToScroll:_,slideCount:D,trackStyle:N,variableWidth:v,vertical:b,verticalSwiping:M,triggerType:T},I=void 0;if(!0===s&&yt.startX?1:-1);!0===this.props.verticalSwiping&&(t.swipeLength=Math.round(Math.sqrt(Math.pow(t.curY-t.startY,2))),a=t.curY>t.startY?1:-1);var o=this.state.currentSlide,r=Math.ceil(this.state.slideCount/this.props.slidesToScroll),i=this.swipeDirection(this.state.touchObject),s=t.swipeLength;!1===this.props.infinite&&(0===o&&"right"===i||r<=o+1&&"left"===i)&&(s=t.swipeLength*this.props.edgeFriction,!1===this.state.edgeDragged&&this.props.edgeEvent&&(this.props.edgeEvent(i),this.setState({edgeDragged:!0}))),!1===this.state.swiped&&this.props.swipeEvent&&(this.props.swipeEvent(i),this.setState({swiped:!0}));var l=n+s*a;this.setState({touchObject:t,swipeLeft:l,trackStyle:(0,c.getTrackCSS)((0,u.default)({left:l},this.props,this.state))}),Math.abs(t.curX-t.startX)<.8*Math.abs(t.curY-t.startY)||4t[t.length-1])e=t[t.length-1];else for(var a in t){if(e-1*t.state.swipeLeft)return a=e,!1}else if(e.offsetLeft-n+t.getWidth(e)/2>-1*t.state.swipeLeft)return a=e,!1;return!0}),Math.abs(a.dataset.index-this.state.currentSlide)||1}return this.props.slidesToScroll},swipeEnd:function(e){if(this.state.dragging){var t=this.state.touchObject,n=this.state.listWidth/this.props.touchThreshold,a=this.swipeDirection(t);if(this.props.verticalSwiping&&(n=this.state.listHeight/this.props.touchThreshold),this.setState({dragging:!1,edgeDragged:!1,swiped:!1,swipeLeft:null,touchObject:{}}),t.swipeLength)if(t.swipeLength>n){e.preventDefault();var o=void 0,r=void 0;switch(a){case"left":case"down":r=this.state.currentSlide+this.getSlideCount(),o=this.props.swipeToSlide?this.checkNavigable(r):r,this.setState({currentDirection:0});break;case"right":case"up":r=this.state.currentSlide-this.getSlideCount(),o=this.props.swipeToSlide?this.checkNavigable(r):r,this.setState({currentDirection:1});break;default:o=this.state.currentSlide}this.slideHandler(o)}else{var i=(0,c.getTrackLeft)((0,u.default)({slideIndex:this.state.currentSlide,trackRef:this.track},this.props,this.state));this.setState({trackStyle:(0,c.getTrackAnimateCSS)((0,u.default)({left:i},this.props,this.state))})}}else this.props.swipe&&e.preventDefault()},onInnerSliderEnter:function(){this.props.autoplay&&this.props.pauseOnHover&&this.pause()},onInnerSliderLeave:function(){this.props.autoplay&&this.props.pauseOnHover&&this.autoPlay()}};t.default=i,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var h=a(n(5)),d=a(n(0)),f=a(n(24)),m=n(334);function a(e){return e&&e.__esModule?e:{default:e}}var o={initialize:function(n){var a=this,e=f.default.findDOMNode(this.list),t=d.default.Children.count(n.children),o=this.getWidth(e),r=this.getWidth(f.default.findDOMNode(this.track)),i=void 0;n.vertical?i=o:i=(o-(n.centerMode&&2*parseInt(n.centerPadding)))/n.slidesToShow;var s=this.getHeight(e.querySelector('[data-index="0"]')),l=s*n.slidesToShow,u=n.slidesToShow||1,c=n.rtl?t-1-(u-1)-n.defaultActiveIndex:n.defaultActiveIndex;this.setState({slideCount:t,slideWidth:i,listWidth:o,trackWidth:r,currentSlide:c,slideHeight:s,listHeight:l},function(){var e=(0,m.getTrackLeft)((0,h.default)({slideIndex:a.state.currentSlide,trackRef:a.track},n,a.state)),t=(0,m.getTrackCSS)((0,h.default)({left:e},n,a.state));a.setState({trackStyle:t}),a.autoPlay()})},update:function(e){this.initialize(e)},getWidth:function(e){return e.getBoundingClientRect().width||e.offsetWidth},getHeight:function(e){return e.getBoundingClientRect().height||e.offsetHeight},adaptHeight:function(){if(this.props.adaptiveHeight){var e='[data-index="'+this.state.currentSlide+'"]';if(this.list){var t=f.default.findDOMNode(this.list),n=t.querySelector(e).offsetHeight;t.style.height=n+"px"}}},canGoNext:function(e){var t=!0;return e.infinite||(e.centerMode?e.currentSlide>=e.slideCount-1&&(t=!1):(e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1)),t},slideHandler:function(e){var t=this,n=this.props.rtl,a=void 0,o=void 0,r=void 0;if(!this.props.waitForAnimate||!this.state.animating){if("fade"===this.props.animation){if(o=this.state.currentSlide,!1===this.props.infinite&&(e<0||e>=this.state.slideCount))return;return a=e<0?e+this.state.slideCount:e>=this.state.slideCount?e-this.state.slideCount:e,this.props.lazyLoad&&this.state.lazyLoadedList.indexOf(a)<0&&this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(a)}),r=function(){t.setState({animating:!1}),t.props.onChange(a),delete t.animationEndCallback},this.setState({animating:!0,currentSlide:a},function(){this.animationEndCallback=setTimeout(r,this.props.speed+20)}),void this.autoPlay()}a=e,n?a<0?!1===this.props.infinite?o=0:this.state.slideCount%this.props.slidesToScroll!=0?a+this.props.slidesToScroll<=0?(o=this.state.slideCount+a,a=this.state.slideCount-this.props.slidesToScroll):o=a=0:o=this.state.slideCount+a:o=a>=this.state.slideCount?!1===this.props.infinite?this.state.slideCount-this.props.slidesToShow:this.state.slideCount%this.props.slidesToScroll!=0?0:a-this.state.slideCount:a:o=a<0?!1===this.props.infinite?0:this.state.slideCount%this.props.slidesToScroll!=0?this.state.slideCount-this.state.slideCount%this.props.slidesToScroll:this.state.slideCount+a:a>=this.state.slideCount?!1===this.props.infinite?this.state.slideCount-this.props.slidesToShow:this.state.slideCount%this.props.slidesToScroll!=0?0:a-this.state.slideCount:a;var i=(0,m.getTrackLeft)((0,h.default)({slideIndex:a,trackRef:this.track},this.props,this.state)),s=(0,m.getTrackLeft)((0,h.default)({slideIndex:o,trackRef:this.track},this.props,this.state));if(!1===this.props.infinite&&(i=s),this.props.lazyLoad){for(var l=!0,u=[],c=a<0?this.state.slideCount+a:o,d=c;d=this.state.slideCount?2*this.state.slideCount-d-1:this.state.slideCount-d-1),(l=l&&0<=this.state.lazyLoadedList.indexOf(f))||u.push(f)}l||this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(u)})}if(!1===this.props.useCSS)this.setState({currentSlide:o,trackStyle:(0,m.getTrackCSS)((0,h.default)({left:s},this.props,this.state))},function(){t.props.onChange(o)});else{var p={animating:!1,currentSlide:o,trackStyle:(0,m.getTrackCSS)((0,h.default)({left:s},this.props,this.state)),swipeLeft:null};r=function(){t.setState(p),t.props.onChange(o),delete t.animationEndCallback},this.setState({animating:!0,currentSlide:o,trackStyle:(0,m.getTrackAnimateCSS)((0,h.default)({left:i},this.props,this.state))},function(){this.animationEndCallback=setTimeout(r,this.props.speed+20)})}this.autoPlay()}},arrowHoverHandler:function(e){var t=(0,m.getTrackLeft)((0,h.default)({slideIndex:this.state.currentSlide,trackRef:this.track},this.props,this.state)),n=void 0;n="next"===e?t-30:"prev"===e?t+30:t,this.setState({trackStyle:(0,m.getTrackAnimateCSS)((0,h.default)({left:n},this.props,this.state))})},swipeDirection:function(e){var t=void 0,n=e.startX-e.curX,a=e.startY-e.curY,o=Math.atan2(a,n);return(t=Math.round(180*o/Math.PI))<0&&(t=360-Math.abs(t)),t<=45&&0<=t||t<=360&&315<=t?!1===this.props.rtl?"left":"right":135<=t&&t<=225?!1===this.props.rtl?"right":"left":!0===this.props.verticalSwiping?35<=t&&t<=135?"down":"up":"vertical"},play:function(){var e=void 0;if(!this.hasMounted)return!1;if(this.props.rtl)e=this.state.currentSlide-this.props.slidesToScroll;else{if(!this.canGoNext((0,h.default)({},this.props,this.state)))return!1;e=this.state.currentSlide+this.props.slidesToScroll}this.slideHandler(e)},autoPlay:function(){this.state.autoPlayTimer&&clearTimeout(this.state.autoPlayTimer),this.props.autoplay&&this.setState({autoPlayTimer:setTimeout(this.play.bind(this),this.props.autoplaySpeed)})},pause:function(){this.state.autoPlayTimer&&(clearTimeout(this.state.autoPlayTimer),this.setState({autoPlayTimer:null}))}};t.default=o,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,m=c(n(5)),r=c(n(4)),i=c(n(6)),s=c(n(7)),l=n(0),g=c(l),u=c(n(2)),y=c(n(12)),_=c(n(23)),v=n(11);function c(e){return e&&e.__esModule?e:{default:e}}var d=v.func.noop,f=(o=a=function(e){function h(){return(0,r.default)(this,h),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(h,e),h.isDisabled=function(e){var t=e.infinite,n=e.type,a=e.centerMode,o=e.currentSlide,r=e.slideCount,i=e.slidesToShow;return!t&&(r<=i||("prev"===n?o<=0:!!(a&&r-1<=o)||r-i<=o))},h.prototype.handleClick=function(e,t){t&&t.preventDefault(),"prev"===e.message&&(e.message="previous"),this.props.clickHandler(e,t)},h.prototype.render=function(){var e=this.props,t=e.prefix,n=e.type,a=e.arrowSize,o=e.arrowPosition,r=e.arrowDirection,i=e.onMouseEnter,s=e.onMouseLeave,l=e.children,u=v.obj.pickOthers(h.propTypes,this.props),c=h.ARROW_ICON_TYPES[r][n],d=h.isDisabled(this.props),f=(0,y.default)([t+"slick-arrow",t+"slick-"+n,o,a,r],{disabled:d}),p=(0,m.default)({},u,{key:n,"data-role":"none",className:f,style:{display:"block"},onClick:d?null:this.handleClick.bind(this,{message:n}),onMouseEnter:d?null:i,onMouseLeave:d?null:s});return l?g.default.cloneElement(g.default.Children.only(l),p):g.default.createElement("button",(0,m.default)({type:"button",role:"button"},p),g.default.createElement(_.default,{type:c}))},h}(l.Component),a.propTypes={prefix:u.default.string,rtl:u.default.bool,type:u.default.oneOf(["prev","next"]).isRequired,centerMode:u.default.bool,currentSlide:u.default.number,infinite:u.default.bool,clickHandler:u.default.func,slideCount:u.default.number,slidesToShow:u.default.number,arrow:u.default.element,arrowSize:u.default.string,arrowPosition:u.default.string,arrowDirection:u.default.oneOf(["hoz","ver"]),onMouseEnter:u.default.func,onMouseLeave:u.default.func,children:u.default.node},a.defaultProps={onMouseEnter:d,onMouseLeave:d},a.ARROW_ICON_TYPES={hoz:{prev:"arrow-left",next:"arrow-right"},ver:{prev:"arrow-up",next:"arrow-down"}},o);f.displayName="Arrow",t.default=f,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,r=c(n(4)),i=c(n(6)),s=c(n(7)),S=c(n(5)),l=n(0),T=c(l),u=c(n(2)),x=c(n(12)),L=n(11);function c(e){return e&&e.__esModule?e:{default:e}}var C=function(e,t){return null===e.key||void 0===e.key?t:e.key},d=function(y){var _=void 0,v=[],b=[],M=[],w=T.default.Children.count(y.children),k=void 0;return T.default.Children.forEach(y.children,function(t,e){var n={message:"children",index:e,slidesToScroll:y.slidesToScroll,currentSlide:y.currentSlide};k=!y.lazyLoad|(y.lazyLoad&&0<=y.lazyLoadedList.indexOf(e))?t:t.key?T.default.createElement("div",{key:t.key}):T.default.createElement("div",null);var a,o,r,i,s,l,u,c,d,f,p=(a=(0,S.default)({},y,{activeIndex:e}),o={},void 0!==a.variableWidth&&!1!==a.variableWidth||(o.width=a.slideWidth),"fade"===a.animation&&(o.position="relative",o.opacity=a.currentSlide===a.activeIndex?1:0,o.visibility=a.currentSlide>=a.activeIndex?"visible":"hidden",o.transition="opacity "+a.speed+"ms "+a.cssEase,o.WebkitTransition="opacity "+a.speed+"ms "+a.cssEase,a.vertical?o.top=-a.activeIndex*a.slideHeight:o.left=-a.activeIndex*a.slideWidth),a.vertical&&(o.width="100%"),o),h=(r=(0,S.default)({activeIndex:e},y),s=r.prefix,d=c=u=l=void 0,f=(d=r.rtl?r.slideCount-1-r.activeIndex:r.activeIndex)<0||d>=r.slideCount,r.centerMode?(c=Math.floor(r.slidesToShow/2),u=(d-r.currentSlide)%r.slideCount==0,d>r.currentSlide-c-1&&d<=r.currentSlide+c&&(l=!0)):l=r.currentSlide<=d&&d outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(d.b)(e.to),n=Object(d.b)(this.props.to);Object(d.c)(t,n)?l()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"==typeof n?g(n,t.params):y({},n,{pathname:g(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(o.a.Component);_.propTypes={computedMatch:i.a.object,push:i.a.bool,from:i.a.string,to:i.a.oneOfType([i.a.string,i.a.object]).isRequired},_.defaultProps={push:!1},_.contextTypes={router:i.a.shape({history:i.a.shape({push:i.a.func.isRequired,replace:i.a.func.isRequired}).isRequired,staticContext:i.a.object}).isRequired};var v=_;t.a=v},function(e,t,n){"use strict";var a=n(43),o=n.n(a),r=n(0),s=n.n(r),i=n(2),l=n.n(i),u=n(86),c=n(38),d=n.n(c),f=Object.assign||function(e){for(var t=1;t may have only one child element"),this.unlisten=a.listen(function(){e.setState({match:e.computeMatch(a.location.pathname)})})},i.prototype.componentWillReceiveProps=function(e){o()(this.props.history===e.history,"You cannot change ")},i.prototype.componentWillUnmount=function(){this.unlisten()},i.prototype.render=function(){var e=this.props.children;return e?s.a.Children.only(e):null},i}(s.a.Component);h.propTypes={history:l.a.object.isRequired,children:l.a.node},h.contextTypes={router:l.a.object},h.childContextTypes={router:l.a.object.isRequired};var m=h;function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y=function(r){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,a=Array(n),o=0;o ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},i.prototype.render=function(){return s.a.createElement(m,{history:this.history,children:this.props.children})},i}(s.a.Component);y.propTypes={basename:l.a.string,getUserConfirmation:l.a.func,hashType:l.a.oneOf(["hashbang","noslash","slash"]),children:l.a.node};t.a=y},function(e,t,n){"use strict";var a=n(0),f=n.n(a),o=n(2),r=n.n(o),i=n(43),s=n.n(i),l=n(38),u=n.n(l),p=n(107);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){u()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){s()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),s()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var l=this.context.router.route,e=this.props.children,u=this.props.location||l.location,c=void 0,d=void 0;return f.a.Children.forEach(e,function(e){if(null==c&&f.a.isValidElement(e)){var t=e.props,n=t.path,a=t.exact,o=t.strict,r=t.sensitive,i=t.from,s=n||i;d=e,c=Object(p.a)(u.pathname,{path:s,exact:a,strict:o,sensitive:r},l.match)}}),c?f.a.cloneElement(d,{location:u,computedMatch:c}):null},t}(f.a.Component);c.contextTypes={router:r.a.shape({route:r.a.object.isRequired}).isRequired},c.propTypes={children:r.a.node,location:r.a.object};var d=c;t.a=d}]); \ No newline at end of file +e.exports=function(e){return null!=e&&(n(e)||"function"==typeof(t=e).readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))||!!e._isBuffer);var t}},function(e,t,n){"use strict";var a=n(131),o=n(47),r=n(464),i=n(465);function s(e){this.defaults=e,this.interceptors={request:new r,response:new r}}s.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(a,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[i,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},o.forEach(["delete","get","head","options"],function(n){s.prototype[n]=function(e,t){return this.request(o.merge(t||{},{method:n,url:e}))}}),o.forEach(["post","put","patch"],function(a){s.prototype[a]=function(e,t,n){return this.request(o.merge(n||{},{method:a,url:e,data:t}))}}),e.exports=s},function(e,t){var n,a,o=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(e){n=r}try{a="function"==typeof clearTimeout?clearTimeout:i}catch(e){a=i}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d>8-r%1*8)){if(255<(n=a.charCodeAt(r+=.75)))throw new s;t=t<<8|n}return o}},function(e,t,n){"use strict";var s=n(47);e.exports=s.isStandardBrowserEnv()?{write:function(e,t,n,a,o,r){var i=[];i.push(e+"="+encodeURIComponent(t)),s.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),s.isString(a)&&i.push("path="+a),s.isString(o)&&i.push("domain="+o),!0===r&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var a=n(47);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(t){a.forEach(this.handlers,function(e){null!==e&&t(e)})},e.exports=o},function(e,t,n){"use strict";var a=n(47),o=n(466),r=n(312),i=n(131),s=n(467),l=n(468);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=l(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=a.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),a.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||i.adapter)(t).then(function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return r(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(e,t,n){"use strict";var a=n(47);e.exports=function(t,n,e){return a.forEach(e,function(e){t=e(t,n)}),t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var a=n(313);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new a(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},e.exports=o},function(e,t,n){"use strict";e.exports=function(t){return function(e){return t.apply(null,e)}}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,M=d(n(5)),r=d(n(4)),i=d(n(6)),s=d(n(7)),w=d(n(0)),l=d(n(24)),u=d(n(2)),k=d(n(12)),S=d(n(23)),T=d(n(19)),c=d(n(45));function d(e){return e&&e.__esModule?e:{default:e}}var x=n(11).obj.pickOthers,f=(o=a=function(a){function b(e,t){(0,r.default)(this,b);var n=(0,i.default)(this,a.call(this,e,t));return n.handleToggle=function(){n.setState(function(e){return{expand:!e.expand}})},n._contentRefHandler=function(e){n.content=e},n.saveFooter=function(e){n.footer=e},n.state={needMore:!1,expand:!1,contentHeight:"auto"},n}return(0,s.default)(b,a),b.prototype.componentDidMount=function(){this._setNeedMore(),this._setContentHeight()},b.prototype.componentDidUpdate=function(){this._setContentHeight()},b.prototype._setNeedMore=function(){var e=this.props.contentHeight,t=this._getNodeChildrenHeight(this.content);this.setState({needMore:"auto"!==e&&e=a.length)return n;var i=a[o],s=e(t&&t[i],n,a,o+1);if(!t){var l=isNaN(i)?{}:[];return l[i]=s,l}if(Array.isArray(t)){var u=[].concat(t);return u[i]=s,u}return(0,c.default)({},t,((r={})[i]=s,r))}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,y=c(n(5)),r=c(n(4)),i=c(n(6)),s=c(n(7)),_=c(n(0)),l=c(n(2)),v=c(n(12)),b=n(11),u=c(n(28));function c(e){return e&&e.__esModule?e:{default:e}}var d=(o=a=function(o){function g(e){(0,r.default)(this,g);var n=(0,i.default)(this,o.call(this,e));n.onChange=function(e,t){n.props.onChange(n._formField.getValues(),{name:e,value:t,field:n._formField})};var t=(0,y.default)({},e.fieldOptions,{onChange:n.onChange});if(e.field){n._formField=e.field;var a=n._formField.options.onChange;t.onChange=b.func.makeChain(a,n.onChange),n._formField.setOptions&&n._formField.setOptions(t)}else"value"in e&&(t.values=e.value),n._formField=new u.default(n,t);return e.saveField(n._formField),n}return(0,s.default)(g,o),g.prototype.getChildContext=function(){return{_formField:this.props.field?this.props.field:this._formField,_formSize:this.props.size}},g.prototype.componentWillReceiveProps=function(e){"value"in e&&this._formField.setValues(e.value),"error"in e&&this._formField.setErrors(e.error)},g.prototype.render=function(){var e,t=this.props,n=t.className,a=t.inline,o=t.size,r=t.labelAlign,i=t.labelTextAlign,s=t.onSubmit,l=t.children,u=t.labelCol,c=t.wrapperCol,d=t.style,f=t.prefix,p=t.rtl,h=t.component,m=(0,v.default)(((e={})[f+"form"]=!0,e[f+"inline"]=a,e[""+f+o]=o,e[n]=!!n,e));return _.default.createElement(h,(0,y.default)({role:"grid"},b.obj.pickOthers(g.propTypes,this.props),{className:m,style:d,dir:p?"rtl":void 0,onSubmit:s}),_.default.Children.map(l,function(e){if(e&&"function"==typeof e.type&&"form_item"===e.type._typeMark){var t={labelCol:e.props.labelCol?e.props.labelCol:u,wrapperCol:e.props.wrapperCol?e.props.wrapperCol:c,labelAlign:e.props.labelAlign?e.props.labelAlign:r,labelTextAlign:e.props.labelTextAlign?e.props.labelTextAlign:i,size:e.props.size?e.props.size:o};return _.default.cloneElement(e,(n=t,a={},Object.keys(n).forEach(function(e){void 0!==n[e]&&(a[e]=n[e])}),a))}var n,a;return e}))},g}(_.default.Component),a.propTypes={prefix:l.default.string,inline:l.default.bool,size:l.default.oneOf(["large","medium","small"]),labelAlign:l.default.oneOf(["top","left","inset"]),labelTextAlign:l.default.oneOf(["left","right"]),field:l.default.any,saveField:l.default.func,labelCol:l.default.object,wrapperCol:l.default.object,onSubmit:l.default.func,children:l.default.any,className:l.default.string,style:l.default.object,value:l.default.object,onChange:l.default.func,component:l.default.string,fieldOptions:l.default.object,rtl:l.default.bool},a.defaultProps={prefix:"next-",onSubmit:function(e){e.preventDefault()},size:"medium",labelAlign:"left",onChange:b.func.noop,component:"form",saveField:b.func.noop},a.childContextTypes={_formField:l.default.object,_formSize:l.default.string},o);d.displayName="Form",t.default=d,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,h=d(n(5)),r=d(n(4)),i=d(n(6)),s=d(n(7)),m=d(n(0)),l=d(n(2)),g=d(n(12)),u=d(n(39)),y=n(11),c=d(n(317)),_=n(496);function d(e){return e&&e.__esModule?e:{default:e}}var v=u.default.Row,b=u.default.Col,f=(o=a=function(e){function p(){return(0,r.default)(this,p),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(p,e),p.prototype.getNames=function(){return m.default.Children.toArray(this.props.children).filter(function(e){return e.props&&("name"in e.props||"data-meta"in e.props)}).map(function(e){return e.props.name||e.props.id})},p.prototype.getHelper=function(){var e=this.props.help,t=this.context._formField;return m.default.createElement(c.default,{name:void 0===e?this.getNames():void 0,field:t},e)},p.prototype.getState=function(){var e=this.props.validateState;if(e)return e;if(this.context._formField){var t=this.context._formField.getState,n=this.getNames();return n.length?t(n[0]):""}},p.prototype.getSize=function(){return this.props.size||this.context._formSize},p.prototype.getItemLabel=function(){var e,t=this.props,n=t.id,a=t.required,o=t.asterisk,r=void 0===o?a:o,i=t.label,s=t.labelCol,l=t.wrapperCol,u=t.prefix,c=t.labelAlign,d=t.labelTextAlign;if(!i)return null;var f=m.default.createElement("label",{htmlFor:n||this.getNames()[0],required:r,key:"label"},i),p=(0,g.default)(((e={})[u+"form-item-label"]=!0,e[u+"left"]="left"===d,e));return(l||s)&&"top"!==c?m.default.createElement(b,(0,h.default)({},s,{className:p}),f):m.default.createElement("div",{className:p},f)},p.prototype.getItemWrapper=function(){var n=this,e=this.props,t=e.hasFeedback,a=e.labelCol,o=e.wrapperCol,r=e.children,i=e.extra,s=e.labelAlign,l=e.prefix,u=this.getState(),c={size:this.getSize()};u&&("error"===u||t)&&(c.state=u),"inset"===s&&(c.label=this.getItemLabel());var d=r;"function"==typeof r&&this.context._formField&&(d=r(this.context._formField.getValues()));var f=m.default.Children.map(d,function(e){if(e&&"function"==typeof e.type&&"form_item"!==e.type._typeMark&&"form_error"!==e.type._typeMark){var t=c;return t=n.context._formField&&"name"in e.props&&!("data-meta"in e.props)?n.context._formField.init(e.props.name,(0,h.default)({},(0,_.getFieldInitCfg)(n.props,e.type.displayName),{props:e.props}),c):(0,h.default)({},e.props,t),m.default.cloneElement(e,t)}return e}),p=this.getHelper();return(o||a)&&"top"!==s?m.default.createElement(b,(0,h.default)({},o,{className:l+"form-item-control",key:"item"}),f," ",p," ",i):m.default.createElement("div",{className:l+"form-item-control"},f," ",p," ",i)},p.prototype.render=function(){var e,t=this.props,n=t.className,a=t.labelAlign,o=t.style,r=t.prefix,i=t.wrapperCol,s=t.labelCol,l=this.getState(),u=this.getSize(),c=(0,g.default)(((e={})[r+"form-item"]=!0,e[""+r+a]=a,e["has-"+l]=!!l,e[""+r+u]=!!u,e[""+n]=!!n,e)),d=(i||s)&&"top"!==a?v:"div",f="inset"===a?null:this.getItemLabel();return m.default.createElement(d,(0,h.default)({},y.obj.pickOthers(p.propTypes,this.props),{className:c,style:o}),f,this.getItemWrapper())},p}(m.default.Component),a.propTypes={prefix:l.default.string,rtl:l.default.bool,label:l.default.node,labelCol:l.default.object,wrapperCol:l.default.object,help:l.default.node,extra:l.default.node,validateState:l.default.oneOf(["error","success","loading"]),hasFeedback:l.default.bool,style:l.default.object,id:l.default.string,children:l.default.oneOfType([l.default.node,l.default.func]),size:l.default.oneOf(["large","small","medium"]),labelAlign:l.default.oneOf(["top","left","inset"]),labelTextAlign:l.default.oneOf(["left","right"]),className:l.default.string,required:l.default.bool,asterisk:l.default.bool,requiredMessage:l.default.string,requiredTrigger:l.default.oneOfType([l.default.string,l.default.array]),min:l.default.number,max:l.default.number,minmaxMessage:l.default.string,minmaxTrigger:l.default.oneOfType([l.default.string,l.default.array]),minLength:l.default.number,maxLength:l.default.number,minmaxLengthMessage:l.default.string,minmaxLengthTrigger:l.default.oneOfType([l.default.string,l.default.array]),length:l.default.number,lengthMessage:l.default.string,lengthTrigger:l.default.oneOfType([l.default.string,l.default.array]),pattern:l.default.any,patternMessage:l.default.string,patternTrigger:l.default.oneOfType([l.default.string,l.default.array]),format:l.default.oneOf(["number","email","url","tel"]),formatMessage:l.default.string,formatTrigger:l.default.oneOfType([l.default.string,l.default.array]),validator:l.default.func,validatorTrigger:l.default.oneOfType([l.default.string,l.default.array]),autoValidate:l.default.bool},a.defaultProps={prefix:"next-",hasFeedback:!1},a.contextTypes={_formField:l.default.object,_formSize:l.default.oneOf(["large","small","medium"])},a._typeMark="form_item",o);f.displayName="Item",t.default=f,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,k=u(n(5)),S=u(n(13)),r=u(n(4)),i=u(n(6)),s=u(n(7)),T=n(0),x=u(T),l=u(n(2)),L=u(n(12));function u(e){return e&&e.__esModule?e:{default:e}}var c=(o=a=function(e){function t(){return(0,r.default)(this,t),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e,t,n,a=this.props,o=a.prefix,r=(a.pure,a.wrap),i=a.fixed,s=a.gutter,l=a.fixedWidth,u=a.align,c=a.justify,d=a.hidden,f=a.className,p=a.component,h=a.children,m=a.rtl,g=(0,S.default)(a,["prefix","pure","wrap","fixed","gutter","fixedWidth","align","justify","hidden","className","component","children","rtl"]),y=void 0;if(!0===d)(n={})[o+"row-hidden"]=!0,y=n;else if("string"==typeof d){var _;(_={})[o+"row-"+d+"-hidden"]=!!d,y=_}else Array.isArray(d)&&(y=d.reduce(function(e,t){return e[o+"row-"+t+"-hidden"]=!!t,e},{}));var v=(0,L.default)((0,k.default)(((e={})[o+"row"]=!0,e[o+"row-wrap"]=r,e[o+"row-fixed"]=i,e[o+"row-fixed-"+l]=!!l,e[o+"row-justify-"+c]=!!c,e[o+"row-align-"+u]=!!u,e),y,((t={})[f]=!!f,t))),b=h,M=parseInt(s,10);if(0!==M){var w=M/2+"px";g.style=(0,k.default)({marginLeft:"-"+w,marginRight:"-"+w},g.style||{}),b=T.Children.map(h,function(e){return e&&e.type&&"function"==typeof e.type&&e.type.isNextCol?(0,T.cloneElement)(e,{style:(0,k.default)({paddingLeft:w,paddingRight:w},e.style||{})}):e})}return x.default.createElement(p,(0,k.default)({dir:m?"rtl":"ltr",role:"row",className:v},g),b)},t}(T.Component),a.propTypes={prefix:l.default.string,pure:l.default.bool,rtl:l.default.bool,className:l.default.string,style:l.default.object,children:l.default.node,gutter:l.default.oneOfType([l.default.string,l.default.number]),wrap:l.default.bool,fixed:l.default.bool,fixedWidth:l.default.oneOf(["xxs","xs","s","m","l","xl"]),align:l.default.oneOf(["top","center","bottom","baseline","stretch"]),justify:l.default.oneOf(["start","center","end","space-between","space-around"]),hidden:l.default.oneOfType([l.default.bool,l.default.string,l.default.array]),component:l.default.string},a.defaultProps={prefix:"next-",pure:!1,fixed:!1,gutter:0,wrap:!1,component:"div"},o);c.displayName="Row",t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,M=c(n(5)),w=c(n(51)),k=c(n(13)),r=c(n(4)),i=c(n(6)),s=c(n(7)),l=n(0),S=c(l),u=c(n(2)),T=c(n(12));function c(e){return e&&e.__esModule?e:{default:e}}var x=["xxs","xs","s","m","l","xl"],d=(o=a=function(e){function t(){return(0,r.default)(this,t),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e,t,n,a=this,o=this.props,r=o.prefix,i=(o.pure,o.span),s=o.offset,l=o.fixedSpan,u=o.fixedOffset,c=o.hidden,d=o.align,f=(o.xxs,o.xs,o.s,o.m,o.l,o.xl,o.component),p=o.className,h=o.children,m=o.rtl,g=(0,k.default)(o,["prefix","pure","span","offset","fixedSpan","fixedOffset","hidden","align","xxs","xs","s","m","l","xl","component","className","children","rtl"]),y=x.reduce(function(e,t){var n={};return"object"===(0,w.default)(a.props[t])?n=a.props[t]:n.span=a.props[t],e[r+"col-"+t+"-"+n.span]=!!n.span,e[r+"col-"+t+"-offset-"+n.offset]=!!n.offset,e},{}),_=void 0;if(!0===c)(n={})[r+"col-hidden"]=!0,_=n;else if("string"==typeof c){var v;(v={})[r+"col-"+c+"-hidden"]=!!c,_=v}else Array.isArray(c)&&(_=c.reduce(function(e,t){return e[r+"col-"+t+"-hidden"]=!!t,e},{}));var b=(0,T.default)((0,M.default)(((e={})[r+"col"]=!0,e[r+"col-"+i]=!!i,e[r+"col-fixed-"+l]=!!l,e[r+"col-offset-"+s]=!!s,e[r+"col-offset-fixed-"+u]=!!u,e[r+"col-"+d]=!!d,e),y,_,((t={})[p]=p,t)));return S.default.createElement(f,(0,M.default)({dir:m?"rtl":"ltr",role:"gridcell",className:b},g),h)},t}(l.Component),a.isNextCol=!0,a.propTypes={prefix:u.default.string,pure:u.default.bool,rtl:u.default.bool,className:u.default.string,children:u.default.node,span:u.default.oneOfType([u.default.string,u.default.number]),fixedSpan:u.default.oneOfType([u.default.string,u.default.number]),offset:u.default.oneOfType([u.default.string,u.default.number]),fixedOffset:u.default.oneOfType([u.default.string,u.default.number]),align:u.default.oneOf(["top","center","bottom","baseline","stretch"]),hidden:u.default.oneOfType([u.default.bool,u.default.string,u.default.array]),xxs:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),xs:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),s:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),m:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),l:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),xl:u.default.oneOfType([u.default.string,u.default.number,u.default.object]),component:u.default.string},a.defaultProps={prefix:"next-",pure:!1,component:"div"},o);d.displayName="Col",t.default=d,e.exports=t.default},function(e,t,n){"use strict";function i(e,t){if(t in e)return e[t]}function s(e,t){var n;return(n={})[e]=t[e],n.message=i(t,e+"Message"),n.trigger=i(t,e+"Trigger"),n}function a(e){var t=[];e.required&&t.push(s("required",e));var n=Number(e.maxLength),a=Number(e.minLength);(a||n)&&t.push({minLength:a,maxLength:n,message:i(e,"minmaxLengthMessage")||i(e,"minLengthMessage")||i(e,"maxLengthMessage"),trigger:i(e,"minmaxLengthTrigger")||i(e,"minLengthTrigger")||i(e,"maxLengthTrigger")}),e.length&&t.push(s("length",e)),e.pattern&&t.push(s("pattern",e)),-1<["number","tel","url","email"].indexOf(e.format)&&t.push(s("format",e));var o=Number(e.max),r=Number(e.min);return(o||r)&&t.push({min:r,max:o,message:i(e,"minmaxMessage")||i(e,"minMessage")||i(e,"maxMessage"),trigger:i(e,"minmaxTrigger")||i(e,"minTrigger")||i(e,"maxTrigger")}),e.validator&&"function"==typeof e.validator&&t.push({validator:e.validator,trigger:i(e,"validatorTrigger")}),t}t.__esModule=!0,t.getRules=a,t.getFieldInitCfg=function(e,t){return{valueName:function(e,t){if(e.valueName)return e.valueName;if("string"==typeof t){var n=t.replace(/Config\(/,"").replace(")","");if(-1!==["Switch","Checkbox","Radio"].indexOf(n))return"checked"}return"value"}(e,t),trigger:e.trigger?e.trigger:"onChange",autoValidate:e.autoValidate,rules:a(e)}}},function(e,t,n){"use strict";t.__esModule=!0;var a,o,r=s(n(5)),l=s(n(4)),u=s(n(6)),c=s(n(7)),d=s(n(0)),i=s(n(2)),f=s(n(19)),p=n(11);function s(e){return e&&e.__esModule?e:{default:e}}var h=(o=a=function(i){function s(){var e,o,t;(0,l.default)(this,s);for(var n=arguments.length,a=Array(n),r=0;r, as child."),a.push(t),e.props.children&&(t.children=n(e.props.children))}}),a}(e.children)),t},s.prototype.fetchInfoFromBinaryChildren=function(e){var a=!1,o=[],r=[];return function t(e,n){r[n]=r[n]||[],e.forEach(function(e){e.children?(a=!0,t(e.children,n+1)):o.push(e),r[n].push(e)})}(e,0),r.forEach(function(e,o){e.forEach(function(e,t){var n=void 0,a=e.children;a&&(n=function t(e,n){return n=n||0,e.forEach(function(e){e.children?n=t(e.children,n):n+=1}),n}(a),e.colSpan=n,r[o][t]=e)})}),{flatChildren:o,groupChildren:r,hasGroupHeader:a}},s.prototype.renderColGroup=function(e){var t=e.map(function(e,t){var n=e.width,a={};return n&&(a={width:n}),C.default.createElement("col",{style:a,key:t})});return C.default.createElement("colgroup",{key:"table-colgroup"},t)},s.prototype.renderTable=function(e,t){if(t.length||!t.length&&!this.props.lockType){var n=this.props,a=n.hasHeader,o=n.components,r=n.prefix,i=n.wrapperContent,s=n.filterParams,l=n.locale,u=n.dataSource,c=n.emptyContent,d=n.loading,f=n.getCellProps,p=n.primaryKey,h=n.getRowProps,m=n.onRowClick,g=n.onRowMouseEnter,y=n.onRowMouseLeave,_=n.pure,v=n.rtl,b=this.state.sort,M=o.Header,w=void 0===M?E.default:M,k=o.Wrapper,S=void 0===k?O.default:k,T=o.Body,x=void 0===T?D.default:T,L=this.renderColGroup(t);return C.default.createElement(S,{colGroup:L,ref:this.getWrapperRef,prefix:r},a?C.default.createElement(w,{prefix:r,rtl:v,pure:_,affixRef:this.getAffixRef,colGroup:L,className:r+"table-header",filterParams:s,columns:e,locale:l,headerCellRef:this.getHeaderCellRef,components:o,onFilter:this.onFilter,sort:b,onResizeChange:this.onResizeChange,onSort:this.onSort}):null,C.default.createElement(x,{prefix:r,rtl:v,pure:_,colGroup:L,className:r+"table-body",components:o,loading:d,emptyContent:c,getCellProps:f,primaryKey:p,getRowProps:h,columns:t,rowRef:this.getRowRef,cellRef:this.getCellRef,onRowClick:m,onRowMouseEnter:g,onRowMouseLeave:y,dataSource:u,locale:l}),i)}return null},s.prototype.render=function(){var e,t=this.normalizeChildrenState(this.props);this.groupChildren=t.groupChildren,this.flatChildren=t.flatChildren;var n=this.renderTable(t.groupChildren,t.flatChildren),a=this.props,o=a.className,r=a.hasBorder,i=a.isZebra,s=a.loading,l=a.hasHeader,u=a.prefix,c=(a.dataSource,a.entireDataSource,a.onSort,a.onResizeChange,a.onRowClick,a.onRowMouseEnter,a.onRowMouseLeave,a.onFilter,a.getRowProps,a.getCellProps,a.primaryKey,a.components,a.wrapperContent,a.lockType,a.locale,a.expandedIndexSimulate,a.refs,a.pure,a.rtl),d=(a.emptyContent,a.filterParams,a.columns,a.loadingComponent),f=void 0===d?b.default:d,p=(0,y.default)(a,["className","hasBorder","isZebra","loading","hasHeader","prefix","dataSource","entireDataSource","onSort","onResizeChange","onRowClick","onRowMouseEnter","onRowMouseLeave","onFilter","getRowProps","getCellProps","primaryKey","components","wrapperContent","lockType","locale","expandedIndexSimulate","refs","pure","rtl","emptyContent","filterParams","columns","loadingComponent"]),h=(0,v.default)(((e={})[u+"table"]=!0,e["only-bottom-border"]=!r,e["no-header"]=!l,e.zebra=i,e[o]=o,e));c&&(p.dir="rtl");var m=C.default.createElement("div",(0,_.default)({className:h},p),n);if(s){var g=u+"table-loading";return C.default.createElement(f,{className:g},m)}return m},s}(C.default.Component),a.Column=g.default,a.ColumnGroup=M.default,a.Header=E.default,a.Body=D.default,a.Wrapper=O.default,a.Row=f.default,a.Cell=p.default,a.Filter=h.default,a.Sort=m.default,a.propTypes={prefix:i.default.string,pure:i.default.bool,rtl:i.default.bool,className:i.default.string,style:i.default.object,dataSource:i.default.array,entireDataSource:i.default.array,onRowClick:i.default.func,onRowMouseEnter:i.default.func,onRowMouseLeave:i.default.func,onSort:i.default.func,onFilter:i.default.func,onResizeChange:i.default.func,getRowProps:i.default.func,getCellProps:i.default.func,hasBorder:i.default.bool,hasHeader:i.default.bool,isZebra:i.default.bool,loading:i.default.bool,loadingComponent:i.default.func,filterParams:i.default.object,sort:i.default.object,locale:i.default.object,components:i.default.object,columns:i.default.array,emptyContent:i.default.node,primaryKey:i.default.string,lockType:i.default.oneOf(["left","right"]),wrapperContent:i.default.any,refs:i.default.object,expandedRowRender:i.default.func,expandedRowIndent:i.default.array,openRowKeys:i.default.array,hasExpandedRowCtrl:i.default.bool,getExpandedColProps:i.default.func,onRowOpen:i.default.func,onExpandedRowClick:i.default.func,fixedHeader:i.default.bool,maxBodyHeight:i.default.oneOfType([i.default.number,i.default.string]),rowSelection:i.default.object,stickyHeader:i.default.bool,offsetTop:i.default.number,affixProps:i.default.object,indent:i.default.number,isTree:i.default.bool,useVirtual:i.default.bool,rowHeight:i.default.oneOfType([i.default.number,i.default.func]),onBodyScroll:i.default.func,expandedIndexSimulate:i.default.bool},a.defaultProps={dataSource:[],onRowClick:S,onRowMouseEnter:S,onRowMouseLeave:S,onSort:S,onFilter:S,onResizeChange:S,getRowProps:S,getCellProps:S,prefix:"next-",hasBorder:!0,hasHeader:!0,isZebra:!1,loading:!1,expandedIndexSimulate:!1,primaryKey:"id",components:{},locale:s.default.Table},a.childContextTypes={notRenderCellIndex:i.default.array,lockType:i.default.oneOf(["left","right"])},a.contextTypes={getTableInstance:i.default.func,getTableInstanceForVirtual:i.default.func},o);T.displayName="Table",t.default=T,e.exports=t.default},function(e,t){var i=Object.prototype.hasOwnProperty;function a(e,t){for(var n in e)if(i.call(e,n))return e[n]===t[n];return!1}function s(e,t){if(!e&&!t||e===t)return!0;if(!e!=!t)return!1;if(e.length!==t.length)return!1;for(var n=0;nt.clientWidth,l=t.scrollHeight>t.clientHeight,u=l?r.width:0,c=i-(s?r.height:0);n&&g.dom.setStyle(n,"max-height",c),a&&g.dom.setStyle(a,"max-height",c),o&&g.dom.setStyle(o,e?"left":"right",u)}},a.prototype.adjustHeaderSize=function(){var u=this;this.isLock()&&this.tableInc.groupChildren.forEach(function(e,t){var n=u.tableInc.groupChildren[t].length-1,a=u.getHeaderCellNode(t,n),o=u.getHeaderCellNode(t,0),r=u.getHeaderCellNode(t,0,"right"),i=u.getHeaderCellNode(t,0,"left");if(a&&r){var s=a.offsetHeight;g.dom.setStyle(r,"height",s),setTimeout(function(){u.tableRightInc.affixRef&&u.tableRightInc.affixRef.getInstance().updatePosition()})}if(o&&i){var l=o.offsetHeight;g.dom.setStyle(i,"height",l),setTimeout(function(){u.tableLeftInc.affixRef&&u.tableLeftInc.affixRef.getInstance().updatePosition()})}})},a.prototype.adjustCellSize=function(){var l=this;this.isLock()&&this.tableInc.props.dataSource.forEach(function(e,t){var n=l.getCellNode(t,0,"left"),a=l.getCellNode(t,0,"right"),o=l.getFirstNormalCellNode(t),r=o&&parseFloat(getComputedStyle(o).height)||0,i=0,s=0;n&&(i=n.offsetHeight),a&&(s=a.offsetHeight),n&&r!==i&&g.dom.setStyle(n,"height",r),a&&r!==s&&g.dom.setStyle(a,"height",r)})},a.prototype.getWrapperNode=function(e){e=e?e.charAt(0).toUpperCase()+e.substr(1):"";try{return(0,l.findDOMNode)(this.refs["lock"+e])}catch(e){return null}},a.prototype.getFirstNormalCellNode=function(e){for(var t=0,n=void 0;n=this.getCellNode(e,t),t++,(!n||n&&n.rowSpan&&1t;);return n},a.prototype.getRowNode=function(e,t){var n=this["table"+(t=t?t.charAt(0).toUpperCase()+t.substr(1):"")+"Inc"];try{return(0,l.findDOMNode)(n.getRowRef(e))}catch(e){return null}},a.prototype.getHeaderCellNode=function(e,t,n){var a=this["table"+(n=n?n.charAt(0).toUpperCase()+n.substr(1):"")+"Inc"];try{return(0,l.findDOMNode)(a.getHeaderCellRef(e,t))}catch(e){return null}},a.prototype.getCellNode=function(e,t,n){var a=this["table"+(n=n?n.charAt(0).toUpperCase()+n.substr(1):"")+"Inc"];try{return(0,l.findDOMNode)(a.getCellRef(e,t))}catch(e){return null}},a.prototype.render=function(){var e=this.props,t=(e.children,e.prefix),n=e.components,a=e.className,o=(0,f.default)(e,["children","prefix","components","className"]),r=this.normalizeChildrenState(this.props),i=r.lockLeftChildren,s=r.lockRightChildren,l=r.children;if(this._notNeedAdjustLockLeft&&(i=[]),this._notNeedAdjustLockRight&&(s=[]),this.lockLeftChildren=i,this.lockRightChildren=s,this.isOriginLock()){var u;(n=(0,p.default)({},n)).Body=n.Body||_.default,n.Header=n.Header||v.default,n.Wrapper=n.Wrapper||b.default,n.Row=n.Row||y.default,a=(0,m.default)(((u={})[t+"table-lock"]=!0,u[a]=a,u));var c=[h.default.createElement(d,(0,p.default)({},o,{key:"lock-left",columns:i,className:t+"table-lock-left",prefix:t,lockType:"left",components:n,ref:"lockLeft",loading:!1})),h.default.createElement(d,(0,p.default)({},o,{key:"lock-right",columns:s,className:t+"table-lock-right",prefix:t,lockType:"right",components:n,ref:"lockRight",loading:!1}))];return h.default.createElement(d,(0,p.default)({},o,{columns:l,prefix:t,wrapperContent:c,components:n,className:a}))}return h.default.createElement(d,this.props)},a}(h.default.Component),e.LockRow=y.default,e.LockBody=_.default,e.LockHeader=v.default,e.propTypes=(0,p.default)({scrollToCol:a.default.number,scrollToRow:a.default.number},d.propTypes),e.defaultProps=(0,p.default)({},d.defaultProps),e.childContextTypes={getTableInstance:a.default.func,getLockNode:a.default.func,onLockBodyScroll:a.default.func,onLockBodyWheel:a.default.func,onRowMouseEnter:a.default.func,onRowMouseLeave:a.default.func},t);return n.displayName="LockTable",(0,c.statics)(n,d),n};var s=n(0),h=d(s),l=n(24),a=d(n(2)),m=d(n(12)),u=d(n(318)),g=n(11),y=d(n(324)),_=d(n(515)),v=d(n(516)),b=d(n(133)),c=n(55);function d(e){return e&&e.__esModule?e:{default:e}}function M(e){return function n(e){return e.map(function(e){var t=(0,p.default)({},e);return e.children&&(e.children=n(e.children)),t})}(e)}e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,r=s(n(5)),l=s(n(4)),u=s(n(6)),c=s(n(7)),d=s(n(0)),f=n(24),i=s(n(2)),p=s(n(325));function s(e){return e&&e.__esModule?e:{default:e}}var h=(o=a=function(i){function s(){var e,t,n;(0,l.default)(this,s);for(var a=arguments.length,o=Array(a),r=0;rr.top-c.offset?(n?(d.position="absolute",d.top=o-(r.top-c.offset),f.position="relative"):(d.position="fixed",d.top=c.offset+l.top),p._setAffixStyle(d,!0),p._setContainerStyle(f)):c.bottom&&ox',"Tag"),"readonly"!==n&&"interactive"!==n||o.log.warning("Warning: [ shape="+n+" ] is deprecated at [ Tag ]"),"secondary"===a&&o.log.warning("Warning: [ type=secondary ] is deprecated at [ Tag ]"),["count","marked","value","onChange"].forEach(function(e){e in t&&o.log.warning("Warning: [ "+e+" ] is deprecated at [ Tag ]")}),("selected"in t||"defaultSelected"in t)&&o.log.warning("Warning: [ selected|defaultSelected ] is deprecated at [ Tag ], use [ checked|defaultChecked ] at [ Tag.Selectable ] instead of it"),"closed"in t&&o.log.warning("Warning: [ closed ] is deprecated at [ Tag ], use [ onClose ] at [ Tag.Closeable ] instead of it"),"onSelect"in t&&e("onSelect","","Tag"),"afterClose"in t&&o.log.warning("Warning: [ afterClose ] is deprecated at [ Tag ], use [ afterClose ] at [ Tag.Closeable ] instead of it"),t}});c.Group=a.default.config(i.default),c.Selectable=a.default.config(s.default),c.Closable=a.default.config(l.default),c.Closeable=c.Closable,t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,o,s=h(n(5)),l=h(n(13)),r=h(n(4)),i=h(n(6)),u=h(n(7)),c=n(0),d=h(c),f=h(n(2)),p=h(n(12));function h(e){return e&&e.__esModule?e:{default:e}}var m=(o=a=function(e){function t(){return(0,r.default)(this,t),(0,i.default)(this,e.apply(this,arguments))}return(0,u.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.prefix,a=e.children,o=e.rtl,r=(0,l.default)(e,["className","prefix","children","rtl"]),i=(0,p.default)((n||"next-")+"tag-group",t);return d.default.createElement("div",(0,s.default)({className:i,dir:o?"rtl":void 0},r),a)},t}(c.Component),a.propTypes={prefix:f.default.string,className:f.default.any,children:f.default.node,rtl:f.default.bool},a.defaultProps={prefix:"next-",rtl:!1},o);m.displayName="Group",t.default=m,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,o,r=m(n(5)),i=m(n(4)),s=m(n(6)),l=m(n(7)),u=n(0),c=m(u),d=m(n(2)),f=m(n(12)),p=n(11),h=m(n(136));function m(e){return e&&e.__esModule?e:{default:e}}var g=p.func.noop,y=p.func.bindCtx,_=(o=a=function(n){function a(e){(0,i.default)(this,a);var t=(0,s.default)(this,n.call(this,e));return t.state={checked:"checked"in e?e.checked:e.defaultChecked||!1},y(t,["handleClick"]),t}return(0,l.default)(a,n),a.prototype.handleClick=function(e){if(e&&e.preventDefault(),this.props.disabled)return!1;this.setState(function(e){return{checked:!e.checked}}),this.props.onChange(!this.props.checked,e)},a.prototype.render=function(){var e=p.obj.pickOthers(["checked","defaultChecked","onChange","className","_shape","closable"],this.props),t="checked"in this.props?this.props.checked:this.state.checked,n=(0,f.default)(this.props.className,{checked:t});return c.default.createElement(h.default,(0,r.default)({},e,{role:"checkbox",_shape:"checkable","aria-checked":t,className:n,onClick:this.handleClick}))},a}(u.Component),a.propTypes={checked:d.default.bool,defaultChecked:d.default.bool,onChange:d.default.func,disabled:d.default.bool,className:d.default.any},a.defaultProps={onChange:g},o);_.displayName="Selectable",t.default=_,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,o,r=c(n(4)),i=c(n(6)),s=c(n(7)),l=n(0),d=c(l),u=c(n(2)),f=c(n(136));function c(e){return e&&e.__esModule?e:{default:e}}var p=(o=a=function(e){function t(){return(0,r.default)(this,t),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.className,a=e.closeArea,o=e.onClose,r=e.afterClose,i=e.onClick,s=e.type,l=e.size,u=e.children,c=e.rtl;return d.default.createElement(f.default,{rtl:c,disabled:t,className:n,closeArea:a,onClose:o,afterClose:r,onClick:i,type:s,size:l,closable:!0},u)},t}(l.Component),a.propTypes={disabled:u.default.bool,className:u.default.any,closeArea:u.default.oneOf(["tag","tail"]),onClose:u.default.func,afterClose:u.default.func,onClick:u.default.func,type:u.default.oneOf(["normal","primary"]),size:u.default.oneOf(["small","medium","large"]),children:u.default.any,rtl:u.default.bool},a.defaultProps={disabled:!1,type:"normal"},o);p.displayName="Closeable",t.default=p,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a=i(n(5)),o=i(n(4)),r=n(137);function i(e){return e&&e.__esModule?e:{default:e}}var s=function(){function t(e){(0,o.default)(this,t),this.options=(0,a.default)({filter:r.filter,key:void 0,addonKey:!1,filterLocal:!0},e),this.dataSource=[],this.menuDataSource=[],this.mapDataSource={},this.enabledDataSource=[]}return t.prototype.setOptions=function(e){(0,a.default)(this.options,e)},t.prototype.updateByDS=function(e){var t=1=j.KEYCODE.LEFT&&t<=j.KEYCODE.DOWN&&e.preventDefault();var n=void 0;t===j.KEYCODE.RIGHT||t===j.KEYCODE.DOWN?(n=i.getNextActiveKey(!0),i.handleTriggerEvent(i.props.triggerType,n)):t!==j.KEYCODE.LEFT&&t!==j.KEYCODE.UP||(n=i.getNextActiveKey(!1),i.handleTriggerEvent(i.props.triggerType,n))},i.state={activeKey:i.getDefaultActiveKey(e)},i}return(0,i.default)(D,n),D.prototype.componentWillReceiveProps=function(e){e.activeKey&&this.state.activeKey!==e.activeKey&&this.setState({activeKey:e.activeKey})},D.prototype.getDefaultActiveKey=function(e){var n=e.activeKey||e.defaultActiveKey;return n||N.default.Children.forEach(e.children,function(e,t){N.default.isValidElement(e)&&(null!=n||e.props.disabled||(n=e.key||t))}),n},D.prototype.getNextActiveKey=function(t){var n=this,a=[];N.default.Children.forEach(this.props.children,function(e){N.default.isValidElement(e)&&(e.props.disabled||(t?a.push(e):a.unshift(e)))});var o=a.length,r=o&&a[0].key;return a.forEach(function(e,t){e.key===n.state.activeKey&&(r=t===o-1?a[0].key:a[t+1].key)}),r},D.prototype.setActiveKey=function(e){e===this.state.activeKey||"activeKey"in this.props||this.setState({activeKey:e})},D.prototype.render=function(){var e,t=this.props,n=t.prefix,a=t.animation,o=t.shape,r=t.size,i=t.extra,s=t.excessMode,l=t.tabPosition,u=t.tabRender,c=t.triggerType,d=t.lazyLoad,f=t.unmountInactiveTabs,p=t.popupProps,h=t.navStyle,m=t.navClassName,g=t.contentStyle,y=t.contentClassName,_=t.className,v=t.onClose,b=t.children,M=t.rtl,w=(0,O.default)(t,["prefix","animation","shape","size","extra","excessMode","tabPosition","tabRender","triggerType","lazyLoad","unmountInactiveTabs","popupProps","navStyle","navClassName","contentStyle","contentClassName","className","onClose","children","rtl"]),k=this.state.activeKey,S=(0,A.toArray)(b),T=(0,Y.default)(((e={})[n+"tabs"]=!0,e[n+"tabs-"+o]=o,e[n+"tabs-vertical"]="wrapped"===o&&0<=["left","right"].indexOf(l),e[n+"tabs-"+l]="wrapped"===o,e[""+(n+r)]=r,e),_),x={prefix:n,rtl:M,animation:a,activeKey:k,excessMode:s,extra:i,tabs:S,tabPosition:l,tabRender:u,triggerType:c,popupProps:p,onClose:v,onTriggerEvent:this.handleTriggerEvent,onKeyDown:this.onNavKeyDown,style:h,className:m},L={prefix:n,activeKey:k,lazyLoad:d,unmountInactiveTabs:f,style:g,className:y},C=[N.default.createElement(P.default,(0,E.default)({key:"tab-nav"},x)),N.default.createElement(I.default,(0,E.default)({key:"tab-content"},L),S)];return"bottom"===l&&C.reverse(),N.default.createElement("div",(0,E.default)({dir:M?"rtl":void 0,className:T},j.obj.pickOthers(D.propTypes,w)),C)},D}(l.Component),a.propTypes={prefix:u.default.string,rtl:u.default.bool,activeKey:u.default.oneOfType([u.default.number,u.default.string]),defaultActiveKey:u.default.oneOfType([u.default.number,u.default.string]),shape:u.default.oneOf(["pure","wrapped","text","capsule"]),animation:u.default.bool,excessMode:u.default.oneOf(["slide","dropdown"]),tabPosition:u.default.oneOf(["top","bottom","left","right"]),size:u.default.oneOf(["small","medium"]),triggerType:u.default.oneOf(["hover","click"]),lazyLoad:u.default.bool,unmountInactiveTabs:u.default.bool,navStyle:u.default.object,navClassName:u.default.string,contentStyle:u.default.object,contentClassName:u.default.string,extra:u.default.node,onClick:u.default.func,onChange:u.default.func,onClose:u.default.func,tabRender:u.default.func,children:u.default.any,className:u.default.string},a.defaultProps={prefix:"next-",shape:"pure",size:"medium",animation:!0,tabPosition:"top",excessMode:"slide",triggerType:"click",lazyLoad:!0,unmountInactiveTabs:!1,onClick:f,onChange:f,onClose:f},o);p.displayName="Tab",(t.default=p).Item=c.default,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var a,o,C=h(n(5)),i=h(n(4)),s=h(n(6)),r=h(n(7)),D=h(n(0)),l=n(24),u=h(n(2)),E=h(n(12)),O=h(n(23)),c=h(n(52)),d=h(n(48)),N=h(n(100)),f=n(11),p=n(332);function h(e){return e&&e.__esModule?e:{default:e}}var Y=function(){},j={float:"right",zIndex:1},P={float:"left",zIndex:1},m=c.default.Popup,g=(o=a=function(n){function a(e,t){(0,i.default)(this,a);var r=(0,s.default)(this,n.call(this,e,t));return r.removeTab=function(e,t){t&&t.stopPropagation(),r.props.onClose(e)},r.defaultTabTemplateRender=function(t,e){var n=e.prefix,a=e.title,o=e.closeable?D.default.createElement(O.default,{type:"close",onClick:function(e){return r.removeTab(t,e)},className:n+"tabs-tab-close"}):null;return D.default.createElement("div",{className:r.props.prefix+"tabs-tab-inner"},a,o)},r.scrollToActiveTab=function(){if(r.activeTab&&"slide"===r.props.excessMode){var e=(0,p.getOffsetWH)(r.activeTab),t=(0,p.getOffsetWH)(r.wrapper),n=(0,p.getOffsetLT)(r.activeTab),a=(0,p.getOffsetLT)(r.wrapper),o=r.offset;a+t<=n||n+e<=a||a+tn&&(t.current=n),this.setState(t),this.props.onPageSizeChange(e)},l.prototype.renderPageTotal=function(){var e=this.props,t=e.prefix,n=e.total,a=e.totalRender,o=this.state,r=o.currentPageSize,i=o.current,s=[(i-1)*r+1,i*r];return j.default.createElement("div",{className:t+"pagination-total"},a(n,s))},l.prototype.renderPageItem=function(e){var t,n=this.props,a=n.prefix,o=n.size,r=n.link,i=n.pageNumberRender,s=n.total,l=n.pageSize,u=n.locale,c=this.state.current,d=this.getTotalPage(s,l),f=parseInt(e,10)===c,p={size:o,className:(0,P.default)((t={},t[a+"pagination-item"]=!0,t[a+"current"]=f,t)),onClick:f?v:this.onPageItemClick.bind(this,e)};return r&&(p.component="a",p.href=r.replace("{page}",e)),j.default.createElement(h.default,(0,Y.default)({"aria-label":m.str.template(u.total,{current:e,total:d})},p,{key:e}),i(e))},l.prototype.renderPageFirst=function(e){var t,n=this.props,a=n.prefix,o=n.size,r=n.shape,i=n.locale,s={disabled:e<=1,size:o,className:(0,P.default)((t={},t[a+"pagination-item"]=!0,t[a+"prev"]=!0,t)),onClick:this.onPageItemClick.bind(this,e-1)},l=j.default.createElement(d.default,{type:"arrow-left"});return j.default.createElement(h.default,(0,Y.default)({},s,{"aria-label":m.str.template(i.labelPrev,{current:e})}),l,"arrow-only"===r||"arrow-prev-only"===r||"no-border"===r?"":i.prev)},l.prototype.renderPageLast=function(e,t){var n,a=this.props,o=a.prefix,r=a.size,i=a.shape,s=a.locale,l={disabled:t<=e,size:r,className:(0,P.default)((n={},n[o+"pagination-item"]=!0,n[o+"next"]=!0,n)),onClick:this.onPageItemClick.bind(this,e+1)},u=j.default.createElement(d.default,{type:"arrow-right"});return j.default.createElement(h.default,(0,Y.default)({},l,{"aria-label":m.str.template(s.labelNext,{current:e})}),"arrow-only"===i||"no-border"===i?"":s.next,u)},l.prototype.renderPageEllipsis=function(e){var t=this.props.prefix;return j.default.createElement(d.default,{className:t+"pagination-ellipsis",type:"ellipsis",key:"ellipsis-"+e})},l.prototype.renderPageJump=function(){var t=this,e=this.props,n=e.prefix,a=e.size,o=e.locale;return[j.default.createElement("span",{className:n+"pagination-jump-text"},o.goTo),j.default.createElement(f.default,{className:n+"pagination-jump-input",type:"text",size:a,onChange:this.onInputChange.bind(this),onKeyDown:function(e){e.keyCode===m.KEYCODE.ENTER&&t.onJump(e)}}),j.default.createElement("span",{className:n+"pagination-jump-text"},o.page),j.default.createElement(h.default,{className:n+"pagination-jump-go",size:a,onClick:this.onJump},o.go)]},l.prototype.renderPageDisplay=function(e,t){var n=this.props,a=n.prefix,o=n.pageNumberRender;return j.default.createElement("span",{className:a+"pagination-display"},j.default.createElement("em",null,o(e)),"/",o(t))},l.prototype.renderPageList=function(e,t){var n=this.props,a=n.prefix,o=n.pageShowCount,r=[];if(t<=o)for(var i=1;i<=t;i++)r.push(this.renderPageItem(i));else{var s=o-3,l=parseInt(s/2,10),u=void 0,c=void 0;r.push(this.renderPageItem(1)),c=e+l,(u=e-l)<=1&&(c=(u=2)+s),2=e.length&&-1=e.children.length)this.update(e),this.changeSlide({message:"index",index:e.children.length-e.slidesToShow,currentSlide:this.state.currentSlide});else{var t=["children"];!u.obj.shallowEqual(u.obj.pickOthers(t,this.props),u.obj.pickOthers(t,e))&&this.update(e)}},a.prototype.componentDidUpdate=function(){this.adaptHeight()},a.prototype.componentWillUnmount=function(){this.animationEndCallback&&clearTimeout(this.animationEndCallback),u.events.off(window,"resize",this.onWindowResized),this.state.autoPlayTimer&&clearInterval(this.state.autoPlayTimer)},a.prototype.onWindowResized=function(){this.update(this.props),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},a.prototype.slickGoTo=function(e){"number"==typeof e&&this.changeSlide({message:"index",index:e,currentSlide:this.state.currentSlide})},a.prototype.onEnterArrow=function(e){this.arrowHoverHandler(e)},a.prototype.onLeaveArrow=function(){this.arrowHoverHandler()},a.prototype._instanceRefHandler=function(e,t){this[e]=t},a.prototype.render=function(){var e=this.props,t=e.prefix,n=e.animation,a=e.arrows,o=e.arrowSize,r=e.arrowPosition,i=e.arrowDirection,s=e.dots,l=e.dotsClass,u=e.cssEase,c=e.speed,d=e.infinite,f=e.centerMode,p=e.centerPadding,h=e.lazyLoad,m=e.dotsDirection,g=e.rtl,y=e.slidesToShow,_=e.slidesToScroll,v=e.variableWidth,b=e.vertical,M=e.verticalSwiping,w=e.focusOnSelect,k=e.children,S=e.dotsRender,T=e.triggerType,x=this.state,L=x.currentSlide,C=x.lazyLoadedList,D=x.slideCount,E=x.slideWidth,O=x.slideHeight,N=x.trackStyle,Y=x.listHeight,j=x.dragging,P={prefix:t,animation:n,cssEase:u,speed:c,infinite:d,centerMode:f,focusOnSelect:w?this.selectHandler:null,currentSlide:L,lazyLoad:h,lazyLoadedList:C,rtl:g,slideWidth:E,slideHeight:O,slidesToShow:y,slidesToScroll:_,slideCount:D,trackStyle:N,variableWidth:v,vertical:b,verticalSwiping:M,triggerType:T},I=void 0;if(!0===s&&yt.startX?1:-1);!0===this.props.verticalSwiping&&(t.swipeLength=Math.round(Math.sqrt(Math.pow(t.curY-t.startY,2))),a=t.curY>t.startY?1:-1);var o=this.state.currentSlide,r=Math.ceil(this.state.slideCount/this.props.slidesToScroll),i=this.swipeDirection(this.state.touchObject),s=t.swipeLength;!1===this.props.infinite&&(0===o&&"right"===i||r<=o+1&&"left"===i)&&(s=t.swipeLength*this.props.edgeFriction,!1===this.state.edgeDragged&&this.props.edgeEvent&&(this.props.edgeEvent(i),this.setState({edgeDragged:!0}))),!1===this.state.swiped&&this.props.swipeEvent&&(this.props.swipeEvent(i),this.setState({swiped:!0}));var l=n+s*a;this.setState({touchObject:t,swipeLeft:l,trackStyle:(0,c.getTrackCSS)((0,u.default)({left:l},this.props,this.state))}),Math.abs(t.curX-t.startX)<.8*Math.abs(t.curY-t.startY)||4t[t.length-1])e=t[t.length-1];else for(var a in t){if(e-1*t.state.swipeLeft)return a=e,!1}else if(e.offsetLeft-n+t.getWidth(e)/2>-1*t.state.swipeLeft)return a=e,!1;return!0}),Math.abs(a.dataset.index-this.state.currentSlide)||1}return this.props.slidesToScroll},swipeEnd:function(e){if(this.state.dragging){var t=this.state.touchObject,n=this.state.listWidth/this.props.touchThreshold,a=this.swipeDirection(t);if(this.props.verticalSwiping&&(n=this.state.listHeight/this.props.touchThreshold),this.setState({dragging:!1,edgeDragged:!1,swiped:!1,swipeLeft:null,touchObject:{}}),t.swipeLength)if(t.swipeLength>n){e.preventDefault();var o=void 0,r=void 0;switch(a){case"left":case"down":r=this.state.currentSlide+this.getSlideCount(),o=this.props.swipeToSlide?this.checkNavigable(r):r,this.setState({currentDirection:0});break;case"right":case"up":r=this.state.currentSlide-this.getSlideCount(),o=this.props.swipeToSlide?this.checkNavigable(r):r,this.setState({currentDirection:1});break;default:o=this.state.currentSlide}this.slideHandler(o)}else{var i=(0,c.getTrackLeft)((0,u.default)({slideIndex:this.state.currentSlide,trackRef:this.track},this.props,this.state));this.setState({trackStyle:(0,c.getTrackAnimateCSS)((0,u.default)({left:i},this.props,this.state))})}}else this.props.swipe&&e.preventDefault()},onInnerSliderEnter:function(){this.props.autoplay&&this.props.pauseOnHover&&this.pause()},onInnerSliderLeave:function(){this.props.autoplay&&this.props.pauseOnHover&&this.autoPlay()}};t.default=i,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var h=a(n(5)),d=a(n(0)),f=a(n(24)),m=n(334);function a(e){return e&&e.__esModule?e:{default:e}}var o={initialize:function(n){var a=this,e=f.default.findDOMNode(this.list),t=d.default.Children.count(n.children),o=this.getWidth(e),r=this.getWidth(f.default.findDOMNode(this.track)),i=void 0;n.vertical?i=o:i=(o-(n.centerMode&&2*parseInt(n.centerPadding)))/n.slidesToShow;var s=this.getHeight(e.querySelector('[data-index="0"]')),l=s*n.slidesToShow,u=n.slidesToShow||1,c=n.rtl?t-1-(u-1)-n.defaultActiveIndex:n.defaultActiveIndex;this.setState({slideCount:t,slideWidth:i,listWidth:o,trackWidth:r,currentSlide:c,slideHeight:s,listHeight:l},function(){var e=(0,m.getTrackLeft)((0,h.default)({slideIndex:a.state.currentSlide,trackRef:a.track},n,a.state)),t=(0,m.getTrackCSS)((0,h.default)({left:e},n,a.state));a.setState({trackStyle:t}),a.autoPlay()})},update:function(e){this.initialize(e)},getWidth:function(e){return e.getBoundingClientRect().width||e.offsetWidth},getHeight:function(e){return e.getBoundingClientRect().height||e.offsetHeight},adaptHeight:function(){if(this.props.adaptiveHeight){var e='[data-index="'+this.state.currentSlide+'"]';if(this.list){var t=f.default.findDOMNode(this.list),n=t.querySelector(e).offsetHeight;t.style.height=n+"px"}}},canGoNext:function(e){var t=!0;return e.infinite||(e.centerMode?e.currentSlide>=e.slideCount-1&&(t=!1):(e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1)),t},slideHandler:function(e){var t=this,n=this.props.rtl,a=void 0,o=void 0,r=void 0;if(!this.props.waitForAnimate||!this.state.animating){if("fade"===this.props.animation){if(o=this.state.currentSlide,!1===this.props.infinite&&(e<0||e>=this.state.slideCount))return;return a=e<0?e+this.state.slideCount:e>=this.state.slideCount?e-this.state.slideCount:e,this.props.lazyLoad&&this.state.lazyLoadedList.indexOf(a)<0&&this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(a)}),r=function(){t.setState({animating:!1}),t.props.onChange(a),delete t.animationEndCallback},this.setState({animating:!0,currentSlide:a},function(){this.animationEndCallback=setTimeout(r,this.props.speed+20)}),void this.autoPlay()}a=e,n?a<0?!1===this.props.infinite?o=0:this.state.slideCount%this.props.slidesToScroll!=0?a+this.props.slidesToScroll<=0?(o=this.state.slideCount+a,a=this.state.slideCount-this.props.slidesToScroll):o=a=0:o=this.state.slideCount+a:o=a>=this.state.slideCount?!1===this.props.infinite?this.state.slideCount-this.props.slidesToShow:this.state.slideCount%this.props.slidesToScroll!=0?0:a-this.state.slideCount:a:o=a<0?!1===this.props.infinite?0:this.state.slideCount%this.props.slidesToScroll!=0?this.state.slideCount-this.state.slideCount%this.props.slidesToScroll:this.state.slideCount+a:a>=this.state.slideCount?!1===this.props.infinite?this.state.slideCount-this.props.slidesToShow:this.state.slideCount%this.props.slidesToScroll!=0?0:a-this.state.slideCount:a;var i=(0,m.getTrackLeft)((0,h.default)({slideIndex:a,trackRef:this.track},this.props,this.state)),s=(0,m.getTrackLeft)((0,h.default)({slideIndex:o,trackRef:this.track},this.props,this.state));if(!1===this.props.infinite&&(i=s),this.props.lazyLoad){for(var l=!0,u=[],c=a<0?this.state.slideCount+a:o,d=c;d=this.state.slideCount?2*this.state.slideCount-d-1:this.state.slideCount-d-1),(l=l&&0<=this.state.lazyLoadedList.indexOf(f))||u.push(f)}l||this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(u)})}if(!1===this.props.useCSS)this.setState({currentSlide:o,trackStyle:(0,m.getTrackCSS)((0,h.default)({left:s},this.props,this.state))},function(){t.props.onChange(o)});else{var p={animating:!1,currentSlide:o,trackStyle:(0,m.getTrackCSS)((0,h.default)({left:s},this.props,this.state)),swipeLeft:null};r=function(){t.setState(p),t.props.onChange(o),delete t.animationEndCallback},this.setState({animating:!0,currentSlide:o,trackStyle:(0,m.getTrackAnimateCSS)((0,h.default)({left:i},this.props,this.state))},function(){this.animationEndCallback=setTimeout(r,this.props.speed+20)})}this.autoPlay()}},arrowHoverHandler:function(e){var t=(0,m.getTrackLeft)((0,h.default)({slideIndex:this.state.currentSlide,trackRef:this.track},this.props,this.state)),n=void 0;n="next"===e?t-30:"prev"===e?t+30:t,this.setState({trackStyle:(0,m.getTrackAnimateCSS)((0,h.default)({left:n},this.props,this.state))})},swipeDirection:function(e){var t=void 0,n=e.startX-e.curX,a=e.startY-e.curY,o=Math.atan2(a,n);return(t=Math.round(180*o/Math.PI))<0&&(t=360-Math.abs(t)),t<=45&&0<=t||t<=360&&315<=t?!1===this.props.rtl?"left":"right":135<=t&&t<=225?!1===this.props.rtl?"right":"left":!0===this.props.verticalSwiping?35<=t&&t<=135?"down":"up":"vertical"},play:function(){var e=void 0;if(!this.hasMounted)return!1;if(this.props.rtl)e=this.state.currentSlide-this.props.slidesToScroll;else{if(!this.canGoNext((0,h.default)({},this.props,this.state)))return!1;e=this.state.currentSlide+this.props.slidesToScroll}this.slideHandler(e)},autoPlay:function(){this.state.autoPlayTimer&&clearTimeout(this.state.autoPlayTimer),this.props.autoplay&&this.setState({autoPlayTimer:setTimeout(this.play.bind(this),this.props.autoplaySpeed)})},pause:function(){this.state.autoPlayTimer&&(clearTimeout(this.state.autoPlayTimer),this.setState({autoPlayTimer:null}))}};t.default=o,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,m=c(n(5)),r=c(n(4)),i=c(n(6)),s=c(n(7)),l=n(0),g=c(l),u=c(n(2)),y=c(n(12)),_=c(n(23)),v=n(11);function c(e){return e&&e.__esModule?e:{default:e}}var d=v.func.noop,f=(o=a=function(e){function h(){return(0,r.default)(this,h),(0,i.default)(this,e.apply(this,arguments))}return(0,s.default)(h,e),h.isDisabled=function(e){var t=e.infinite,n=e.type,a=e.centerMode,o=e.currentSlide,r=e.slideCount,i=e.slidesToShow;return!t&&(r<=i||("prev"===n?o<=0:!!(a&&r-1<=o)||r-i<=o))},h.prototype.handleClick=function(e,t){t&&t.preventDefault(),"prev"===e.message&&(e.message="previous"),this.props.clickHandler(e,t)},h.prototype.render=function(){var e=this.props,t=e.prefix,n=e.type,a=e.arrowSize,o=e.arrowPosition,r=e.arrowDirection,i=e.onMouseEnter,s=e.onMouseLeave,l=e.children,u=v.obj.pickOthers(h.propTypes,this.props),c=h.ARROW_ICON_TYPES[r][n],d=h.isDisabled(this.props),f=(0,y.default)([t+"slick-arrow",t+"slick-"+n,o,a,r],{disabled:d}),p=(0,m.default)({},u,{key:n,"data-role":"none",className:f,style:{display:"block"},onClick:d?null:this.handleClick.bind(this,{message:n}),onMouseEnter:d?null:i,onMouseLeave:d?null:s});return l?g.default.cloneElement(g.default.Children.only(l),p):g.default.createElement("button",(0,m.default)({type:"button",role:"button"},p),g.default.createElement(_.default,{type:c}))},h}(l.Component),a.propTypes={prefix:u.default.string,rtl:u.default.bool,type:u.default.oneOf(["prev","next"]).isRequired,centerMode:u.default.bool,currentSlide:u.default.number,infinite:u.default.bool,clickHandler:u.default.func,slideCount:u.default.number,slidesToShow:u.default.number,arrow:u.default.element,arrowSize:u.default.string,arrowPosition:u.default.string,arrowDirection:u.default.oneOf(["hoz","ver"]),onMouseEnter:u.default.func,onMouseLeave:u.default.func,children:u.default.node},a.defaultProps={onMouseEnter:d,onMouseLeave:d},a.ARROW_ICON_TYPES={hoz:{prev:"arrow-left",next:"arrow-right"},ver:{prev:"arrow-up",next:"arrow-down"}},o);f.displayName="Arrow",t.default=f,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,r=c(n(4)),i=c(n(6)),s=c(n(7)),S=c(n(5)),l=n(0),T=c(l),u=c(n(2)),x=c(n(12)),L=n(11);function c(e){return e&&e.__esModule?e:{default:e}}var C=function(e,t){return null===e.key||void 0===e.key?t:e.key},d=function(y){var _=void 0,v=[],b=[],M=[],w=T.default.Children.count(y.children),k=void 0;return T.default.Children.forEach(y.children,function(t,e){var n={message:"children",index:e,slidesToScroll:y.slidesToScroll,currentSlide:y.currentSlide};k=!y.lazyLoad|(y.lazyLoad&&0<=y.lazyLoadedList.indexOf(e))?t:t.key?T.default.createElement("div",{key:t.key}):T.default.createElement("div",null);var a,o,r,i,s,l,u,c,d,f,p=(a=(0,S.default)({},y,{activeIndex:e}),o={},void 0!==a.variableWidth&&!1!==a.variableWidth||(o.width=a.slideWidth),"fade"===a.animation&&(o.position="relative",o.opacity=a.currentSlide===a.activeIndex?1:0,o.visibility=a.currentSlide>=a.activeIndex?"visible":"hidden",o.transition="opacity "+a.speed+"ms "+a.cssEase,o.WebkitTransition="opacity "+a.speed+"ms "+a.cssEase,a.vertical?o.top=-a.activeIndex*a.slideHeight:o.left=-a.activeIndex*a.slideWidth),a.vertical&&(o.width="100%"),o),h=(r=(0,S.default)({activeIndex:e},y),s=r.prefix,d=c=u=l=void 0,f=(d=r.rtl?r.slideCount-1-r.activeIndex:r.activeIndex)<0||d>=r.slideCount,r.centerMode?(c=Math.floor(r.slidesToShow/2),u=(d-r.currentSlide)%r.slideCount==0,d>r.currentSlide-c-1&&d<=r.currentSlide+c&&(l=!0)):l=r.currentSlide<=d&&d outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(d.b)(e.to),n=Object(d.b)(this.props.to);Object(d.c)(t,n)?l()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"==typeof n?g(n,t.params):y({},n,{pathname:g(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(o.a.Component);_.propTypes={computedMatch:i.a.object,push:i.a.bool,from:i.a.string,to:i.a.oneOfType([i.a.string,i.a.object]).isRequired},_.defaultProps={push:!1},_.contextTypes={router:i.a.shape({history:i.a.shape({push:i.a.func.isRequired,replace:i.a.func.isRequired}).isRequired,staticContext:i.a.object}).isRequired};var v=_;t.a=v},function(e,t,n){"use strict";var a=n(43),o=n.n(a),r=n(0),s=n.n(r),i=n(2),l=n.n(i),u=n(86),c=n(38),d=n.n(c),f=Object.assign||function(e){for(var t=1;t may have only one child element"),this.unlisten=a.listen(function(){e.setState({match:e.computeMatch(a.location.pathname)})})},i.prototype.componentWillReceiveProps=function(e){o()(this.props.history===e.history,"You cannot change ")},i.prototype.componentWillUnmount=function(){this.unlisten()},i.prototype.render=function(){var e=this.props.children;return e?s.a.Children.only(e):null},i}(s.a.Component);h.propTypes={history:l.a.object.isRequired,children:l.a.node},h.contextTypes={router:l.a.object},h.childContextTypes={router:l.a.object.isRequired};var m=h;function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y=function(r){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,a=Array(n),o=0;o ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},i.prototype.render=function(){return s.a.createElement(m,{history:this.history,children:this.props.children})},i}(s.a.Component);y.propTypes={basename:l.a.string,getUserConfirmation:l.a.func,hashType:l.a.oneOf(["hashbang","noslash","slash"]),children:l.a.node};t.a=y},function(e,t,n){"use strict";var a=n(0),f=n.n(a),o=n(2),r=n.n(o),i=n(43),s=n.n(i),l=n(38),u=n.n(l),p=n(107);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){u()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){s()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),s()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var l=this.context.router.route,e=this.props.children,u=this.props.location||l.location,c=void 0,d=void 0;return f.a.Children.forEach(e,function(e){if(null==c&&f.a.isValidElement(e)){var t=e.props,n=t.path,a=t.exact,o=t.strict,r=t.sensitive,i=t.from,s=n||i;d=e,c=Object(p.a)(u.pathname,{path:s,exact:a,strict:o,sensitive:r},l.match)}}),c?f.a.cloneElement(d,{location:u,computedMatch:c}):null},t}(f.a.Component);c.contextTypes={router:r.a.shape({route:r.a.object.isRequired}).isRequired},c.propTypes={children:r.a.node,location:r.a.object};var d=c;t.a=d}]); diff --git a/core/pom.xml b/core/pom.xml index 7db5aea940c..84da4aa053a 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -18,7 +18,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 ../pom.xml diff --git a/core/src/main/java/com/alibaba/nacos/core/utils/PropertyUtil.java b/core/src/main/java/com/alibaba/nacos/core/utils/PropertyUtil.java index 3ef13fe6dfd..0faf2e5ddbb 100644 --- a/core/src/main/java/com/alibaba/nacos/core/utils/PropertyUtil.java +++ b/core/src/main/java/com/alibaba/nacos/core/utils/PropertyUtil.java @@ -16,6 +16,7 @@ package com.alibaba.nacos.core.utils; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,8 +35,8 @@ public class PropertyUtil { private static final Logger log = LoggerFactory.getLogger(PropertyUtil.class); static { + InputStream inputStream = null; try { - InputStream inputStream = null; String baseDir = System.getProperty("nacos.home"); if (!StringUtils.isBlank(baseDir)) { inputStream = new FileInputStream(baseDir + "/conf/application.properties"); @@ -46,6 +47,8 @@ public class PropertyUtil { properties.load(inputStream); } catch (Exception e) { log.error("read property file error:" + e); + } finally { + IOUtils.closeQuietly(inputStream); } } diff --git a/core/src/main/java/com/alibaba/nacos/core/utils/SystemUtils.java b/core/src/main/java/com/alibaba/nacos/core/utils/SystemUtils.java index 4350ebba94b..c224a84fa1f 100644 --- a/core/src/main/java/com/alibaba/nacos/core/utils/SystemUtils.java +++ b/core/src/main/java/com/alibaba/nacos/core/utils/SystemUtils.java @@ -22,10 +22,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; +import java.io.*; import java.lang.management.ManagementFactory; import java.util.ArrayList; import java.util.Arrays; @@ -59,8 +56,7 @@ public class SystemUtils { public static final String FUNCTION_MODE_NAMING = "naming"; - - private static OperatingSystemMXBean operatingSystemMXBean = (OperatingSystemMXBean)ManagementFactory + private static OperatingSystemMXBean operatingSystemMXBean = (OperatingSystemMXBean) ManagementFactory .getOperatingSystemMXBean(); /** @@ -98,15 +94,15 @@ public static String getSystemEnv(String key) { } public static float getLoad() { - return (float)operatingSystemMXBean.getSystemLoadAverage(); + return (float) operatingSystemMXBean.getSystemLoadAverage(); } public static float getCPU() { - return (float)operatingSystemMXBean.getSystemCpuLoad(); + return (float) operatingSystemMXBean.getSystemCpuLoad(); } public static float getMem() { - return (float)(1 - (double)operatingSystemMXBean.getFreePhysicalMemorySize() / (double)operatingSystemMXBean + return (float) (1 - (double) operatingSystemMXBean.getFreePhysicalMemorySize() / (double) operatingSystemMXBean .getTotalPhysicalMemorySize()); } @@ -128,23 +124,31 @@ private static String getClusterConfFilePath() { public static List readClusterConf() throws IOException { List instanceList = new ArrayList(); - List lines = IoUtils.readLines( - new InputStreamReader(new FileInputStream(new File(CLUSTER_CONF_FILE_PATH)), UTF_8)); - String comment = "#"; - for (String line : lines) { - String instance = line.trim(); - if (instance.startsWith(comment)) { - // # it is ip - continue; + Reader reader = null; + + try { + reader = new InputStreamReader(new FileInputStream(new File(CLUSTER_CONF_FILE_PATH)), UTF_8); + List lines = IoUtils.readLines(reader); + String comment = "#"; + for (String line : lines) { + String instance = line.trim(); + if (instance.startsWith(comment)) { + // # it is ip + continue; + } + if (instance.contains(comment)) { + // 192.168.71.52:8848 # Instance A + instance = instance.substring(0, instance.indexOf(comment)); + instance = instance.trim(); + } + instanceList.add(instance); } - if (instance.contains(comment)) { - // 192.168.71.52:8848 # Instance A - instance = instance.substring(0, instance.indexOf(comment)); - instance = instance.trim(); + return instanceList; + } finally { + if (reader != null) { + reader.close(); } - instanceList.add(instance); } - return instanceList; } public static void writeClusterConf(String content) throws IOException { diff --git a/distribution/conf/application.properties b/distribution/conf/application.properties index 9ec050758ed..c95c3b5ca1d 100644 --- a/distribution/conf/application.properties +++ b/distribution/conf/application.properties @@ -26,7 +26,7 @@ management.metrics.export.influx.enabled=false #management.metrics.export.influx.compressed=true server.tomcat.accesslog.enabled=true -server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D +server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i # default current work dir server.tomcat.basedir= diff --git a/distribution/pom.xml b/distribution/pom.xml index 8d32af1260c..b282d54e01a 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -18,7 +18,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 ../pom.xml diff --git a/example/pom.xml b/example/pom.xml index 25f9291f2da..fb29d5b5256 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -18,7 +18,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 ../pom.xml diff --git a/naming/pom.xml b/naming/pom.xml index 3cb0ddd8b4d..ef719b42c5d 100644 --- a/naming/pom.xml +++ b/naming/pom.xml @@ -18,7 +18,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 ../pom.xml @@ -150,10 +150,6 @@ jul-to-slf4j
- - com.github.spotbugs - spotbugs-annotations - com.alibaba.nacos nacos-cmdb diff --git a/naming/src/main/java/com/alibaba/nacos/naming/boot/RunningConfig.java b/naming/src/main/java/com/alibaba/nacos/naming/boot/RunningConfig.java index b32947b1c44..bf5011849c9 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/boot/RunningConfig.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/boot/RunningConfig.java @@ -17,7 +17,6 @@ import com.alibaba.nacos.naming.misc.Loggers; import com.alibaba.nacos.naming.misc.UtilsAndCommons; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.context.WebServerInitializedEvent; @@ -39,7 +38,6 @@ public class RunningConfig implements ApplicationListener> listeners = new ConcurrentHashMap<>(); + private Map> listeners = new ConcurrentHashMap<>(); + + private Map syncChecksumTasks = new ConcurrentHashMap<>(16); @PostConstruct public void init() throws Exception { @@ -190,48 +192,62 @@ public void onRemove(String key) { public void onReceiveChecksums(Map checksumMap, String server) { - List toUpdateKeys = new ArrayList<>(); - List toRemoveKeys = new ArrayList<>(); - for (Map.Entry entry : checksumMap.entrySet()) { - if (distroMapper.responsible(KeyBuilder.getServiceName(entry.getKey()))) { - // this key should not be sent from remote server: - Loggers.EPHEMERAL.error("receive responsible key timestamp of " + entry.getKey() + " from " + server); - // abort the procedure: - return; - } - if (!dataStore.contains(entry.getKey()) || - dataStore.get(entry.getKey()).value == null || - !dataStore.get(entry.getKey()).value.getChecksum().equals(entry.getValue())) { - toUpdateKeys.add(entry.getKey()); - } + if (syncChecksumTasks.containsKey(server)) { + // Already in process of this server: + Loggers.EPHEMERAL.warn("sync checksum task already in process with {}", server); + return; } - for (String key : dataStore.keys()) { + syncChecksumTasks.put(server, "1"); - if (!server.equals(distroMapper.mapSrv(KeyBuilder.getServiceName(key)))) { - continue; + try { + + List toUpdateKeys = new ArrayList<>(); + List toRemoveKeys = new ArrayList<>(); + for (Map.Entry entry : checksumMap.entrySet()) { + if (distroMapper.responsible(KeyBuilder.getServiceName(entry.getKey()))) { + // this key should not be sent from remote server: + Loggers.EPHEMERAL.error("receive responsible key timestamp of " + entry.getKey() + " from " + server); + // abort the procedure: + return; + } + if (!dataStore.contains(entry.getKey()) || + dataStore.get(entry.getKey()).value == null || + !dataStore.get(entry.getKey()).value.getChecksum().equals(entry.getValue())) { + toUpdateKeys.add(entry.getKey()); + } } - if (!checksumMap.containsKey(key)) { - toRemoveKeys.add(key); + for (String key : dataStore.keys()) { + + if (!server.equals(distroMapper.mapSrv(KeyBuilder.getServiceName(key)))) { + continue; + } + + if (!checksumMap.containsKey(key)) { + toRemoveKeys.add(key); + } } - } - Loggers.EPHEMERAL.info("to remove keys: {}, to update keys: {}, source: {}", toRemoveKeys, toUpdateKeys, server); + Loggers.EPHEMERAL.info("to remove keys: {}, to update keys: {}, source: {}", toRemoveKeys, toUpdateKeys, server); - for (String key : toRemoveKeys) { - onRemove(key); - } + for (String key : toRemoveKeys) { + onRemove(key); + } - if (toUpdateKeys.isEmpty()) { - return; - } + if (toUpdateKeys.isEmpty()) { + return; + } - try { - byte[] result = NamingProxy.getData(toUpdateKeys, server); - processData(result); - } catch (Exception e) { - Loggers.EPHEMERAL.error("get data from " + server + " failed!", e); + try { + byte[] result = NamingProxy.getData(toUpdateKeys, server); + processData(result); + } catch (Exception e) { + Loggers.EPHEMERAL.error("get data from " + server + " failed!", e); + } + } finally { + // Remove this 'in process' flag: + syncChecksumTasks.remove(server); } } @@ -259,8 +275,9 @@ public void processData(byte[] data) throws Exception { if (!listeners.containsKey(entry.getKey())) { // pretty sure the service not exist: - if (ServerMode.AP.name().equals(switchDomain.getServerMode())) { + if (switchDomain.isDefaultInstanceEphemeral()) { // create empty service + Loggers.EPHEMERAL.info("creating service {}", entry.getKey()); Service service = new Service(); String serviceName = KeyBuilder.getServiceName(entry.getKey()); String namespaceId = KeyBuilder.getNamespace(entry.getKey()); @@ -277,19 +294,24 @@ public void processData(byte[] data) throws Exception { } for (Map.Entry> entry : datumMap.entrySet()) { - dataStore.put(entry.getKey(), entry.getValue()); if (!listeners.containsKey(entry.getKey())) { - Loggers.EPHEMERAL.warn("listener not found: {}", entry.getKey()); + // Should not happen: + Loggers.EPHEMERAL.warn("listener of {} not found.", entry.getKey()); continue; } - for (RecordListener listener : listeners.get(entry.getKey())) { - try { + + try { + for (RecordListener listener : listeners.get(entry.getKey())) { listener.onChange(entry.getKey(), entry.getValue().value); - } catch (Exception e) { - Loggers.EPHEMERAL.error("notify " + listener + ", key: " + entry.getKey() + " failed.", e); } + } catch (Exception e) { + Loggers.EPHEMERAL.error("[NACOS-DISTRO] error while execute listener of key: {}", entry.getKey(), e); + continue; } + + // Update data store if listener executed successfully: + dataStore.put(entry.getKey(), entry.getValue()); } } } @@ -384,12 +406,13 @@ public void run() { continue; } } catch (Throwable e) { - Loggers.EPHEMERAL.error("[NACOS-DISTRO] error while notifying listener of key: {} {}", datumKey, e); + Loggers.EPHEMERAL.error("[NACOS-DISTRO] error while notifying listener of key: {}", datumKey, e); } } if (Loggers.EPHEMERAL.isDebugEnabled()) { - Loggers.EPHEMERAL.debug("[NACOS-DISTRO] datum change notified, key: {}, listener count: {}", datumKey, count); + Loggers.EPHEMERAL.debug("[NACOS-DISTRO] datum change notified, key: {}, listener count: {}, action: {}", + datumKey, count, action.name()); } } catch (Throwable e) { Loggers.EPHEMERAL.error("[NACOS-DISTRO] Error while handling notifying task", e); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcher.java b/naming/src/main/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcher.java index 727932dcdf7..b317954f5eb 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcher.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcher.java @@ -17,10 +17,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.nacos.naming.cluster.servers.Server; -import com.alibaba.nacos.naming.misc.GlobalConfig; -import com.alibaba.nacos.naming.misc.GlobalExecutor; -import com.alibaba.nacos.naming.misc.Loggers; -import com.alibaba.nacos.naming.misc.NetUtils; +import com.alibaba.nacos.naming.misc.*; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -58,12 +55,8 @@ public void init() { } } - public int mapTask(String key) { - return Math.abs(key.hashCode()) % partitionConfig.getTaskDispatchThreadCount(); - } - public void addTask(String key) { - taskSchedulerList.get(mapTask(key)).addTask(key); + taskSchedulerList.get(UtilsAndCommons.shakeUp(key, partitionConfig.getTaskDispatchThreadCount())).addTask(key); } public class TaskScheduler implements Runnable { @@ -107,14 +100,16 @@ public void run() { continue; } + if (StringUtils.isBlank(key)) { + continue; + } + if (dataSize == 0) { keys = new ArrayList<>(); } - if (StringUtils.isNotBlank(key)) { - keys.add(key); - dataSize++; - } + keys.add(key); + dataSize++; if (dataSize == partitionConfig.getBatchSyncKeyCount() || (System.currentTimeMillis() - lastDispatchTime) > partitionConfig.getTaskDispatchPeriod()) { diff --git a/naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftConsistencyServiceImpl.java b/naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftConsistencyServiceImpl.java index 15b48bcc27f..5326dcba480 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftConsistencyServiceImpl.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftConsistencyServiceImpl.java @@ -18,6 +18,7 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.naming.cluster.ServerStatus; import com.alibaba.nacos.naming.consistency.Datum; +import com.alibaba.nacos.naming.consistency.KeyBuilder; import com.alibaba.nacos.naming.consistency.RecordListener; import com.alibaba.nacos.naming.consistency.persistent.PersistentConsistencyService; import com.alibaba.nacos.naming.misc.Loggers; @@ -38,6 +39,9 @@ public class RaftConsistencyServiceImpl implements PersistentConsistencyService @Autowired private RaftCore raftCore; + @Autowired + private RaftPeerSet peers; + @Autowired private SwitchDomain switchDomain; @@ -54,6 +58,12 @@ public void put(String key, Record value) throws NacosException { @Override public void remove(String key) throws NacosException { try { + if (KeyBuilder.matchInstanceListKey(key) && !raftCore.isLeader()) { + Datum datum = new Datum(); + datum.key = key; + raftCore.onDelete(datum.key, peers.getLeader()); + return; + } raftCore.signalDelete(key); } catch (Exception e) { Loggers.RAFT.error("Raft remove failed.", e); @@ -92,7 +102,7 @@ public void onPut(Datum datum, RaftPeer source) throws NacosException { public void onRemove(Datum datum, RaftPeer source) throws NacosException { try { - raftCore.onDelete(datum, source); + raftCore.onDelete(datum.key, source); } catch (Exception e) { Loggers.RAFT.error("Raft onRemove failed.", e); throw new NacosException(NacosException.SERVER_ERROR, "Raft onRemove failed, datum:" + datum + ", source: " + source); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftCore.java b/naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftCore.java index dc9fdf6b731..5d9fbfad0dc 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftCore.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftCore.java @@ -213,7 +213,7 @@ public STATE onContentWriteCompleted() { if (!latch.await(UtilsAndCommons.RAFT_PUBLISH_TIMEOUT, TimeUnit.MILLISECONDS)) { // only majority servers return success can we consider this update success - Loggers.RAFT.info("data publish failed, caused failed to notify majority, key={}", key); + Loggers.RAFT.error("data publish failed, caused failed to notify majority, key={}", key); throw new IllegalStateException("data publish failed, caused failed to notify majority, key=" + key); } @@ -243,7 +243,7 @@ public void signalDelete(final String key) throws Exception { json.put("datum", datum); json.put("source", peers.local()); - onDelete(datum, peers.local()); + onDelete(datum.key, peers.local()); for (final String server : peers.allServersWithoutMySelf()) { String url = buildURL(server, API_ON_DEL); @@ -317,7 +317,7 @@ public void onPublish(Datum datum, RaftPeer source) throws Exception { Loggers.RAFT.info("data added/updated, key={}, term={}", datum.key, local.term); } - public void onDelete(Datum datum, RaftPeer source) throws Exception { + public void onDelete(String datumKey, RaftPeer source) throws Exception { RaftPeer local = peers.local(); @@ -337,7 +337,7 @@ public void onDelete(Datum datum, RaftPeer source) throws Exception { local.resetLeaderDue(); // do apply - String key = datum.key; + String key = datumKey; deleteDatum(key); if (KeyBuilder.matchServiceMetaKey(key)) { @@ -353,7 +353,7 @@ public void onDelete(Datum datum, RaftPeer source) throws Exception { raftStore.updateTerm(local.term.get()); } - Loggers.RAFT.info("data removed, key={}, term={}", datum.key, local.term); + Loggers.RAFT.info("data removed, key={}, term={}", datumKey, local.term); } @@ -667,41 +667,49 @@ public Integer onCompleted(Response response) throws Exception { return 1; } - List datumList = JSON.parseObject(response.getResponseBody(), new TypeReference>() { + List datumList = JSON.parseObject(response.getResponseBody(), new TypeReference>() { }); - for (Datum datum : datumList) { + for (JSONObject datumJson : datumList) { OPERATE_LOCK.lock(); + Datum newDatum = null; try { - Datum oldDatum = getDatum(datum.key); + Datum oldDatum = getDatum(datumJson.getString("key")); - if (oldDatum != null && datum.timestamp.get() <= oldDatum.timestamp.get()) { + if (oldDatum != null && datumJson.getLongValue("timestamp") <= oldDatum.timestamp.get()) { Loggers.RAFT.info("[NACOS-RAFT] timestamp is smaller than that of mine, key: {}, remote: {}, local: {}", - datum.key, datum.timestamp, oldDatum.timestamp); + datumJson.getString("key"), datumJson.getLongValue("timestamp"), oldDatum.timestamp); continue; } - raftStore.write(datum); - - if (KeyBuilder.matchServiceMetaKey(datum.key)) { + if (KeyBuilder.matchServiceMetaKey(datumJson.getString("key"))) { Datum serviceDatum = new Datum<>(); - serviceDatum.key = datum.key; - serviceDatum.timestamp.set(datum.timestamp.get()); - serviceDatum.value = JSON.parseObject(JSON.toJSONString(datum.value), Service.class); - datum = serviceDatum; + serviceDatum.key = datumJson.getString("key"); + serviceDatum.timestamp.set(datumJson.getLongValue("timestamp")); + serviceDatum.value = + JSON.parseObject(JSON.toJSONString(datumJson.getJSONObject("value")), Service.class); + newDatum = serviceDatum; } - if (KeyBuilder.matchInstanceListKey(datum.key)) { + if (KeyBuilder.matchInstanceListKey(datumJson.getString("key"))) { Datum instancesDatum = new Datum<>(); - instancesDatum.key = datum.key; - instancesDatum.timestamp.set(datum.timestamp.get()); - instancesDatum.value = JSON.parseObject(JSON.toJSONString(datum.value), Instances.class); - datum = instancesDatum; + instancesDatum.key = datumJson.getString("key"); + instancesDatum.timestamp.set(datumJson.getLongValue("timestamp")); + instancesDatum.value = + JSON.parseObject(JSON.toJSONString(datumJson.getJSONObject("value")), Instances.class); + newDatum = instancesDatum; + } + + if (newDatum == null || newDatum.value == null) { + Loggers.RAFT.error("receive null datum: {}", datumJson); + continue; } - datums.put(datum.key, datum); - notifier.addTask(datum.key, ApplyAction.CHANGE); + raftStore.write(newDatum); + + datums.put(newDatum.key, newDatum); + notifier.addTask(newDatum.key, ApplyAction.CHANGE); local.resetLeaderDue(); @@ -715,10 +723,10 @@ public Integer onCompleted(Response response) throws Exception { raftStore.updateTerm(local.term.get()); Loggers.RAFT.info("data updated, key: {}, timestamp: {}, from {}, local term: {}", - datum.key, datum.timestamp, JSON.toJSONString(remote), local.term); + newDatum.key, newDatum.timestamp, JSON.toJSONString(remote), local.term); } catch (Throwable e) { - Loggers.RAFT.error("[RAFT-BEAT] failed to sync datum from leader, key: {} {}", datum.key, e); + Loggers.RAFT.error("[RAFT-BEAT] failed to sync datum from leader, datum: {}", newDatum, e); } finally { OPERATE_LOCK.unlock(); } @@ -863,7 +871,6 @@ public void loadDatum(String key) { } private void deleteDatum(String key) { - Datum deleted; try { deleted = datums.remove(URLDecoder.decode(key, "UTF-8")); @@ -881,6 +888,10 @@ public boolean isInitialized() { return initialized || !globalConfig.isDataWarmup(); } + public int getNotifyTaskCount() { + return notifier.getTaskSize(); + } + public class Notifier implements Runnable { private ConcurrentHashMap services = new ConcurrentHashMap<>(10 * 1024); @@ -895,6 +906,9 @@ public void addTask(String datumKey, ApplyAction action) { if (action == ApplyAction.CHANGE) { services.put(datumKey, StringUtils.EMPTY); } + + Loggers.RAFT.info("add task {}", datumKey); + tasks.add(Pair.with(datumKey, action)); } @@ -920,6 +934,8 @@ public void run() { services.remove(datumKey); + Loggers.RAFT.info("remove task {}", datumKey); + int count = 0; if (listeners.containsKey(KeyBuilder.SERVICE_META_KEY_PREFIX)) { @@ -936,7 +952,7 @@ public void run() { listener.onDelete(datumKey); } } catch (Throwable e) { - Loggers.RAFT.error("[NACOS-RAFT] error while notifying listener of key: {} {}", datumKey, e); + Loggers.RAFT.error("[NACOS-RAFT] error while notifying listener of key: {}", datumKey, e); } } } @@ -961,7 +977,7 @@ public void run() { continue; } } catch (Throwable e) { - Loggers.RAFT.error("[NACOS-RAFT] error while notifying listener of key: {} {}", datumKey, e); + Loggers.RAFT.error("[NACOS-RAFT] error while notifying listener of key: {}", datumKey, e); } } diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java index 010d2966d3d..a9da7b0bb03 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ApiController.java @@ -24,6 +24,7 @@ import com.alibaba.nacos.naming.core.ServiceManager; import com.alibaba.nacos.naming.misc.UtilsAndCommons; import com.alibaba.nacos.naming.push.ClientInfo; +import com.alibaba.nacos.naming.web.CanDistro; import com.alibaba.nacos.naming.web.OverrideParameterRequestWrapper; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -138,6 +139,7 @@ public JSONObject srvIPXT(HttpServletRequest request) throws Exception { agent, clusters, clientIP, udpPort, env, isCheck, app, tenant, healthyOnly); } + @CanDistro @RequestMapping("/clientBeat") public JSONObject clientBeat(HttpServletRequest request) throws Exception { OverrideParameterRequestWrapper requestWrapper = OverrideParameterRequestWrapper.buildRequest(request); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ClusterController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ClusterController.java index 9bda150d3a4..2b0df41280a 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ClusterController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ClusterController.java @@ -96,9 +96,8 @@ public String update(HttpServletRequest request) throws Exception { cluster.setHealthChecker(abstractHealthChecker); cluster.setMetadata(UtilsAndCommons.parseMetadata(metadata)); - + cluster.init(); service.getClusterMap().put(clusterName, cluster); - service.setLastModifiedMillis(System.currentTimeMillis()); service.recalculateChecksum(); service.validate(); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/DistroController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/DistroController.java index 2504a276782..058dd273cec 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/DistroController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/DistroController.java @@ -15,6 +15,7 @@ */ package com.alibaba.nacos.naming.controllers; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.alibaba.nacos.core.utils.WebUtils; import com.alibaba.nacos.naming.cluster.ServerMode; @@ -84,8 +85,8 @@ public String onSyncDatum(HttpServletRequest request, HttpServletResponse respon String namespaceId = KeyBuilder.getNamespace(entry.getKey()); String serviceName = KeyBuilder.getServiceName(entry.getKey()); if (!serviceManager.containService(namespaceId, serviceName) - && ServerMode.AP.name().equals(switchDomain.getServerMode())) { - serviceManager.createEmptyService(namespaceId, serviceName); + && switchDomain.isDefaultInstanceEphemeral()) { + serviceManager.createEmptyService(namespaceId, serviceName, true); } consistencyService.onPut(entry.getKey(), entry.getValue().value); } @@ -106,7 +107,9 @@ public String syncChecksum(HttpServletRequest request, HttpServletResponse respo @RequestMapping(value = "/datum", method = RequestMethod.GET) public void get(HttpServletRequest request, HttpServletResponse response) throws Exception { - String keys = WebUtils.required(request, "keys"); + + String entity = IOUtils.toString(request.getInputStream(), "UTF-8"); + String keys = JSON.parseObject(entity).getString("keys"); String keySplitter = ","; Map datumMap = new HashMap<>(64); for (String key : keys.split(keySplitter)) { diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/HealthController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/HealthController.java index 931f711a71f..801212e6cab 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/HealthController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/HealthController.java @@ -25,20 +25,18 @@ import com.alibaba.nacos.naming.core.Service; import com.alibaba.nacos.naming.core.ServiceManager; import com.alibaba.nacos.naming.healthcheck.HealthCheckType; -import com.alibaba.nacos.naming.misc.HttpClient; import com.alibaba.nacos.naming.misc.Loggers; import com.alibaba.nacos.naming.misc.UtilsAndCommons; import com.alibaba.nacos.naming.push.PushService; +import com.alibaba.nacos.naming.web.CanDistro; import com.google.common.collect.Lists; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; -import java.net.HttpURLConnection; -import java.util.HashMap; -import java.util.Map; /** * Health status related operation controller @@ -68,57 +66,48 @@ public JSONObject server(HttpServletRequest request) { return result; } + @CanDistro @RequestMapping(value = {"", "/instance"}, method = RequestMethod.PUT) public String update(HttpServletRequest request) throws Exception { String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID); String serviceName = WebUtils.required(request, CommonParams.SERVICE_NAME); - String ip = WebUtils.required(request, "ip"); - int port = Integer.parseInt(WebUtils.required(request, "port")); - boolean valid = Boolean.valueOf(WebUtils.required(request, "valid")); String clusterName = WebUtils.optional(request, CommonParams.CLUSTER_NAME , UtilsAndCommons.DEFAULT_CLUSTER_NAME); - if (!distroMapper.responsible(serviceName)) { - String server = distroMapper.mapSrv(serviceName); - Loggers.EVT_LOG.info("I'm not responsible for " + serviceName + ", proxy it to " + server); - Map proxyParams = new HashMap<>(16); - for (Map.Entry entry : request.getParameterMap().entrySet()) { - String key = entry.getKey(); - String value = entry.getValue()[0]; - proxyParams.put(key, value); - } + String ip = WebUtils.required(request, "ip"); + int port = Integer.parseInt(WebUtils.required(request, "port")); - if (!server.contains(UtilsAndCommons.IP_PORT_SPLITER)) { - server = server + UtilsAndCommons.IP_PORT_SPLITER + RunningConfig.getServerPort(); - } + boolean valid = false; + + String healthyString = WebUtils.optional(request, "healthy", StringUtils.EMPTY); + if (StringUtils.isBlank(healthyString)) { + healthyString = WebUtils.optional(request, "valid", StringUtils.EMPTY); + } - String url = "http://" + server + RunningConfig.getContextPath() - + UtilsAndCommons.NACOS_NAMING_CONTEXT + "/health"; - HttpClient.HttpResult httpResult = HttpClient.httpPost(url, null, proxyParams); + if (StringUtils.isBlank(healthyString)) { + throw new IllegalArgumentException("Param 'healthy' is required."); + } - if (httpResult.code != HttpURLConnection.HTTP_OK) { - throw new IllegalArgumentException("failed to proxy health update to " + server + ", service: " + serviceName); - } - } else { - Service service = serviceManager.getService(namespaceId, serviceName); - // Only health check "none" need update health status with api - if (HealthCheckType.NONE.name().equals(service.getClusterMap().get(clusterName).getHealthChecker().getType())) { - for (Instance instance : service.allIPs(Lists.newArrayList(clusterName))) { - if (instance.getIp().equals(ip) && instance.getPort() == port) { - instance.setHealthy(valid); - Loggers.EVT_LOG.info((valid ? "[IP-ENABLED]" : "[IP-DISABLED]") + " ips: " - + instance.getIp() + ":" + instance.getPort() + "@" + instance.getClusterName() - + ", service: " + serviceName + ", msg: update thought HealthController api"); - pushService.serviceChanged(namespaceId, service.getName()); - break; - } + + Service service = serviceManager.getService(namespaceId, serviceName); + // Only health check "none" need update health status with api + if (HealthCheckType.NONE.name().equals(service.getClusterMap().get(clusterName).getHealthChecker().getType())) { + for (Instance instance : service.allIPs(Lists.newArrayList(clusterName))) { + if (instance.getIp().equals(ip) && instance.getPort() == port) { + instance.setHealthy(valid); + Loggers.EVT_LOG.info((valid ? "[IP-ENABLED]" : "[IP-DISABLED]") + " ips: " + + instance.getIp() + ":" + instance.getPort() + "@" + instance.getClusterName() + + ", service: " + serviceName + ", msg: update thought HealthController api"); + pushService.serviceChanged(namespaceId, service.getName()); + break; } - } else { - throw new IllegalArgumentException("health check mode 'client' and 'server' are not supported, service: " + serviceName); } + } else { + throw new IllegalArgumentException("health check is still working, service: " + serviceName); } + return "ok"; } } diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java index aa6cd746b7d..2be944606f2 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java @@ -112,6 +112,7 @@ public String deregister(HttpServletRequest request) throws Exception { Service service = serviceManager.getService(namespaceId, serviceName); if (service == null) { + Loggers.SRV_LOG.warn("remove instance from non-exist service: {}", serviceName); return "ok"; } @@ -187,7 +188,8 @@ public JSONObject detail(HttpServletRequest request) throws Exception { List ips = service.allIPs(clusters); if (ips == null || ips.isEmpty()) { - throw new IllegalStateException("no ips found for cluster " + cluster + " in service " + serviceName); + throw new NacosException(NacosException.NOT_FOUND, + "no ips found for cluster " + cluster + " in service " + serviceName); } for (Instance instance : ips) { @@ -205,7 +207,7 @@ public JSONObject detail(HttpServletRequest request) throws Exception { } } - throw new IllegalStateException("no matched ip found!"); + throw new NacosException(NacosException.NOT_FOUND, "no matched ip found!"); } @CanDistro @@ -216,15 +218,15 @@ public JSONObject beat(HttpServletRequest request) throws Exception { result.put("clientBeatInterval", switchDomain.getClientBeatInterval()); - // ignore client beat in CP mode: - if (ServerMode.CP.name().equals(switchDomain.getServerMode())) { - return result; - } - String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID); String beat = WebUtils.required(request, "beat"); RsInfo clientBeat = JSON.parseObject(beat, RsInfo.class); + + if (!switchDomain.isDefaultInstanceEphemeral() && !clientBeat.isEphemeral()) { + return result; + } + if (StringUtils.isBlank(clientBeat.getCluster())) { clientBeat.setCluster(UtilsAndCommons.DEFAULT_CLUSTER_NAME); } @@ -323,16 +325,6 @@ private Instance parseInstance(HttpServletRequest request) throws Exception { throw new NacosException(NacosException.INVALID_PARAM, "instance format invalid:" + instance); } - if ((ServerMode.AP.name().equals(switchDomain.getServerMode()) && !instance.isEphemeral())) { - throw new NacosException(NacosException.INVALID_PARAM, "wrong instance type: " + instance.isEphemeral() - + " in " + switchDomain.getServerMode() + " mode."); - } - - if ((ServerMode.CP.name().equals(switchDomain.getServerMode()) && instance.isEphemeral())) { - throw new NacosException(NacosException.INVALID_PARAM, "wrong instance type: " + instance.isEphemeral() - + " in " + switchDomain.getServerMode() + " mode."); - } - return instance; } @@ -341,12 +333,14 @@ private Instance getIPAddress(HttpServletRequest request) { String ip = WebUtils.required(request, "ip"); String port = WebUtils.required(request, "port"); String weight = WebUtils.optional(request, "weight", "1"); - String cluster = WebUtils.optional(request, CommonParams.CLUSTER_NAME, UtilsAndCommons.DEFAULT_CLUSTER_NAME); + String cluster = WebUtils.optional(request, CommonParams.CLUSTER_NAME, StringUtils.EMPTY); + if (StringUtils.isBlank(cluster)) { + cluster = WebUtils.optional(request, "cluster", UtilsAndCommons.DEFAULT_CLUSTER_NAME); + } boolean healthy = BooleanUtils.toBoolean(WebUtils.optional(request, "healthy", "true")); boolean enabled = BooleanUtils.toBoolean(WebUtils.optional(request, "enable", "true")); - // If server running in CP mode, we set this flag to false: boolean ephemeral = BooleanUtils.toBoolean(WebUtils.optional(request, "ephemeral", - String.valueOf(!ServerMode.CP.name().equals(switchDomain.getServerMode())))); + String.valueOf(switchDomain.isDefaultInstanceEphemeral()))); Instance instance = new Instance(); instance.setPort(Integer.parseInt(port)); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/OperatorController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/OperatorController.java index 6af3f80b702..a4b80a61083 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/OperatorController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/OperatorController.java @@ -23,6 +23,7 @@ import com.alibaba.nacos.core.utils.WebUtils; import com.alibaba.nacos.naming.cluster.ServerListManager; import com.alibaba.nacos.naming.cluster.ServerStatusManager; +import com.alibaba.nacos.naming.consistency.persistent.raft.RaftCore; import com.alibaba.nacos.naming.core.DistroMapper; import com.alibaba.nacos.naming.core.Service; import com.alibaba.nacos.naming.core.ServiceManager; @@ -73,6 +74,9 @@ public class OperatorController { @Autowired private DistroMapper distroMapper; + @Autowired + private RaftCore raftCore; + @RequestMapping("/push/state") public JSONObject pushState(HttpServletRequest request) { @@ -144,6 +148,7 @@ public JSONObject metrics(HttpServletRequest request) { result.put("status", serverStatusManager.getServerStatus().name()); result.put("serviceCount", serviceCount); result.put("instanceCount", ipCount); + result.put("raftNotifyTaskCount", raftCore.getNotifyTaskCount()); result.put("responsibleServiceCount", responsibleDomCount); result.put("responsibleInstanceCount", responsibleIPCount); result.put("cpu", SystemUtils.getCPU()); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/RaftController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/RaftController.java index 5b84551e6cd..bf1e6c284a2 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/RaftController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/RaftController.java @@ -50,7 +50,7 @@ import java.util.Map; /** - * HTTP interfaces for Raft consistency protocol. These interfaces should only be invoked by Nacos server itself. + * Methods for Raft consistency protocol. These methods should only be invoked by Nacos server itself. * * @author nkorange * @since 1.0.0 @@ -83,7 +83,6 @@ public JSONObject vote(HttpServletRequest request, HttpServletResponse response) public JSONObject beat(HttpServletRequest request, HttpServletResponse response) throws Exception { String entity = new String(IoUtils.tryDecompress(request.getInputStream()), "UTF-8"); -// String value = Arrays.asList(entity).toArray(new String[1])[0]; String value = URLDecoder.decode(entity, "UTF-8"); value = URLDecoder.decode(value, "UTF-8"); @@ -240,7 +239,6 @@ public String onDelete(HttpServletRequest request, HttpServletResponse response) response.setHeader("Content-Encode", "gzip"); String entity = IOUtils.toString(request.getInputStream(), "UTF-8"); -// String value = Arrays.asList(entity).toArray(new String[1])[0]; String value = URLDecoder.decode(entity, "UTF-8"); value = URLDecoder.decode(value, "UTF-8"); JSONObject jsonObject = JSON.parseObject(value); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ServiceController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ServiceController.java index d4bec77714e..47c7683ff06 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ServiceController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ServiceController.java @@ -31,6 +31,7 @@ import com.alibaba.nacos.naming.selector.LabelSelector; import com.alibaba.nacos.naming.selector.NoneSelector; import com.alibaba.nacos.naming.selector.Selector; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -39,6 +40,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; +import java.io.IOException; import java.net.URLDecoder; import java.util.*; @@ -105,15 +107,6 @@ public String remove(HttpServletRequest request) throws Exception { Constants.DEFAULT_NAMESPACE_ID); String serviceName = WebUtils.required(request, CommonParams.SERVICE_NAME); - Service service = serviceManager.getService(namespaceId, serviceName); - if (service == null) { - throw new IllegalArgumentException("specified service not exist, serviceName : " + serviceName); - } - - if (!service.allIPs().isEmpty()) { - throw new IllegalArgumentException("specified service has instances, serviceName : " + serviceName); - } - serviceManager.easyRemoveService(namespaceId, serviceName); return "ok"; @@ -299,13 +292,19 @@ public JSONObject searchService(HttpServletRequest request) { } @RequestMapping(value = "/status", method = RequestMethod.POST) - public String serviceStatus(HttpServletRequest request) { + public String serviceStatus(HttpServletRequest request) throws Exception { + + String entity = IOUtils.toString(request.getInputStream(), "UTF-8"); + String value = URLDecoder.decode(entity, "UTF-8"); + JSONObject json = JSON.parseObject(value); + //format: service1@@checksum@@@service2@@checksum - String statuses = WebUtils.required(request, "statuses"); - String serverIP = WebUtils.optional(request, "clientIP", ""); + String statuses = json.getString("statuses"); + String serverIP = json.getString("clientIP"); if (!serverListManager.contains(serverIP)) { - throw new IllegalArgumentException("ip: " + serverIP + " is not in serverlist"); + throw new NacosException(NacosException.INVALID_PARAM, + "ip: " + serverIP + " is not in serverlist"); } try { @@ -345,7 +344,7 @@ public String serviceStatus(HttpServletRequest request) { } @RequestMapping(value = "/checksum", method = RequestMethod.PUT) - public JSONObject checksum(HttpServletRequest request) { + public JSONObject checksum(HttpServletRequest request) throws Exception { String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID); @@ -353,7 +352,8 @@ public JSONObject checksum(HttpServletRequest request) { Service service = serviceManager.getService(namespaceId, serviceName); if (service == null) { - throw new IllegalArgumentException("serviceName not found: " + serviceName); + throw new NacosException(NacosException.NOT_FOUND, + "serviceName not found: " + serviceName); } service.recalculateChecksum(); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/Cluster.java b/naming/src/main/java/com/alibaba/nacos/naming/core/Cluster.java index af79c65d9fb..c4bf499279b 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/Cluster.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/Cluster.java @@ -54,6 +54,9 @@ public class Cluster extends com.alibaba.nacos.api.naming.pojo.Cluster implement @JSONField(serialize = false) private Service service; + @JSONField(serialize = false) + private volatile boolean inited = false; + private Map metadata = new ConcurrentHashMap<>(); public Cluster() { @@ -87,8 +90,12 @@ public List allIPs(boolean ephemeral) { } public void init() { + if (inited) { + return; + } checkTask = new HealthCheckTask(this); HealthCheckReactor.scheduleCheck(checkTask); + inited = true; } public void destroy() { @@ -105,6 +112,7 @@ public Service getService() { public void setService(Service service) { this.service = service; + this.setServiceName(service.getName()); } @Override diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/Instance.java b/naming/src/main/java/com/alibaba/nacos/naming/core/Instance.java index 23df04d762b..6f9679c4ded 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/Instance.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/Instance.java @@ -181,7 +181,7 @@ public static Instance fromJSON(String json) { } if (ip == null) { - throw new IllegalArgumentException("malfomed ip config: " + json); + throw new IllegalArgumentException("malformed ip config: " + json); } if (ip.getWeight() > MAX_WEIGHT_VALUE) { @@ -195,7 +195,7 @@ public static Instance fromJSON(String json) { } if (!ip.validate()) { - throw new IllegalArgumentException("malfomed ip config: " + json); + throw new IllegalArgumentException("malformed ip config: " + json); } return ip; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/Instances.java b/naming/src/main/java/com/alibaba/nacos/naming/core/Instances.java index 57752790e71..933a7ea880f 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/Instances.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/Instances.java @@ -25,6 +25,7 @@ import java.nio.charset.Charset; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -40,7 +41,7 @@ public class Instances implements Record { private long lastCalculateTime = 0L; - private List instanceList; + private List instanceList = new ArrayList<>(); public List getInstanceList() { return instanceList; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/Service.java b/naming/src/main/java/com/alibaba/nacos/naming/core/Service.java index 7addc5875b4..170a8ded7f9 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/Service.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/Service.java @@ -18,8 +18,8 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.nacos.naming.boot.SpringContext; -import com.alibaba.nacos.naming.consistency.RecordListener; import com.alibaba.nacos.naming.consistency.KeyBuilder; +import com.alibaba.nacos.naming.consistency.RecordListener; import com.alibaba.nacos.naming.healthcheck.ClientBeatCheckTask; import com.alibaba.nacos.naming.healthcheck.ClientBeatProcessor; import com.alibaba.nacos.naming.healthcheck.HealthCheckReactor; @@ -44,9 +44,9 @@ * Service of Nacos server side *

* We introduce a 'service --> cluster --> instance' model, in which service stores a list of clusters, - * which contains a list of instances. + * which contain a list of instances. *

- * This class inherits from Service in API module and stores some fields that do not expose to client. + * This class inherits from Service in API module and stores some fields that do not have to expose to client. * * @author nkorange */ @@ -154,14 +154,19 @@ public void onChange(String key, Instances value) throws Exception { Loggers.SRV_LOG.info("[NACOS-RAFT] datum is changed, key: {}, value: {}", key, value); - for (Instance ip : value.getInstanceList()) { + for (Instance instance : value.getInstanceList()) { + + if (instance == null) { + // Reject this abnormal instance list: + throw new RuntimeException("got null instance " + key); + } - if (ip.getWeight() > 10000.0D) { - ip.setWeight(10000.0D); + if (instance.getWeight() > 10000.0D) { + instance.setWeight(10000.0D); } - if (ip.getWeight() < 0.01D && ip.getWeight() > 0.0D) { - ip.setWeight(0.01D); + if (instance.getWeight() < 0.01D && instance.getWeight() > 0.0D) { + instance.setWeight(0.01D); } } diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java b/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java index b5c34ea1ffb..46600847378 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/ServiceManager.java @@ -21,7 +21,6 @@ import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.naming.cluster.ServerListManager; -import com.alibaba.nacos.naming.cluster.ServerMode; import com.alibaba.nacos.naming.cluster.servers.Server; import com.alibaba.nacos.naming.consistency.ConsistencyService; import com.alibaba.nacos.naming.consistency.Datum; @@ -79,6 +78,8 @@ public class ServiceManager implements RecordListener { @Autowired private PushService pushService; + private final Object putServiceLock = new Object(); + @PostConstruct public void init() { @@ -155,9 +156,15 @@ public void onChange(String key, Service service) throws Exception { public void onDelete(String key) throws Exception { String namespace = KeyBuilder.getNamespace(key); String name = KeyBuilder.getServiceName(key); - Service service = chooseServiceMap(namespace).remove(name); + Service service = chooseServiceMap(namespace).get(name); Loggers.RAFT.info("[RAFT-NOTIFIER] datum is deleted, key: {}", key); + // check again: + if (service != null && !service.allIPs().isEmpty()) { + Loggers.SRV_LOG.warn("service not empty, key: {}", key); + return; + } + if (service != null) { service.destroy(); consistencyService.remove(KeyBuilder.buildInstanceListKey(namespace, name, true)); @@ -165,6 +172,8 @@ public void onDelete(String key) throws Exception { consistencyService.unlisten(KeyBuilder.buildServiceMetaKey(namespace, name), service); Loggers.SRV_LOG.info("[DEAD-SERVICE] {}", service.toJSON()); } + + chooseServiceMap(namespace).remove(name); } private class UpdatedServiceProcessor implements Runnable { @@ -321,16 +330,28 @@ public int getResponsibleInstanceCount() { } public void easyRemoveService(String namespaceId, String serviceName) throws Exception { + + Service service = getService(namespaceId, serviceName); + if (service == null) { + throw new IllegalArgumentException("specified service not exist, serviceName : " + serviceName); + } + + if (!service.allIPs().isEmpty()) { + throw new IllegalArgumentException("specified service has instances, serviceName : " + serviceName); + } + consistencyService.remove(KeyBuilder.buildServiceMetaKey(namespaceId, serviceName)); } - public void addOrReplaceService(Service service) throws Exception { + public void addOrReplaceService(Service service) throws NacosException { consistencyService.put(KeyBuilder.buildServiceMetaKey(service.getNamespaceId(), service.getName()), service); } - public void createEmptyService(String namespaceId, String serviceName) throws NacosException { + public void createEmptyService(String namespaceId, String serviceName, boolean local) throws NacosException { Service service = getService(namespaceId, serviceName); if (service == null) { + + Loggers.SRV_LOG.info("creating empty service {}:{}", namespaceId, serviceName); service = new Service(); service.setName(serviceName); service.setNamespaceId(namespaceId); @@ -339,10 +360,14 @@ public void createEmptyService(String namespaceId, String serviceName) throws Na service.setLastModifiedMillis(System.currentTimeMillis()); service.recalculateChecksum(); service.validate(); - putService(service); - service.init(); - consistencyService.listen(KeyBuilder.buildInstanceListKey(service.getNamespaceId(), service.getName(), true), service); - consistencyService.listen(KeyBuilder.buildInstanceListKey(service.getNamespaceId(), service.getName(), false), service); + if (local) { + putService(service); + service.init(); + consistencyService.listen(KeyBuilder.buildInstanceListKey(service.getNamespaceId(), service.getName(), true), service); + consistencyService.listen(KeyBuilder.buildInstanceListKey(service.getNamespaceId(), service.getName(), false), service); + } else { + addOrReplaceService(service); + } } } @@ -358,9 +383,7 @@ public void createEmptyService(String namespaceId, String serviceName) throws Na */ public void registerInstance(String namespaceId, String serviceName, Instance instance) throws NacosException { - if (ServerMode.AP.name().equals(switchDomain.getServerMode())) { - createEmptyService(namespaceId, serviceName); - } + createEmptyService(namespaceId, serviceName, instance.isEphemeral()); Service service = getService(namespaceId, serviceName); @@ -466,6 +489,7 @@ public List updateIpAddresses(Service service, String action, boolean if (!service.getClusterMap().containsKey(instance.getClusterName())) { Cluster cluster = new Cluster(instance.getClusterName()); cluster.setService(service); + cluster.init(); service.getClusterMap().put(instance.getClusterName(), cluster); Loggers.SRV_LOG.warn("cluster: {} not found, ip: {}, will create new cluster with default configuration.", instance.getClusterName(), instance.toJSON()); @@ -522,7 +546,11 @@ public boolean containService(String namespaceId, String serviceName) { public void putService(Service service) { if (!serviceMap.containsKey(service.getNamespaceId())) { - serviceMap.put(service.getNamespaceId(), new ConcurrentHashMap<>(16)); + synchronized (putServiceLock) { + if (!serviceMap.containsKey(service.getNamespaceId())) { + serviceMap.put(service.getNamespaceId(), new ConcurrentHashMap<>(16)); + } + } } serviceMap.get(service.getNamespaceId()).put(service.getName(), service); } diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/HttpClient.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/HttpClient.java index dc54484b24d..bad71625fc8 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/HttpClient.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/HttpClient.java @@ -27,6 +27,8 @@ import org.apache.http.*; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; +import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.entity.ContentType; @@ -41,6 +43,7 @@ import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; +import java.net.URI; import java.net.URL; import java.net.URLEncoder; import java.util.*; @@ -285,6 +288,29 @@ public static void asyncHttpPutLarge(String url, Map headers, by } } + public static void asyncHttpGetLarge(String url, Map headers, byte[] content, AsyncCompletionHandler handler) throws Exception { + AsyncHttpClient.BoundRequestBuilder builder = asyncHttpClient.prepareGet(url); + + if (!headers.isEmpty()) { + for (String headerKey : headers.keySet()) { + builder.setHeader(headerKey, headers.get(headerKey)); + } + } + + builder.setBody(content); + + builder.setHeader("Content-Type", "application/json; charset=UTF-8"); + builder.setHeader("Accept-Charset", "UTF-8"); + builder.setHeader("Accept-Encoding", "gzip"); + builder.setHeader("Content-Encoding", "gzip"); + + if (handler != null) { + builder.execute(handler); + } else { + builder.execute(); + } + } + public static HttpResult httpPutLarge(String url, Map headers, byte[] content) { try { HttpClientBuilder builder = HttpClients.custom(); @@ -313,6 +339,35 @@ public static HttpResult httpPutLarge(String url, Map headers, b } } + public static HttpResult httpGetLarge(String url, Map headers, String content) { + + try { + HttpClientBuilder builder = HttpClients.custom(); + builder.setUserAgent(UtilsAndCommons.SERVER_VERSION); + builder.setConnectionTimeToLive(500, TimeUnit.MILLISECONDS); + + CloseableHttpClient httpClient = builder.build(); + HttpGetWithEntity httpGetWithEntity = new HttpGetWithEntity(); + httpGetWithEntity.setURI(new URI(url)); + + for (Map.Entry entry : headers.entrySet()) { + httpGetWithEntity.setHeader(entry.getKey(), entry.getValue()); + } + + httpGetWithEntity.setEntity(new StringEntity(content, ContentType.create("application/json", "UTF-8"))); + HttpResponse response = httpClient.execute(httpGetWithEntity); + HttpEntity entity = response.getEntity(); + + HeaderElement[] headerElements = entity.getContentType().getElements(); + String charset = headerElements[0].getParameterByName("charset").getValue(); + + return new HttpResult(response.getStatusLine().getStatusCode(), + IOUtils.toString(entity.getContent(), charset), Collections.emptyMap()); + } catch (Exception e) { + return new HttpResult(500, e.toString(), Collections.emptyMap()); + } + } + public static HttpResult httpPostLarge(String url, Map headers, String content) { try { HttpClientBuilder builder = HttpClients.custom(); @@ -442,4 +497,14 @@ public String getHeader(String name) { return respHeaders.get(name); } } + + public static class HttpGetWithEntity extends HttpEntityEnclosingRequestBase { + + public final static String METHOD_NAME = "GET"; + + @Override + public String getMethod() { + return METHOD_NAME; + } + } } diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java index 9903967a211..bf3220f7e22 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java @@ -79,8 +79,8 @@ public static byte[] getData(List keys, String server) throws Exception Map params = new HashMap<>(8); params.put("keys", StringUtils.join(keys, ",")); - HttpClient.HttpResult result = HttpClient.httpGet("http://" + server + RunningConfig.getContextPath() - + UtilsAndCommons.NACOS_NAMING_CONTEXT + DATA_GET_URL, new ArrayList<>(), params); + HttpClient.HttpResult result = HttpClient.httpGetLarge("http://" + server + RunningConfig.getContextPath() + + UtilsAndCommons.NACOS_NAMING_CONTEXT + DATA_GET_URL, new HashMap<>(8), JSON.toJSONString(params)); if (HttpURLConnection.HTTP_OK == result.code) { return result.content.getBytes(); diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java index 4cfa285fcc4..8c6ddc8c9b1 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java @@ -15,6 +15,7 @@ */ package com.alibaba.nacos.naming.misc; +import com.alibaba.fastjson.JSON; import com.alibaba.nacos.naming.boot.RunningConfig; import com.ning.http.client.AsyncCompletionHandler; import com.ning.http.client.Response; @@ -49,7 +50,7 @@ public void send(final String serverIP, Message msg) { } try { - HttpClient.asyncHttpPost(url, null, params, new AsyncCompletionHandler() { + HttpClient.asyncHttpPostLarge(url, null, JSON.toJSONString(params), new AsyncCompletionHandler() { @Override public Integer onCompleted(Response response) throws Exception { if (response.getStatusCode() != HttpURLConnection.HTTP_OK) { diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java index 68b1b162db8..51c0c5dd69b 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java @@ -89,7 +89,7 @@ public class SwitchDomain implements Record, Cloneable { private String overriddenServerStatus = null; - private String serverMode = "AP"; + private boolean defaultInstanceEphemeral = true; public boolean isEnableAuthentication() { return enableAuthentication; @@ -342,12 +342,12 @@ public void setOverriddenServerStatus(String overriddenServerStatus) { this.overriddenServerStatus = overriddenServerStatus; } - public String getServerMode() { - return serverMode; + public boolean isDefaultInstanceEphemeral() { + return defaultInstanceEphemeral; } - public void setServerMode(String serverMode) { - this.serverMode = serverMode; + public void setDefaultInstanceEphemeral(boolean defaultInstanceEphemeral) { + this.defaultInstanceEphemeral = defaultInstanceEphemeral; } @Override diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchEntry.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchEntry.java index d9d16e9ffb8..f48a44f8a07 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchEntry.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchEntry.java @@ -59,5 +59,5 @@ public class SwitchEntry { public static final String PARAM_JSON = "json"; public static final String OVERRIDDEN_SERVER_STATUS = "overriddenServerStatus"; - public static final String SERVER_MODE = "serverMode"; + public static final String DEFAULT_INSTANCE_EPHEMERAL = "defaultInstanceEphemeral"; } diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchManager.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchManager.java index a4df47f1f7c..e34192c568c 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchManager.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchManager.java @@ -18,7 +18,6 @@ import com.alibaba.fastjson.JSON; import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.exception.NacosException; -import com.alibaba.nacos.naming.cluster.ServerMode; import com.alibaba.nacos.naming.consistency.ConsistencyService; import com.alibaba.nacos.naming.consistency.Datum; import com.alibaba.nacos.naming.consistency.KeyBuilder; @@ -263,9 +262,9 @@ public void update(String entry, String value, boolean debug) throws Exception { switchDomain.setOverriddenServerStatus(status); } - if (entry.equals(SwitchEntry.SERVER_MODE)) { - String mode = value; - switchDomain.setServerMode(ServerMode.valueOf(mode).name()); + if (entry.equals(SwitchEntry.DEFAULT_INSTANCE_EPHEMERAL)) { + String defaultEphemeral = value; + switchDomain.setDefaultInstanceEphemeral(Boolean.parseBoolean(defaultEphemeral)); } if (debug) { @@ -308,7 +307,7 @@ public void update(SwitchDomain newSwitchDomain) { switchDomain.setPushCVersion(newSwitchDomain.getPushCVersion()); switchDomain.setEnableAuthentication(newSwitchDomain.isEnableAuthentication()); switchDomain.setOverriddenServerStatus(newSwitchDomain.getOverriddenServerStatus()); - switchDomain.setServerMode(newSwitchDomain.getServerMode()); + switchDomain.setDefaultInstanceEphemeral(newSwitchDomain.isDefaultInstanceEphemeral()); } public SwitchDomain getSwitchDomain() { diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java index 0891ae2b4c3..d3c8a28040d 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/UtilsAndCommons.java @@ -237,4 +237,34 @@ public static Map parseMetadata(String metadata) throws NacosExc public static String assembleFullServiceName(String namespaceId, String serviceName) { return namespaceId + UtilsAndCommons.NAMESPACE_SERVICE_CONNECTOR + serviceName; } + + /** + * 根据指定的字符串计算出一个0(含)到{@code upperLimit}(不含)之间的数字,本方法会试图让不同的字符串较均匀的分布在0到{@code upperLimit}之间。 + * (Provide a number between 0(include) and {@code upperLimit}(exclude) for the given {@code string}, the number will be nearly uniform distribution.) + *

+ *

+ * 举个例子:假设有N个提供相同服务的服务器地址被存在一个数组中,为了实现负载均衡,可以根据调用者的名字决定使用哪个服务器。 + * (e.g. Assume there's an array which contains some IP of the servers provide the same service, the caller name can be used to choose the server to achieve load balance.) + *

+     *     String[] serverIps = new String[10];
+     *     int index = shakeUp("callerName", serverIps.length);
+     *     String targetServerIp = serverIps[index];
+     * 
+ * + * @param string 字符串。如果为null会固定返回0 (a string. the number 0 will be returned if it's null) + * @param upperLimit 返回值的上限,必须为正整数(>0) (the upper limit of the returned number, must be a positive integer, which means > 0) + * @return 0(含)到upperLimit(不含)之间的一个数字 (a number between 0(include) and upperLimit(exclude)) + * @throws IllegalArgumentException if the upper limit equals or less than 0 + * @since 1.0.0 + */ + public static int shakeUp(String string, int upperLimit) { + if (upperLimit < 1) { + throw new IllegalArgumentException("upper limit must be greater than 0"); + } + if (string == null) { + return 0; + } + return (string.hashCode() & Integer.MAX_VALUE) % upperLimit; + } + } diff --git a/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java b/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java index 485b9055fcd..bc650dd27f2 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java @@ -22,7 +22,6 @@ import com.alibaba.nacos.naming.misc.Loggers; import com.alibaba.nacos.naming.misc.SwitchDomain; import com.alibaba.nacos.naming.misc.UtilsAndCommons; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -57,7 +56,6 @@ public void init(FilterConfig filterConfig) throws ServletException { } - @SuppressFBWarnings("HRS_REQUEST_PARAMETER_TO_HTTP_HEADER") @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) servletRequest; @@ -68,6 +66,10 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo try { String path = new URI(req.getRequestURI()).getPath(); String serviceName = req.getParameter(CommonParams.SERVICE_NAME); + // For client under 0.8.0: + if (StringUtils.isBlank(serviceName)) { + serviceName = req.getParameter("dom"); + } Method method = filterBase.getMethod(req.getMethod(), path); if (method == null) { diff --git a/naming/src/test/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcherTest.java b/naming/src/test/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcherTest.java new file mode 100644 index 00000000000..6a67f943031 --- /dev/null +++ b/naming/src/test/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcherTest.java @@ -0,0 +1,44 @@ +/* + * Copyright 1999-2018 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.alibaba.nacos.naming.consistency.ephemeral.distro; + +import com.alibaba.nacos.naming.misc.GlobalConfig; +import org.junit.Before; +import org.junit.Test; +import org.springframework.test.util.ReflectionTestUtils; + +/** + * @author jifengnan + */ +public class TaskDispatcherTest { + + private TaskDispatcher taskDispatcher; + + @Before + public void init() { + taskDispatcher = new TaskDispatcher(); + GlobalConfig conf = new GlobalConfig(); + ReflectionTestUtils.setField(conf, "taskDispatchThreadCount", 3); + ReflectionTestUtils.setField(taskDispatcher, "partitionConfig", conf); + taskDispatcher.init(); + } + + @Test + public void testAddTask() { + char[] chars = new char[]{2325, 9, 30, 12, 2}; + taskDispatcher.addTask(new String(chars)); + } +} diff --git a/naming/src/test/java/com/alibaba/nacos/naming/misc/UtilsAndCommonsTest.java b/naming/src/test/java/com/alibaba/nacos/naming/misc/UtilsAndCommonsTest.java index f206adedb45..009db7f1fd5 100644 --- a/naming/src/test/java/com/alibaba/nacos/naming/misc/UtilsAndCommonsTest.java +++ b/naming/src/test/java/com/alibaba/nacos/naming/misc/UtilsAndCommonsTest.java @@ -40,4 +40,16 @@ public void testControllerPathsDefaultValues() { Assert.assertEquals("/nacos/v1/ns", DEFAULT_NACOS_NAMING_CONTEXT); } + + @Test(expected = IllegalArgumentException.class) + public void testShakeUpException() { + UtilsAndCommons.shakeUp(null, 0); + } + + @Test + public void testShakeUp() { + Assert.assertEquals(0, UtilsAndCommons.shakeUp(null, 1)); + char[] chars = new char[]{2325, 9, 30, 12, 2}; + Assert.assertEquals(0, UtilsAndCommons.shakeUp(new String(chars), 1)); + } } diff --git a/pom.xml b/pom.xml index 43601d94063..df49487d486 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 2018 com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 pom Alibaba NACOS ${project.version} @@ -680,23 +680,22 @@
- org.codehaus.jackson - jackson-mapper-lgpl - 1.9.6 + com.fasterxml.jackson.core + jackson-core + 2.9.8 + + com.fasterxml.jackson.core + jackson-databind + 2.9.8 + org.codehaus.jackson jackson-core-asl 1.9.10 - - com.github.spotbugs - spotbugs-annotations - 3.1.3 - - io.jsonwebtoken jjwt-api diff --git a/test/pom.xml b/test/pom.xml index 3eedbd1b517..df7eb9a9ac8 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -17,7 +17,7 @@ com.alibaba.nacos nacos-all - 1.0.0-RC2 + 1.0.0-RC3 ../pom.xml 4.0.0 diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/CPInstancesAPI_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/CPInstancesAPI_ITCase.java index b4099a461bf..c66afd79afc 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/CPInstancesAPI_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/CPInstancesAPI_ITCase.java @@ -32,6 +32,8 @@ import com.alibaba.nacos.api.naming.NamingService; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ListView; +import com.alibaba.nacos.config.server.utils.TimeUtils; +import com.alibaba.nacos.config.server.utils.TimeoutUtils; import com.alibaba.nacos.naming.NamingApp; import org.junit.After; @@ -79,8 +81,6 @@ public class CPInstancesAPI_ITCase { public void setUp() throws Exception { String url = String.format("http://localhost:%d/", port); this.base = new URL(url); - NamingBase.prepareServer(port, "UP", "CP"); - TimeUnit.SECONDS.sleep(5L); naming = NamingFactory.createNamingService("127.0.0.1" + ":" + port); @@ -105,7 +105,7 @@ public void cleanup() throws Exception { * @TestStep : * @ExpectResult : */ - @Test(expected = IllegalStateException.class) + @Test public void registerInstance_ephemeral_true() throws Exception { String serviceName = NamingBase.randomDomainName(); namingServiceCreate(serviceName, TEST_NAMESPACE_1, TEST_GROUP_1); @@ -116,6 +116,9 @@ public void registerInstance_ephemeral_true() throws Exception { instance.setIp("11.11.11.11"); instance.setPort(80); naming1.registerInstance(serviceName, TEST_GROUP_1, instance); + TimeUnit.SECONDS.sleep(3L); + naming1.deregisterInstance(serviceName, TEST_GROUP_1, instance); + namingServiceDelete(serviceName, TEST_NAMESPACE_1, TEST_GROUP_1); } /** @@ -154,7 +157,8 @@ public void registerInstance_ephemeral_false_deregisterInstance() throws Excepti instance.setIp("11.11.11.11"); instance.setPort(80); naming1.registerInstance(serviceName, TEST_GROUP_1, instance); - naming1.deregisterInstance(serviceName, TEST_GROUP_1, "11.11.11.11", 80, "c1"); + naming1.deregisterInstance(serviceName, TEST_GROUP_1, instance); + TimeUnit.SECONDS.sleep(3L); namingServiceDelete(serviceName, TEST_NAMESPACE_1, TEST_GROUP_1); } diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/NamingBase.java b/test/src/test/java/com/alibaba/nacos/test/naming/NamingBase.java index b2b91dd5779..b87282fe551 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/NamingBase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/NamingBase.java @@ -165,10 +165,10 @@ public static boolean verifyInstanceList(List instanceList1, List headers = new ArrayList(); headers.add("User-Agent"); @@ -177,15 +177,5 @@ public static void prepareServer(int localPort, String status, String mode) { HttpClient.request(url, headers, new HashMap(), "UTF-8", "PUT"); Assert.assertEquals(HttpStatus.SC_OK, result.code); - - - url = "http://127.0.0.1:" + localPort + "/nacos/v1/ns/operator/switches?entry=serverMode&value=" + mode; - headers = new ArrayList(); - headers.add("User-Agent"); - headers.add("Nacos-Server"); - result = - HttpClient.request(url, headers, new HashMap(), "UTF-8", "PUT"); - - Assert.assertEquals(HttpStatus.SC_OK, result.code); } }