Commit db98727b by liuhui

首页前台后台拆分基本完成

parent 666bb2a0
Showing with 18175 additions and 25 deletions
......@@ -269,6 +269,13 @@
<artifactId>fastjson</artifactId>
</dependency>
<!-- 工具类 -->
<dependency>
<groupId>com.xiaoleilu</groupId>
<artifactId>hutool-all</artifactId>
<version>3.3.2</version>
</dependency>
</dependencies>
<build>
......@@ -277,39 +284,45 @@
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>static/fonts/**</exclude>
<exclude>static/file/**</exclude>
<exclude>**/*.woff</exclude>
<exclude>**/*.woff2</exclude>
<exclude>**/*.ttf</exclude>
</excludes>
<includes>
<include>application.yml</include>
<include>application-${profileActive}.yml</include>
<include>banner.txt</include>
<include>ehcache/*</include>
<include>i18n/*</include>
<include>log4j.xml</include>
<include>mybatis/**/*</include>
<include>static/**/*</include>
<include>templates/**/*</include>
<include>ehcache/*</include>
<include>log4j.xml</include>
<include>wps.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>static/fonts/**</include>
<include>static/file/**</include>
<include>**/*.woff</include>
<include>**/*.woff2</include>
<include>**/*.ttf</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -320,6 +333,24 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/lib</outputDirectory>
<includeScope>system</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
......@@ -131,7 +131,9 @@ public class ShiroRedisConfig {
redisManager.setHost(redisHost);
redisManager.setPort(redisPort);
redisManager.setTimeout(redisTimeout);
if(!"".equals(redisPassword.trim())){
redisManager.setPassword(redisPassword);
}
return redisManager;
}
......
package com.sinobase.framework.config;
import java.util.Properties;
import com.alibaba.druid.filter.config.ConfigTools;
import com.alibaba.druid.util.DruidPasswordCallback;
/**
*
* @author shj 对配置文件中的数据库密码进行解密
*/
public class DbPasswordCallback extends DruidPasswordCallback {
@Override
public void setProperties(Properties properties) {
super.setProperties(properties);
String password = (String) properties.get("password");
String publickey = (String) properties.get("publicKey");
try {
String dbpassword = DbPasswordCallback.decryptStr(password);
setPassword(dbpassword.toCharArray());
} catch (Exception e) {
e.printStackTrace();
}
}
public static final byte[] SECRET_KEY = "0123456789abcdef".getBytes();
public static String decryptStr(String enStr) {
com.xiaoleilu.hutool.crypto.symmetric.SymmetricCrypto aes = new com.xiaoleilu.hutool.crypto.symmetric.SymmetricCrypto(
com.xiaoleilu.hutool.crypto.symmetric.SymmetricAlgorithm.AES, SECRET_KEY);
return aes.decryptStr(enStr);
}
public static String encryptStr(String enStr) {
com.xiaoleilu.hutool.crypto.symmetric.SymmetricCrypto aes = new com.xiaoleilu.hutool.crypto.symmetric.SymmetricCrypto(
com.xiaoleilu.hutool.crypto.symmetric.SymmetricAlgorithm.AES, SECRET_KEY);
return new String(aes.encryptHex(enStr));
}
}
......@@ -41,7 +41,7 @@ public class UserRealm extends AuthorizingRealm {
logger.debug("username: {} will validate" , username);
User user = new User();
if(isPlatform) { //如果集成SSO登录
user = platformService.getUserByLoginname(username);
user = platformService.setLoginUserInfo(username);
return new SimpleAuthenticationInfo(user, password, getName());
}else { //如果没有集成sso的情况下,需要开发者自行验证用户信息
if("developer".equals(username) && "123456".equals(password)) {
......
package com.sinobase.project.module.docsend.controller;
import com.github.pagehelper.PageHelper;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.framework.web.controller.BaseController;
import com.sinobase.framework.web.page.PageDomain;
import com.sinobase.framework.web.page.TableDataInfo;
import com.sinobase.framework.web.page.TableSupport;
import com.sinobase.project.module.docsend.service.IReadExtranetService;
import com.sinobase.project.module.docsend.service.IReadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/read")
public class ReadController extends BaseController {
@Autowired
private IReadService readService;
@Autowired
private IReadExtranetService readExtranetService;
@Value("${sinobase.isIntranet}")
private boolean isIntranet;
/**
* 获取已阅分页数据
* @param pageNumber 第几页数据
* @param countPerPage 每页有几条数据
* @return json型式的整页待办数据
*/
@RequestMapping("/list/{pageNumber}/{countPerPage}")
@ResponseBody
public List<Map<String, String>> getDocSendList(@PathVariable int pageNumber, @PathVariable int countPerPage){
int pageCount = 0;
if(isIntranet){
pageCount = readService.getPageCount(countPerPage);
}else{
pageCount = readExtranetService.getPageCount(countPerPage);
}
List<Map<String, String>> docSendList = null;
if(pageNumber <= pageCount) {
if(isIntranet){
docSendList = readService.docSendList(pageNumber, countPerPage,"self","","");
}else{
docSendList = readExtranetService.docSendList(pageNumber, countPerPage,"self","","");
}
}
return docSendList;
}
/**
* 获取列表信息
* @return
*/
@RequestMapping("/tablelist")
@ResponseBody
public TableDataInfo getDocSendTableList(String title,String number){
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
String orderBy = pageDomain.getOrderBy();
PageHelper.startPage(pageNum, pageSize, orderBy);
}
int indexCount = 0;
List<Map<String, String>> docSendList = null;
if(isIntranet){
indexCount = readService.getIndexCount(title,number);
docSendList = readService.docSendList(pageNum, pageSize,"self",title,number);
}else{
indexCount = readExtranetService.getIndexCount(title,number);
docSendList = readExtranetService.docSendList(pageNum, pageSize,"self",title,number);
}
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
rspData.setRows(docSendList);
rspData.setTotal(indexCount);
return rspData;
}
/**
* 获取已阅数据分页数量(页数)
* @param count 每页的数据条数
* @return 页数
*/
@RequestMapping("/page_count/{count}")
@ResponseBody
public int getPageCount(@PathVariable int count) {
int pageCount = 0;
if(isIntranet){
pageCount = readService.getPageCount(count);
}else{
pageCount = readExtranetService.getPageCount(count);
}
return pageCount;
}
}
package com.sinobase.project.module.docsend.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.system.user.domain.User;
public class IndexReadHandler {
private static final Logger log = LoggerFactory.getLogger(IndexReadHandler.class);
/**
* 刷新已阅索引数据
* @param dataSource
* @return
*/
public static synchronized boolean refreshIndex(DruidDataSource dataSource) {
boolean result = true;
//step.1 查询索引表最新的日期
Date latestTime = new Date();
List<Map<String, Object>> localList = new ArrayList<Map<String, Object>>();
List<Map<String, Object>> remoteList = new ArrayList<Map<String, Object>>();
try {
latestTime = IndexReadHandler.getLatestOfIndex(dataSource);
} catch (SQLException e) {
result = false;
e.printStackTrace();
}
try {
//step.2 根据第一步的时间查询出本地缺少的已阅数据
localList = LocalSysReadHandler.getNotIndexedLocal(dataSource, latestTime);
//step.3 根据第一步的时间查询出远程缺少的已阅数
remoteList = RemoteSysReadHandler.getNotIndexedRemote(latestTime);
} catch (SQLException e) {
e.printStackTrace();
}
//step.4 把第二、三步查出来的数据插入到索引表当中(分批执行,每次执行1000条)
int bufferSize = 1000;
List<String> sqlList = new LinkedList<String>(); //切割后的批量插入sql语句集合
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
list.addAll(localList);
list.addAll(remoteList);
do {
List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
if(list.size() > bufferSize) {
tempList = list.subList(0, bufferSize - 1);
}else {
tempList = list;
}
String sqlFragment = IndexReadHandler.buildSQLFragment(tempList);
String sql = IndexReadHandler.buildSQLStatement(sqlFragment);
if(null != sql && !"".equals(sql.trim()))
sqlList.add(sql);
tempList.clear();
}while(list.size() != 0);
try {
IndexReadHandler.queryInsert4Index(dataSource, sqlList);
} catch (SQLException e) {
e.printStackTrace();
}
return result;
}
/**
* 从已阅索引中获取已阅数量
* @param dataSource
* @return
*/
public static int getIndexCount(DruidDataSource dataSource,String title,String number)
throws SQLException{
User user = ShiroUtils.getSysUser();
int count = 0;
String sql = "select count(1) as count from sys_read_index where (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"')";
if(StringUtils.isNotEmpty(title)){
sql += " and title like '%"+title+"%'";
}
if(StringUtils.isNotEmpty(title)){
sql += " and number like '%"+number+"%'";
}
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs && rs.next()) {
count = rs.getInt("count");
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
rs.close();
pstmt.close();
conn.close();
}
return count;
}
/**
* 从已阅列表中获取分页数据
* @param dataSource
* @param pageNumber
* @param countPerPage
* @return
*/
public static List<Map<String, Object>> paging(DruidDataSource dataSource, int pageNumber, int countPerPage,String title,String number){
User user = ShiroUtils.getSysUser();
String sql = "select id,doomsday,userid,source_system from sys_read_index where (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"')";
if(StringUtils.isNotEmpty(title)){
sql += " and title like '%"+title+"%'";
}
if(StringUtils.isNotEmpty(number)){
sql += " and number like '%"+number+"%'";
}
sql += " order by str_to_date(doomsday,'%Y-%m-%d %H:%i:%s') desc limit "+ (pageNumber-1)*countPerPage +","+ countPerPage;
List<Map<String, Object>> ret = new LinkedList<Map<String, Object>>();
try {
Connection conn = dataSource.getConnection();
PreparedStatement pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, Object> map = new HashMap<String, Object>();
String id = rs.getString("id");
Date doomsday = new Date(rs.getTimestamp("doomsday").getTime());
String userid = rs.getString("userid");
String source = rs.getString("source_system");
map.put("id", id);
map.put("doomsday", doomsday);
map.put("userid", userid);
map.put("source", source);
ret.add(map);
}
}
rs.close();
pstmt.close();
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
return ret;
}
/**
* 获取所有的已阅
* @param dataSource
* @return
*/
public static List<Map<String, Object>> paging(DruidDataSource dataSource){
User user = ShiroUtils.getSysUser();
String sql = "select id,doomsday,userid,source_system from sys_read_index where (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"')" +
" order by str_to_date(doomsday,'%Y-%m-%d %H:%i:%s') desc ";
List<Map<String, Object>> ret = new LinkedList<Map<String, Object>>();
try {
Connection conn = dataSource.getConnection();
PreparedStatement pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, Object> map = new HashMap<String, Object>();
String id = rs.getString("id");
Date doomsday = new Date(rs.getTimestamp("doomsday").getTime());
String userid = rs.getString("userid");
String source = rs.getString("source_system");
map.put("id", id);
map.put("doomsday", doomsday);
map.put("userid", userid);
map.put("source", source);
ret.add(map);
}
}
rs.close();
pstmt.close();
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
return ret;
}
//获取当前索引表中最近的时间
private static Date getLatestOfIndex(DruidDataSource dataSource)
throws SQLException {
User user = ShiroUtils.getSysUser();
String sql = "select id,doomsday,source_system from sys_read_index where (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"') order by doomsday desc limit 1";
Date latestOfIndex = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
latestOfIndex = sdf.parse("1970-01-01 08:00:00");
} catch (ParseException e1) {
e1.printStackTrace();
}
Connection conn = dataSource.getConnection();
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs && rs.next()) {
latestOfIndex = new Date(rs.getTimestamp("doomsday").getTime());
}
rs.close();
pstmt.close();
conn.close();
} catch(SQLException e) {
e.printStackTrace();
}
return latestOfIndex;
}
//向已阅索引表插入已阅数据
private static void queryInsert4Index(DruidDataSource dataSource, List<String> sqlList)
throws SQLException {
Connection conn = dataSource.getConnection();
Statement stmt = conn.createStatement();
int sqlSize = sqlList.size();
for(int ix = 0; ix < sqlSize; ++ ix) { //直接遍历执行所有sql语句,按理说应该不需要sleep
String sql = sqlList.get(ix);
//log.debug("query:"+sql);
stmt.executeUpdate(sql);
}
stmt.close();
conn.close();
}
//构建SQL语句片段
private static String buildSQLFragment(List<Map<String, Object>> list) {
StringBuffer fragment = new StringBuffer("");
int size = list.size();
for(int ix = 0; ix < size; ++ ix) {
Map<String, Object> cur = list.get(ix);
String id = String.valueOf(cur.get("id"));
String doomsday = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format((Date)cur.get("doomsday"));
String userid = String.valueOf(cur.get("userid"));
String title = cur.get("title") == null ? "" : cur.get("title").toString();
String number = cur.get("number") == null ? "" : cur.get("number").toString();
String source = cur.get("source") == null ? "" : cur.get("source").toString();
if(0 != ix) {
fragment.append(",");
}
fragment.append("('"+id+"','"+doomsday+"','"+userid+"','"+title+"','"+number+"','"+source+"')");
}
return fragment.toString();
}
//将SQL语句片段构建成完整语句
private static String buildSQLStatement(String fragment) {
String sql = "";
if(null != fragment && !"".equals(fragment.trim())) {
sql = "insert into sys_read_index (id,doomsday,userid,title,number,source_system) values " + fragment;
}
return sql;
}
}
package com.sinobase.project.module.docsend.dao;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.system.user.domain.User;
import org.apache.poi.util.StringUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.*;
public class LocalSysReadHandler {
public static final String SOURCE = "local";
/**
* 外网直接获取mysql中已阅数据
* @param dataSource
* @param pageNumber
* @param countPerPage
* @param title
* @return
* @throws SQLException
*/
public static List<Map<String, String>> getDoneList(DruidDataSource dataSource,int pageNumber,int countPerPage,String title,String number)
throws SQLException{
User user = ShiroUtils.getSysUser();
List<Map<String, String>> ret = new ArrayList<Map<String, String>>();
String fieldArray[] = new String[] {"send_id", "send_title", "user_notion", "view_url", "keyword", "relation_id", "relation_table", "relation_key", "notion_date"};
String filedStr = StringUtil.join(fieldArray, ",");
String sql = "select "+filedStr+" from doc_send where (in_user_id='"+user.getUserId()+"' or in_user_id='"+user.getHistoryId()+"')";
if(StringUtils.isNotEmpty(title)){
sql += " and title like '%"+title+"%'";
}
if(StringUtils.isNotEmpty(number)){
sql += " and number like '%"+number+"%'";
}
sql += " order by str_to_date(notion_date,'%Y-%m-%d %H:%i:%s') desc ";
if(pageNumber!=0&&countPerPage!=0){
sql += " limit "+ (pageNumber-1)*countPerPage +","+ countPerPage;
}
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, String> cur = new HashMap<String, String>();
for(int ix = 0; ix < fieldArray.length; ++ ix) {
String field = fieldArray[ix];
String val = rs.getString(field);
cur.put(field, val);
}
cur.put("source",LocalSysReadHandler.SOURCE);
ret.add(cur);
}
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
/**
* 从已办表中查询一个时间点到当前时间的数据
* @param dataSource
* @param latestTime
* @return
* @throws SQLException
*/
static List<Map<String, Object>> getNotIndexedLocal(DruidDataSource dataSource, Date latestTime)
throws SQLException{
User user = ShiroUtils.getSysUser();
String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(latestTime);
List<Map<String, Object>> ret = new ArrayList<Map<String, Object>>(); //ArrayList即可,无需排序
String sql = "select send_id, str_to_date(notion_date, '%Y-%m-%d %H:%i:%s') as doomsday,in_user_id,send_title,user_notion " +
" from doc_send " +
" where (in_user_id='"+user.getUserId()+"' or in_user_id='"+user.getHistoryId()+"') and " +
"str_to_date(notion_date, '%Y-%m-%d %H:%i:%s') > str_to_date('"+time+"', '%Y-%m-%d %H:%i:%s') and see_flag='1'" +
" order by str_to_date(notion_date, '%Y-%m-%d %H:%i:%s') desc";
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, Object> temp = new HashMap<String, Object>();
String id = rs.getString("send_id");
Date doomsday = new Date(rs.getTimestamp("doomsday").getTime());
String userid = rs.getString("in_user_id");
String title = rs.getString("send_title");
String number = rs.getString("user_notion");
temp.put("id", id);
temp.put("doomsday", doomsday);
temp.put("userid", userid);
temp.put("title", title);
temp.put("number", number);
temp.put("source", LocalSysReadHandler.SOURCE);
ret.add(temp);
}
}
} catch(SQLException e) {
e.printStackTrace();
} finally {
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
/**
* 根据已办ID批量获取已办信息(不排序)
* @param dataSource
* @param idList
* @return
*/
public static Map<String, Map<String, String>> getDoneListById(DruidDataSource dataSource, List<String> idList)
throws SQLException{
Map<String,Map<String, String>> ret = new HashMap<String, Map<String, String>>();
String fragment = LocalSysReadHandler.buildSQLFragment(idList);
if(StringUtils.isNotEmpty(fragment)){
String fieldArray[] = new String[] {"send_id", "send_title", "user_notion", "view_url", "keyword", "relation_id", "relation_table", "relation_key", "notion_date"};
String filedStr = StringUtil.join(fieldArray, ",");
String sql = "select "+filedStr+" from doc_send where send_id in ("+fragment+")";
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, String> cur = new HashMap<String, String>();
for(int ix = 0; ix < fieldArray.length; ++ ix) {
String field = fieldArray[ix];
String val = rs.getString(field);
cur.put(field, val);
}
ret.put(cur.get("send_id"), cur);
}
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
rs.close();
pstmt.close();
conn.close();
}
}
return ret;
}
//构建SQL语句片段
private static String buildSQLFragment(List<String> idList) {
StringBuffer fragment = new StringBuffer();
int size = idList.size();
for(int ix = 0; ix < size; ++ ix) {
if(ix != 0)
fragment.append(",");
fragment.append("'"+idList.get(ix)+"'");
}
return fragment.toString();
}
}
package com.sinobase.project.module.docsend.dao;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.common.utils.spring.SpringUtils;
import com.sinobase.datasource.aspectj.lang.enums.DataSourceType;
import com.sinobase.datasource.source.DynamicDataSourceContextHolder;
import com.sinobase.oldoa.util.Cp30Datasource;
import com.sinobase.project.system.user.domain.User;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.poi.util.StringUtil;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.*;
public class RemoteSysReadHandler {
public static final String SOURCE = "old";
public static QueryRunner qr = new QueryRunner(Cp30Datasource.getDataSource());
static List<Map<String, Object>> getNotIndexedRemote(Date latestTime)
throws SQLException {
User user = ShiroUtils.getSysUser();
List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.ORACLE.name());
DataSource dataSource = (DataSource) SpringUtils.getBean("dynamicDataSource");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// format.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
String sql = "select send_id, TO_DATE(notion_date, 'yyyy-mm-dd hh24:mi:ss') as doomsday,in_user_id,send_title,user_notion from doc_send " +
" where (in_user_id='"+user.getUserId()+"' or in_user_id='"+user.getHistoryId()+"') and" +
" TO_DATE(notion_date, 'yyyy-mm-dd hh24:mi:ss') > TO_DATE('"+format.format(latestTime)+"', 'yyyy-mm-dd hh24:mi:ss') and see_flag='1' and keyword!='退文' and keyword!='收回'"+
" order by TO_DATE(notion_date, 'yyyy-mm-dd hh24:mi:ss') desc";
List<Map<String, Object>> list = new ArrayList<>();
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
getValue(conn,stmt,rs,resultList);
} catch (Exception e) {
e.printStackTrace();
}finally{
rs.close();
stmt.close();
conn.close();
DynamicDataSourceContextHolder.clearDataSourceType();
}
return resultList;
}
private static void getValue(Connection conn,Statement stmt,ResultSet rs,List<Map<String, Object>> resultList) throws Exception{
User user = ShiroUtils.getSysUser();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(null != rs) {
while (rs.next()) {
Map<String, Object> temp = new HashMap<String, Object>();
String id = parseString(rs.getString("send_id"));
Date doomsday = format.parse(parseString(rs.getString("doomsday")));
String userid = parseString(rs.getString("in_user_id"));
String title = parseString(rs.getString("send_title"));
String number = parseString(rs.getString("user_notion"));
temp.put("id", id);
temp.put("doomsday", doomsday);
temp.put("userid", userid);
temp.put("title", title);
temp.put("number", number);
temp.put("source", RemoteSysReadHandler.SOURCE);
resultList.add(temp);
}
}
DynamicDataSourceContextHolder.clearDataSourceType();
}
private static String parseString(Object obj) {
String ret = "";
if(obj != null)
ret = obj.toString();
return ret;
}
public static synchronized Map<String, Map<String, String>> getDoneListById(List<String> idList)
throws SQLException {
Map<String,Map<String, String>> ret = new HashMap<String, Map<String, String>>();
String fragment = RemoteSysReadHandler.buildSQLFragment(idList);
if(StringUtils.isNotEmpty(fragment)){
DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.ORACLE.name());
DataSource dataSource = (DataSource) SpringUtils.getBean("dynamicDataSource");
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
String fieldArray[] = new String[] {"send_id", "send_title", "user_notion", "view_url", "keyword", "relation_id", "relation_table", "relation_key", "notion_date"};
String filedStr = StringUtil.join(fieldArray, ",");
String sql = "select "+filedStr+" from doc_send where send_id in ("+fragment+")";
List<Map<String, Object>> list = new ArrayList<>();
try {
conn = dataSource.getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
getValue(conn,stmt,rs,ret,fieldArray);
} catch (Exception e) {
e.printStackTrace();
}finally{
rs.close();
stmt.close();
conn.close();
DynamicDataSourceContextHolder.clearDataSourceType();
}
}
return ret;
}
private static void getValue(Connection conn,Statement stmt,ResultSet rs,Map<String,Map<String, String>> ret,String[] fieldArray) throws Exception{
if(null != rs) {
while (rs.next()) {
Map<String, String> cur = new HashMap<String, String>();
for(int i = 0; i < fieldArray.length; ++ i) {
String field = fieldArray[i];
String val = parseString(rs.getString(field));
cur.put(field, val);
}
ret.put(rs.getString("send_id"), cur);
}
}
DynamicDataSourceContextHolder.clearDataSourceType();
}
//构建SQL语句片段
private static String buildSQLFragment(List<String> idList) {
StringBuffer fragment = new StringBuffer();
int size = idList.size();
for(int ix = 0; ix < size; ++ ix) {
if(ix != 0)
fragment.append(",");
fragment.append("'"+idList.get(ix)+"'");
}
return fragment.toString();
}
}
package com.sinobase.project.module.docsend.service;
import java.util.List;
import java.util.Map;
public interface IReadExtranetService {
/**
* 获取已阅分页数据
* @param pageNumber 第几页数据
* @param countPerPage 每页有几条数据
* @return 整页待办数据
*/
public List<Map<String, String>> docSendList(int pageNumber, int countPerPage, String type, String title, String number);
/**
* 获取已阅数据分页数量(页数)
* @param count 每页的数据条数
* @return 页数
*/
public int getPageCount(int count);
/**
* 获取登录人所有记录数
* @return
*/
public int getIndexCount(String title, String number);
}
package com.sinobase.project.module.docsend.service;
import java.util.List;
import java.util.Map;
public interface IReadService {
/**
* 获取已阅分页数据
* @param pageNumber 第几页数据
* @param countPerPage 每页有几条数据
* @return 整页待办数据
*/
public List<Map<String, String>> docSendList(int pageNumber, int countPerPage,String type,String title,String number);
/**
* 获取已阅数据分页数量(页数)
* @param count 每页的数据条数
* @return 页数
*/
public int getPageCount(int count);
/**
* 获取登录人所有记录数
* @return
*/
public int getIndexCount(String title,String number);
}
package com.sinobase.project.module.docsend.service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.project.module.docsend.dao.LocalSysReadHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@Service
public class ReadExtranetServiceImpl implements IReadExtranetService {
@Autowired
private DruidDataSource dataSource;
@Override
public List<Map<String, String>> docSendList(int pageNumber, int countPerPage,String type,String title,String number) {
List<Map<String, String>> ret = new LinkedList<Map<String,String>>();
try{
if(type.equals("table")){
ret = LocalSysReadHandler.getDoneList(dataSource, 0, 0,title,number);
}else{
ret = LocalSysReadHandler.getDoneList(dataSource, pageNumber, countPerPage,title,number);
}
}catch(Exception e){
e.printStackTrace();
}
return ret;
}
@Override
public int getPageCount(int count) {
int indexCount = 0;
List<Map<String, String>> ret = new LinkedList<Map<String,String>>();
try{
ret = LocalSysReadHandler.getDoneList(dataSource, 0, 0,null,null);
indexCount = ret.size();
}catch(Exception e){
e.printStackTrace();
}
// 计算页数并返回
int pageCount = indexCount / count;
if(0 != indexCount % count)
++ pageCount;
return pageCount;
}
@Override
public int getIndexCount(String title,String number) {
int indexCount = 0;
List<Map<String, String>> ret = new LinkedList<Map<String,String>>();
try{
ret = LocalSysReadHandler.getDoneList(dataSource, 0, 0,title,number);
indexCount = ret.size();
}catch(Exception e){
e.printStackTrace();
}
return indexCount;
}
}
package com.sinobase.project.module.docsend.service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.project.module.docsend.dao.IndexReadHandler;
import com.sinobase.project.module.docsend.dao.LocalSysReadHandler;
import com.sinobase.project.module.docsend.dao.RemoteSysReadHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.SQLException;
import java.util.*;
@Service
public class ReadServiceImpl implements IReadService {
@Autowired
private DruidDataSource dataSource;
@Override
public List<Map<String, String>> docSendList(int pageNumber, int countPerPage,String type,String title,String number) {
// step.1 刷新待阅索引的数据
//IndexHandler.refreshIndex(dataSource);
// step.2 通过分页的形式查询索引表
List<Map<String, Object>> pagingList = new ArrayList<Map<String,Object>>();
if(type.equals("table")){
pagingList = IndexReadHandler.paging(dataSource);
}else{
pagingList = IndexReadHandler.paging(dataSource, pageNumber, countPerPage,title,number);
}
// step.3 根据分页表中的id和source_system字段,分别调用LocalSystemHandler和RemoteSysHandler类中的查询方法
List<String> localIds = new ArrayList<String>(); //本系统待办表中的ID集合
List<String> remoteOldIds = new ArrayList<String>(); //老系统待办表中的ID集合
for(int ix = 0; ix < pagingList.size(); ++ ix) {
Map<String, Object> cur = pagingList.get(ix);
String id = cur.get("id").toString();
String source = cur.get("source").toString();
switch(source) {
case LocalSysReadHandler.SOURCE:
localIds.add(id);
break;
case RemoteSysReadHandler.SOURCE:
remoteOldIds.add(id);
break;
}
}
Map<String, Map<String, String>> localDone = new HashMap<>();
Map<String, Map<String, String>> remoteOldDone = new HashMap<>();
try {
localDone = LocalSysReadHandler.getDoneListById(dataSource, localIds);
remoteOldDone = RemoteSysReadHandler.getDoneListById(remoteOldIds);
} catch (SQLException throwables) {
throwables.printStackTrace();
}
// step.4 把两个来源的数据进行排序操作,并返回
List<Map<String, String>> ret = new LinkedList<Map<String,String>>();
for(int ix = 0; ix < pagingList.size(); ++ ix) {
Map<String, Object> pMap = pagingList.get(ix);
String id = pMap.get("id").toString();
String source = pMap.get("source").toString();
Map<String, String> cur = null;
switch(source) {
case LocalSysReadHandler.SOURCE:
cur = localDone.get(id);
if(null != cur){
cur.put("source",LocalSysReadHandler.SOURCE);
}
break;
case RemoteSysReadHandler.SOURCE:
cur = remoteOldDone.get(id);
if(null != cur){
cur.put("source",RemoteSysReadHandler.SOURCE);
}
break;
}
if(null != cur)
ret.add(cur);
}
return ret;
}
@Override
public int getPageCount(int count) {
// step.1 刷新待办索引的数据
IndexReadHandler.refreshIndex(dataSource);
// step.2 查出待办索引表的数据量count(1)
int indexCount = 0;
try {
indexCount = IndexReadHandler.getIndexCount(dataSource,"","");
} catch (SQLException throwables) {
throwables.printStackTrace();
}
// step.3 计算页数并返回
int pageCount = indexCount / count;
if(0 != indexCount % count)
++ pageCount;
return pageCount;
}
@Override
public int getIndexCount(String title,String number) {
// step.1 刷新待办索引的数据
IndexReadHandler.refreshIndex(dataSource);
// step.2 查出待办索引表的数据量count(1)
int indexCount = 0;
try {
indexCount = IndexReadHandler.getIndexCount(dataSource,title,number);
} catch (SQLException throwables) {
throwables.printStackTrace();
}
return indexCount;
}
}
# 获取已办数据信息
因为新旧系统同时运行,所以已办信息存在于MySQL和Oracle两个数据库中。
列表显示已办数据时,要把两个库的数据综合在一起做一个排序。
## 代码结构
`controller`
* `DoneController.java` 供前端请求的controller类
`service`
* `IDoneService.java` 获取已办相关信息的Service接口
* `DoneServiceImpl.java` 获取已办相关信息的Service实现类
`dao`
* `LocalSysHandler.java` 本地已办数据的查询方法类
* `RemoteSysHandler.java` 旧(其它)系统已办数据的方法类
`tools`
* 工具类,包含httpClient、排序算法等(用不上了,老系统的数据也在本地开发,无需http请求)
数据库表没建JavaBean,数据存储到Map中,字段名分别为:`id``doomsday``source`
> 本系统中的source值为 `local`
> 老系统中source值为 `old`
## 数据库
在数据库中建立了一个 *索引表* 用于存储两个系统中所有的已办信息ID和时间,用于排序。
```
drop table if exists sys_done_index;
create table sys_done_index
(
`id` varchar(50) NOT NULL,
`doomsday` datetime NOT NULL,
`source_system` varchar(50) NOT NULL,
primary key (`id`)
);
```
\ No newline at end of file
package com.sinobase.project.module.done.controller;
import com.github.pagehelper.PageHelper;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.framework.web.controller.BaseController;
import com.sinobase.framework.web.page.PageDomain;
import com.sinobase.framework.web.page.TableDataInfo;
import com.sinobase.framework.web.page.TableSupport;
import com.sinobase.project.module.done.service.IDoneExtranetService;
import com.sinobase.project.module.done.service.IDoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/done")
public class DoneController extends BaseController {
@Autowired
private IDoneService doneService;
@Autowired
private IDoneExtranetService doneExtranetService;
@Value("${sinobase.isIntranet}")
private boolean isIntranet;
/**
* 获取已办分页数据
* @param pageNumber 第几页数据
* @param countPerPage 每页有几条数据
* @return json型式的整页待办数据
*/
@RequestMapping("/list/{pageNumber}/{countPerPage}")
@ResponseBody
public List<Map<String, String>> getDoneList(@PathVariable int pageNumber, @PathVariable int countPerPage){
int pageCount = 0;
if(isIntranet){
pageCount = doneService.getPageCount(countPerPage);
}else{
pageCount = doneExtranetService.getPageCount(countPerPage);
}
List<Map<String, String>> doneList = null;
if(pageNumber <= pageCount) {
if(isIntranet){
doneList = doneService.doneList(pageNumber, countPerPage,"self","");
}else{
doneList = doneExtranetService.doneList(pageNumber, countPerPage,"self","");
}
}
return doneList;
}
/**
* 获取列表信息
* @return
*/
@RequestMapping("/tablelist")
@ResponseBody
public TableDataInfo getDoneTableList(String title,String number){
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
String orderBy = pageDomain.getOrderBy();
PageHelper.startPage(pageNum, pageSize, orderBy);
}
int indexCount = 0;
List<Map<String, String>> doneList = null;
if(isIntranet){
indexCount = doneService.getIndexCount(title);
doneList = doneService.doneList(pageNum, pageSize,"self",title);
}else{
indexCount = doneExtranetService.getIndexCount(title);
doneList = doneExtranetService.doneList(pageNum, pageSize,"self",title);
}
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
rspData.setRows(doneList);
rspData.setTotal(indexCount);
return rspData;
}
/**
* 获取已办数据分页数量(页数)
* @param count 每页的数据条数
* @return 页数
*/
@RequestMapping("/page_count/{count}")
@ResponseBody
public int getPageCount(@PathVariable int count) {
int pageCount = 0;
if(isIntranet){
pageCount = doneService.getPageCount(count);
}else{
pageCount = doneExtranetService.getPageCount(count);
}
return pageCount;
}
/**
* 获取已办理文件数
* @return
*/
@RequestMapping("/getFileCount")
@ResponseBody
public int getFileCount() {
int fileCount = 0;
if(isIntranet){
fileCount = doneService.getIndexCount("");
}else{
fileCount = doneExtranetService.getIndexCount("");
}
return fileCount;
}
}
package com.sinobase.project.module.done.dao;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.system.user.domain.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.*;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.*;
public class IndexHandler {
private static final Logger log = LoggerFactory.getLogger(IndexHandler.class);
/**
* 刷新已办索引数据
* @param dataSource
* @return
*/
public static synchronized boolean refreshIndex(DruidDataSource dataSource) {
System.out.println("mysql 当前连接数:"+dataSource.getActiveCount());
boolean result = true;
//step.1 查询索引表最新的日期
Date latestTime = new Date();
List<Map<String, Object>> localList = new ArrayList<Map<String, Object>>();
List<Map<String, Object>> remoteList = new ArrayList<Map<String, Object>>();
try {
System.out.println("step.1 查询索引表最新的日期--------begin");
latestTime = IndexHandler.getLatestOfIndex(dataSource);
System.out.println("step.1 查询索引表最新的日期--------end");
} catch (SQLException e) {
result = false;
e.printStackTrace();
}
try {
//step.2 根据第一步的时间查询出本地缺少的已办数据
System.out.println("step.2 根据第一步的时间查询出本地缺少的已办数据--------begin");
localList = LocalSysHandler.getNotIndexedLocal(dataSource, latestTime);
System.out.println("step.2 根据第一步的时间查询出本地缺少的已办数据--------end");
//step.3 根据第一步的时间查询出远程缺少的已办数
System.out.println("step.3 根据第一步的时间查询出远程缺少的已办数--------begin");
remoteList = RemoteSysHandler.getNotIndexedRemote(latestTime);
System.out.println("step.3 根据第一步的时间查询出远程缺少的已办数--------end");
} catch (SQLException e) {
e.printStackTrace();
}
//step.4 把第二、三步查出来的数据插入到索引表当中(分批执行,每次执行1000条)
System.out.println("step.4 把第二、三步查出来的数据插入到索引表当中(分批执行,每次执行1000条)--------begin");
int bufferSize = 1000;
List<String> sqlList = new LinkedList<String>(); //切割后的批量插入sql语句集合
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
list.addAll(localList);
list.addAll(remoteList);
do {
List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
if(list.size() > bufferSize) {
tempList = list.subList(0, bufferSize - 1);
}else {
tempList = list;
}
String sqlFragment = IndexHandler.buildSQLFragment(tempList);
String sql = IndexHandler.buildSQLStatement(sqlFragment);
if(null != sql && !"".equals(sql.trim()))
sqlList.add(sql);
tempList.clear();
}while(list.size() != 0);
try {
IndexHandler.queryInsert4Index(dataSource, sqlList);
} catch (SQLException e) {
e.printStackTrace();
}
System.out.println("step.4 把第二、三步查出来的数据插入到索引表当中(分批执行,每次执行1000条)--------end");
return result;
}
/**
* 从已办索引中获取已办数量
* @param dataSource
* @return
*/
public static int getIndexCount(DruidDataSource dataSource,String title)
throws SQLException{
User user = ShiroUtils.getSysUser();
int count = 0;
String sql = "select count(1) as count from sys_done_index d " +
" INNER JOIN ( SELECT i.userid AS userid, i.recordid AS recordid, max(i.doomsday) AS doomsday " +
" FROM sys_done_index i WHERE userid IN ( '"+user.getUserId()+"' , '"+user.getHistoryId()+"') " +
" GROUP BY i.userid, i.recordid ) dd ON dd.recordid = d.recordid AND dd.doomsday = d.doomsday " +
" where d.userid in ( '"+user.getUserId()+"' , '"+user.getHistoryId()+"') ";
if(StringUtils.isNotEmpty(title)){
sql += " and d.title like '%"+title+"%'";
}
Logger logger = LoggerFactory.getLogger(RemoteSysHandler.class);
logger.debug(sql);
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs && rs.next()) {
count = rs.getInt("count");
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
rs.close();
pstmt.close();
conn.close();
}
return count;
}
/**
* 从已办列表中获取分页数据
* @param dataSource
* @param pageNumber
* @param countPerPage
* @return
*/
public static List<Map<String, Object>> paging(DruidDataSource dataSource, int pageNumber, int countPerPage,String title)
throws SQLException{
User user = ShiroUtils.getSysUser();
String sql = "SELECT d.id,max(d.doomsday) AS doomsday, d.userid,d.source_system FROM sys_done_index d " +
" INNER JOIN ( SELECT i.userid AS userid, i.recordid AS recordid, max(i.doomsday) AS doomsday " +
" FROM sys_done_index i WHERE userid IN ( '"+user.getUserId()+"' , '"+user.getHistoryId()+"' )" +
" GROUP BY i.userid, i.recordid ) dd ON dd.recordid = d.recordid AND dd.doomsday = d.doomsday " +
" where d.userid in ( '"+user.getUserId()+"' , '"+user.getHistoryId()+"') ";
if(StringUtils.isNotEmpty(title)){
sql += " and d.title like '%"+title+"%'";
}
sql += " group by d.recordid,d.userid,d.id,d.source_system order by str_to_date(d.doomsday,'%Y-%m-%d %H:%i:%s') desc limit "+ (pageNumber-1)*countPerPage +","+ countPerPage;
List<Map<String, Object>> ret = new LinkedList<Map<String, Object>>();
Logger logger = LoggerFactory.getLogger(RemoteSysHandler.class);
logger.debug(sql);
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, Object> map = new HashMap<String, Object>();
String id = rs.getString("id");
Date doomsday = new Date(rs.getTimestamp("doomsday").getTime());
String userid = rs.getString("userid");
String source = rs.getString("source_system");
map.put("id", id);
map.put("doomsday", doomsday);
map.put("userid", userid);
map.put("source", source);
ret.add(map);
}
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
/**
* 获取所有的已办
* @param dataSource
* @return
*/
public static List<Map<String, Object>> paging(DruidDataSource dataSource)
throws SQLException{
User user = ShiroUtils.getSysUser();
String sql = "select id,doomsday,userid,source_system from sys_done_index as b where not exists(select 1 from sys_done_index where recordid= b.recordid and b.doomsday<doomsday ) and " +
"(userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"') order by str_to_date(doomsday,'%Y-%m-%d %H:%i:%s') desc ";
List<Map<String, Object>> ret = new LinkedList<Map<String, Object>>();
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, Object> map = new HashMap<String, Object>();
String id = rs.getString("id");
Date doomsday = new Date(rs.getTimestamp("doomsday").getTime());
String userid = rs.getString("userid");
String source = rs.getString("source_system");
map.put("id", id);
map.put("doomsday", doomsday);
map.put("userid", userid);
map.put("source", source);
ret.add(map);
}
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
//获取当前索引表中最近的时间
private static Date getLatestOfIndex(DruidDataSource dataSource)
throws SQLException {
User user = ShiroUtils.getSysUser();
String sql = "select id,doomsday,source_system from sys_done_index where (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"') order by doomsday desc limit 1";
System.out.println("getLatestOfIndex "+sql);
Date latestOfIndex = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
latestOfIndex = sdf.parse("1970-01-01 08:00:00");
} catch (ParseException e1) {
e1.printStackTrace();
}
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs && rs.next()) {
latestOfIndex = new Date(rs.getTimestamp("doomsday").getTime());
}
} catch(SQLException e) {
e.printStackTrace();
} finally {
rs.close();
pstmt.close();
conn.close();
}
return latestOfIndex;
}
//向已办索引表插入已办数据
private static void queryInsert4Index(DruidDataSource dataSource, List<String> sqlList)
throws SQLException {
Connection conn = null;
Statement stmt = null;
try{
conn = dataSource.getConnection();
stmt = conn.createStatement();
int sqlSize = sqlList.size();
for(int ix = 0; ix < sqlSize; ++ ix) { //直接遍历执行所有sql语句,按理说应该不需要sleep
String sql = sqlList.get(ix);
stmt.executeUpdate(sql);
}
}catch (Exception e){
e.printStackTrace();
}finally {
stmt.close();
conn.close();
}
}
//构建SQL语句片段
private static String buildSQLFragment(List<Map<String, Object>> list) {
StringBuffer fragment = new StringBuffer("");
int size = list.size();
for(int ix = 0; ix < size; ++ ix) {
Map<String, Object> cur = list.get(ix);
String id = parseString(cur.get("id"));
String doomsday = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format((Date)cur.get("doomsday"));
String userid = parseString(cur.get("userid"));
String title = cur.get("title")!=null?parseString(cur.get("title")).replaceAll("'","\\\\'"):"";
String recordid = cur.get("recordid")!=null?parseString(cur.get("recordid")):"";
String source = parseString(cur.get("source"));
if(0 != ix) {
fragment.append(",");
}
fragment.append("('"+id+"','"+doomsday+"','"+userid+"','"+title+"','"+recordid+"','"+source+"')");
}
return fragment.toString();
}
//将SQL语句片段构建成完整语句
private static String buildSQLStatement(String fragment) {
String sql = "";
if(null != fragment && !"".equals(fragment.trim())) {
sql = "insert into sys_done_index (id,doomsday,userid,title,recordid,source_system) values " + fragment;
}
return sql;
}
private static String parseString(Object obj) {
String ret = "";
if(obj != null)
ret = obj.toString();
return ret;
}
}
package com.sinobase.project.module.done.dao;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.system.user.domain.User;
import org.apache.poi.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.*;
public class LocalSysHandler {
public static final String SOURCE = "local";
private static final Logger log = LoggerFactory.getLogger(LocalSysHandler.class);
/**
* 外网直接获取mysql中已办数据
* @param dataSource
* @param pageNumber
* @param countPerPage
* @param title
* @return
* @throws SQLException
*/
public static List<Map<String, String>> getDoneList(DruidDataSource dataSource,int pageNumber,int countPerPage,String title)
throws SQLException{
User user = ShiroUtils.getSysUser();
List<Map<String, String>> ret = new ArrayList<Map<String, String>>();
String fieldArray[] = new String[] {"id", "title", "filetypeid", "filetypename", "workflowid", "workflowname", "recordid", "readtime","handdoneurl","docid"};
String filedStr = StringUtil.join(fieldArray, ",");
String sql = "select "+filedStr+" from flow_read_new as b where not exists(select 1 from flow_read_new where userid=b.userid and recordid= b.recordid " +
"and b.readtime<readtime ) and (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"')";
if(StringUtils.isNotEmpty(title)){
sql += " and title like '%"+title+"%'";
}
sql += " order by str_to_date(readtime,'%Y-%m-%d %H:%i:%s') desc ";
System.out.println("已办 sql "+sql);
if(pageNumber!=0&&countPerPage!=0){
sql += "limit "+ (pageNumber-1)*countPerPage +","+ countPerPage;
}
log.debug("flow_read_new:"+sql);
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, String> cur = new HashMap<String, String>();
for(int ix = 0; ix < fieldArray.length; ++ ix) {
String field = fieldArray[ix];
String val = rs.getString(field);
cur.put(field, val);
}
ret.add(cur);
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
/**
* 从已办表中查询一个时间点到当前时间的数据
* @param dataSource
* @param latestTime
* @return
* @throws SQLException
*/
static List<Map<String, Object>> getNotIndexedLocal(DruidDataSource dataSource, Date latestTime)
throws SQLException{
User user = ShiroUtils.getSysUser();
String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(latestTime);
List<Map<String, Object>> ret = new ArrayList<Map<String, Object>>(); //ArrayList即可,无需排序
String sql = "select id, str_to_date(readtime, '%Y-%m-%d %H:%i:%s') as doomsday,userid,title,recordid " +
" from flow_read_new as b where not EXISTS( select 1 from flow_read_new where userid=b.userid and recordid= b.recordid" +
" and b.readtime<readtime ) and (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"') and " +
" str_to_date(readtime, '%Y-%m-%d %H:%i:%s') > str_to_date('"+time+"', '%Y-%m-%d %H:%i:%s')" +
" order by str_to_date(readtime, '%Y-%m-%d %H:%i:%s') desc";
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
System.out.println("getNotIndexedLocal "+sql);
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, Object> temp = new HashMap<String, Object>();
String id = rs.getString("id");
Date doomsday = new Date(rs.getTimestamp("doomsday").getTime());
String userid = rs.getString("userid");
String title = rs.getString("title");
String recordid = rs.getString("recordid");
temp.put("id", id);
temp.put("doomsday", doomsday);
temp.put("userid", userid);
temp.put("title", title);
temp.put("recordid", recordid);
temp.put("source", LocalSysHandler.SOURCE);
ret.add(temp);
}
}
} catch(SQLException e) {
e.printStackTrace();
}finally{
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
/**
* 根据已办ID批量获取已办信息(不排序)
* @param dataSource
* @param idList
* @return
*/
public static Map<String, Map<String, String>> getDoneListById(DruidDataSource dataSource, List<String> idList)
throws SQLException{
Map<String,Map<String, String>> ret = new HashMap<String, Map<String, String>>();
String fragment = LocalSysHandler.buildSQLFragment(idList);
if(StringUtils.isNotEmpty(fragment)){
String fieldArray[] = new String[] {"id", "title", "filetypeid", "filetypename", "workflowid", "workflowname", "recordid", "readtime","handdoneurl","docid"};
String filedStr = StringUtil.join(fieldArray, ",");
String sql = "select "+filedStr+" from flow_read_new where id in ("+fragment+")";
log.debug("flow_read_new:"+sql);
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = dataSource.getConnection();
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, String> cur = new HashMap<String, String>();
for(int ix = 0; ix < fieldArray.length; ++ ix) {
String field = fieldArray[ix];
String val = rs.getString(field);
cur.put(field, val);
}
ret.put(cur.get("id"), cur);
}
}
} catch (SQLException e) {
e.printStackTrace();
} finally{
rs.close();
pstmt.close();
conn.close();
}
}
return ret;
}
//构建SQL语句片段
private static String buildSQLFragment(List<String> idList) {
StringBuffer fragment = new StringBuffer();
int size = idList.size();
for(int ix = 0; ix < size; ++ ix) {
if(ix != 0)
fragment.append(",");
fragment.append("'"+idList.get(ix)+"'");
}
return fragment.toString();
}
}
package com.sinobase.project.module.done.dao;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.common.utils.spring.SpringUtils;
import com.sinobase.datasource.aspectj.lang.enums.DataSourceType;
import com.sinobase.datasource.source.DynamicDataSourceContextHolder;
import com.sinobase.project.system.user.domain.User;
import org.apache.poi.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.*;
public class RemoteSysHandler {
public static final String SOURCE = "old";
private static final Logger log = LoggerFactory.getLogger(RemoteSysHandler.class);
static List<Map<String, Object>> getNotIndexedRemote(Date latestTime)
throws SQLException {
User user = ShiroUtils.getSysUser();
List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.ORACLE.name());
DataSource dataSource = (DataSource) SpringUtils.getBean("dynamicDataSource");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// format.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
String sql = "select id, TO_DATE(readtime, 'yyyy-mm-dd hh24:mi:ss') as doomsday,userid,title,recordid from flow_read " +
" where (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"') and TO_DATE(readtime, 'yyyy-mm-dd hh24:mi:ss') > TO_DATE('"+format.format(latestTime)+"', 'yyyy-mm-dd hh24:mi:ss')"+
" order by TO_DATE(readtime, 'yyyy-mm-dd hh24:mi:ss') desc";
log.debug(sql);
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
System.out.println("getNotIndexedRemote "+sql);
try {
conn = dataSource.getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
getValue(conn,stmt,rs,resultList);
} catch (Exception e) {
e.printStackTrace();
} finally {
rs.close();
stmt.close();
conn.close();
DynamicDataSourceContextHolder.clearDataSourceType();
}
return resultList;
}
private static void getValue(Connection conn,Statement stmt,ResultSet rs,List<Map<String, Object>> resultList) throws Exception{
User user = ShiroUtils.getSysUser();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(null != rs) {
while (rs.next()) {
Map<String, Object> temp = new HashMap<String, Object>();
String id = parseString(rs.getString("id"));
Date doomsday = format.parse(parseString(rs.getString("doomsday")));
String userid = parseString(rs.getString("userid"));
String title = parseString(rs.getString("title"));
String recordid = parseString(rs.getString("recordid"));
temp.put("id", id);
temp.put("doomsday", doomsday);
temp.put("userid", userid);
temp.put("title", title);
temp.put("recordid", recordid);
temp.put("source", RemoteSysHandler.SOURCE);
resultList.add(temp);
}
}
DynamicDataSourceContextHolder.clearDataSourceType();
}
private static String parseString(Object obj) {
String ret = "";
if(obj != null)
ret = obj.toString();
return ret;
}
public static synchronized Map<String, Map<String, String>> getDoneListById(List<String> idList)
throws SQLException{
Map<String,Map<String, String>> ret = new HashMap<String, Map<String, String>>();
String fragment = RemoteSysHandler.buildSQLFragment(idList);
if(StringUtils.isNotEmpty(fragment)){
DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.ORACLE.name());
DataSource dataSource = (DataSource) SpringUtils.getBean("dynamicDataSource");
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
String fieldArray[] = new String[] {"id", "title", "filetypeid", "filetypename", "workflowid", "workflowname", "recordid", "readtime","(select w.overdo_url||'&'||w.target_key||'=' from waitdo_config w where w.filetype_id=r.filetypeid and rownum=1) as readUrl"};
String fieldArray2[] = new String[] {"id", "title", "filetypeid", "filetypename", "workflowid", "workflowname", "recordid", "readtime","readUrl"};
String filedStr = StringUtil.join(fieldArray, ",");
String sql = "select "+filedStr+" from flow_read r where r.id in ("+fragment+")";
try {
conn = dataSource.getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
getValue(conn,stmt,rs,ret,fieldArray2);
} catch (Exception e) {
e.printStackTrace();
}finally{
rs.close();
stmt.close();
conn.close();
DynamicDataSourceContextHolder.clearDataSourceType();
}
}
return ret;
}
private static void getValue(Connection conn,Statement stmt,ResultSet rs,Map<String,Map<String, String>> ret,String[] fieldArray2) throws Exception{
if(null != rs) {
while (rs.next()) {Map<String, String> cur = new HashMap<String, String>();
for(int i = 0; i < fieldArray2.length; ++ i) {
String field = fieldArray2[i];
String val = parseString(rs.getString(field));
cur.put(field, val);
}
ret.put(rs.getString("id"), cur);
}
}
DynamicDataSourceContextHolder.clearDataSourceType();
}
//构建SQL语句片段
private static String buildSQLFragment(List<String> idList) {
StringBuffer fragment = new StringBuffer();
int size = idList.size();
for(int ix = 0; ix < size; ++ ix) {
if(ix != 0)
fragment.append(",");
fragment.append("'"+idList.get(ix)+"'");
}
return fragment.toString();
}
}
package com.sinobase.project.module.done.service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.project.module.done.dao.LocalSysHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@Service
public class DoneExtranetServiceImpl implements IDoneExtranetService {
@Autowired
private DruidDataSource dataSource;
@Override
public List<Map<String, String>> doneList(int pageNumber, int countPerPage,String type,String title) {
List<Map<String, String>> ret = new LinkedList<Map<String,String>>();
try{
if(type.equals("table")){
ret = LocalSysHandler.getDoneList(dataSource,0,0,title);
}else{
ret = LocalSysHandler.getDoneList(dataSource,pageNumber,countPerPage,title);
}
}catch(Exception e){
e.printStackTrace();
}
return ret;
}
@Override
public int getPageCount(int count) {
int indexCount = 0;
List<Map<String, String>> ret = new LinkedList<Map<String,String>>();
try{
ret = LocalSysHandler.getDoneList(dataSource,0,0,"");
indexCount = ret.size();
}catch(Exception e){
e.printStackTrace();
}
// 计算页数并返回
int pageCount = indexCount / count;
if(0 != indexCount % count)
++ pageCount;
return pageCount;
}
@Override
public int getIndexCount(String title) {
int indexCount = 0;
List<Map<String, String>> ret = new LinkedList<Map<String,String>>();
try{
ret = LocalSysHandler.getDoneList(dataSource,0,0,title);
indexCount = ret.size();
}catch(Exception e){
e.printStackTrace();
}
return indexCount;
}
}
package com.sinobase.project.module.done.service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.project.module.done.dao.IndexHandler;
import com.sinobase.project.module.done.dao.LocalSysHandler;
import com.sinobase.project.module.done.dao.RemoteSysHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.SQLException;
import java.util.*;
@Service
public class DoneServiceImpl implements IDoneService {
@Autowired
private DruidDataSource dataSource;
@Override
public List<Map<String, String>> doneList(int pageNumber, int countPerPage,String type,String title) {
// step.1 刷新待办索引的数据
//IndexHandler.refreshIndex(dataSource);
// step.2 通过分页的形式查询索引表
List<Map<String, Object>> pagingList = new ArrayList<Map<String,Object>>();
try{
if(type.equals("table")){
pagingList = IndexHandler.paging(dataSource);
}else{
pagingList = IndexHandler.paging(dataSource, pageNumber, countPerPage, title);
}
}catch (Exception e){
e.printStackTrace();
}
// step.3 根据分页表中的id和source_system字段,分别调用LocalSystemHandler和RemoteSysHandler类中的查询方法
List<String> localIds = new ArrayList<String>(); //本系统待办表中的ID集合
List<String> remoteOldIds = new ArrayList<String>(); //老系统待办表中的ID集合
for(int ix = 0; ix < pagingList.size(); ++ ix) {
Map<String, Object> cur = pagingList.get(ix);
String id = cur.get("id").toString();
String source = cur.get("source").toString();
switch(source) {
case LocalSysHandler.SOURCE:
localIds.add(id);
break;
case RemoteSysHandler.SOURCE:
remoteOldIds.add(id);
break;
}
}
Map<String, Map<String, String>> localDone = new HashMap<>();
Map<String, Map<String, String>> remoteOldDone = new HashMap<>();
try {
localDone = LocalSysHandler.getDoneListById(dataSource, localIds);
remoteOldDone = RemoteSysHandler.getDoneListById(remoteOldIds);
} catch (SQLException throwables) {
throwables.printStackTrace();
}
// step.4 把两个来源的数据进行排序操作,并返回
List<Map<String, String>> ret = new LinkedList<Map<String,String>>();
for(int ix = 0; ix < pagingList.size(); ++ ix) {
Map<String, Object> pMap = pagingList.get(ix);
String id = pMap.get("id").toString();
String source = pMap.get("source").toString();
Map<String, String> cur = null;
switch(source) {
case LocalSysHandler.SOURCE:
cur = localDone.get(id);
break;
case RemoteSysHandler.SOURCE:
cur = remoteOldDone.get(id);
break;
}
if(null != cur)
ret.add(cur);
}
return ret;
}
@Override
public int getPageCount(int count) {
// step.1 刷新待办索引的数据
IndexHandler.refreshIndex(dataSource);
// step.2 查出待办索引表的数据量count(1)
int indexCount = 0;
try {
indexCount = IndexHandler.getIndexCount(dataSource,"");
} catch (SQLException throwables) {
throwables.printStackTrace();
}
// step.3 计算页数并返回
int pageCount = indexCount / count;
if(0 != indexCount % count)
++ pageCount;
return pageCount;
}
@Override
public int getIndexCount(String title) {
// step.1 刷新待办索引的数据
IndexHandler.refreshIndex(dataSource);
// step.2 查出待办索引表的数据量count(1)
int indexCount = 0;
try {
indexCount = IndexHandler.getIndexCount(dataSource,title);
} catch (SQLException throwables) {
throwables.printStackTrace();
}
return indexCount;
}
}
package com.sinobase.project.module.done.service;
import java.util.List;
import java.util.Map;
public interface IDoneExtranetService {
/**
* 获取已办分页数据
* @param pageNumber 第几页数据
* @param countPerPage 每页有几条数据
* @return 整页待办数据
*/
public List<Map<String, String>> doneList(int pageNumber, int countPerPage, String type, String title);
/**
* 获取已办数据分页数量(页数)
* @param count 每页的数据条数
* @return 页数
*/
public int getPageCount(int count);
/**
* 获取登录人所有记录数
* @return
*/
public int getIndexCount(String title);
}
package com.sinobase.project.module.done.service;
import java.util.List;
import java.util.Map;
public interface IDoneService {
/**
* 获取已办分页数据
* @param pageNumber 第几页数据
* @param countPerPage 每页有几条数据
* @return 整页待办数据
*/
public List<Map<String, String>> doneList(int pageNumber, int countPerPage,String type,String title);
/**
* 获取已办数据分页数量(页数)
* @param count 每页的数据条数
* @return 页数
*/
public int getPageCount(int count);
/**
* 获取登录人所有记录数
* @return
*/
public int getIndexCount(String title);
}
package com.sinobase.project.module.homepage.mapper;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* 首页操作层通用
* @author liuhui
*/
@Repository
public interface HomePageMapper {
/**
* 获取通知信息
* @param recordid
* @return
*/
public Map<String, String> getTongZhiById(@Param("recordid") String recordid);
}
package com.sinobase.project.module.homepage.service;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sinobase.project.module.homepage.mapper.HomePageMapper;
/**
*
* 首页获取信息专用service层,替换原先的service层方法
*
* @author liuhui001
*
*/
@Service
public class HomePageSeriveImpl implements IHomePageSerive{
@Autowired
private HomePageMapper pageMapper;
@Override
public Map<String, String> getTongZhiById(String recordid) {
return pageMapper.getTongZhiById(recordid);
}
}
package com.sinobase.project.module.homepage.service;
import java.util.Map;
/**
*
* 首页获取信息专用service层,替换原先的service层方法
*
* @author liuhui001
*
*/
public interface IHomePageSerive {
/**
* 获取通知信息
* @param recordid
* @return
*/
public Map<String, String> getTongZhiById(String recordid);
}
package com.sinobase.project.module.toberead.comtroller;
import com.github.pagehelper.PageHelper;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.framework.web.controller.BaseController;
import com.sinobase.framework.web.domain.AjaxResult;
import com.sinobase.framework.web.page.PageDomain;
import com.sinobase.framework.web.page.TableDataInfo;
import com.sinobase.framework.web.page.TableSupport;
import com.sinobase.project.module.toberead.service.ITobereadExtranetService;
import com.sinobase.project.module.toberead.service.ITobereadService;
import com.sinobase.project.system.user.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/toberead")
public class TobereadController extends BaseController {
@Autowired
ITobereadService tobereadService;
@Autowired
ITobereadExtranetService tobereadExtranetService;
@Value("${sinobase.isIntranet}")
private boolean isIntranet;
/**
* 获取待阅数据分页数量(页数)
* @param count 每页的数据条数
* @return 页数
*/
@RequestMapping("/page_count/{count}")
@ResponseBody
public int getPageCount(@PathVariable int count) {
if(isIntranet){
return tobereadService.getPageCount(count);
}else{
return tobereadExtranetService.getPageCount(count);
}
}
/**
* 获取所有待阅数据的数量
* @return 待阅数量
*/
@RequestMapping("/count")
@ResponseBody
public int getCount() {
if(isIntranet){
return tobereadService.getCount();
}else{
return tobereadExtranetService.getCount();
}
}
/**
* 获取待办分页数据
* @param pageNumber 第几页数据
* @param countPerPage 每页有几条数据
* @return json型式的整页待阅数据
*/
@RequestMapping("/list/{pageNumber}/{countPerPage}")
@ResponseBody
public Map<String,Object> getDoneList(@PathVariable int pageNumber, @PathVariable int countPerPage){
Map<String,Object> map = new HashMap<String,Object>();
User user = ShiroUtils.getSysUser();
if(isIntranet){
tobereadService.refreshIndex(user.getUserId());
map.put("list",tobereadService.getDoneList(pageNumber, countPerPage));
map.put("count",tobereadService.getCount());
}else{
map.put("list",tobereadExtranetService.getDoneList(pageNumber,countPerPage));
map.put("count",tobereadExtranetService.getCount());
}
return map;
}
/**
* 获取列表信息
* @return
*/
@RequestMapping("/tablelist")
@ResponseBody
public TableDataInfo getDoneTableList(){
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
String orderBy = pageDomain.getOrderBy();
PageHelper.startPage(pageNum, pageSize, orderBy);
}
User user = ShiroUtils.getSysUser();
int indexCount = 0;
List<Object> doneList = null;
if(isIntranet){
tobereadService.refreshIndex(user.getUserId());
indexCount = tobereadService.getCount();
doneList = new ArrayList<Object>(tobereadService.getDoneList(pageNum, pageSize));
}else{
indexCount = tobereadExtranetService.getCount();
doneList = new ArrayList<Object>(tobereadExtranetService.getDoneList(pageNum,pageSize));
}
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
rspData.setRows(doneList);
rspData.setTotal(indexCount);
return rspData;
}
/**
* 批量阅毕
* @param ids
* @param dataSources
* @return
*/
@RequestMapping("/afterReading")
@ResponseBody
public AjaxResult afterReading(String ids,String dataSources){
String[] idArray = ids.split(",");
String[] dataSourceArray = dataSources.split(",");
for(int i=0;i<idArray.length;i++){
String id = idArray[i];
String dataSource = dataSourceArray[i];
if(isIntranet){
tobereadService.afterReading(id,dataSource);
}else{
tobereadExtranetService.afterReading(id,dataSource);
}
}
return super.success();
}
}
package com.sinobase.project.module.toberead.dao;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.module.toberead.model.Toberead;
import com.sinobase.project.system.portal.constant.MessageConstants;
import com.sinobase.project.system.user.domain.User;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LocalTobereadHandler {
public static final String SOURCE = "local";
public static List<Toberead> getTodo(DruidDataSource dataSource,int pageNumber,int countPerPage)
throws SQLException{
User user = ShiroUtils.getSysUser();
List<Toberead> ret = new ArrayList<Toberead>();
String sql = "select id, title, url, receive_time,grant_user_id,from_user_name,0 as leaderInsNum,wait_handle_primary_key_value as relationId,wait_handle_table_name as relationTable from sys_message where grant_user_id LIKE '%"+user.getUserId()+
"%' and message_type='"+ MessageConstants.MESSAGE_TYPE_DOC_SEND_WAIT +"'";
sql += " order by receive_time desc";
if(pageNumber!=0&&countPerPage!=0){
sql += " limit "+ (pageNumber-1)*countPerPage +","+ countPerPage;
}
System.out.println("待阅 mysql "+sql);
Connection conn = dataSource.getConnection();
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Toberead cur = new Toberead();
cur.setId(rs.getString("id"));
cur.setTitle(rs.getString("title"));
cur.setUrl(rs.getString("url"));
cur.setFromUserName(rs.getString("from_user_name"));
cur.setLeaderInsNum(rs.getString("leaderInsNum"));
cur.setRelationId(rs.getString("relationId"));
cur.setRelationTable(rs.getString("relationTable"));
Date receiveTime = rs.getTimestamp("receive_time");
//TODO: 因为redis从小到大排序,所以考虑是不是要把时间载戳变成负数
cur.setReceiveTime(0-receiveTime.getTime());
cur.setDataSource(SOURCE);
ret.add(cur);
}
}
}catch(SQLException e) {
e.printStackTrace();
}finally {
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
}
package com.sinobase.project.module.toberead.dao;
import com.sinobase.common.utils.DateUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.common.utils.spring.SpringUtils;
import com.sinobase.datasource.aspectj.lang.enums.DataSourceType;
import com.sinobase.datasource.source.DynamicDataSourceContextHolder;
import com.sinobase.project.module.toberead.model.Toberead;
import com.sinobase.project.system.user.domain.User;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RemoteTobereadHandler {
public static final String SOURCE = "old";
public static synchronized List<Toberead> getTodo(){
User user = ShiroUtils.getSysUser();
List<Toberead> ret = new ArrayList<Toberead>();
DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.ORACLE.name());
DataSource dataSource = (DataSource) SpringUtils.getBean("dynamicDataSource");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String sql = "select send_id,send_title,view_url,cre_time,in_user_id,(select username from flow_user u where u.userid=t.cre_user_id) as fromusername," +
"case when (t.relation_table='YZ_ARCHIVES_IN')" +
" then (select count(*) from flow_idea a where tablename like 'YZ_ARCHIVES_IN' and a.stattag ='1' and a.wfisvisible ='1' and a.recordid =t.relation_id )" +
" when (t.relation_table='YZ_ARCHIVES_OUT')" +
" then (select count(*) from flow_idea a where tablename like 'YZ_ARCHIVES_OUT' and a.stattag ='1' and a.wfisvisible ='1' and a.recordid =t.relation_id )" +
" when (t.relation_table='YZ_ARCHIVES_SIGN')" +
" then (select count(*) from flow_idea a where tablename like 'YZ_ARCHIVES_SIGN' and a.stattag ='1' and a.wfisvisible ='1' and a.recordid =t.relation_id )" +
" when (t.relation_table='YZ_ARCHIVES_SUMMARY')" +
" then (select count(*) from flow_idea a where tablename like 'YZ_ARCHIVES_SUMMARY' and a.stattag ='1' and a.wfisvisible ='1' and a.recordid =t.relation_id )" +
" end as leaderInsNum,relation_id as relationId,relation_table as relationTable " +
" from doc_send t" +
" where t.is_GONGGAO is null and see_flag='0' and t.flag='1'";
sql += " and t.filing_cabinet_id is null and t.del_flag='1' " +
" and t.in_user_id='" + user.getHistoryId() + "' " +
"and t.relation_id not in (" +
"select t.NOTICE_ID from YZ_SDIC_NOTICEINFO t " +
"where t.USERID = '" + user.getHistoryId() + "' and t.STATUS = '1')" +
"and (case when relation_table = 'YZ_SDIC_WORKNOTICE'" +
" and exists( select 1 from YZ_SDIC_WORKNOTICE w where status = '2' and w.id=relation_id) then '1'" +
"when relation_table != 'YZ_SDIC_WORKNOTICE' then '1' else '0' end) = '1' order by t.cre_time desc";
System.out.println("待阅 oracle "+sql);
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try{
conn = dataSource.getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
getValue(conn,stmt,rs,ret);
}catch(Exception e){
e.printStackTrace();
}finally{
DynamicDataSourceContextHolder.clearDataSourceType();
}
return ret;
}
private static void getValue(Connection conn,Statement stmt,ResultSet rs,List<Toberead> ret) throws Exception{
User user = ShiroUtils.getSysUser();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(null != rs) {
while (rs.next()) {
Toberead cur = new Toberead();
String id = parseString(rs.getString("send_id"));
String title = parseString(rs.getString("send_title"));
String url = parseString(rs.getString("view_url"));
Date receivetime = format.parse(parseString(rs.getString("cre_time")));
String userid = parseString(rs.getString("in_user_id"));
String fromusername = parseString(rs.getString("fromusername"));
String leaderInsNum = parseString(rs.getString("leaderInsNum"));
String relationId = parseString(rs.getString("relationId"));
String relationTable = parseString(rs.getString("relationTable"));
cur.setId(id);
cur.setTitle(title);
cur.setUrl(url);
//TODO: 因为redis从小到大排序,所以考虑是不是要把时间载戳变成负数
cur.setReceiveTime(0-receivetime.getTime());
cur.setDataSource(SOURCE);
cur.setFromUserName(fromusername);
cur.setLeaderInsNum(leaderInsNum);
cur.setRelationId(relationId);
cur.setRelationTable(relationTable);
ret.add(cur);
}
}
rs.close();
stmt.close();
conn.close();
DynamicDataSourceContextHolder.clearDataSourceType();
}
private static String parseString(Object obj) {
String ret = "";
if(obj != null)
ret = obj.toString();
return ret;
}
/**
* 阅毕
* @param id
*/
public static void afterReading(String id){
DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.ORACLE.name());
DataSource dataSource = (DataSource) SpringUtils.getBean("dynamicDataSource");
String sql = "update doc_send set see_flag='1' ,notion_date='"+ DateUtils.getNowDate("yyyy-MM-dd HH:mm:ss") +"' where send_id='"+id+"'";
Connection conn = null;
Statement stmt = null;
try{
conn = dataSource.getConnection();
stmt = conn.createStatement();
update(conn,stmt,sql);
}catch(Exception e){
e.printStackTrace();
}finally{
DynamicDataSourceContextHolder.clearDataSourceType();
}
}
private static void update(Connection conn,Statement stmt,String sql) throws Exception{
int i = stmt.executeUpdate(sql);
stmt.close();
conn.close();
DynamicDataSourceContextHolder.clearDataSourceType();
}
}
package com.sinobase.project.module.toberead.model;
import java.io.Serializable;
public class Toberead implements Serializable {
private String id; //数据ID
private String title; //待阅标题
private long receiveTime; //待阅接收到的时候,根据这个字段进行排序
private String url; //待阅url
private String fromUserName; //上一办理人
private String leaderInsNum; //领导批示数
private String relationId; //关联ID
private String relationTable; //关联表
private String dataSource; //数据来源
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public long getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(long receiveTime) {
this.receiveTime = receiveTime;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getFromUserName() {
return fromUserName;
}
public void setFromUserName(String fromUserName) {
this.fromUserName = fromUserName;
}
public String getDataSource() {
return dataSource;
}
public void setDataSource(String dataSource) {
this.dataSource = dataSource;
}
public String getLeaderInsNum() {
return leaderInsNum;
}
public void setLeaderInsNum(String leaderInsNum) {
this.leaderInsNum = leaderInsNum;
}
public String getRelationId() {
return relationId;
}
public void setRelationId(String relationId) {
this.relationId = relationId;
}
public String getRelationTable() {
return relationTable;
}
public void setRelationTable(String relationTable) {
this.relationTable = relationTable;
}
}
package com.sinobase.project.module.toberead.service;
import com.sinobase.project.module.toberead.model.Toberead;
import java.util.List;
public interface ITobereadExtranetService {
public int getPageCount(int count);
public int getCount();
public List<Toberead> getDoneList(int pageNumber, int countPerPage);
public void afterReading(String id, String dataSource);
}
package com.sinobase.project.module.toberead.service;
import java.util.Set;
public interface ITobereadService {
public int getPageCount(int count);
public int getCount();
public Set<Object> getDoneList(int pageNumber, int countPerPage);
public void refreshIndex(String userId);
public void afterReading(String id, String dataSource);
}
package com.sinobase.project.module.toberead.service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.DateUtils;
import com.sinobase.common.utils.IdUtils;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.module.toberead.dao.LocalTobereadHandler;
import com.sinobase.project.module.toberead.dao.RemoteTobereadHandler;
import com.sinobase.project.module.toberead.model.Toberead;
import com.sinobase.project.system.portal.domain.Message;
import com.sinobase.project.system.portal.service.IMessageService;
import com.sinobase.project.system.readingmanagement.domain.DocSend;
import com.sinobase.project.system.readingmanagement.service.IDocSendService;
import com.sinobase.project.system.user.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
public class TobereadExtranetServiceImpl implements ITobereadExtranetService {
@Autowired
private DruidDataSource dataSource;
@Autowired
private IMessageService messageService;
@Autowired
IDocSendService docSendService;
@Override
public int getPageCount(int count) {
int itemCount = getCount();
int pageCount = itemCount / count;
if(0 != itemCount % count) {
++ pageCount;
}
return pageCount;
}
@Override
public int getCount() {
int count = 0;
try{
List<Toberead> localTodoList = LocalTobereadHandler.getTodo(dataSource,0,0);
count = localTodoList.size();
}catch(Exception e){
e.printStackTrace();
}
return count;
}
@Override
public List<Toberead> getDoneList(int pageNumber, int countPerPage) {
List<Toberead> localTodoList = null;
try{
localTodoList = LocalTobereadHandler.getTodo(dataSource,pageNumber,countPerPage);
}catch(Exception e){
e.printStackTrace();
}
return localTodoList;
}
/**
* 阅毕
* @param id
* @param dataSource
*/
public void afterReading(String id, String dataSource){
User user = ShiroUtils.getSysUser();
//新老数据判断
if(StringUtils.isNotEmpty(dataSource)&&dataSource.equals(LocalTobereadHandler.SOURCE)){
//获取message信息
Message msg = messageService.getMessage(id);
//向doc_send中插入已阅信息
DocSend doc = new DocSend();
doc.setSendId(IdUtils.getRandomIdByUUID());
doc.setRelationId(msg.getSubordinateId());
doc.setRelationTable(msg.getWaitHandleTableName());
doc.setRelationKey(msg.getWaitHandlePrimaryKeyName());
doc.setViewUrl(msg.getUrl());
doc.setInUserId(user.getUserId());
doc.setCreUserId(user.getUserId());
doc.setCreTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
doc.setNotionDate(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
doc.setSeeFlag("1");
doc.setKeyWord(msg.getCategoryTypes());
doc.setSendTitle(msg.getTitle());
doc.setNotionDate(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
docSendService.saveDocSend(doc);
//删除待阅信息
messageService.delMessage(id);
}else if(StringUtils.isNotEmpty(dataSource)&&dataSource.equals(RemoteTobereadHandler.SOURCE)){
// 外网只处理mysql待阅数据 oracle不进行处理
// RemoteTobereadHandler.afterReading(id);
}
}
}
package com.sinobase.project.module.toberead.service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.DateUtils;
import com.sinobase.common.utils.IdUtils;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.module.toberead.dao.LocalTobereadHandler;
import com.sinobase.project.module.toberead.dao.RemoteTobereadHandler;
import com.sinobase.project.module.toberead.model.Toberead;
import com.sinobase.project.system.portal.domain.Message;
import com.sinobase.project.system.portal.service.IMessageService;
import com.sinobase.project.system.readingmanagement.domain.DocSend;
import com.sinobase.project.system.readingmanagement.service.IDocSendService;
import com.sinobase.project.system.user.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.DefaultTypedTuple;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.stereotype.Service;
import java.sql.SQLException;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@Service
public class TobereadServiceImpl implements ITobereadService {
@Autowired
private RedisTemplate<Object, Object> redisTemplate;
@Autowired
private DruidDataSource dataSource;
@Autowired
private IMessageService messageService;
@Autowired
IDocSendService docSendService;
@Override
public int getPageCount(int count) {
int itemCount = getCount();
int pageCount = itemCount / count;
if(0 != itemCount % count) {
++ pageCount;
}
return pageCount;
}
@Override
public int getCount() {
User user = ShiroUtils.getSysUser();
String userId = user.getUserId();
int count = redisTemplate.opsForZSet().zCard("toberead"+userId).intValue();
return count;
}
@Override
public Set<Object> getDoneList(int pageNumber, int countPerPage) {
User user = ShiroUtils.getSysUser();
String userId = user.getUserId();
int pageCount = getPageCount(countPerPage);
if(pageNumber > pageCount) { //如果要获取的页数大于实际页数
pageNumber = pageCount;
}
int start = (pageNumber - 1) * countPerPage;
int end = pageNumber * countPerPage - 1;
if(end > getCount()) {
end = -1;
}
Set<Object> ret = redisTemplate.opsForZSet().range("toberead"+userId, start, end);
return ret;
}
//从mysql和oracle中读取待阅数(根据用户ID)并添加到redis中,
public void refreshIndex(String userId) {
try {
List<Toberead> localTodoList = LocalTobereadHandler.getTodo(dataSource,0,0);
List<Toberead> remoteTodoList = RemoteTobereadHandler.getTodo();
localTodoList.addAll(remoteTodoList);
setRedisData(userId, localTodoList);
} catch (SQLException e) {
e.printStackTrace();
}
}
//将待阅数据更新到redis中
private void setRedisData(String userId, List<Toberead> todoList) {
redisTemplate.opsForZSet().removeRange("toberead"+userId, 0, -1);
/*for(Toberead todo : todoList) {
redisTemplate.opsForZSet().add("toberead"+userId, todo, todo.getReceiveTime());
}*/
Set<ZSetOperations.TypedTuple<Object>> tuples = new HashSet<ZSetOperations.TypedTuple<Object>>();
for(Toberead todo : todoList) {
ZSetOperations.TypedTuple<Object> curTuple = new DefaultTypedTuple(todo, (double)todo.getReceiveTime());
tuples.add(curTuple);
}
if(tuples.size()>0){
redisTemplate.opsForZSet().add("toberead" + userId, tuples);
}
}
/**
* 阅毕
* @param id
* @param dataSource
*/
public void afterReading(String id, String dataSource){
User user = ShiroUtils.getSysUser();
//新老数据判断
if(StringUtils.isNotEmpty(dataSource)&&dataSource.equals(LocalTobereadHandler.SOURCE)){
//获取message信息
Message msg = messageService.getMessage(id);
//向doc_send中插入已阅信息
DocSend doc = new DocSend();
doc.setSendId(IdUtils.getRandomIdByUUID());
doc.setRelationId(msg.getSubordinateId());
doc.setRelationTable(msg.getWaitHandleTableName());
doc.setRelationKey(msg.getWaitHandlePrimaryKeyName());
doc.setViewUrl(msg.getUrl());
doc.setInUserId(user.getUserId());
doc.setCreUserId(user.getUserId());
doc.setCreTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
doc.setNotionDate(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
doc.setSeeFlag("1");
doc.setKeyWord(msg.getCategoryTypes());
doc.setSendTitle(msg.getTitle());
doc.setNotionDate(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
docSendService.saveDocSend(doc);
//删除待阅信息
messageService.delMessage(id);
}else if(StringUtils.isNotEmpty(dataSource)&&dataSource.equals(RemoteTobereadHandler.SOURCE)){
RemoteTobereadHandler.afterReading(id);
}
}
}
package com.sinobase.project.module.todo.controller;
import com.github.pagehelper.PageHelper;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.framework.web.page.PageDomain;
import com.sinobase.framework.web.page.TableDataInfo;
import com.sinobase.framework.web.page.TableSupport;
import com.sinobase.project.module.todo.model.Todo;
import com.sinobase.project.module.todo.service.IProcessJumpService;
import com.sinobase.project.module.todo.service.ITodoExtranetService;
import com.sinobase.project.module.todo.service.ITodoService;
import com.sinobase.project.system.user.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/processJump")
public class ProcessJumpController {
@Autowired
IProcessJumpService processJumpService;
/**
* 获取列表信息(跳节点)
* @return
*/
@RequestMapping("/tablelistAll")
@ResponseBody
public TableDataInfo getDoneTableListAll(String title){
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
String orderBy = pageDomain.getOrderBy();
PageHelper.startPage(pageNum, pageSize, orderBy);
}
int indexCount = processJumpService.getCount("all",title);
List<Object> doneList = new ArrayList<Object>(processJumpService.getTodoList(pageNum, pageSize,"all",title));
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
rspData.setRows(doneList);
rspData.setTotal(indexCount);
return rspData;
}
@RequestMapping("/tablelistAllDone")
@ResponseBody
public TableDataInfo getDoneTableListAllDone(String title){
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
String orderBy = pageDomain.getOrderBy();
PageHelper.startPage(pageNum, pageSize, orderBy);
}
int indexCount = processJumpService.getDoneCount("all",title);
List<Object> doneList = new ArrayList<Object>(processJumpService.getDoneList(pageNum, pageSize,"all",title));
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
rspData.setRows(doneList);
rspData.setTotal(indexCount);
return rspData;
}
}
package com.sinobase.project.module.todo.controller;
import com.github.pagehelper.PageHelper;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.framework.web.page.PageDomain;
import com.sinobase.framework.web.page.TableDataInfo;
import com.sinobase.framework.web.page.TableSupport;
import com.sinobase.project.module.todo.model.Todo;
import com.sinobase.project.module.todo.service.ITodoExtranetService;
import com.sinobase.project.module.todo.service.ITodoService;
import com.sinobase.project.system.user.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/todo")
public class TodoController {
@Autowired
ITodoService todoService;
@Autowired
ITodoExtranetService todoExtranetService;
@Value("${sinobase.isIntranet}")
private boolean isIntranet;
/**
* 获取待办数据分页数量(页数)
* @param count 每页的数据条数
* @return 页数
*/
@RequestMapping("/page_count/{count}")
@ResponseBody
public int getPageCount(@PathVariable int count) {
if(isIntranet){
return todoService.getPageCount(count);
}else{
return todoExtranetService.getPageCount(count);
}
}
/**
* 获取所有待办数据的数量
* @return 待办数量
*/
@RequestMapping("/count")
@ResponseBody
public int getCount() {
if(isIntranet){
return todoService.getCount();
}else{
return todoExtranetService.getCount();
}
}
/**
* 获取待办分页数据
* @param pageNumber 第几页数据
* @param countPerPage 每页有几条数据
* @return json型式的整页待办数据
*/
@RequestMapping("/list/{pageNumber}/{countPerPage}")
@ResponseBody
public Map<String,Object> getDoneList(@PathVariable int pageNumber, @PathVariable int countPerPage){
User user = ShiroUtils.getSysUser();
String userId = user.getUserId();
Map<String,Object> map = new HashMap<String,Object>();
if(isIntranet){
todoService.refreshIndex(userId);
map.put("list",todoService.getDoneList(pageNumber, countPerPage));
map.put("count",todoService.getCount());
}else{
map.put("list",todoExtranetService.getDoneList(pageNumber,countPerPage));
map.put("count",todoExtranetService.getCount());
}
return map;
}
/**
* 获取列表信息(更多)
* @return
*/
@RequestMapping("/tablelist")
@ResponseBody
public TableDataInfo getDoneTableList(String title){
User user = ShiroUtils.getSysUser();
String userId = user.getUserId();
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
String orderBy = pageDomain.getOrderBy();
PageHelper.startPage(pageNum, pageSize, orderBy);
}
int indexCount = 0;
List<Object> doneList = null;
if(isIntranet){
todoService.refreshIndex(userId);
indexCount = todoService.getCount();
doneList = new ArrayList<Object>(todoService.getDoneList(pageNum, pageSize));
}else{
indexCount = todoExtranetService.getCount();
doneList = new ArrayList<Object>(todoExtranetService.getDoneList(pageNum, pageSize));
}
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
rspData.setRows(doneList);
rspData.setTotal(indexCount);
return rspData;
}
/**
* 根据sendclass获取待办列表信息
* @return
*/
@RequestMapping("/tablelistBySendclass")
@ResponseBody
public Map<String,List<Todo>> getDoneListBySendclass(){
Map<String,List<Todo>> map = null;
if(isIntranet){
map = todoService.getDoneList();
}else{
map = todoExtranetService.getDoneList();
}
return map;
}
}
package com.sinobase.project.module.todo.dao;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.module.todo.model.Todo;
import com.sinobase.project.system.portal.constant.MessageConstants;
import com.sinobase.project.system.user.domain.User;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LocalTodoHandler {
public static final String SOURCE = "local";
public static List<Todo> getTodo(DruidDataSource dataSource,int pageNumber,int countPerPage)
throws SQLException{
User user = ShiroUtils.getSysUser();
List<Todo> ret = new ArrayList<Todo>();
String sql = "select id, title, url, receive_time,grant_user_id,from_user_name,subordinate_id,level,'' as sendclass,'' as filetypename,'' as wflevename,0 as leaderInsNum from sys_message where grant_user_id = '"+user.getUserId()
+"' and message_type='"+ MessageConstants.MESSAGE_TYPE_WORK_FLOW_WRITE +"'";
if(pageNumber!=0&&countPerPage!=0){
sql += " order by receive_time desc limit "+ (pageNumber-1)*countPerPage +","+ countPerPage;
}
System.out.println("LocalTodoHandler mysql "+sql);
Connection conn = dataSource.getConnection();
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Todo cur = new Todo();
cur.setId(rs.getString("id"));
cur.setTitle(rs.getString("title"));
cur.setUrl(rs.getString("url"));
cur.setFromUserName(rs.getString("from_user_name"));
Date receiveTime = rs.getTimestamp("receive_time");
//TODO: 因为redis从小到大排序,所以考虑是不是要把时间载戳变成负数
cur.setReceiveTime(0-receiveTime.getTime());
cur.setDataSource(SOURCE);
cur.setUrgency(rs.getString("level"));
cur.setSendclass(rs.getString("sendclass"));
cur.setFiletypename(rs.getString("filetypename"));
cur.setWflevename(rs.getString("wflevename"));
cur.setLeaderInsNum(rs.getString("leaderInsNum"));
cur.setRecordId(rs.getString("subordinate_id"));
cur.setTypeSort("");
cur.setLimitTime("");
cur.setFlowSort("");
cur.setFlowSort2("");
ret.add(cur);
}
}
}catch(SQLException e) {
e.printStackTrace();
}finally {
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
}
package com.sinobase.project.module.todo.dao;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.module.done.dao.LocalSysHandler;
import com.sinobase.project.module.todo.model.Todo;
import com.sinobase.project.system.portal.constant.MessageConstants;
import com.sinobase.project.system.user.domain.User;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
public class ProcessJumpHandler {
public static final String SOURCE = "local";
public static List<Todo> getTodo(DruidDataSource dataSource,int pageNumber,int countPerPage,String isSelf,String title)
throws SQLException{
User user = ShiroUtils.getSysUser();
List<Todo> ret = new ArrayList<Todo>();
String sql = "select id, title, url, receive_time,grant_user_id,from_user_name,level,'' as sendclass from sys_message where 1=1 ";
if(StringUtils.isNotEmpty(isSelf)&&isSelf.equals("self")){
sql += " and grant_user_id = '"+user.getUserId()+"' ";
}else{
sql += " and url not like '%/questionnaire/%' ";
}
if(StringUtils.isNotEmpty(title)){
sql += " and title like '%"+title+"%' ";
}
sql += "and message_type='"+ MessageConstants.MESSAGE_TYPE_WORK_FLOW_WRITE +"'";
if(pageNumber!=0&&countPerPage!=0){
sql += " order by receive_time desc limit "+ (pageNumber-1)*countPerPage +","+ countPerPage;
}
System.out.println("LocalTodoHandler mysql "+sql);
Connection conn = dataSource.getConnection();
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Todo cur = new Todo();
cur.setId(rs.getString("id"));
cur.setTitle(rs.getString("title"));
cur.setUrl(rs.getString("url"));
cur.setFromUserName(rs.getString("from_user_name"));
Date receiveTime = rs.getTimestamp("receive_time");
//TODO: 因为redis从小到大排序,所以考虑是不是要把时间载戳变成负数
cur.setReceiveTime(0-receiveTime.getTime());
cur.setDataSource(SOURCE);
cur.setUrgency(rs.getString("level"));
cur.setSendclass(rs.getString("sendclass"));
ret.add(cur);
}
}
}catch(SQLException e) {
e.printStackTrace();
}finally {
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
public static List<Map<String, Object>> getDone(DruidDataSource dataSource,int pageNumber,int countPerPage,String isSelf,String title)
throws SQLException{
User user = ShiroUtils.getSysUser();
List<Map<String, Object>> ret = new ArrayList<Map<String, Object>>();
String sql = "select id, title, filetypeid, filetypename,recordid,readtime,docid,userid from flow_read_new where 1=1 ";
if(StringUtils.isNotEmpty(isSelf)&&isSelf.equals("self")){
sql += " and userid = '"+user.getUserId()+"' ";
}else{
sql += " and handdoneurl not like '%/questionnaire/%' ";
}
if(StringUtils.isNotEmpty(title)){
sql += " and title like '%"+title+"%' ";
}
if(pageNumber!=0&&countPerPage!=0){
sql += " order by readtime desc limit "+ (pageNumber-1)*countPerPage +","+ countPerPage;
}
System.out.println("LocalDoneHandler mysql "+sql);
Connection conn = dataSource.getConnection();
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(null != rs) {
while(rs.next()) {
Map<String, Object> temp = new HashMap<String, Object>();
String id = rs.getString("id");
String userid = rs.getString("userid");
String til = rs.getString("title");
String recordid = rs.getString("recordid");
String docid = rs.getString("docid");
String filetypeid = rs.getString("filetypeid");
String filetypename = rs.getString("filetypename");
Date receiveTime = rs.getTimestamp("readtime");
temp.put("id", id);
temp.put("title", til);
temp.put("filetypeid", filetypeid);
temp.put("filetypename", filetypename);
temp.put("recordid", recordid);
temp.put("readtime", receiveTime);
temp.put("docid", docid);
temp.put("userid", userid);
ret.add(temp);
}
}
}catch(SQLException e) {
e.printStackTrace();
}finally {
rs.close();
pstmt.close();
conn.close();
}
return ret;
}
}
package com.sinobase.project.module.todo.dao;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.common.utils.spring.SpringUtils;
import com.sinobase.datasource.aspectj.lang.enums.DataSourceType;
import com.sinobase.datasource.source.DynamicDataSourceContextHolder;
import com.sinobase.project.module.todo.model.Todo;
import com.sinobase.project.system.user.domain.User;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RemoteTodoHandler {
public static final String SOURCE = "old";
public static synchronized List<Todo> getTodo(){
User user = ShiroUtils.getSysUser();
List<Todo> ret = new ArrayList<Todo>();
DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.ORACLE.name());
DataSource dataSource = (DataSource) SpringUtils.getBean("dynamicDataSource");
String sql = "select t.id,t.title,t.recordid,t.url,t.createtime,t.userid,t.preusername,t.deptid,t.hj,t.sendclass,t.filetypename,t.wflevename,t.typesort,t.flowsort,t.flowsort2," +
"case when (t.sendclass='SW')" +
" then (select count(*) from flow_idea a where tablename like 'YZ_ARCHIVES_IN' and a.stattag ='1' and a.wfisvisible ='1' and a.recordid =t.recordid )" +
" when (t.sendclass='FW')" +
" then (select count(*) from flow_idea a where tablename like 'YZ_ARCHIVES_OUT' and a.stattag ='1' and a.wfisvisible ='1' and a.recordid =t.recordid )" +
" when (t.sendclass='QB')" +
" then (select count(*) from flow_idea a where tablename like 'YZ_ARCHIVES_SIGN' and a.stattag ='1' and a.wfisvisible ='1' and a.recordid =t.recordid )" +
" when (t.sendclass='HYJY')" +
" then (select count(*) from flow_idea a where tablename like 'YZ_ARCHIVES_SUMMARY' and a.stattag ='1' and a.wfisvisible ='1' and a.recordid =t.recordid )" +
" end as leaderInsNum" +
" from oa_db t where (userid='"+user.getUserId()+"' or userid='"+user.getHistoryId()+"')";
System.out.println("RemoteTodoHandler oracle "+sql);
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try{
conn = dataSource.getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
getValue(conn,stmt,rs,ret);
}catch(Exception e){
e.printStackTrace();
}finally{
DynamicDataSourceContextHolder.clearDataSourceType();
}
return ret;
}
private static void getValue(Connection conn,Statement stmt,ResultSet rs,List<Todo> ret) throws Exception{
User user = ShiroUtils.getSysUser();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(null != rs) {
while (rs.next()) {
Todo cur = new Todo();
String id = parseString(rs.getString("id"));
String title = parseString(rs.getString("title"));
String recordid = parseString(rs.getString("recordid"));
String url = parseString(rs.getString("url"));
String creTime = parseString(rs.getString("createtime"));
String deptid = parseString(rs.getString("deptid"));
String wflevename =parseString(rs.getString("wflevename"));
String filetypename = parseString(rs.getString("filetypename"));
String leaderInsNum = parseString(rs.getString("leaderInsNum"));
String typesort = parseString(rs.getString("typesort"));
String flowsort = parseString(rs.getString("flowsort"));
String flowsort2 = parseString(rs.getString("flowsort2"));
if(creTime.length()==10){
creTime += " 00:00:00";
}else if(creTime.length()==16){
creTime += ":00";
}else if(creTime.length()<10) {
creTime = format.format(new Date());
}
Date receivetime = format.parse(creTime);
String userid = parseString(rs.getString("userid"));
String fromusername = parseString(rs.getString("preusername"));
String hj = parseString(rs.getString("hj"));
String sendclass = parseString(rs.getString("sendclass"));
cur.setId(id);
cur.setTitle(title);
cur.setRecordId(recordid);
cur.setUrl(url);
//TODO: 因为redis从小到大排序,所以考虑是不是要把时间载戳变成负数
cur.setReceiveTime(0-receivetime.getTime());
cur.setDataSource(SOURCE);
cur.setFromUserName(fromusername);
cur.setFiletypename(filetypename);
cur.setWflevename(wflevename);
if(deptid!=null && !deptid.equals("")) {
cur.setDeptId(deptid);
}else {
cur.setDeptId(user.getDept().getHistoryId());
}
cur.setUrgency(hj);
cur.setSendclass(sendclass);
cur.setLeaderInsNum(leaderInsNum);
cur.setTypeSort(typesort);
cur.setFlowSort(flowsort);
cur.setFlowSort2(flowsort2);
ret.add(cur);
}
}
rs.close();
stmt.close();
conn.close();
DynamicDataSourceContextHolder.clearDataSourceType();
}
private static String parseString(Object obj) {
String ret = "";
if(obj != null)
ret = obj.toString();
return ret;
}
}
package com.sinobase.project.module.todo.model;
import java.io.Serializable;
public class Todo implements Serializable {
private String id; //数据ID
private String title; //待办标题
private String recordId; //业务ID
private long receiveTime; //待办接收到的时候,根据这个字段进行排序
private String url; //待办url
private String fromUserName; //上一办理人
private String dataSource; //数据来源
private String deptId;
private String urgency; //缓急
private String sendclass;
private String wflevename;
private String filetypename;
private String leaderInsNum; //领导批示数
private String typeSort; //类型
private String limitTime; //反馈结束时间
private String showLimitPNG; //显示反馈结束时间PNG图片
private String flowSort; //
private String flowSort2; //
public String getWflevename() {
return wflevename;
}
public void setWflevename(String wflevename) {
this.wflevename = wflevename;
}
public String getFiletypename() {
return filetypename;
}
public void setFiletypename(String filetypename) {
this.filetypename = filetypename;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public long getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(long receiveTime) {
this.receiveTime = receiveTime;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getFromUserName() {
return fromUserName;
}
public void setFromUserName(String fromUserName) {
this.fromUserName = fromUserName;
}
public String getDataSource() {
return dataSource;
}
public void setDataSource(String dataSource) {
this.dataSource = dataSource;
}
public String getDeptId() {
return deptId;
}
public void setDeptId(String deptId) {
this.deptId = deptId;
}
public String getUrgency() {
return urgency;
}
public void setUrgency(String urgency) {
this.urgency = urgency;
}
public String getSendclass() {
return sendclass;
}
public void setSendclass(String sendclass) {
this.sendclass = sendclass;
}
public String getLeaderInsNum() {
return leaderInsNum;
}
public void setLeaderInsNum(String leaderInsNum) {
this.leaderInsNum = leaderInsNum;
}
public String getTypeSort() {
return typeSort;
}
public void setTypeSort(String typeSort) {
this.typeSort = typeSort;
}
public String getLimitTime() {
return limitTime;
}
public void setLimitTime(String limitTime) {
this.limitTime = limitTime;
}
public String getShowLimitPNG() {
return showLimitPNG;
}
public void setShowLimitPNG(String showLimitPNG) {
this.showLimitPNG = showLimitPNG;
}
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public String getFlowSort() {
return flowSort;
}
public void setFlowSort(String flowSort) {
this.flowSort = flowSort;
}
public String getFlowSort2() {
return flowSort2;
}
public void setFlowSort2(String flowSort2) {
this.flowSort2 = flowSort2;
}
}
package com.sinobase.project.module.todo.service;
import com.sinobase.project.module.todo.model.Todo;
import java.util.List;
import java.util.Map;
public interface IProcessJumpService {
public int getCount(String isSelf, String title);
public List<Todo> getTodoList(int pageNumber, int countPerPage, String isSelf, String title);
public int getDoneCount(String isSelf, String title);
public List<Map<String, Object>> getDoneList(int pageNumber, int countPerPage,String isSelf,String title);
}
package com.sinobase.project.module.todo.service;
import com.sinobase.project.module.todo.model.Todo;
import java.util.List;
import java.util.Map;
public interface ITodoExtranetService {
public int getPageCount(int count);
public int getCount();
public List<Todo> getDoneList(int pageNumber, int countPerPage);
public Map<String, List<Todo>> getDoneList();
}
package com.sinobase.project.module.todo.service;
import com.sinobase.project.module.todo.model.Todo;
import java.util.List;
import java.util.Map;
import java.util.Set;
public interface ITodoService {
public int getPageCount(int count);
public int getCount();
public Set<Object> getDoneList(int pageNumber, int countPerPage);
public void refreshIndex(String userId);
public Map<String, List<Todo>> getDoneList();
}
package com.sinobase.project.module.todo.service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.project.module.todo.dao.LocalTodoHandler;
import com.sinobase.project.module.todo.dao.ProcessJumpHandler;
import com.sinobase.project.module.todo.model.Todo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class ProcessJumpServiceImpl implements IProcessJumpService {
@Autowired
private DruidDataSource dataSource;
@Override
public int getCount(String isSelf,String title) {
int count = 0;
try{
List<Todo> localTodoList = new ArrayList<>();
if(StringUtils.isNotEmpty(isSelf)&&isSelf.equals("all")){
localTodoList = ProcessJumpHandler.getTodo(dataSource,0,0,isSelf,title);
}else{
localTodoList = ProcessJumpHandler.getTodo(dataSource,0,0,"self",title);
}
count = localTodoList.size();
}catch(Exception e){
e.printStackTrace();
}
return count;
}
@Override
public List<Todo> getTodoList(int pageNumber, int countPerPage,String isSelf,String title) {
List<Todo> localTodoList = null;
try{
localTodoList = ProcessJumpHandler.getTodo(dataSource,pageNumber,countPerPage,isSelf,title);
}catch(Exception e){
e.printStackTrace();
}
return localTodoList;
}
@Override
public int getDoneCount(String isSelf,String title) {
int count = 0;
try{
List<Map<String, Object>> localTodoList = new ArrayList<>();
if(StringUtils.isNotEmpty(isSelf)&&isSelf.equals("all")){
localTodoList = ProcessJumpHandler.getDone(dataSource,0,0,isSelf,title);
}else{
localTodoList = ProcessJumpHandler.getDone(dataSource,0,0,"self",title);
}
count = localTodoList.size();
}catch(Exception e){
e.printStackTrace();
}
return count;
}
@Override
public List<Map<String, Object>> getDoneList(int pageNumber, int countPerPage,String isSelf,String title) {
List<Map<String, Object>> localTodoList = null;
try{
localTodoList = ProcessJumpHandler.getDone(dataSource,pageNumber,countPerPage,isSelf,title);
}catch(Exception e){
e.printStackTrace();
}
return localTodoList;
}
}
package com.sinobase.project.module.todo.service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.project.module.todo.dao.LocalTodoHandler;
import com.sinobase.project.module.todo.model.Todo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class TodoExtranetServiceImpl implements ITodoExtranetService {
@Autowired
private DruidDataSource dataSource;
@Override
public int getPageCount(int count) {
int itemCount = getCount();
int pageCount = itemCount / count;
if(0 != itemCount % count) {
++ pageCount;
}
return pageCount;
}
@Override
public int getCount() {
int count = 0;
try{
List<Todo> localTodoList = LocalTodoHandler.getTodo(dataSource,0,0);
count = localTodoList.size();
}catch(Exception e){
e.printStackTrace();
}
return count;
}
@Override
public List<Todo> getDoneList(int pageNumber, int countPerPage) {
List<Todo> localTodoList = null;
try{
localTodoList = LocalTodoHandler.getTodo(dataSource,pageNumber,countPerPage);
}catch(Exception e){
e.printStackTrace();
}
return localTodoList;
}
public Map<String,List<Todo>> getDoneList(){
Set<String> keySet = new HashSet<String>();
Map<String,List<Todo>> map = new HashMap<String,List<Todo>>();
try{
List<Todo> localTodoList = LocalTodoHandler.getTodo(dataSource,0,0);
for(Todo todo : localTodoList){
if(StringUtils.isNotEmpty(todo.getSendclass())){
if(keySet.contains(todo.getSendclass())){
List<Todo> list = new ArrayList<Todo>();
list = map.get(todo.getSendclass());
list.add(todo);
map.put(todo.getSendclass(),list);
}else{
keySet.add(todo.getSendclass());
List<Todo> list = new ArrayList<Todo>();
list.add(todo);
map.put(todo.getSendclass(),list);
}
}
}
}catch(Exception e){
e.printStackTrace();
}
return map;
}
}
package com.sinobase.project.module.todo.service;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.DefaultTypedTuple;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.stereotype.Service;
import com.alibaba.druid.pool.DruidDataSource;
import com.sinobase.common.utils.StringUtils;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.project.module.homepage.service.IHomePageSerive;
import com.sinobase.project.module.todo.dao.LocalTodoHandler;
import com.sinobase.project.module.todo.dao.RemoteTodoHandler;
import com.sinobase.project.module.todo.model.Todo;
import com.sinobase.project.system.user.domain.User;
@Service
public class TodoServiceImpl implements ITodoService {
@Autowired
private RedisTemplate<Object, Object> redisTemplate;
private Map<String,Set<Object>> todoMap = new LinkedHashMap<>();
@Autowired
private IHomePageSerive homepageservice;
@Autowired
private DruidDataSource dataSource;
@Override
public int getPageCount(int count) {
int itemCount = getCount();
int pageCount = itemCount / count;
if(0 != itemCount % count) {
++ pageCount;
}
return pageCount;
}
@Override
public int getCount() {
User user = ShiroUtils.getSysUser();
String userId = user.getUserId();
int count = redisTemplate.opsForZSet().zCard("todo"+userId).intValue();
return count;
}
@Override
public Set<Object> getDoneList(int pageNumber, int countPerPage) {
User user = ShiroUtils.getSysUser();
String userId = user.getUserId();
int pageCount = getPageCount(countPerPage);
if(pageNumber > pageCount) { //如果要获取的页数大于实际页数
pageNumber = pageCount;
}
int start = (pageNumber - 1) * countPerPage;
int end = pageNumber * countPerPage - 1;
int maxIndex = getCount();
if(end > getCount()) {
end = maxIndex;
}
//获取临时存储的首页待办信息
Set<Object> ret = todoMap.get("sortedtodo"+userId);
//返回结果集
Set<Object> result = new LinkedHashSet<>();
//对工作通知进行处理
int num = 0;
if(ret!=null){
for(Object obj : ret){
if(num>=start&&num<=end){
Todo todo = (Todo) obj;
if(StringUtils.isNotEmpty(todo.getTypeSort())&&todo.getTypeSort().equals("worknotice")){
//通过ID获取通知信息,将反馈结束时间存入待办中
if(StringUtils.isNotEmpty(todo.getRecordId())){
Map<String,String> tongzhi = homepageservice.getTongZhiById(todo.getRecordId());
String limitTime = tongzhi.get("LIMIT_TIME");
if(StringUtils.isNotEmpty(limitTime)){
todo.setLimitTime(limitTime);
todo.setShowLimitPNG("true");
}else{
todo.setShowLimitPNG("false");
}
}
}
result.add(todo);
}
num++;
}
}
return result;
}
//从mysql和oracle中读取待办数(根据用户ID)并添加到redis中,
public void refreshIndex(String userId) {
try {
List<Todo> localTodoList = LocalTodoHandler.getTodo(dataSource,0,0);
List<Todo> remoteTodoList = RemoteTodoHandler.getTodo();
localTodoList.addAll(remoteTodoList);
setRedisData(userId, localTodoList);
} catch (SQLException e) {
e.printStackTrace();
}
}
//将待办数据更新到redis中
private void setRedisData(String userId, List<Todo> todoList) {
redisTemplate.opsForZSet().removeRange("todo"+userId, 0, redisTemplate.opsForZSet().size("todo"+userId));
redisTemplate.opsForZSet().removeRange("sortedtodo"+userId, 0, redisTemplate.opsForZSet().size("sortedtodo"+userId));
/*for(Todo todo : todoList) {
redisTemplate.opsForZSet().add("todo"+userId, todo, todo.getReceiveTime());
}*/
Set<ZSetOperations.TypedTuple<Object>> tuples = new HashSet<ZSetOperations.TypedTuple<Object>>();
for(Todo todo : todoList) {
ZSetOperations.TypedTuple<Object> curTuple = new DefaultTypedTuple(todo, (double)todo.getReceiveTime());
tuples.add(curTuple);
}
if(tuples.size()>0){
redisTemplate.opsForZSet().add("todo" + userId, tuples);
}
//获取redis中所有待办
Set<Object> retAll = redisTemplate.opsForZSet().range("todo"+userId, 0, redisTemplate.opsForZSet().size("todo"+userId));
//急文集合
Set<Object> urgencySet = new LinkedHashSet<>();
//其他集合
Set<Object> othersSet = new LinkedHashSet<>();
//遍历获取所有急文
for(Object obj : retAll){
Todo todo = (Todo) obj;
ZSetOperations.TypedTuple<Object> curTuple = new DefaultTypedTuple(todo, (double)todo.getReceiveTime());
if(StringUtils.isNotEmpty(todo.getUrgency())&&(todo.getUrgency().equals("特急")||todo.getUrgency().equals("加急")||todo.getUrgency().equals("是"))){
urgencySet.add(obj);
}else{
othersSet.add(obj);
}
}
urgencySet.addAll(othersSet);
if(urgencySet.size()>0){
todoMap.put("sortedtodo"+userId,urgencySet);
}
}
public Map<String,List<Todo>> getDoneList(){
User user = ShiroUtils.getSysUser();
String userId = user.getUserId();
Set<String> keySet = new HashSet<String>();
Map<String,List<Todo>> map = new HashMap<String,List<Todo>>();
Set<Object> ret = redisTemplate.opsForZSet().range("todo"+userId, 0, redisTemplate.opsForZSet().size("todo"+userId));
for(Object obj : ret){
Todo todo = (Todo) obj;
//将待办数据根据流程类型sendclass进行分类
if(StringUtils.isNotEmpty(todo.getSendclass())){
if(keySet.contains(todo.getSendclass())){
List<Todo> list = new ArrayList<Todo>();
list = map.get(todo.getSendclass());
list.add(todo);
map.put(todo.getSendclass(),list);
}else{
keySet.add(todo.getSendclass());
List<Todo> list = new ArrayList<Todo>();
list.add(todo);
map.put(todo.getSendclass(),list);
}
}
}
return map;
}
}
package com.sinobase.project.system.menu.controller;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.sinobase.common.utils.security.ShiroUtils;
import com.sinobase.framework.aspectj.lang.annotation.Log;
import com.sinobase.framework.aspectj.lang.enums.BusinessType;
import com.sinobase.framework.config.SinoBaseConfig;
import com.sinobase.framework.web.controller.BaseController;
import com.sinobase.framework.web.domain.AjaxResult;
import com.sinobase.project.system.menu.domain.Menu;
import com.sinobase.project.system.menu.service.IMenuService;
import com.sinobase.project.system.role.domain.Role;
import com.sinobase.project.system.sino.service.PlatformService;
import com.sinobase.project.system.user.domain.User;
/**
* 菜单信息
*
* @author sinobase
*/
@Controller
@RequestMapping("/system/menu")
public class MenuController extends BaseController {
private String prefix = "system/menu";
@Autowired
private IMenuService menuService;
@Autowired
private PlatformService platformService;
@RequiresPermissions("system:menu:view")
@GetMapping()
public String menu() {
return prefix + "/menu";
}
/**
* 标签页面解析服务
* @param menuId 上组节点ID
* @return
*/
@GetMapping("/tab/{parentId}")
@ResponseBody
public List<Menu> tab(@PathVariable("parentId") String parentId) {
List<Menu> list = new ArrayList<Menu>();
User user = ShiroUtils.getSysUser();
if (SinoBaseConfig.isPlatform()) {
list = platformService.getTabs(user.getMenus(), parentId);
} else {
list = menuService.selectMenusByUser(user, Menu.TYPE_TAB, parentId);
}
return list;
}
@RequiresPermissions("system:menu:list")
@GetMapping("/list")
@ResponseBody
public List<Menu> list(Menu menu) {
List<Menu> menuList = menuService.selectMenuList(menu);
return menuList;
}
/**
* 删除菜单
*/
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
@RequiresPermissions("system:menu:remove")
@PostMapping("/remove/{menuId}")
@ResponseBody
public AjaxResult remove(@PathVariable("menuId") String menuId) {
if (menuService.selectCountMenuByParentId(menuId) > 0) {
return error(1, "存在子菜单,不允许删除");
}
if (menuService.selectCountRoleMenuByMenuId(menuId) > 0) {
return error(1, "菜单已分配,不允许删除");
}
return toAjax(menuService.deleteMenuById(menuId));
}
/**
* 新增
*/
@GetMapping("/add/{parentId}")
public String add(@PathVariable("parentId") String parentId, ModelMap mmap) {
Menu menu = null;
if (!parentId.equals("0".toString())) {
menu = menuService.selectMenuById(parentId);
} else {
menu = new Menu();
menu.setMenuId("0");
menu.setMenuName("主目录");
}
mmap.put("menu", menu);
return prefix + "/add";
}
/**
* 新增保存菜单
*/
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
@RequiresPermissions("system:menu:add")
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(Menu menu) {
return toAjax(menuService.insertMenu(menu));
}
/**
* 修改菜单
*/
@GetMapping("/edit/{menuId}")
public String edit(@PathVariable("menuId") String menuId, ModelMap mmap) {
mmap.put("menu", menuService.selectMenuById(menuId));
return prefix + "/edit";
}
/**
* 修改保存菜单
*/
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
@RequiresPermissions("system:menu:edit")
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(Menu menu) {
return toAjax(menuService.updateMenu(menu));
}
/**
* 选择菜单图标
*/
@GetMapping("/icon")
public String icon() {
return prefix + "/icon";
}
/**
* 校验菜单名称
*/
@PostMapping("/checkMenuNameUnique")
@ResponseBody
public String checkMenuNameUnique(Menu menu) {
return menuService.checkMenuNameUnique(menu);
}
/**
* 加载角色菜单列表树
*/
@GetMapping("/roleMenuTreeData")
@ResponseBody
public List<Map<String, Object>> roleMenuTreeData(Role role) {
List<Map<String, Object>> tree = menuService.roleMenuTreeData(role);
return tree;
}
/**
* 加载所有菜单列表树
*/
@GetMapping("/menuTreeData")
@ResponseBody
public List<Map<String, Object>> menuTreeData(Role role) {
List<Map<String, Object>> tree = menuService.menuTreeData();
return tree;
}
/**
* 选择菜单树
*/
@GetMapping("/selectMenuTree/{menuId}")
public String selectMenuTree(@PathVariable("menuId") String menuId, ModelMap mmap) {
mmap.put("menu", menuService.selectMenuById(menuId));
return prefix + "/tree";
}
}
\ No newline at end of file
......@@ -151,6 +151,20 @@ public class PlatformService {
}
/**
* 设置用户登录后的相关信息
*
* @param loginName
* @return
*/
public User setLoginUserInfo(String loginName) {
User user = getUserByLoginname(loginName);
// 设置用户资源菜单 和 标签页面
user.setMenus(getResourceList(user.getUserId() + "",user.getDept().getParentId(),user));
return user;
}
/**
* 获取用户所有资源目录和标签
*
* @param userID 登录后的用户ID
......
spring:
redis:
host: 152.136.74.6
host: 172.30.13.53
port: 6379
password: bug48625
#连接超时时间(毫秒)
timeout: 2000
password:
pool:
#最大连接数(负数表示没有限制)
max-active: 1000
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sinobase.project.module.homepage.mapper.HomePageMapper">
<!--通过ID获取公文详情信息 -->
<select id="getTongZhiById" resultType="java.util.HashMap"
parameterType="String">
select * from yz_tongzhi_info where id=#{recordid}
</select>
</mapper>
\ No newline at end of file
/*!
* jQuery blockUI plugin
* Version 2.70.0-2014.11.23
* Requires jQuery v1.7 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2013 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
*/
;(function() {
/*jshint eqeqeq:false curly:false latedef:false */
"use strict";
function setup($) {
$.fn._fadeIn = $.fn.fadeIn;
var noOp = $.noop || function() {};
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
// confusing userAgent strings on Vista)
var msie = /MSIE/.test(navigator.userAgent);
var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
var mode = document.documentMode || 0;
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
// global $ methods for blocking/unblocking the entire page
$.blockUI = function(opts) { install(window, opts); };
$.unblockUI = function(opts) { remove(window, opts); };
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
$.growlUI = function(title, message, timeout, onClose) {
var $m = $('<div class="growlUI"></div>');
if (title) $m.append('<h1>'+title+'</h1>');
if (message) $m.append('<h2>'+message+'</h2>');
if (timeout === undefined) timeout = 3000;
// Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
var callBlock = function(opts) {
opts = opts || {};
$.blockUI({
message: $m,
fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700,
fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
centerY: false,
showOverlay: false,
onUnblock: onClose,
css: $.blockUI.defaults.growlCSS
});
};
callBlock();
var nonmousedOpacity = $m.css('opacity');
$m.mouseover(function() {
callBlock({
fadeIn: 0,
timeout: 30000
});
var displayBlock = $('.blockMsg');
displayBlock.stop(); // cancel fadeout if it has started
displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
}).mouseout(function() {
$('.blockMsg').fadeOut(1000);
});
// End konapun additions
};
// plugin method for blocking element content
$.fn.block = function(opts) {
if ( this[0] === window ) {
$.blockUI( opts );
return this;
}
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
this.each(function() {
var $el = $(this);
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
return;
$el.unblock({ fadeOut: 0 });
});
return this.each(function() {
if ($.css(this,'position') == 'static') {
this.style.position = 'relative';
$(this).data('blockUI.static', true);
}
this.style.zoom = 1; // force 'hasLayout' in ie
install(this, opts);
});
};
// plugin method for unblocking element content
$.fn.unblock = function(opts) {
if ( this[0] === window ) {
$.unblockUI( opts );
return this;
}
return this.each(function() {
remove(this, opts);
});
};
$.blockUI.version = 2.70; // 2nd generation blocking at no extra cost!
// override these in your code to change the default behavior and style
$.blockUI.defaults = {
// message displayed when blocking (use null for no message)
message: '<div class="loaderbox"><div class="loading-activity"></div> 加载中......</div>',
title: null, // title string; only used when theme == true
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
theme: false, // set to true to use with jQuery UI themes
// styles for the message when blocking; if you wish to disable
// these and use an external stylesheet then do this in your code:
// $.blockUI.defaults.css = {};
css: {
padding: 0,
margin: 0,
width: '30%',
top: '40%',
left: '35%',
textAlign: 'center',
color: '#000',
border: '0px',
backgroundColor:'transparent',
cursor: 'wait'
},
// minimal style set used when themes are used
themedCSS: {
width: '30%',
top: '40%',
left: '35%'
},
// styles for the overlay
overlayCSS: {
backgroundColor: '#000',
opacity: 0.6,
cursor: 'wait'
},
// style to replace wait cursor before unblocking to correct issue
// of lingering wait cursor
cursorReset: 'default',
// styles applied when using $.growlUI
growlCSS: {
width: '350px',
top: '10px',
left: '',
right: '10px',
border: 'none',
padding: '5px',
opacity: 0.6,
cursor: 'default',
color: '#fff',
backgroundColor: '#000',
'-webkit-border-radius':'10px',
'-moz-border-radius': '10px',
'border-radius': '10px'
},
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
// (hat tip to Jorge H. N. de Vasconcelos)
/*jshint scripturl:true */
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
// force usage of iframe in non-IE browsers (handy for blocking applets)
forceIframe: false,
// z-index for the blocking overlay
baseZ: 1000,
// set these to true to have the message automatically centered
centerX: true, // <-- only effects element blocking (page block controlled via css above)
centerY: true,
// allow body element to be stetched in ie6; this makes blocking look better
// on "short" pages. disable if you wish to prevent changes to the body height
allowBodyStretch: true,
// enable if you want key and mouse events to be disabled for content that is blocked
bindEvents: true,
// be default blockUI will supress tab navigation from leaving blocking content
// (if bindEvents is true)
constrainTabKey: true,
// fadeIn time in millis; set to 0 to disable fadeIn on block
fadeIn: 200,
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
fadeOut: 400,
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
timeout: 0,
// disable if you don't want to show the overlay
showOverlay: true,
// if true, focus will be placed in the first available input field when
// page blocking
focusInput: true,
// elements that can receive focus
focusableElements: ':input:enabled:visible',
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
// no longer needed in 2012
// applyPlatformOpacityRules: true,
// callback method invoked when fadeIn has completed and blocking message is visible
onBlock: null,
// callback method invoked when unblocking has completed; the callback is
// passed the element that has been unblocked (which is the window object for page
// blocks) and the options that were passed to the unblock call:
// onUnblock(element, options)
onUnblock: null,
// callback method invoked when the overlay area is clicked.
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
onOverlayClick: null,
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
quirksmodeOffsetHack: 4,
// class name of the message block
blockMsgClass: 'blockMsg',
// if it is already blocked, then ignore it (don't unblock and reblock)
ignoreIfBlocked: false
};
// private data and functions follow...
var pageBlock = null;
var pageBlockEls = [];
function install(el, opts) {
var css, themedCSS;
var full = (el == window);
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
opts = $.extend({}, $.blockUI.defaults, opts || {});
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
return;
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
if (opts.onOverlayClick)
opts.overlayCSS.cursor = 'pointer';
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
msg = msg === undefined ? opts.message : msg;
// remove the current block (if there is one)
if (full && pageBlock)
remove(window, {fadeOut:0});
// if an existing element is being used as the blocking content then we capture
// its current place in the DOM (and current display style) so we can restore
// it when we unblock
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
var node = msg.jquery ? msg[0] : msg;
var data = {};
$(el).data('blockUI.history', data);
data.el = node;
data.parent = node.parentNode;
data.display = node.style.display;
data.position = node.style.position;
if (data.parent)
data.parent.removeChild(node);
}
$(el).data('blockUI.onUnblock', opts.onUnblock);
var z = opts.baseZ;
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
// layer1 is the iframe layer which is used to supress bleed through of underlying content
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
// layer3 is the message content that is displayed while blocking
var lyr1, lyr2, lyr3, s;
if (msie || opts.forceIframe)
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
else
lyr1 = $('<div class="blockUI" style="display:none"></div>');
if (opts.theme)
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
else
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
if (opts.theme && full) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
if ( opts.title ) {
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
}
s += '<div class="ui-widget-content ui-dialog-content"></div>';
s += '</div>';
}
else if (opts.theme) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
if ( opts.title ) {
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
}
s += '<div class="ui-widget-content ui-dialog-content"></div>';
s += '</div>';
}
else if (full) {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
}
else {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
}
lyr3 = $(s);
// if we have a message, style it
if (msg) {
if (opts.theme) {
lyr3.css(themedCSS);
lyr3.addClass('ui-widget-content');
}
else
lyr3.css(css);
}
// style the overlay
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
lyr2.css(opts.overlayCSS);
lyr2.css('position', full ? 'fixed' : 'absolute');
// make iframe layer transparent in IE
if (msie || opts.forceIframe)
lyr1.css('opacity',0.0);
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
$.each(layers, function() {
this.appendTo($par);
});
if (opts.theme && opts.draggable && $.fn.draggable) {
lyr3.draggable({
handle: '.ui-dialog-titlebar',
cancel: 'li'
});
}
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
if (ie6 || expr) {
// give body 100% height
if (full && opts.allowBodyStretch && $.support.boxModel)
$('html,body').css('height','100%');
// fix ie6 issue when blocked element has a border width
if ((ie6 || !$.support.boxModel) && !full) {
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
var fixT = t ? '(0 - '+t+')' : 0;
var fixL = l ? '(0 - '+l+')' : 0;
}
// simulate fixed position
$.each(layers, function(i,o) {
var s = o[0].style;
s.position = 'absolute';
if (i < 2) {
if (full)
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
else
s.setExpression('height','this.parentNode.offsetHeight + "px"');
if (full)
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
else
s.setExpression('width','this.parentNode.offsetWidth + "px"');
if (fixL) s.setExpression('left', fixL);
if (fixT) s.setExpression('top', fixT);
}
else if (opts.centerY) {
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
s.marginTop = 0;
}
else if (!opts.centerY && full) {
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
s.setExpression('top',expression);
}
});
}
// show the message
if (msg) {
if (opts.theme)
lyr3.find('.ui-widget-content').append(msg);
else
lyr3.append(msg);
if (msg.jquery || msg.nodeType)
$(msg).show();
}
if ((msie || opts.forceIframe) && opts.showOverlay)
lyr1.show(); // opacity is zero
if (opts.fadeIn) {
var cb = opts.onBlock ? opts.onBlock : noOp;
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
var cb2 = msg ? cb : noOp;
if (opts.showOverlay)
lyr2._fadeIn(opts.fadeIn, cb1);
if (msg)
lyr3._fadeIn(opts.fadeIn, cb2);
}
else {
if (opts.showOverlay)
lyr2.show();
if (msg)
lyr3.show();
if (opts.onBlock)
opts.onBlock.bind(lyr3)();
}
// bind key and mouse events
bind(1, el, opts);
if (full) {
pageBlock = lyr3[0];
pageBlockEls = $(opts.focusableElements,pageBlock);
if (opts.focusInput)
setTimeout(focus, 20);
}
else
center(lyr3[0], opts.centerX, opts.centerY);
if (opts.timeout) {
// auto-unblock
var to = setTimeout(function() {
if (full)
$.unblockUI(opts);
else
$(el).unblock(opts);
}, opts.timeout);
$(el).data('blockUI.timeout', to);
}
}
// remove the block
function remove(el, opts) {
var count;
var full = (el == window);
var $el = $(el);
var data = $el.data('blockUI.history');
var to = $el.data('blockUI.timeout');
if (to) {
clearTimeout(to);
$el.removeData('blockUI.timeout');
}
opts = $.extend({}, $.blockUI.defaults, opts || {});
bind(0, el, opts); // unbind events
if (opts.onUnblock === null) {
opts.onUnblock = $el.data('blockUI.onUnblock');
$el.removeData('blockUI.onUnblock');
}
var els;
if (full) // crazy selector to handle odd field errors in ie6/7
els = $('body').children().filter('.blockUI').add('body > .blockUI');
else
els = $el.find('>.blockUI');
// fix cursor issue
if ( opts.cursorReset ) {
if ( els.length > 1 )
els[1].style.cursor = opts.cursorReset;
if ( els.length > 2 )
els[2].style.cursor = opts.cursorReset;
}
if (full)
pageBlock = pageBlockEls = null;
if (opts.fadeOut) {
count = els.length;
els.stop().fadeOut(opts.fadeOut, function() {
if ( --count === 0)
reset(els,data,opts,el);
});
}
else
reset(els, data, opts, el);
}
// move blocking element back into the DOM where it started
function reset(els,data,opts,el) {
var $el = $(el);
if ( $el.data('blockUI.isBlocked') )
return;
els.each(function(i,o) {
// remove via DOM calls so we don't lose event handlers
if (this.parentNode)
this.parentNode.removeChild(this);
});
if (data && data.el) {
data.el.style.display = data.display;
data.el.style.position = data.position;
data.el.style.cursor = 'default'; // #59
if (data.parent)
data.parent.appendChild(data.el);
$el.removeData('blockUI.history');
}
if ($el.data('blockUI.static')) {
$el.css('position', 'static'); // #22
}
if (typeof opts.onUnblock == 'function')
opts.onUnblock(el,opts);
// fix issue in Safari 6 where block artifacts remain until reflow
var body = $(document.body), w = body.width(), cssW = body[0].style.width;
body.width(w-1).width(w);
body[0].style.width = cssW;
}
// bind/unbind the handler
function bind(b, el, opts) {
var full = el == window, $el = $(el);
// don't bother unbinding if there is nothing to unbind
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
return;
$el.data('blockUI.isBlocked', b);
// don't bind events when overlay is not in use or if bindEvents is false
if (!full || !opts.bindEvents || (b && !opts.showOverlay))
return;
// bind anchors and inputs for mouse and key events
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
if (b)
$(document).bind(events, opts, handler);
else
$(document).unbind(events, handler);
// former impl...
// var $e = $('a,:input');
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
}
// event handler to suppress keyboard/mouse events when blocking
function handler(e) {
// allow tab navigation (conditionally)
if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) {
if (pageBlock && e.data.constrainTabKey) {
var els = pageBlockEls;
var fwd = !e.shiftKey && e.target === els[els.length-1];
var back = e.shiftKey && e.target === els[0];
if (fwd || back) {
setTimeout(function(){focus(back);},10);
return false;
}
}
}
var opts = e.data;
var target = $(e.target);
if (target.hasClass('blockOverlay') && opts.onOverlayClick)
opts.onOverlayClick(e);
// allow events within the message content
if (target.parents('div.' + opts.blockMsgClass).length > 0)
return true;
// allow events for content that is not being blocked
return target.parents().children().filter('div.blockUI').length === 0;
}
function focus(back) {
if (!pageBlockEls)
return;
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
if (e)
e.focus();
}
function center(el, x, y) {
var p = el.parentNode, s = el.style;
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
if (x) s.left = l > 0 ? (l+'px') : '0';
if (y) s.top = t > 0 ? (t+'px') : '0';
}
function sz(el, p) {
return parseInt($.css(el,p),10)||0;
}
}
/*global define:true */
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
define(['jquery'], setup);
} else {
setup(jQuery);
}
})();
\ No newline at end of file
/**
* @name jQuery FullScreen Plugin
* @author Martin Angelov, Morten Sjøgren
* @version 1.2
* @url http://tutorialzine.com/2012/02/enhance-your-website-fullscreen-api/
* @license MIT License
*/
/*jshint browser: true, jquery: true */
(function($){
"use strict";
// These helper functions available only to our plugin scope.
function supportFullScreen(){
var doc = document.documentElement;
return ('requestFullscreen' in doc) ||
('mozRequestFullScreen' in doc && document.mozFullScreenEnabled) ||
('webkitRequestFullScreen' in doc);
}
function requestFullScreen(elem){
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullScreen) {
elem.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}
}
function fullScreenStatus(){
return document.fullscreen ||
document.mozFullScreen ||
document.webkitIsFullScreen ||
false;
}
function cancelFullScreen(){
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
}
function onFullScreenEvent(callback){
$(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange", function(){
// The full screen status is automatically
// passed to our callback as an argument.
callback(fullScreenStatus());
});
}
// Adding a new test to the jQuery support object
$.support.fullscreen = supportFullScreen();
// Creating the plugin
$.fn.fullScreen = function(props){
if(!$.support.fullscreen || this.length !== 1) {
// The plugin can be called only
// on one element at a time
return this;
}
if(fullScreenStatus()){
// if we are already in fullscreen, exit
cancelFullScreen();
return this;
}
// You can potentially pas two arguments a color
// for the background and a callback function
var options = $.extend({
'background' : '#111',
'callback' : $.noop( ),
'fullscreenClass' : 'fullScreen'
}, props),
elem = this,
// This temporary div is the element that is
// actually going to be enlarged in full screen
fs = $('<div>', {
'css' : {
'overflow-y' : 'auto',
'background' : options.background,
'width' : '100%',
'height' : '100%'
}
})
.insertBefore(elem)
.append(elem);
// You can use the .fullScreen class to
// apply styling to your element
elem.addClass( options.fullscreenClass );
// Inserting our element in the temporary
// div, after which we zoom it in fullscreen
requestFullScreen(fs.get(0));
fs.click(function(e){
if(e.target == this){
// If the black bar was clicked
cancelFullScreen();
}
});
elem.cancel = function(){
cancelFullScreen();
return elem;
};
onFullScreenEvent(function(fullScreen){
if(!fullScreen){
// We have exited full screen.
// Detach event listener
$(document).off( 'fullscreenchange mozfullscreenchange webkitfullscreenchange' );
// Remove the class and destroy
// the temporary div
elem.removeClass( options.fullscreenClass ).insertBefore(fs);
fs.remove();
}
// Calling the facultative user supplied callback
if(options.callback) {
options.callback(fullScreen);
}
});
return elem;
};
$.fn.cancelFullScreen = function( ) {
cancelFullScreen();
return this;
};
}(jQuery));
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
.toast-title {
font-weight: 700
}
.toast-message {
-ms-word-wrap: break-word;
word-wrap: break-word
}
.toast-message a, .toast-message label {
color: #fff
}
.toast-message a:hover {
color: #ccc;
text-decoration: none
}
.toast-close-button {
position: relative;
right: -.3em;
top: -.3em;
float: right;
font-size: 20px;
font-weight: 700;
color: #fff;
-webkit-text-shadow: 0 1px 0 #fff;
text-shadow: 0 1px 0 #fff;
opacity: .8;
-ms-filter: alpha(Opacity=80);
filter: alpha(opacity=80)
}
.toast-close-button:focus, .toast-close-button:hover {
color: #000;
text-decoration: none;
cursor: pointer;
opacity: .4;
-ms-filter: alpha(Opacity=40);
filter: alpha(opacity=40)
}
button.toast-close-button {
padding: 0;
cursor: pointer;
background: 0 0;
border: 0;
-webkit-appearance: none
}
.toast-top-center {
top: 0;
right: 0;
width: 100%
}
.toast-bottom-center {
bottom: 0;
right: 0;
width: 100%
}
.toast-top-full-width {
top: 0;
right: 0;
width: 100%
}
.toast-bottom-full-width {
bottom: 0;
right: 0;
width: 100%
}
.toast-top-left {
top: 12px;
left: 12px
}
.toast-top-right {
top: 12px;
right: 12px
}
.toast-bottom-right {
right: 12px;
bottom: 12px
}
.toast-bottom-left {
bottom: 12px;
left: 12px
}
#toast-container {
position: fixed;
z-index: 999999
}
#toast-container * {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box
}
#toast-container > div {
position: relative;
overflow: hidden;
margin: 0 0 6px;
padding: 15px 15px 15px 50px;
width: 300px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background-position: 15px center;
background-repeat: no-repeat;
-moz-box-shadow: 0 0 12px #999;
-webkit-box-shadow: 0 0 12px #999;
box-shadow: 0 0 12px #999;
color: #fff;
opacity: .8;
-ms-filter: alpha(Opacity=80);
filter: alpha(opacity=80)
}
#toast-container > :hover {
-moz-box-shadow: 0 0 12px #000;
-webkit-box-shadow: 0 0 12px #000;
box-shadow: 0 0 12px #000;
opacity: 1;
-ms-filter: alpha(Opacity=100);
filter: alpha(opacity=100);
cursor: pointer
}
#toast-container > .toast-info {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=) !important
}
#toast-container > .toast-error {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=) !important
}
#toast-container > .toast-success {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==) !important
}
#toast-container > .toast-warning {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=) !important
}
#toast-container.toast-bottom-center > div, #toast-container.toast-top-center > div {
width: 300px;
margin: auto
}
#toast-container.toast-bottom-full-width > div, #toast-container.toast-top-full-width > div {
width: 96%;
margin: auto
}
.toast {
background-color: #030303
}
.toast-success {
background-color: #51a351
}
.toast-error {
background-color: #bd362f
}
.toast-info {
background-color: #2f96b4
}
.toast-warning {
background-color: #f89406
}
.toast-progress {
position: absolute;
left: 0;
bottom: 0;
height: 4px;
background-color: #000;
opacity: .4;
-ms-filter: alpha(Opacity=40);
filter: alpha(opacity=40)
}
@media all and (max-width: 240px) {
#toast-container > div {
padding: 8px 8px 8px 50px;
width: 11em
}
#toast-container .toast-close-button {
right: -.2em;
top: -.2em
}
}
@media all and (min-width: 241px) and (max-width: 480px) {
#toast-container > div {
padding: 8px 8px 8px 50px;
width: 18em
}
#toast-container .toast-close-button {
right: -.2em;
top: -.2em
}
}
@media all and (min-width: 481px) and (max-width: 768px) {
#toast-container > div {
padding: 15px 15px 15px 50px;
width: 25em
}
}
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="homefill" unicode="&#59067;" d="M947.2 473.6l-374.4 307.2c-32 25.6-86.4 25.6-118.4 0l-377.6-310.4c-12.8-6.4-16-22.4-9.6-35.2 3.2-12.8 16-19.2 28.8-19.2h32v-364.8c0-48 35.2-83.2 83.2-83.2h204.8c19.2 0 32 12.8 32 32v147.2c0 22.4 35.2 44.8 64 44.8s67.2-22.4 67.2-44.8v-147.2c0-19.2 12.8-32 32-32h208c48 0 80 32 80 83.2v364.8h32c12.8 0 25.6 9.6 28.8 22.4 3.2 12.8 0 25.6-12.8 35.2z" horiz-adv-x="1024" />
<glyph glyph-name="dianziping" unicode="&#58886;" d="M338.292364-45.381818V56.785455h0.884363v8.610909h342.341818v-110.778182h228.026182v-54.178909h-0.884363v-8.610909H119.156364V-53.992727h0.884363v8.610909h218.298182zM0 896h1022.603636v-737.931636H0V896z" horiz-adv-x="1024" />
<glyph glyph-name="chewei" unicode="&#58887;" d="M1687.04 115.456a223.616 223.616 0 1 0-447.232 0 223.616 223.616 0 0 0 447.232 0z m-1025.152 0a223.616 223.616 0 1 0-447.232 0 223.616 223.616 0 0 0 447.232 0zM38.08 421.632l75.712 227.072s29.76 42.24 65.344 82.56c43.52 49.28 63.872 76.608 93.312 93.376C321.536 852.608 409.6 886.08 464.64 892.928c55.04 6.912 474.752 0 474.752 0S1018.496 889.6 1059.776 872.32c41.28-17.28 116.992-48.192 161.728-82.56 44.672-34.432 144.448-120.448 175.424-141.056 30.976-20.672 47.616-39.424 85.504-49.792 37.824-10.24 196.608-43.072 234.432-60.288 37.824-17.216 106.624-30.976 127.296-68.8 20.608-37.888 72.256-116.992 72.256-209.92v-147.84s-6.912-30.976-17.28-41.344c-10.24-10.24-51.52-13.76-51.52-13.76h-120.448s30.976 313.088-272.128 315.84c-282.112 2.56-257.664-315.84-257.664-315.84h-495.36s41.28 320-264.896 316.672c-295.808-3.2-257.92-316.672-257.92-316.672H86.208s-37.824 10.368-58.496 34.432C7.104 115.456 0.256 170.496 0.256 170.496V373.632l37.824 48z m748.8 113.536h595.2v30.976s-31.04 41.28-75.712 75.648c-44.8 34.432-116.992 86.016-165.12 120.448-48.192 34.368-141.056 68.8-141.056 68.8H786.816v-295.872z m-92.864 0V831.04H399.296s-111.232-79.168-149.12-116.992c-37.76-37.824-74.496-178.88-74.496-178.88h518.336z" horiz-adv-x="1920" />
<glyph glyph-name="kuangquanshui" unicode="&#58888;" d="M428.330806 769.875837h176.895705a17.834637 17.834637 0 0 1 18.04797 17.493304V878.462323c0 9.685317-8.106653 17.535971-18.04797 17.53597H428.373473a17.79197 17.79197 0 0 1-18.04797-17.493304v-91.178515c0-9.599984 8.106653-17.450638 18.04797-17.450637z m339.370101-139.391768S657.194425 701.438618 606.890509 722.259916H413.86683S292.949698 666.878675 258.560422 628.478739v-227.540954s86.655856-68.010553-2.559995-135.765107v-330.580782l58.794568-54.613243h381.780697l71.125215 56.575906v324.479459c-62.29323 24.703959-70.143883 113.322478 0 141.909097V630.484069zM300.501686 542.761549V610.132103c18.986635 39.466601 91.86118 69.845217 127.573121 69.845217L599.039855 680.10532c36.522606-0.639999 107.263821-35.327941 127.402454-69.973217v-67.413221c-7.039988 0-19.967967 24.917292-106.367822 24.917292-89.898517 0-131.797114-51.029248-211.967647-51.029248-76.543872 0-99.157168 26.154623-107.690487 26.154623z" horiz-adv-x="1024" />
<glyph glyph-name="dianhua" unicode="&#58889;" d="M592.341803 819.990353a39.30447 39.30447 0 0 0-0.393832-0.039384h-0.787665A38.20174 38.20174 0 0 0 551.383237 856.380464a38.20174 38.20174 0 0 0 36.114428 39.462003c1.023964 0 101.648135 5.553036 205.895563-46.944818a387.649202 387.649202 0 0 0 148.080971-129.531467c46.157154-68.054233 73.922336-153.673391 82.350349-254.730777a38.08359 38.08359 0 0 0-35.051081-40.958566c-1.142114-0.275683-2.126695-0.275683-3.150659-0.275683a38.241123 38.241123 0 0 0-38.241123 34.775399c-13.075235 156.745283-75.733965 264.891652-186.243328 321.682279-81.523301 41.903764-161.786337 40.328435-168.75717 40.092135zM383.413731 255.234734c89.675631-89.557481 193.45046-175.176638 234.56656-134.296838 58.720406 58.838556 94.952984 109.957998 224.405684 5.946869 129.492083-104.089895 30.010027-173.483159-26.898751-230.391936-65.612473-65.691239-310.458057-3.386958-552.507431 238.504883C21.048568 376.928937-41.09818 621.695754 24.47491 687.386994c56.869394 57.026927 126.420191 156.4696 230.391936 26.898751 104.011129-129.57085 52.852304-165.803428-5.868102-224.484451-40.958566-41.116099 44.660591-144.890929 134.375604-234.56656z m287.103798 128.783185c-20.282367 0-37.177776 16.54096-38.20174 37.650375-4.607839 93.81087-63.288862 115.195968-88.336601 119.96134l-0.905814 0.118149c-20.873116 4.214006-34.381566 24.968972-30.325092 46.47222 4.095857 21.582014 24.181308 35.563063 45.015039 31.349057h0.275683c27.489499-5.277354 55.136532-18.116289 77.74251-36.075045 31.073374-24.69329 68.920665-72.110707 73.134671-157.729864 1.023964-21.77893-15.241313-40.407201-36.311345-41.628082-0.787665-0.11815-1.417797-0.11815-2.047928-0.11815zM628.180549 859.13729c0-0.393832 0-0.393832 0 0 0-0.393832 0-0.393832 0 0zM831.004219 384.017919c-17.958756 0-33.318218 14.886864-35.208613 34.775399-13.74475 145.481677-85.264708 226.965595-212.748247 242.206907-19.494702 2.362994-33.593901 21.503247-31.467206 42.848962 2.126695 21.306331 19.652235 36.705177 39.146938 34.381566 22.448445-2.717443 90.581445-10.869773 153.043259-58.208425A280.487414 280.487414 0 0 0 822.73374 585.26626c23.196727-44.227375 37.847291-97.473512 43.518477-158.399379 2.008545-21.345714-12.208803-40.367818-31.703506-42.533896-1.063347-0.275683-2.362994-0.275683-3.544492-0.275682z" horiz-adv-x="1024" />
<glyph glyph-name="maike" unicode="&#58890;" d="M891.259259 360.106667v26.055111h-77.482666v-26.093037c0-156.520296-116.167111-284.823704-265.746963-303.255704v128.265482c94.701037 17.370074 166.798222 101.072593 166.798222 200.021333V691.579259C714.827852 804.67437 624.45037 896 512.530963 896c-111.881481 0-202.258963-91.32563-202.258963-204.382815v-306.517333c0-101.110519 70.997333-184.813037 166.760296-200.021333v-130.465186c-150.641778 17.408-267.908741 146.773333-267.90874 303.29363V384H132.740741v-26.093037c0-198.921481 151.703704-363.064889 344.291555-381.534815v-27.192889H274.773333V-128h512.113778v77.179259h-239.919407v27.192889C739.555556-2.996148 891.259259 160.085333 891.259259 360.068741z" horiz-adv-x="1024" />
<glyph glyph-name="dianxin" unicode="&#58891;" d="M23.272727-82.757818l977.454546 97.745454v146.478546l-977.454546-97.745455v-146.478545zM658.478545 652.288l-103.470545-47.941818c3.630545-16.709818 5.725091-33.885091 5.725091-51.898182 0-134.749091-109.707636-244.503273-244.224-244.503273-73.541818 0-138.938182 33.373091-183.761455 84.992L23.272727 338.199273v-176.733091l977.454546 96.954182v173.614545l-342.248728 220.253091zM316.509091 405.969455a146.525091 146.525091 0 0 1 59.438545 280.482909l37.236364 147.549091A49.058909 49.058909 0 0 1 377.809455 893.346909a48.733091 48.733091 0 0 1-59.438546-35.467636l-41.704727-164.724364c-61.486545-17.454545-107.101091-73.216-107.101091-140.474182A147.269818 147.269818 0 0 1 316.509091 405.969455z" horiz-adv-x="1024" />
<glyph glyph-name="tiaofu" unicode="&#58892;" d="M1160.030316 799.366737A45.648842 45.648842 0 0 0 1185.684211 758.029474v-750.915369a46.187789 46.187789 0 0 0-17.946948-36.432842c-66.775579-51.307789-167.666526-79.656421-284.402526-79.656421-111.023158 0-203.344842 25.438316-281.923369 77.824-75.237053 50.122105-149.072842 83.536842-265.269894 83.536842-108.220632 0-197.470316-32.875789-243.334737-66.937263 0 0-92.16-70.224842-92.16 68.985263V758.029474c0 12.503579 5.173895 24.576 14.22821 33.253052C69.146947 843.021474 189.493895 895.245474 336.087579 895.245474c147.402105 0 239.130947-47.427368 316.362105-98.950737 63.973053-42.576842 137.269895-62.356211 230.885053-62.356211 95.178105 0 178.283789 22.096842 228.136421 60.52379 14.012632 10.778947 32.714105 12.611368 48.505263 4.904421zM422.211368 566.703158a26.947368 26.947368 0 0 1-26.947368-26.947369v-12.018526a26.947368 26.947368 0 0 1 26.947368-26.947368h407.336421a26.947368 26.947368 0 0 1 26.947369 26.947368V539.755789a26.947368 26.947368 0 0 1-26.947369 26.947369H422.157474z m0-263.545263a26.947368 26.947368 0 0 1-26.947368-26.947369v-12.018526a26.947368 26.947368 0 0 1 26.947368-26.947368h407.336421a26.947368 26.947368 0 0 1 26.947369 26.947368v11.964632a26.947368 26.947368 0 0 1-26.947369 26.947368H422.157474z" horiz-adv-x="1185" />
<glyph glyph-name="chashui" unicode="&#58893;" d="M1378.49344 612.693333c-33.735111 0-65.877333-6.826667-95.402667-17.749333a498.574222 498.574222 0 0 1-78.563555 58.254222c-4.209778 2.56-7.623111 5.12-11.832889 7.623111h-608.142222c-6.826667-3.413333-12.686222-7.623111-19.456-11.832889C494.155662 604.16 437.551218 546.702222 401.995662 479.175111a375.466667 375.466667 0 0 1-25.315555-59.960889 350.776889 350.776889 0 0 1-18.602667-111.502222c0-37.148444 5.916444-72.647111 16.896-106.382222 9.272889-28.728889 21.959111-56.604444 38.001778-82.830222 40.561778-67.527111 102.229333-124.984889 178.232889-167.253334h-0.853334v-44.771555c0-16.042667 13.539556-29.582222 29.582223-29.582223h537.201777c16.042667 0 29.582222 13.539556 29.582223 29.582223v44.771555h-0.853334c58.311111 32.142222 108.942222 74.353778 147.000889 122.481778 15.189333-2.503111 30.378667-4.209778 45.568-4.209778a271.473778 271.473778 0 0 1 271.189333 271.132445c0.796444 150.357333-121.628444 271.985778-271.189333 271.985777z m2.56-463.758222c24.462222 48.981333 38.001778 103.025778 38.001778 158.776889 0 81.123556-27.875556 157.127111-76.003556 222.151111 11.832889 2.56 23.665778 3.413333 36.295111 3.413333a192.512 192.512 0 0 0 192.625778-192.625777c-0.853333-104.675556-86.186667-190.862222-190.919111-191.715556zM1195.19744 728.405333c0 31.232-115.712 56.547556-266.069333 60.814223a60.586667 60.586667 0 0 1-39.708445 106.382222 60.586667 60.586667 0 0 1-39.651555-106.382222c-150.357333-4.266667-266.126222-29.582222-266.126223-60.871112v-15.189333h612.408889v15.246222h-0.853333zM331.96544 307.768889c0 48.924444 9.272889 96.256 27.022222 140.174222 6.769778 18.602667 16.042667 35.498667 25.315556 53.191111-104.675556 130.958222-232.277333 150.357333-238.193778 151.210667a27.192889 27.192889 0 0 1-19.399111-5.063111L10.998329 561.152c-9.329778-6.826667-12.686222-18.602667-9.329778-29.582222a25.6 25.6 0 0 1 25.372445-17.749334c114.858667 0 207.758222-151.210667 239.843555-247.466666 22.016-66.730667 69.290667-105.585778 104.789333-127.544889a361.813333 361.813333 0 0 0-32.995555 102.172444 350.549333 350.549333 0 0 0-6.712889 66.730667z" horiz-adv-x="1650" />
<glyph glyph-name="lvzhi" unicode="&#58894;" d="M464.34181 538.31867c30.207698 30.165032 10.111899 164.051693-84.905818 259.026743C284.546275 892.320463 152.323597 914.165578 120.494582 882.251231c-31.957014-31.914348-10.111899-164.094359 84.863151-259.069409s228.861711-115.070849 259.026743-84.905818zM848.039306 623.181822c94.97505 94.97505 116.820165 227.155062 84.905818 259.069409-31.914348 31.914348-164.094359 10.069233-259.069409-84.905818s-115.070849-228.861711-84.905818-259.026743c30.207698-30.207698 164.094359-10.111899 259.069409 84.905818zM462.592494 426.66112H114.222644A50.346163 50.346163 0 0 1 64.00448 376.442956v-148.179852h534.394656l-346.449869-42.367576a40.532928 40.532928 0 0 1-31.957014-46.378203l36.99163-223.229768a40.532928 40.532928 0 0 1 40.020934-33.919661h434.043659a40.532928 40.532928 0 0 1 40.191598 35.028983l42.66624 310.866225h95.31638a50.346163 50.346163 0 0 1 50.175499 50.218165V426.66112H462.592494z" horiz-adv-x="1024" />
<glyph glyph-name="zhuoqian" unicode="&#58895;" d="M365.714286 896h1082.294857L1682.285714-128H599.990857L365.714286 896z m402.285714-292.571429a36.571429 36.571429 0 0 1 0-73.142857h438.857143a36.571429 36.571429 0 0 1 0 73.142857h-438.857143z m146.285714-292.571428a36.571429 36.571429 0 0 1 0-73.142857h438.857143a36.571429 36.571429 0 0 1 0 73.142857h-438.857143zM219.428571 896l219.428572-1024H0L219.428571 896z" horiz-adv-x="1682" />
<glyph glyph-name="xuanzhuanmen" unicode="&#58896;" d="M734.117647 463.345269h-64.040921C664.961637 650.88491 600.347826 896 488.347826 896c-49.923274 0-118.424552-37.769821-161.923274-216.306905a47.099744 47.099744 0 1 1 91.498722-22.424553c25.616368 105.575448 57.616368 138.230179 67.846547 143.386189 26.230179-21.769821 86.383632-160.654731 90.230179-339.846547h-80a15.345269 15.345269 0 0 1-10.230179-26.2711l122.230179-114.578005a15.345269 15.345269 0 0 1 21.769821 0l115.805627 119.693095a15.345269 15.345269 0 0 1-11.457801 23.734015z m-245.769821-591.345269c-40.347826 0-99.232737 26.189258-142.731458 151.652174a47.058824 47.058824 0 0 0 88.961637 30.731458c25.575448-72.961637 49.923274-88.306905 53.769821-88.306906 3.805627 0 42.84399 27.498721 71.652174 149.769821a47.058824 47.058824 0 1 0 91.539642-21.769821c-34.578005-145.268542-90.88491-222.076726-163.191816-222.076726zM810.230179 518.383632a47.099744 47.099744 0 0 1-22.383632-91.498722c115.846547-28.808184 142.076726-64 142.076727-69.76982 0-25.616368-143.345269-101.11509-417.923274-101.11509-45.421995 0-89.616368 0-132.460358 7.038363l4.501279 76.808184a15.345269 15.345269 0 0 1-26.2711 11.498722L234.88491 237.421995a15.345269 15.345269 0 0 1 0-21.769821l113.923274-120.961637a15.345269 15.345269 0 0 1 26.884911 10.230179v64.040921c44.153453-3.846547 88.961637-7.038363 135.038363-7.038363 246.383632 0 512 60.767263 512 192 1.268542 52.460358-35.846547 120.306905-212.460358 164.501278zM148.542199 218.84399a47.345269 47.345269 0 0 0-20.460358 3.232736C22.997442 264.961637 0 320 0 357.074169c0 128 234.88491 181.769821 436.501279 192a47.058824 47.058824 0 1 0 4.501279-94.117647c-242.618926-12.112532-346.925831-78.035806-346.925832-97.882353 0 0 12.153453-24.306905 71.693095-47.345269a46.731458 46.731458 0 0 0-17.268542-90.88491z" horiz-adv-x="1024" />
<glyph glyph-name="xianhua" unicode="&#58897;" d="M92.387413 266.282667a300.629333 300.629333 0 0 0 144.256-3.669334c47.914667-12.928 90.752-37.589333 128.554667-73.984 18.176-18.176 33.578667-38.613333 46.165333-61.354666 12.586667-22.741333 22.186667-46.336 28.842667-70.826667 6.656-24.490667 10.154667-49.322667 10.496-74.496a326.272 326.272 0 0 0-6.826667-72.405333c-47.573333-10.496-95.488-7.68-143.744 8.405333a323.84 323.84 0 0 0-128 79.744c-37.76 36.352-63.146667 78.506667-76.074666 126.421333a292.437333 292.437333 0 0 0-3.669334 142.165334z m838.314667 0a292.437333 292.437333 0 0 0-3.669333-142.165334c-12.928-47.914667-37.973333-90.026667-75.008-126.421333a243.925333 243.925333 0 0 0-64-45.653333 413.312 413.312 0 0 0-77.653334-29.354667c-27.306667-7.381333-55.466667-12.245333-84.48-14.72-29.013333-2.432-57.514667-2.986667-85.504-1.578667H479.587413v394.496a313.173333 313.173333 0 0 0-113.322666 33.578667 336.554667 336.554667 0 0 0-75.008 52.48 338.645333 338.645333 0 0 0-58.24 70.314667 350.122667 350.122667 0 0 0-37.76 83.925333 324.608 324.608 0 0 0-13.653334 94.421333c0 44.074667 8.746667 86.741333 26.24 128a335.274667 335.274667 0 0 0 92.842667-38.314666c28.330667-17.109333 53.717333-37.930667 76.074667-62.421334a321.962667 321.962667 0 0 0 46.677333 130.645334A343.253333 343.253333 0 0 0 517.304747 892.672a325.973333 325.973333 0 0 0 96-100.736c24.832-40.533333 40.064-84.992 45.653333-133.248a363.093333 363.093333 0 0 0 76.586667 63.488 324.821333 324.821333 0 0 0 93.397333 39.338667 333.226667 333.226667 0 0 0 24.106667-125.909334 332.8 332.8 0 0 0-13.098667-93.397333c-8.746667-30.08-21.333333-58.026667-37.76-83.925333a362.112 362.112 0 0 0-58.24-70.272 325.717333 325.717333 0 0 0-74.496-52.48v-1.066667a353.706667 353.706667 0 0 0-60.330667-23.594667c-20.650667-5.973333-42.154667-9.6-64.512-11.008v-282.24c8.362667 28.672 21.333333 56.149333 38.826667 82.346667 17.493333 26.24 37.76 50.56 60.842667 72.96a319.061333 319.061333 0 0 0 62.421333 48.213333 370.602667 370.602667 0 0 0 72.96 33.621334 324.48 324.48 0 0 0 76.544 15.701333 262.570667 262.570667 0 0 0 74.496-4.181333z" horiz-adv-x="1024" />
<glyph glyph-name="touying" unicode="&#58898;" d="M170.666667-39.025778c0-45.112889 36.579556-81.692444 81.692444-81.692444h54.442667c45.112889 0 81.692444 36.579556 81.692444 81.692444V42.666667H170.666667v-81.692445zM910.222222-39.025778c0-45.112889 36.579556-81.692444 81.692445-81.692444h54.442666c45.112889 0 81.692444 36.579556 81.692445 81.692444V42.666667H910.222222v-81.692445zM1143.694222 896H163.384889A163.384889 163.384889 0 0 1 0 732.615111v-490.154667a163.441778 163.441778 0 0 1 163.384889-163.384888h980.309333a163.441778 163.441778 0 0 1 163.441778 163.384888V732.615111A163.384889 163.384889 0 0 1 1143.694222 896zM490.154667 296.96H108.942222v54.385778h381.212445v-54.442667z m0 163.328H108.942222v54.442667h381.212445v-54.442667z m0 163.384889H108.942222v54.499555h381.212445v-54.499555z m408.462222-435.712a299.576889 299.576889 0 1 0 0.056889 599.153778 299.576889 299.576889 0 0 0 0-599.153778zM873.244444 725.333333a190.577778 190.577778 0 1 1 0-381.212444 190.577778 190.577778 0 1 1 0 381.212444z" horiz-adv-x="1308" />
<glyph glyph-name="kafei" unicode="&#58899;" d="M533.113705 895.683839a21.851713 21.851713 0 0 1-21.418616-22.12732c0-66.460705-25.395234-86.225677-57.877509-115.400666-32.482276-29.056872-72.3272-67.563133-72.327201-145.678085a21.851713 21.851713 0 0 1 32.71851-19.135013 21.930458 21.930458 0 0 1 10.788053 19.135013c0 64.925179 25.237744 84.060192 57.87751 113.274554 32.679138 29.253734 72.3272 68.429327 72.3272 147.804197A21.81234 21.81234 0 0 1 533.113705 895.683839z m108.943584-108.786094a21.851713 21.851713 0 0 1-21.379244-22.12732c0-42.482879-14.646553-52.6016-36.301404-71.894103s-50.908585-48.034396-50.908584-102.171522a21.891085 21.891085 0 0 1 10.788052-19.095641c6.811435-3.937246 15.119023-3.937246 21.930458 0a21.930458 21.930458 0 0 1 10.788053 19.095641c0 40.789864 14.370946 50.160508 36.301404 69.689246 21.930458 19.489365 50.908585 48.979334 50.908584 104.376379a21.81234 21.81234 0 0 1-22.127319 22.12732zM207.070402 525.464641a21.772968 21.772968 0 0 1-21.733596-21.772967v-261.118124a216.942229 216.942229 0 0 1 87.603714-174.026253h434.002575a217.454071 217.454071 0 0 1 83.036508 131.385884c49.688039 4.055363 86.068187 25.749586 106.817472 59.058683 22.363555 36.222659 27.718209 82.170314 27.954443 132.173332 0.078745 0.15749 0.078745 0.31498 0.078745 0.511842A20.670539 20.670539 0 0 1 925.10587 394.866207c0 35.789562-29.489969 65.240159-65.279531 65.240159h-65.279531V503.691674a21.772968 21.772968 0 0 1-21.733595 21.733595H207.070402z m587.476406-108.825466h65.279531c12.323579 0 21.772968-9.449389 21.772968-21.733595 0-48.191885-6.299593-87.997438-21.772968-112.998947-12.99291-20.867401-31.340474-34.135919-65.279531-37.99442v172.726962zM120.057276 25.001362a21.772968 21.772968 0 0 1-21.772968-21.772968c0-60.239857 83.272743-108.786094 152.292657-108.786094h478.690312c70.476695 0 152.33203 47.522554 152.33203 108.786094a21.772968 21.772968 0 0 1-21.772968 21.772968H120.017903z" horiz-adv-x="1024" />
<glyph glyph-name="zhibi" unicode="&#58900;" d="M779.527682 570.12131l-174.541964 174.495419L139.633571 279.218037V104.722618h174.541964l465.352147 465.398692z m137.77179 137.77179a46.358346 46.358346 0 0 1 0 65.581234l-108.914185 108.914186a46.358346 46.358346 0 0 1-65.627779 0l-91.227266-91.227267 174.541964-174.541964 91.227266 91.227267zM0 11.633571h1023.97952v-139.633571H0z" horiz-adv-x="1024" />
<glyph glyph-name="zhuangang" unicode="&#58901;" d="M247.1936 628.24448V609.28h557.79328V658.71872s35.88096 12.65664 64.14336 25.31328c49.80736 25.31328 64.14336 76.30848 43.008 76.30848-26.99264 6.9632-53.57568 15.44192-79.6672 25.31328C782.66368 806.62528 654.00832 889.69216 619.3152 896H440.03328C397.43488 883.34336 311.33696 806.62528 240.8448 787.61984c-64.14336-12.61568-92.85632-18.96448-92.85632-18.96448-14.336-12.65664 7.168-44.68736 28.672-63.65184a340.29568 340.29568 0 0 1 71.35232-32.07168v-44.6464h-0.8192z m323.66592 150.3232l-38.37952 11.01824-38.42048-16.46592 7.70048 27.77088-30.72 21.9136 38.42048 5.48864 15.7696 26.74688 23.01952-27.77088L593.92 821.78048l-30.72-16.42496 7.70048-26.74688zM266.6496 565.57568C280.90368 300.35968 401.32608 199.68 401.32608 199.68h255.5904C770.53952 300.72832 798.72 565.53472 798.72 565.53472c0 6.26688-532.48 0-532.48 0h0.4096zM652.0832 240.64H444.74368C381.58336 307.56864 347.29984 392.68352 348.16 480.4608l29.9008-5.98016 7.41376-65.90464h133.9392l22.36416 37.2736h37.2736l14.9504-37.2736h118.9888l29.85984 71.8848L757.76 486.4s-7.45472-156.0576-104.0384-245.76h-1.6384z m-194.23232-260.3008s14.49984 0 36.2496 56.1152a166.2976 166.2976 0 0 1 14.45888 59.96544h-36.20864l28.99968 56.1152h72.00768l28.99968-49.93024h-36.20864s-7.24992-93.63456 43.4176-112.2304c0 0 36.2496-38.66624 115.5072 168.3456h36.2496s144.09728-99.81952 201.23648-112.2304V-128H61.44v163.30752a596.45952 596.45952 0 0 1 223.35488 112.18944h43.49952c7.20896 0 64.75776-168.3456 129.55648-168.3456v1.2288z" horiz-adv-x="1024" />
<glyph glyph-name="shuipai" unicode="&#58902;" d="M625.225143 761.856l340.455619-347.574857c21.455238-21.455238 33.304381-52.370286 33.304381-83.334095s-11.897905-61.927619-33.304381-83.334096l-309.49181-302.323809c-42.861714-40.472381-123.806476-42.861714-166.619428 0l-380.928 378.538667C41.984 388.096 25.35619 414.232381 25.35619 502.345143V669.013333C25.35619 826.12419 56.271238 895.171048 244.345905 895.171048h154.721524c95.232-2.438095 149.991619-57.148952 226.157714-133.315048zM401.456762 614.253714c0 61.927619-52.370286 111.85981-111.85981 111.85981a111.762286 111.762286 0 0 1-111.908571-111.85981 111.762286 111.762286 0 0 1 111.908571-111.908571 111.762286 111.762286 0 0 1 111.85981 111.908571z" horiz-adv-x="1024" />
<glyph glyph-name="guopan" unicode="&#58903;" d="M263.471407 175.407407L474.074074 782.222222 132.740741 224.180148zM559.028148 886.442667S555.045926 896 549.546667 896c-6.447407 0-9.178074-10.088296-9.178074-10.088296L322.37037 145.028741s103.461926-87.267556 279.627852-83.247408c188.22637 4.28563 289.261037 133.12 289.261037 133.12L559.028148 886.442667z m-23.324444-439.561482c-2.465185-34.512593-29.961481-31.099259-36.067556-6.181926-2.844444 11.567407 0.493037 38.684444 14.260148 65.687704 10.42963 20.404148 23.134815-40.618667 21.807408-59.505778z m19.835259 226.645334c-5.082074 6.219852-1.782519 28.292741 4.93037 44.259555 5.992296 14.260148 18.469926-29.089185 16.952889-39.253333-1.061926-7.433481-12.09837-16.914963-21.883259-5.006222z m48.014222-121.325038c-0.379259-10.619259-13.274074-25.031111-28.065185-12.136296-8.571259 7.509333-4.323556 37.243259 3.223704 62.767408 6.295704 21.200593 25.334519-38.836148 24.841481-50.631112z m50.062222-92.653037c-6.826667 7.812741-7.698963 28.709926-3.185777 54.46163 3.413333 19.797333 27.799704-29.051259 29.165037-46.004148 0.758519-9.671111-14.411852-21.617778-25.97926-8.457482zM284.444444-76.420741c135.395556-61.705481 283.875556-66.635852 414.189037-22.300444 151.703704 51.617185 224.293926 152.234667 230.551704 179.048296l-19.26637 37.69837s-117.418667-149.048889-323.053037-154.699851c-216.822519-5.95437-342.774519 103.537778-342.774519 103.537777L94.814815 137.481481s13.236148-133.575111 189.629629-213.902222z" horiz-adv-x="1024" />
<glyph glyph-name="liyi" unicode="&#58904;" d="M376.742957 217.755826c41.894957-41.627826 92.026435-60.950261 141.490086-57.878261 42.74087 2.671304 85.036522 21.949217 121.188174 57.878261 31.120696 29.829565 56.676174 75.464348 73.594435 130.715826 16.918261 9.037913 38.64487 25.778087 58.546087 56.854261 68.919652 107.297391 8.503652 241.307826-92.293565 318.642087 2.137043 8.993391 3.250087 18.298435 3.250087 27.870609C682.518261 831.443478 605.273043 896 509.996522 896 414.72 896 337.474783 831.443478 337.474783 751.838609c0-7.657739 0.75687-15.181913 2.137043-22.572522C233.249391 650.818783 177.819826 508.66087 244.157217 405.370435c20.658087-32.233739 43.319652-49.107478 60.460522-57.833739 14.692174-50.220522 36.997565-93.718261 72.125218-129.736348z m299.008 508.883478c-49.107478 36.730435-107.297391 60.015304-164.730435 60.594087-58.546087 0.623304-113.797565-18.69913-160.322783-50.086956 25.377391 53.203478 87.618783 90.824348 160.278261 90.824348 77.378783 0 142.914783-42.651826 164.730435-101.286957zM216.598261 106.629565h124.349217a153.243826 153.243826 0 0 1-1.691826-22.706087c0-84.680348 68.786087-154.35687 156.538435-161.836521 2.404174 25.021217-1.246609 32.278261-15.760696 67.138782 5.030957 1.825391 10.017391 3.695304 15.003826 5.387131 11.753739-13.57913 18.565565-23.151304 22.438957-31.47687 3.917913 8.325565 10.685217 17.897739 22.438956 31.47687 5.030957-1.691826 10.017391-3.561739 15.048348-5.342609-14.246957-34.192696-17.986783-41.939478-15.849739-65.803131 82.053565 12.421565 144.829217 79.560348 144.829218 160.456348 0 7.702261-0.578783 15.315478-1.691827 22.706087h120.742957C861.584696 42.340174 887.407304-37.442783 890.212174-128H133.342609c0.75687 85.926957 26.713043 164.59687 83.255652 234.585043z m258.270609 381.284174l8.102956-8.414609a318.642087 318.642087 0 0 1 119.051131 71.590957l82.899478-50.576696c-4.897391-89.933913-22.038261-161.52487-52.802783-211.656348-28.538435-46.614261-69.542957-74.351304-124.037565-80.183652-54.494609 5.787826-95.454609 33.569391-123.993044 80.139131-29.250783 47.727304-46.258087 114.866087-52.001391 198.745043 43.542261-1.29113 85.570783 2.80487 125.595826 13.890783a326.255304 326.255304 0 0 1 86.906435 37.843478c-22.26087-19.144348-45.768348-35.706435-69.721043-51.378087z m-116.557913 58.323478c46.970435 23.462957 93.94087 47.014957 140.82226 70.522435l16.473044-20.48c-47.905391-36.507826-100.574609-52.402087-157.295304-50.086956zM284.716522 605.718261c20.658087 50.576696 59.481043 91.046957 115.044174 122.345739l13.623652-20.702609c-51.734261-28.271304-95.053913-61.885217-128.667826-101.64313z" horiz-adv-x="1024" />
<glyph glyph-name="shensuomen" unicode="&#58905;" d="M1023.832603-127.832603h-71.668282V800.52761a20.476652 20.476652 0 0 1-20.118311 20.579035H91.786593c-11.262159 0-20.118311-9.214493-20.118311-20.579035V-127.832603H0V800.52761C0 853.408564 41.311646 896 91.786593 896h840.259417C982.520958 896 1023.832603 853.408564 1023.832603 800.52761V-127.832603zM403.390046-21.609971l-289.949394-105.761908c-5.528696-2.098857-11.057392 3.225073-11.057392 10.34071V782.917689c0 7.166828 5.170355 12.132416 10.750243 10.340709l289.898201-100.745128c3.788181-1.433366 6.245379-5.682271 6.245379-10.699051v-693.134672c0.30715-4.607247-2.047665-9.214493-5.887037-10.289518z m165.860881 0l289.949394-105.761908c5.528696-2.098857 11.057392 3.225073 11.057392 10.34071V782.917689c0 7.166828-5.170355 12.132416-10.750242 10.340709l-289.898202-100.745128c-3.788181-1.433366-6.245379-5.682271-6.245379-10.699051v-693.134672c-0.30715-4.607247 2.457198-9.214493 5.887037-10.289518z" horiz-adv-x="1024" />
<glyph glyph-name="zhuanti" unicode="&#58906;" d="M250.831238 416.329143l82.066286 79.286857v-250.587429c0-19.017143 13.165714-31.695238 32.816762-31.695238 19.69981 0 32.816762 12.678095 32.816762 31.695238V495.664762l82.066285-79.286857c13.116952-12.678095 32.816762-12.678095 45.933715 0 13.165714 12.678095 13.165714 31.695238 0 44.373333L388.681143 593.92a32.475429 32.475429 0 0 1-45.933714 0L204.897524 460.702476c-13.165714-12.678095-13.165714-31.695238 0-44.373333s32.816762-12.678095 45.933714 0z m246.832762-106.691048l137.216-135.411809a33.206857 33.206857 0 0 1 46.811429 0l137.216 135.411809a30.378667 30.378667 0 0 1 0 45.153524c-13.360762 12.873143-36.815238 12.873143-46.811429 0l-80.359619-80.603429v248.198096A32.914286 32.914286 0 0 1 658.285714 554.666667c-16.725333 0-33.450667-12.873143-33.450666-32.231619v-248.246858L544.52419 354.742857a33.206857 33.206857 0 0 1-46.86019 0 30.378667 30.378667 0 0 1 0-45.153524z m462.360381-245.613714V703.975619c25.84381 0 63.975619 35.449905 63.975619 89.916952C1024 848.408381 999.619048 896 960.024381 896H64.024381C24.33219 896 0 831.975619 0 794.331429c0-37.595429 42.666667-90.35581 64.024381-90.35581 0-17.798095-0.536381-630.979048 0-640-39.69219 0-61.927619-58.514286-61.927619-101.961143C2.096762-81.432381 31.744-128 67.193905-128h890.684952c41.788952 0 66.121143 30.134857 66.121143 85.430857 0 55.247238-20.089905 106.593524-63.975619 106.593524zM926.47619 67.047619H146.285714V700.952381h780.190476v-633.904762z" horiz-adv-x="1024" />
</font>
</defs></svg>
No preview for this file type
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){
return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qa[0].contentDocument,b.write(),b.close(),c=sa(a,b),qa.detach()),ra[a]=c),c}var ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xa(a,b,c){var d,e,f,g,h=a.style;return c=c||wa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),va.test(g)&&ua.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function ya(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];function Fa(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ea.length;while(e--)if(b=Ea[e]+c,b in a)return b;return d}function Ga(a,b,c){var d=Aa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Ha(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ia(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wa(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xa(a,b,f),(0>e||null==e)&&(e=a.style[b]),va.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Ha(a,b,c||(g?"border":"content"),d,f)+"px"}function Ja(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",ta(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xa(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fa(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ba.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fa(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xa(a,b,d)),"normal"===e&&b in Da&&(e=Da[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?za.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Ca,function(){return Ia(a,b,d)}):Ia(a,b,d):void 0},set:function(a,c,d){var e=d&&wa(a);return Ga(a,c,d?Ha(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ua.test(a)||(n.cssHooks[a+b].set=Ga)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wa(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Ka(a,b,c,d,e){return new Ka.prototype.init(a,b,c,d,e)}n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ka.propHooks[this.prop];return a&&a.get?a.get(this):Ka.propHooks._default.get(this)},run:function(a){var b,c=Ka.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Oa.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Oa.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ua(a,b,c){for(var d,e=(Ra[b]||[]).concat(Ra["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Va(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||ta(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Na.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?ta(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ua(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wa(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xa(a,b,c){var d,e,f=0,g=Qa.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=La||Sa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:La||Sa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wa(k,j.opts.specialEasing);g>f;f++)if(d=Qa[f].call(j,a,k,j.opts))return d;return n.map(k,Ua,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xa,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Ra[c]=Ra[c]||[],Ra[c].unshift(b)},prefilter:function(a,b){b?Qa.unshift(a):Qa.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xa(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pa.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Ta(b,!0),a,d,e)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(La=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),La=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Za:Ya)),
void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Za={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$a[b]||n.find.attr;$a[b]=function(a,b,d){var e,f;return d||(f=$a[b],$a[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$a[b]=f),e}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_a.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ab," ").indexOf(b)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cb=n.now(),db=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];function qb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rb(a,b,c,d){var e={},f=a===mb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function ub(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sb(sb(a,n.ajaxSettings),b):sb(n.ajaxSettings,a)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kb.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pb[1]&&h[2]===pb[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rb(lb,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ib.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(db.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fb.test(d)?d.replace(fb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rb(mb,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tb(k,v,f)),u=ub(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(a){var b;return k.cors||Eb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||n.expando+"_"+cb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):b.jsonp!==!1&&(b.url+=(db.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;function Jb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ib;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jb(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=ya(k.pixelPosition,function(a,c){return c?(c=xa(a,b),va.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lb),b&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n});
$.extend({
include: function(context,file) {
var files = typeof file == "string" ? [file]:file;
for (var i = 0; i < files.length; i++) {
var name = files[i].replace(/^\s|\s$/g, "");
var att = name.split('.');
var ext = att[att.length - 1].toLowerCase();
var isCSS = ext == "css";
var tag = isCSS ? "link" : "script";
var attr = isCSS ? " type='text/css' rel='stylesheet' " : " language='javascript' type='text/javascript' ";
var link = (isCSS ? "href" : "src") + "='" + context + name + "'";
if ($(tag + "[" + link + "]").length == 0) document.write("<" + tag + attr + link + "></" + tag + ">");
}
}
});
\ No newline at end of file
;(function($) {
$.extend({
table: {// 表格封装处理
id: 'list-table',
_option: {},
_params: {},
bindevent: function(opts) {
$('.btn-more').click(function() {$("i", this).toggleClass("fa-angle-down fa-angle-up");$('#list-form-more').slideToggle('fast');});
$('#search-form').find(".btn-close").click(function() {$('.btn-more').click();});
$('#search-form').find(".btn-search").click(function() {$.table.search();});
$('#search-form').find(".btn-reset").click(function() {$.form.reset();});
$(document).click(function(event) {
if ($(event.target).closest(".btn-more").length == 0 && $(event.target).closest("#list-form-more").length==0) {
if ($('#list-form-more').is(":visible")) {
$(".btn-more i", this).toggleClass("fa-angle-down fa-angle-up");
$('#list-form-more').hide('fast');
}
}
});
$(".list-bar").find("button[data-method],input[data-method]").each(function() {
var u = ctx + $(this).attr("data-url");
switch ($(this).attr("data-method")) {
case 'add':
opts.createUrl = u;
break;
case 'edit':
opts.updateUrl = u;
break;
case 'removeAll':
opts.removeUrl = u;
break;
case 'exportExcel':
opts.exportUrl = u;
break;
}
$(this).click(function() {eval("$.operate." + $(this).attr("data-method") + "()");});
});
},
setTabelid:function(tableid){//重新设置tableid,一个表单多个表格的时候需要
$.table.id = tableid;
},
parse: function(tableid, opts) {
$.table.id = tableid;
var $table = $("#" + tableid);
if (undefined == opts) {opts = {};}
$.table.bindevent(opts);
var cols = [],config;
$($table.find("thead th")).each(function() {
try {
config = eval("(" + $(this).attr("config") + ")");
} catch (err) {
alert("数据表格解析错误,请检查表格 " + $(this).text() + " 列属性是否正确.");
return false;
}
if (undefined == config.field) {} else if ("_NUMBER" == config.field) { //序号列
config.align = "center";
config.width = "50";
config.formatter = function(v, r, i) {
return $.table.serialNumber(i);
}
}
cols.push(config);
});
var _ish = (eval("(" + $table.attr("data-config") + ")").height == undefined);
if (_ish) {opts.height = ($(window).height() - 30);}
$.extend(true, opts, eval("(" + $table.attr("data-config") + ")"));
opts.columns = cols;
$.table.init(opts);
$(".bs-bars").css("width", "100%");
if (_ish) {$(window).resize(function() {$("#" + tableid).bootstrapTable('resetView', {height: $(window).height() - 30});});}
},
// 初始化表格参数
init: function(options) {
$.table._option = options;
$.table._params = $.util.isEmpty(options.queryParams) ? $.table.queryParams : options.queryParams;
_sortOrder = $.util.isEmpty(options.sortOrder) ? "asc" : options.sortOrder;
_sortName = $.util.isEmpty(options.sortName) ? "" : options.sortName;
_uniqueId = $.util.isEmpty(options.uniqueId) ? "" : options.uniqueId;
_striped = $.util.isEmpty(options.striped) ? false : options.striped;
_escape = $.util.isEmpty(options.escape) ? false : options.escape;
_height = $.util.isEmpty(options.height) ? "" : options.height;
_initPageSize = $.util.isEmpty(options.pageSize) ? 15 : options.pageSize;
if (options.url != null) {
options.url = (options.url.indexOf(ctx) != 0) ? ctx + options.url : options.url;
}
$("#" + $.table.id).bootstrapTable({
search: false, //$.util.visible(options.search), // 是否显示搜索框功能
showSearch: false, //$.util.visible(options.showSearch), // 是否显示检索信息
showRefresh: false, //$.util.visible(options.showRefresh), // 是否显示刷新按钮
showColumns: false, //$.util.visible(options.showColumns), // 是否显示隐藏某列下拉框
showToggle: false, //$.util.visible(options.showToggle), // 是否显示详细视图和列表视图的切换按钮
showExport: false, //$.util.visible(options.showExport), // 是否支持导出文件
height: _height,
url: options.url, // 请求后台的URL(*)
contentType: "application/x-www-form-urlencoded", // 编码类型
method: 'post', // 请求方式(*)
cache: false, // 是否使用缓存
striped: _striped, // 是否显示行间隔色
sortable: true, // 是否启用排序
sortStable: true, // 设置为 true 将获得稳定的排序
sortName: _sortName, // 排序列名称
sortOrder: _sortOrder, // 排序方式 asc 或者 desc
pagination: $.util.visible(options.pagination), // 是否显示分页(*)
pageNumber: 1, // 初始化加载第一页,默认第一页
pageSize: _initPageSize, // 每页的记录行数(*)
pageList: [15, 25, 50], // 可供选择的每页的行数(*)
escape: _escape, // 转义HTML字符串
iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
toolbar: '#toolbar', // 指定工作栏
sidePagination: "server", // 启用服务端分页
queryParams: $.table._params, // 传递参数(*)
columns: options.columns, // 显示列信息(*)
responseHandler: $.table.responseHandler, // 回调函数
uniqueId: _uniqueId,
useRowAttrFunc: true,
//当选中行,拖拽时的哪行数据,并且可以获取这行数据的上一行数据和下一行数据
onReorderRowsDrag: function(table, row) {onReorderRowsDrag(table, row);},
//拖拽完成后的这条数据,并且可以获取这行数据的上一行数据和下一行数据
onReorderRowsDrop: function(table, row) {onReorderRowsDrop(table, row);},
//当拖拽结束后,整个表格的数据
onReorderRow: function(newData) {onReorderRow(newData);},
onClickRow: options.onClickRow
});
},
// 查询条件
queryParams: function(params) {
$.each($("#search-form").serializeArray(), function(i, field) {params[field.name] = field.value;});
params.pageSize = params.limit;
params.pageNum = params.offset / params.limit + 1;
params.searchValue = params.search;
params.orderByColumn = params.sort;
params.isAsc = params.order;
return params;
},
// 请求获取数据后处理回调函数
responseHandler: function(res) {
if (res.code == 0) {
return {rows: res.rows,total: res.total};
} else {
$.win.alertWarning(res.msg);
return {rows: [],total: 0};
}
},
// 序列号生成
serialNumber: function(index) {
var table = $("#" + $.table.id).bootstrapTable('getOptions');
var pageSize = table.pageSize;
var pageNumber = table.pageNumber;
return pageSize * (pageNumber - 1) + index + 1;
},
// 搜索-默认第一个form
search: function(formId) {
var currentId = $.util.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#" + $.table.id).bootstrapTable('getOptions');
params.queryParams = function(params) {
var search = {};
$.each($("#" + currentId).serializeArray(), function(i, field) {
search[field.name] = field.value;
});
search.pageSize = params.limit;
search.pageNum = params.offset / params.limit + 1;
search.searchValue = params.search;
search.orderByColumn = params.sort;
search.isAsc = params.order;
return search;
}
$("#" + $.table.id).bootstrapTable('refresh', params);
},
// 刷新表格
refresh: function() {
try {
$("#" + $.table.id).bootstrapTable('refresh', {silent: true});
} catch (e) {
console.log(e);
//关闭当前窗口
//window.opener.location.href = window.opener.location.href;
//window.close();
}
},
// 查询表格指定列值
selectColumns: function(column) {return $.map($("#" + $.table.id).bootstrapTable('getSelections'), function(row) {return row[column];});},
// 查询表格首列值
selectFirstColumns: function() {return $.map($("#" + $.table.id).bootstrapTable('getSelections'), function(row) {return row[$.table._option.columns[1].field];});},
// 回显数据字典
dict: function(datas, value) {
var actions = [];
$.each(datas, function(index, dict) {
if (dict.dictValue == value) {
actions.push(($.util.isEmpty(dict.listClass) ? "<span>" : "<span class='badge badge-" + dict.listClass +
"'>") + dict.dictLabel + "</span>");
return false;
}
});
return actions.join('');
},
// 显示表格指定列
showColumn: function(column) {$("#" + $.table.id).bootstrapTable('showColumn', column);},
// 隐藏表格指定列
hideColumn: function(column) {$("#" + $.table.id).bootstrapTable('hideColumn', column);}
},
form: {// 表单封装处理
init: function(formid, saveBtn) {
if (undefined == formid || "" == formid) {
alert("表单form ID值不能为空,请给表单的form添加ID,默认为 form1");
return false;
}
var $form = $('#' + formid);
$(".collapse-link").click(function() {
var fbody = $(this).parents("fieldset").find(".form-fieldset-body");
$("i", this).toggleClass("fa-chevron-down fa-chevron-up");
fbody.slideToggle(function() {
if (fbody.is(":hidden")) {
fbody.after(
"<div class='text-center'><a class='btna btna-default' href='javascript:;' onclick='$(this).parents(\"fieldset\").find(\".collapse-link\").click();'>点击查看隐藏信息</a></div>"
);
} else {
fbody.next().remove();
}
});
});
var _rules = {},
_messages = {};
var isTableForm = $(".form-table").size() > 0;
$form.find("input[data-rule],select[data-rule],textarea[data-rule]").each(function() {
var s = isTableForm ? $(this).parents("td.tr").prev() : $(this).parents("div.control-content").prev();
s.html("<span>*</span>" + s.text());
var msgs = eval("(" + $(this).attr("data-messages") + ")");
_rules[$(this).attr("name")] = eval("(" + $(this).attr("data-rule") + ")");
if (undefined != msgs) {
_messages[$(this).attr("name")] = msgs;
}
});
//console.log(isTableForm+"-----------------------"+JSON.stringify(_rules));
$("#" + formid).validate({
rules: _rules,
messages: _messages
});
if ($.fn.select2 !== undefined) {
$("select.form-control:not(.noselect2)").each(function() {
$(this).select2().on("change", function() {
//$(this).valid();
});
});
}
$.form.readbox();
if (saveBtn) {
$("#" + saveBtn).click(function() {
var url = $form.attr("data-action");
if (url == undefined || "" == url) {
alert("提交地址错误 ,请检查form表单的data-action.");
} else {
if ($("#" + formid).validate().form()) {
$.win.loading("正在处理中,请稍后...");
var config = {
url: ctx + url,
type: "post",
dataType: "json",
data: $form.serialize(),
success: function(result) {
$.win.opener().$.win.msg('保存成功');
$.win.close("table");
}
};
$.ajax(config)
}
}
});
}
},
save: function(url, data, handler) {
$.win.loading("数据保存中,请稍后...");
var config = {
type: "post",
dataType: "json",
url: url,
data: data,
success: function(result) {
if ($.isFunction(handler)) {
$.win.closeLoading();
handler(result);
} else {
if (result.code == web_status.SUCCESS) {
try {
$.win.opener().$.win.msg('保存成功');
$.win.close("table");
} catch (e) {}
} else {
$.win.alertError(result.msg);
}
$.win.closeLoading();
}
}
};
$.ajax(config)
},
reset: function(formId) {
var currentId = $.util.isEmpty(formId) ? $('form').attr('id') : formId;
$("#" + currentId)[0].reset();
},
selectCheckeds: function(name) { // 获取选中复选框项
var checkeds = "";
$('input:checkbox[name="' + name + '"]:checked').each(function(i) {
if (0 == i) {
checkeds = $(this).val();
} else {
checkeds += ("," + $(this).val());
}
});
return checkeds;
},
readbox: function() {
if ($(".check-box").length > 0) {
$(".check-box").iCheck({
checkboxClass: 'icheckbox-blue',
radioClass: 'iradio-blue'
})
}
if ($(".radio-box").length > 0) {
$(".radio-box").iCheck({
checkboxClass: 'icheckbox-blue',
radioClass: 'iradio-blue'
})
}
},
selectSelects: function(name) { // 获取选中下拉框项
var selects = "";
$('#' + name + ' option:selected').each(function(i) {
if (0 == i) {
selects = $(this).val();
} else {
selects += ("," + $(this).val());
}
});
return selects;
}
},
win: { // 弹出层封装处理
icon: function(type) { // 显示图标
var icon = "";
if (type == modal_status.WARNING) {
icon = 0;
} else if (type == modal_status.SUCCESS) {
icon = 1;
} else if (type == modal_status.FAIL) {
icon = 2;
} else {
icon = 3;
}
return icon;
},
msg: function(content) {
layer.msg(content, {
time: 2000,
offset: '50px'
});
},
// 消息提示并刷新父窗体
msgReload: function(msg, type) {
layer.msg(msg, {
icon: $.win.icon(type),
time: 500,
shade: [0.1, '#8F8F8F']
},
function() {
$.win.reload();
});
},
toast: function(content, type) {
toastr.option = {
closeButton: true,
debug: false,
progressBar: true,
showEasing: "swing",
hideEasing: "linear",
showMethod: "fadeIn",
hideMethod: "fadeOut",
onclick: null,
positionClass: "toast-bottom-center",
showDuration: "300",
hideDuration: "100",
timeOut: "200",
extendedTimeOut: "100"
}
//toastr["info"]("你有新消息了!","消息提示");
if (type == 1) {
toastr.error(content, '系统错误');
} else if (type == 2) {
toastr.warning(content, '系统警告');
} else if (type == 3) {
toastr.info(content, '系统系统信');
} else {
toastr.success(content, '操作成功');
}
},
toastRefresh: function(content) {
$.win.toast(content);
$.win.opener().$.table.refresh();
},
// 弹出提示
alert: function(content, type) {
top.layer.alert(content + "", {
icon: $.win.icon(type),
title: "系统提示",
btn: ['确认'],
btnclass: ['btn btn-primary']
});
},
alertCallBack: function(content, type, callBack) {
return top.layer.alert(content + "", {
icon: $.win.icon(type),
title: "系统提示",
btn: ['确认'],
btnclass: ['btn btn-primary']
}, callBack);
},
// 错误提示
alertError: function(content) {
$.win.alert(content, modal_status.FAIL);
},
// 成功提示
alertSuccess: function(content) {
$.win.alert(content, modal_status.SUCCESS);
},
// 警告提示
alertWarning: function(content) {
$.win.alert(content, modal_status.WARNING);
},
alertCollBackWarning: function(content, callBack) {
return $.win.alertCallBack(content, modal_status.WARNING, callBack);
},
confirm: function(content, callBack, cancelBack) {
top.layer.confirm(content, {
icon: 3,
title: "系统提示",
btn: ['确认', '取消'],
btnclass: ['btn btn-primary', 'btn btn-danger']
}, function(index) {
top.layer.close(index);
callBack(true);
}, function(index) {
top.layer.close(index);
if ($.isFunction(cancelBack)) {
cancelBack(true);
}
});
},
/**
* refresh:是否刷新父母页面
* - 空或不填写为不刷新
* - parent:父页面刷新
* - table:父母页面列表刷新
*/
close: function(refresh, msg) { // 关闭窗体
var index = parent.layer.getFrameIndex(window.name);
if (undefined == index) {
window.close();
}
try {
if ("table" == refresh) {
if ($.util.isNotEmpty(msg)) {
$.win.opener().$.win.msg(msg);
}
$.win.opener().$.table.refresh();
} else if ("parent" == refresh) {
$.win.opener().location.reload();
}
parent.layer.close(index);
} catch (e) {}
},
opener: function() { //如果是layer弹出窗口,弹出窗口获取父页面
//再此临时解决首页待办提交流程 js 报错的问题
try {
if(frameElement != null){
var api = frameElement.api || {};
var config = api.config;
return config.opener;
}else{
return window.opener;
}
} catch (e) {
window.opener.location.reload();
//window.opener.location.href = window.opener.location.href;
//window.close();
}
},
/**
* 打开开一个窗口
* @url 窗口地址
* @title 标题
* @size 窗口大小(格式1:数组宽、高['200px','100%'],格式2:如果为true,为最大弹出层,如宽或高任意有个100%,或者true,都为弹出个新页面)
* @noBtn 是否有窗口自带按钮
* @clsHandler 窗口关闭事件回调事件
*/
open: function(url, title, size, btn,clsHandler) {
size = $.win._size(size);
if ($.util.isEmpty(title)) {title = false};
if ($.util.isEmpty(url)) {url = ctx + "404.html"};
var opts = {
area:size,title:title,content:url,
type:2,resize:true,maxmin:false,shadeClose: false,opener: window,scrollbar: true,
end: function() {
if ($.isFunction(clsHandler)) {
clsHandler();//location.reload();
}
}
};
if (btn) {
opts.btn = ['确定', '关闭'],
opts.yes = function(index, layero) {
var iframeWin = layero.find('iframe')[0];
iframeWin.contentWindow.submitHandler();
}
opts.cancel = function(index) {
return true;
}
}
var index = top.layer.open(opts);
if (size == true) {
top.layer.full(index);
}
},
openForm:function(url,winName){
/*var a = $("<a href='"+url+"' target='_blank'>555</a>").get(0);
var e = document.createEvent('MouseEvents');
e.initEvent( 'click', true, true );
a.dispatchEvent(e);*/
if(!winName){winName='newWindow';}
var param = 'width='+(window.screen.availWidth-20)+',height='+(window.screen.availHeight-60)+ ',top=5,left=5,resizable=yes,status=yes,menubar=no,scrollbars=yes';
// window.open(url,'_blank',param);
window.open(url);
},
openContent: function(content, size, title, btns, handler) {
if (undefined == title) {
title = false;
}
var opts = {
type: 1,
area: size,
maxmin: false,
title: title,
shadeClose: false,
closeBtn: 0,
scrollbar: false,
content: content
};
if ($.isFunction(handler)) {
opts.yes = handler;
if (btns != undefined && "" != btns) {
opts.btn = btns;
} else {
opts.btn = ['确定', '取消'];
}
}
layer.open(opts);
},
openHTML: function(content, size, title) {
if (undefined == title) {
title = false;
}
var opts = {
type: 1,maxmin: false,
area: size,title: title,
shadeClose: true,closeBtn: 0,scrollbar: false,
content: content
};
return layer.open(opts);
},
// 打开遮罩层
loading: function(message) {
$.blockUI({
message: '<div class="loaderbox"><div class="loading-activity"></div> ' + message + '</div>'
});
},
// 关闭遮罩层
closeLoading: function() {
setTimeout(function() {
$.unblockUI()
}, 50);
},
// 重新加载
reload: function() {
parent.location.reload();
},
_size: function(size) {
if (size == undefined || ''==size) {
size = ['85%', '85%'];
}else{
if(size==true){
size = ['100%', '100%'];
}else{
if ($.util.isEmpty(size[0])) {size[0] = "85%"};
if ($.util.isEmpty(size[1])) {size[1] = "85%"}
}
}
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios )/i)) {size = ['auto', 'auto']}; //如果是移动端,就使用自适应大小弹窗
return size;
}
},
operate: {// 操作封装处理
exportExcel: function(formId) { // 下载-默认第一个form
var currentId = $.util.isEmpty(formId) ? $('form').attr('id') : formId;
$.win.loading("正在导出数据,请稍后...");
$.post($.table._option.exportUrl, $("#" + currentId).serializeArray(), function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = "/util/download?fileName=" + result.msg + "&delete=" + true;
} else {
$.win.alertError(result.msg);
}
$.win.closeLoading();
});
},
submit: function(url, type, dataType, data) { // 提交数据
$.win.loading("正在处理中,请稍后...");
url = (url.indexOf(ctx) < 0) ? ctx + url : url;
var config = {
url: url,
type: type,
dataType: dataType,
data: data,
success: function(result) {
$.operate.ajaxSuccess(result);
}
};
$.ajax(config);
},
post: function(url, data) { // post请求传输
$.operate.submit(url, "post", "json", data);
},
get: function(url, handler) { // get请求传输
if ($.isFunction(handler)) {
$.get(url, handler);
} else {
$.operate.submit(url, "get", "json", "");
}
},
// 删除信息
remove: function(id) {
$.win.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
var url = $.util.isEmpty(id) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{id}", id);
$.operate.submit(url, "post", "json", {
"id": id
});
});
},
// 批量删除信息
removeAll: function() {
var rows = $.util.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table
._option.uniqueId);
if (rows.length == 0) {
$.win.alertWarning("请至少选择一条记录");
return;
}
$.win.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
var url = ($.table._option.removeUrl.indexOf(ctx) < 0) ? ctx += $.table._option.removeUrl : $.table._option.removeUrl;
var data = {
"ids": rows.join()
};
$.operate.submit(url, "post", "json", data);
});
},
// 清空信息
clean: function() {
$.win.confirm("确定清空所有" + $.table._option.modalName + "吗?", function() {
var url = $.table._option.cleanUrl;
$.operate.submit(url, "post", "json", "");
});
},
// 添加信息
add: function(id) {
var url = $.util.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
$.win.open(url, "添加" + $.table._option.modalName, $.table._option.modalSize);
},
// 编辑信息
edit: function(id) {
var url = "/404.html";
if ($.table._option.updateUrl == undefined || "" == $.table._option.updateUrl) {
alert("信息编辑服务地址错误:" + $.table._option.updateUrl + ",请配置信息编辑服务地址.");
return false;
}
if ($.util.isNotEmpty(id)) {
url = $.table._option.updateUrl.replace("{id}", id);
} else {
var id = $.util.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table
._option.uniqueId);
if (id.length == 0) {
$.win.alertWarning("请至少选择一条记录");
return;
} else if (id.length > 1) {
$.win.alertWarning("请选择一条记录,进行编辑.");
return;
}
url = $.table._option.updateUrl.replace("{id}", id);
}
$.win.open(url, "编辑" + $.table._option.modalName, $.table._option.modalSize);
},
// 工具栏表格树编辑
editTree: function() {
var row = $('#bootstrap-tree-table').bootstrapTreeTable('getSelections')[0];
if ($.util.isEmpty(row)) {
$.win.alertWarning("请至少选择一条记录");
return;
}
var url = $.table._option.updateUrl.replace("{id}", row[$.table._option.uniqueId]);
$.win.open("编辑" + $.table._option.modalName, url);
},
// 保存信息
save: function(url, data, handler) {
$.win.loading("正在处理中,请稍后...");
var config = {
url: url,
type: "post",
dataType: "json",
data: data,
success: function(result) {
if ($.isFunction(handler)) {
$.win.closeLoading();
handler(result);
} else {
if (result.code == web_status.SUCCESS) {
$.win.opener().$.win.msg('保存成功');
$.win.close("table");
} else {
$.win.alertError(result.msg);
}
$.win.closeLoading();
}
}
};
$.ajax(config)
},
// 保存结果弹出msg刷新table表格
ajaxSuccess: function(result) {
if (result.code == web_status.SUCCESS) {
$.win.msg(result.msg);
$.table.refresh();
} else {
$.win.alertError(result.msg);
}
$.win.closeLoading();
},
// 成功结果提示msg(父窗体全局更新)
saveSuccess: function(result) {
if (result.code == web_status.SUCCESS) {
$.win.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
} else {
$.win.alertError(result.msg);
}
$.win.closeLoading();
},
// 成功回调执行事件(父窗体静默更新)
successCallback: function(result) {
if (result.code == web_status.SUCCESS) {
if (window.parent.$("#bootstrap-table").length > 0) {
$.win.close();
window.parent.$.win.msg(result.msg);
window.parent.$.table.refresh();
} else if (window.parent.$("#bootstrap-tree-table").length > 0) {
$.win.close();
window.parent.$.win.msg(result.msg);
window.parent.$.treeTable.refresh();
} else {
$.win.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
}
} else {
$.win.alertError(result.msg);
}
$.win.closeLoading();
}
},
validate: {// 校验封装处理
// 判断返回标识是否唯一 false 不存在 true 存在
unique: function(value) {if (value == "0") {return true;}return false;},
// 表单验证
form: function(formId) {
var currentId = $.util.isEmpty(formId) ? $('form').attr('id') : formId;
return $("#" + currentId).validate().form();
}
},
tree: {// 树插件封装处理
_option: {},
_lastValue: {},
// 初始化树结构
init: function(options) {
$.tree._option = options;
// 属性ID
var _id = $.util.isEmpty(options.id) ? "tree" : options.id;
// 展开等级节点
var _expandLevel = $.util.isEmpty(options.expandLevel) ? 0 : options.expandLevel;
// 树结构初始化加载
var setting = {
check: options.check,
view: {
selectedMulti: false,
nameIsHTML: true
},
data: {
key: {
title: "title"
},
simpleData: {
enable: true
}
},
callback: {
onClick: options.onClick
}
};
$.get(options.url, function(data) {
var treeName = $("#treeName").val();
var treeId = $("#treeId").val();
tree = $.fn.zTree.init($("#" + _id), setting, data);
$._tree = tree;
// 展开第一级节点
var nodes = tree.getNodesByParam("level", 0);
for (var i = 0; i < nodes.length; i++) {
if (_expandLevel > 0) {
tree.expandNode(nodes[i], true, false, false);
}
$.tree.selectByIdName(treeId, treeName, nodes[i]);
}
// 展开第二级节点
nodes = tree.getNodesByParam("level", 1);
for (var i = 0; i < nodes.length; i++) {
if (_expandLevel > 1) {
tree.expandNode(nodes[i], true, false, false);
}
$.tree.selectByIdName(treeId, treeName, nodes[i]);
}
// 展开第三级节点
nodes = tree.getNodesByParam("level", 2);
for (var i = 0; i < nodes.length; i++) {
if (_expandLevel > 2) {
tree.expandNode(nodes[i], true, false, false);
}
$.tree.selectByIdName(treeId, treeName, nodes[i]);
}
}, null, null, "正在加载,请稍后...");
},
// 搜索节点
searchNode: function() {
// 取得输入的关键字的值
var value = $.util.trim($("#keyword").val());
if ($.tree._lastValue === value) {
return;
}
// 保存最后一次搜索名称
$.tree._lastValue = value;
var nodes = $._tree.getNodes();
// 如果要查空字串,就退出不查了。
if (value == "") {
$.tree.showAllNode(nodes);
return;
}
$.tree.hideAllNode(nodes);
// 根据搜索值模糊匹配
$.tree.updateNodes($._tree.getNodesByParamFuzzy("name", value));
},
// 根据Id和Name选中指定节点
selectByIdName: function(treeId, treeName, node) {
if ($.util.isNotEmpty(treeName) && $.util.isNotEmpty(treeId)) {
if (treeId == node.id && treeName == node.name) {
$._tree.selectNode(node, true);
}
}
},
// 显示所有节点
showAllNode: function(nodes) {
nodes = $._tree.transformToArray(nodes);
for (var i = nodes.length - 1; i >= 0; i--) {
if (nodes[i].getParentNode() != null) {
$._tree.expandNode(nodes[i], true, false, false, false);
} else {
$._tree.expandNode(nodes[i], true, true, false, false);
}
$._tree.showNode(nodes[i]);
$.tree.showAllNode(nodes[i].children);
}
},
// 隐藏所有节点
hideAllNode: function(nodes) {
var tree = $.fn.zTree.getZTreeObj("tree");
var nodes = $._tree.transformToArray(nodes);
for (var i = nodes.length - 1; i >= 0; i--) {
$._tree.hideNode(nodes[i]);
}
},
// 显示所有父节点
showParent: function(treeNode) {
var parentNode;
while ((parentNode = treeNode.getParentNode()) != null) {
$._tree.showNode(parentNode);
$._tree.expandNode(parentNode, true, false, false);
treeNode = parentNode;
}
},
// 显示所有孩子节点
showChildren: function(treeNode) {
if (treeNode.isParent) {
for (var idx in treeNode.children) {
var node = treeNode.children[idx];
$._tree.showNode(node);
$.tree.showChildren(node);
}
}
},
// 更新节点状态
updateNodes: function(nodeList) {
$._tree.showNodes(nodeList);
for (var i = 0, l = nodeList.length; i < l; i++) {
var treeNode = nodeList[i];
$.tree.showChildren(treeNode);
$.tree.showParent(treeNode)
}
},
// 获取当前被勾选集合
getCheckedNodes: function(column) {
var _column = $.util.isEmpty(column) ? "id" : column;
var nodes = $._tree.getCheckedNodes(true);
return $.map(nodes, function(row) {
return row[_column];
}).join();
},
// 不允许根父节点选择
notAllowParents: function(_tree) {
var nodes = _tree.getSelectedNodes();
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].level == 0) {
$.win.alertError("不能选择根节点(" + nodes[i].name + ")");
return false;
}
if (nodes[i].isParent) {
$.win.alertError("不能选择父节点(" + nodes[i].name + ")");
return false;
}
}
return true;
},
// 不允许最后层级节点选择
notAllowLastLevel: function(_tree) {
var nodes = _tree.getSelectedNodes();
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].level == nodes.length + 1) {
$.win.alertError("不能选择最后层级节点(" + nodes[i].name + ")");
return false;
}
}
return true;
},
// 隐藏/显示搜索栏
toggleSearch: function() {
$('#search').slideToggle(200);
$('#btnShow').toggle();
$('#btnHide').toggle();
$('#keyword').focus();
},
// 折叠zTreeVue
collapse: function() {
$._tree.expandAll(false);
},
// 展开
expand: function() {
$._tree.expandAll(true);
},
dept: function(id, name, rootId, max, callback) {
if ($.util.isEmpty(rootId)) rootId = '';
if ($.util.isEmpty(max)) max = 0;
if ($.util.isEmpty(callback)) callback = '';
zTreeVue.init([], {
type: 'dept',
rootId: rootId,
max: max
}, callback, {
id: id,
name: name
}, true);
},
user: function(id, name, rootId, max, callback) {
if ($.util.isEmpty(rootId)) rootId = '';
if ($.util.isEmpty(max)) max = 0;
if ($.util.isEmpty(callback)) callback = '';
zTreeVue.init([], {
type: 'user',
rootId: rootId,
max: max
}, callback, {
id: id,
name: name
}, true);
}
},
file: {
get: function(id) {
$.get(_FILE_SERVICE + "/file/get/" + id);
},
getPath: function(id) {
return _FILE_SERVICE + "/file/get/" + id;
},
del: function(id, handler) {
if ($.util.isEmpty(id)) {
alert('id不能为空');
} else {
$.get(ctx + "/file/delete/" + id, function() {
handler();
});
}
},
/**
* 文件操作后回调函数,外层有<div class="file-container"></div>
* @param res 上传成功后回传的file对象
* @param type 回写的类型,image:图片,list:列表
*/
handler: function(type, res) {
if (type == "image") {
var div = $("<div class='thumbnail'></div>");
$("<button type='button' class='images-remove' title='删除文件' data-id='" + res.fileId +
"'><i class='glyphicon glyphicon-trash'></i></button>").bind('click', function() {
var that = $(this);
$.win.confirm("您确认删除吗?", function() {
$.file.del(that.attr("data-id"), function() {
that.parent().remove();
});
});
}).appendTo(div);
div.append("<img class='preview-image' src='" + _FILE_SERVICE + "/file/get/" + res.fileId + "'>");
$(".file-container").append(div);
} else if (type == "list") {
} else {
}
},
//图片列表
retPic: function(res) {
$.file.handler("image", res);
},
//列表回显
rList: function(res) {
$.file.handler("list", res);
}
},
util: {
//返回文件类型的fa 图标 名称
fileTypeIco: function(x) {
if ("doc,docx".indexOf(x) > -1) {
return "fa-file-word-o";
} else if ("jpg,JPG,bmp,png".indexOf(x) > -1) {
return "fa-file-image-o";
} else if ("xls,xlsx".indexOf(x) > -1) {
return "fa-file-excel-o";
} else if ("ppt,pptx".indexOf(x) > -1) {
return "fa-file-powerpoint-o";
} else if ("pdf".indexOf(x) > -1) {
return "fa-file-pdf-o";
} else {
return "fa-file-text-o";
}
},
/**
* 文件上传函数(默认handler可以不传入,调用页面要有附件回显容器id:file_contain)
* @param module 所属业务模块
* @param moduleId 所属业务模块表的id
* @param moduleType 上传文件标识
* @param handler 上传成功后的回调函数
*/
upload: function(module, moduleId, moduleType, handler) {
$.win.open(ctx + "common/file?module=" + module + "&moduleId=" + moduleId + "&returnHandler=" + handler + "&moduleType=" + moduleType, "附件上传", ['800px', '80%']);
},
/**
* 单个文件上传函数(默认handler可以不传入,调用页面要有附件回显容器 样式 .fileupload_btn)
* @param obj file 控件对象(必填)
* @param module 所属业务模块(必填)
* @param moduleId 所属业务模块表的id(必填)
* @param moduleType 所属业务模块表的标识
* @param companyId 所属业务模块表的id(必填)
* @param handler 上传成功后的回调函数(可选)
*/
uploadSign: function(obj, module, moduleId, moduleType, companyId, userId, handler) {
if ($.util.isEmpty(module)) {
alert("单个文件上传函数参数错误:module 必填");
return;
}
if ($.util.isEmpty(moduleId)) {
alert("请先保存或业务参数id输入错误.");
return;
}
if ($.util.isEmpty(companyId)) {
alert("单个文件上传函数参数错误:companyId 必填");
return;
}
var reader = new FileReader();
reader.onloadstart = function(e) {
console.log("开始读取....");
}
reader.onprogress = function(e) {
console.log("正在读取中....");
}
reader.onabort = function(e) {
console.log("中断读取....");
}
reader.onerror = function(e) {
console.log("读取异常....");
}
reader.onload = function(e) {
console.log("成功读取....");
$(".fileupload_btn").html("").append("<img src='" + this.result + "' >");
}
reader.readAsDataURL(obj.files[0]);
jQuery.ajaxFileUpload({
url: _FILE_SERVICE + "/file/upload", //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议,一般设置为false
fileElementId: ['fileupload'], //文件上传域的ID 在这里设置要上传的多个input的ID
data: {
'module': module,
'moduleId': moduleId,
'companyId': companyId,
'moduleType': moduleType,
'uploadType': 'single'
},
dataType: 'json', //返回值类型 一般设置为json
success: function(data, status) { //服务器成功响应处理函数
console.log(data);
if ($.isFunction(handler)) {
handler(data);
}
},
error: function(data, status, e) { //服务器响应失败处理函数
alert(e);
}
});
},
/**
* 单附件上传(跨域)
* @param obj 初始化操作对象 默认为:this 即可
* @param module 所属模块名称
* @param moduleId 所属模块数据ID
* @param moduleType 所属模块类型
* @param companyId 上传人所在公司ID
* @param userId 上传人用户ID
* @param handler 回调方法
* @param fileuploadId file控件ID
*/
uploadSignCross: function(obj, module, moduleId, moduleType, companyId, userId, handler) {
var explorer = $.util.getBrowser();
var browserType = explorer.browser + " " + explorer.version;
var token = $.md5('SinoSoft' + $.util.getNowFormatDate());
if ($.util.isEmpty(module)) {
alert("单个文件上传函数参数错误:module 必填");
return;
}
if ($.util.isEmpty(moduleId)) {
alert("请先保存或业务参数id输入错误.");
return;
}
if ($.util.isEmpty(companyId)) {
alert("单个文件上传函数参数错误:companyId 必填");
return;
}
var reader = new FileReader();
reader.onloadstart = function(e) {
console.log("开始读取....");
}
reader.onprogress = function(e) {
console.log("正在读取中....");
}
reader.onabort = function(e) {
console.log("中断读取....");
}
reader.onerror = function(e) {
console.log("读取异常....");
}
reader.onload = function(e) {
console.log("成功读取....");
$(".fileupload_btn").html("").append("<img src='" + this.result + "' >");
}
reader.readAsDataURL(obj.files[0]);
console.info('--------------------------------------');
jQuery.ajaxFileUpload({
url: ctx + "common/upload", //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议,一般设置为false
fileElementId: [obj.id], //文件上传域的ID 在这里设置要上传的多个input的ID
data: {
'module': module,
'moduleId': moduleId,
'companyId': companyId,
'moduleType': moduleType,
'uploadType': 'single',
'token': token,
'url': "/file/upload",
'browserType': browserType
},
dataType: 'json', //返回值类型 一般设置为json
success: function(data, status) { //服务器成功响应处理函数
console.log(data);
if ($.isFunction(handler)) {
handler(data);
}
},
error: function(data, status, e) { //服务器响应失败处理函数
alert(e);
}
});
},
/**
* 单附件上传(跨域)文件替换(标记原文件为历史版本并上传新文件)
* @param obj 初始化操作对象 默认为:this 即可
* @param fileId 文件Id
* @param module 所属模块名称
* @param moduleId 所属模块数据ID
* @param moduleType 所属模块类型
* @param companyId 上传人所在公司ID
* @param userId 上传人用户ID
* @param handler 回调方法
* @param fileuploadId file控件ID
*/
uploadSignReplaceHV: function(obj, fileId, module, moduleId, moduleType, companyId, userId, handler) {
var explorer = $.util.getBrowser();
var browserType = explorer.browser + " " + explorer.version;
var token = $.md5('SinoSoft' + $.util.getNowFormatDate());
if ($.util.isEmpty(fileId)) {
alert("单个文件上传函数参数错误:fileId 必填");
return;
}
if ($.util.isEmpty(module)) {
alert("单个文件上传函数参数错误:module 必填");
return;
}
if ($.util.isEmpty(moduleId)) {
alert("请先保存或业务参数id输入错误.");
return;
}
if ($.util.isEmpty(companyId)) {
alert("单个文件上传函数参数错误:companyId 必填");
return;
}
var reader = new FileReader();
reader.onloadstart = function(e) {
console.log("开始读取....");
}
reader.onprogress = function(e) {
console.log("正在读取中....");
}
reader.onabort = function(e) {
console.log("中断读取....");
}
reader.onerror = function(e) {
console.log("读取异常....");
}
reader.onload = function(e) {
console.log("成功读取....");
$(".fileupload_btn").html("").append("<img src='" + this.result + "' >");
}
reader.readAsDataURL(obj.files[0]);
console.info('--------------------------------------');
jQuery.ajaxFileUpload({
url: ctx + "file/upload/replace/"+fileId, //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议,一般设置为false
fileElementId: [obj.id], //文件上传域的ID 在这里设置要上传的多个input的ID
data: {
'module': module,
'moduleId': moduleId,
'companyId': companyId,
'moduleType': moduleType,
'uploadType': 'single',
'token': token,
'url': "/file/upload",
'browserType': browserType
},
dataType: 'json', //返回值类型 一般设置为json
success: function(data, status) { //服务器成功响应处理函数
console.log(data);
if ($.isFunction(handler)) {
handler(data);
}
},
error: function(data, status, e) { //服务器响应失败处理函数
alert(e);
}
});
},
/**
* 单个文件上传不覆盖函数(默认handler可以不传入,调用页面要有附件回显容器 样式 .fileupload_btn)
* @param obj file 控件对象(必填)
* @param module 所属业务模块(必填)
* @param moduleId 所属业务模块表的id(必填)
* @param moduleType 所属业务模块表的标识
* @param companyId 所属业务模块表的id(必填)
* @param handler 上传成功后的回调函数(可选)
*/
uploadMult: function(obj, module, moduleId, moduleType, companyId, userId, handler) {
if ($.util.isEmpty(module)) {
alert("单个文件上传函数参数错误:module 必填");
return;
}
if ($.util.isEmpty(moduleId)) {
alert("请先保存或业务参数id输入错误.");
return;
}
if ($.util.isEmpty(companyId)) {
alert("单个文件上传函数参数错误:companyId 必填");
return;
}
var reader = new FileReader();
reader.onloadstart = function(e) {
console.log("开始读取....");
}
reader.onprogress = function(e) {
console.log("正在读取中....");
}
reader.onabort = function(e) {
console.log("中断读取....");
}
reader.onerror = function(e) {
console.log("读取异常....");
}
reader.onload = function(e) {
console.log("成功读取....");
$(".fileupload_btn").html("").append("<img src='" + this.result + "' >");
}
reader.readAsDataURL(obj.files[0]);
jQuery.ajaxFileUpload({
url: ctx + "file/upload", //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议,一般设置为false
fileElementId: ['fileupload'], //文件上传域的ID 在这里设置要上传的多个input的ID
data: {
'module': module,
'moduleId': moduleId,
'companyId': companyId,
'moduleType': moduleType,
'uploadType': 'multiple'
},
dataType: 'json', //返回值类型 一般设置为json
success: function(data, status) { //服务器成功响应处理函数
if ($.isFunction(handler)) {
handler(data);
}
},
error: function(data, status, e) { //服务器响应失败处理函数
alert(e);
}
});
},
//多附件上传(跨域)
uploadMultCross: function(obj, module, moduleId, moduleType, companyId, userId, handler) {
var explorer = $.util.getBrowser();
var browserType = explorer.browser + " " + explorer.version;
var token = $.md5('SinoSoft' + $.util.getNowFormatDate());
if ($.util.isEmpty(module)) {
alert("单个文件上传函数参数错误:module 必填");
return;
}
if ($.util.isEmpty(moduleId)) {
alert("请先保存或业务参数id输入错误.");
return;
}
if ($.util.isEmpty(companyId)) {
alert("单个文件上传函数参数错误:companyId 必填");
return;
}
var reader = new FileReader();
reader.onloadstart = function(e) {
console.log("开始读取....");
}
reader.onprogress = function(e) {
console.log("正在读取中....");
}
reader.onabort = function(e) {
console.log("中断读取....");
}
reader.onerror = function(e) {
console.log("读取异常....");
}
reader.onload = function(e) {
console.log("成功读取....");
$(".fileupload_btn").html("").append("<img src='" + this.result + "' >");
}
reader.readAsDataURL(obj.files[0]);
jQuery.ajaxFileUpload({
url: ctx + "common/upload", //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议,一般设置为false
fileElementId: ['fileupload'], //文件上传域的ID 在这里设置要上传的多个input的ID
data: {
'module': module,
'moduleId': moduleId,
'companyId': companyId,
'moduleType': moduleType,
'uploadType': 'multiple',
'token': token,
'url': "/file/upload",
'browserType': browserType
},
dataType: 'json', //返回值类型 一般设置为json
success: function(data, status) { //服务器成功响应处理函数
if ($.isFunction(handler)) {
handler(data);
}
},
error: function(data, status, e) { //服务器响应失败处理函数
alert(e);
}
});
},
/**
* 公文关联
* @param id 业务ID
* @param type 查询的公文类型(多类型用||分隔) SW 收文 FW 发文 QB 签报 HYJY 会议纪要 YZSP 用章审批
* @param relationType 关联类型
* @param isMulti 单选多选类型:1单选 0多选
* @param callback 回调函数名称
*/
fileRelation: function(id, type, relationType, isMulti, callback) {
var opts = {
title: '公文关联',
btn: ['选 择', '取 消'],
area: ["70%", "85%"],
scrollbar: true,
opener: window,
type: 2,
content: ctx + "mvRelation/" + type + "?id=" + id + "&relationType=" + relationType + "&isMulti=" + isMulti,
yes: function(index, layero) {
var iw = layero.find('iframe')[0];
iw.contentWindow.saveRelation(callback);
}
};
console.log(top)
var index = top.layer.open(opts);
},
// 判断字符串是否为空
isEmpty: function(value) {if (value == undefined || value == null || this.trim(value) == "") {return true;}return false;},
// 判断一个字符串是否为非空串
isNotEmpty: function(value) {return !$.util.isEmpty(value);},
// 是否显示数据 为空默认为显示
visible: function(value) {if ($.util.isEmpty(value) || value == true) {return true;}return false;},
// 空格截取
trim: function(value) {if (value == null) {return "";}return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g, "");},
// 指定随机数返回
random: function(min, max) {return Math.floor((Math.random() * max) + min);},
startWith: function(value, start) {var reg = new RegExp("^" + start);return reg.test(value)},
endWith: function(value, end) {var reg = new RegExp(end + "$");return reg.test(value)},
nowDate: function(formatte) {
var date = new Date();
var seperator = "-";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {month = "0" + month;}
if (strDate >= 0 && strDate <= 9) {strDate = "0" + strDate;}
var currentdate = year + seperator + month + seperator + strDate + " " + date.getHours() + ":" + date.getMinutes();
if (formatte == undefined || "" == formatte) {formatte = "yyyy-MM-dd";}
return $.util.dateFtt(currentdate, formatte);
},
/**
* 对Date的扩展,将 Date 转化为指定格式的String
* 月(M)、日(d)、12小时(h)、24小时(H)、分(m)、秒(s)、周(E)、季度(q) 可以用 1-2 个占位符
* 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
* eg:
* (new Date()).pattern("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
* (new Date()).pattern("yyyy-MM-dd E HH:mm:ss") ==> 2009-03-10 二 20:09:04
* (new Date()).pattern("yyyy-MM-dd EE hh:mm:ss") ==> 2009-03-10 周二 08:09:04
* (new Date()).pattern("yyyy-MM-dd EEE hh:mm:ss") ==> 2009-03-10 星期二 08:09:04
* (new Date()).pattern("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
*/
dateFtt: function(date, fmt) {
if (date == null || date == "" || date == "null") {
return "-";
}
if(date!=undefined && date!=null && date.length >19){
date = date.substring(0,19);
}
date = date.replace(/-/g, "/");
var _d = new Date(date);
var o = {
"M+": _d.getMonth() + 1, //月份
"d+": _d.getDate(), //日
"h+": _d.getHours() % 12 == 0 ? 12 : _d.getHours() % 12, //小时
"H+": _d.getHours(), //小时
"m+": _d.getMinutes(), //分
"s+": _d.getSeconds(), //秒
"q+": Math.floor((_d.getMonth() + 3) / 3), //季度
"S": _d.getMilliseconds() //毫秒
};
var week = {"0": "日","1": "一","2": "二","3": "三","4": "四","5": "五","6": "六"};
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (_d.getFullYear() + "").substr(4 - RegExp.$1.length));
};
if (/(E+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, ((RegExp.$1.length > 1) ? (RegExp.$1.length > 2 ? "星期" : "周") : "") + week[_d.getDay() +
""]);
}
for (var k in o) {
if (new RegExp("(" + k + ")").test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
}
}
return fmt;
},
uuid: function() {
return 'xxxFxxxaxAxxxxxyxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0,v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16)
});
},
getNowFormatDate: function() {
var date = new Date();
var seperator1 = "-";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = year + seperator1 + month + seperator1 + strDate;
return currentdate;
},
userInfo: function(userId, handler) {
$.win.loading("加载数据中,请稍后...");
var config = {
type: "post",
dataType: "json",
url: ctx + "system/user/profile/user/info",
data: {
id: userId
},
success: function(result) {
if ($.isFunction(handler)) {
$.win.closeLoading();
handler(result);
} else {
$.win.closeLoading();
}
}
};
$.ajax(config);
},
// 将表单序列化后转换为{"name1":"value1","name2":"value2"}
getFormObj: function(formId) {
var serializeArr = $("#" + formId).serializeArray();
if (serializeArr && serializeArr.length != 0) {
var obj = {};
for (i in serializeArr) {
var key, value;
var serializeObj = serializeArr[i];
key = serializeObj["name"];
value = serializeObj["value"];
if (!obj[key]) { //如果这个属性没有赋过值,就直接赋值
obj[key] = value;
} else {
obj[key] += "," + value
}
}
return obj;
} else {
return {};
}
},
getBrowser: function() { // 获取浏览器名
var rMsie = /(msie\s|trident\/7)([\w\.]+)/;
var rTrident = /(trident)\/([\w.]+)/;
var rEdge = /(chrome)\/([\w.]+)/; //IE
var rFirefox = /(firefox)\/([\w.]+)/; //火狐
var rOpera = /(opera).+version\/([\w.]+)/; //旧Opera
var rNewOpera = /(opr)\/(.+)/; //新Opera 基于谷歌
var rChrome = /(chrome)\/([\w.]+)/; //谷歌
var rUC = /(chrome)\/([\w.]+)/; //UC
var rMaxthon = /(chrome)\/([\w.]+)/; //遨游
var r2345 = /(chrome)\/([\w.]+)/; //2345
var rQQ = /(chrome)\/([\w.]+)/; //QQ
//var rMetasr = /(metasr)\/([\w.]+)/;//搜狗
var rSafari = /version\/([\w.]+).*(safari)/;
var ua = navigator.userAgent.toLowerCase();
var matchBS, matchBS2;
//IE 低版
matchBS = rMsie.exec(ua);
if (matchBS != null) {
matchBS2 = rTrident.exec(ua);
if (matchBS2 != null) {
switch (matchBS2[2]) {
case "4.0":
return {browser: "Microsoft IE",version: "8"};
break;
case "5.0":
return {browser: "Microsoft IE",version: "9"};
break;
case "6.0":
return {browser: "Microsoft IE",version: "10"};
break;
case "7.0":
return {browser: "Microsoft IE",version: "11"};
break;
default:
return {browser: "Microsoft IE",version: "Undefined"};
}
} else {
return {browser: "Microsoft IE",version: matchBS[2] || "0"};
}
}
//IE最新版
matchBS = rEdge.exec(ua);
if ((matchBS != null) && (!(window.attachEvent))) {return {browser: "Microsoft Edge",version: "Chrome/" + matchBS[2] || "0"};}
//UC浏览器
matchBS = rUC.exec(ua);
if ((matchBS != null) && (!(window.attachEvent))) {return {browser: "UC",version: "Chrome/" + matchBS[2] || "0"};}
//火狐浏览器
matchBS = rFirefox.exec(ua);
if ((matchBS != null) && (!(window.attachEvent))) {return {browser: "火狐",version: "Firefox/" + matchBS[2] || "0"};}
//Oper浏览器
matchBS = rOpera.exec(ua);
if ((matchBS != null) && (!(window.attachEvent))) {return {browser: "Opera",version: "Chrome/" + matchBS[2] || "0"};}
//遨游
matchBS = rMaxthon.exec(ua);
if ((matchBS != null) && (!(window.attachEvent))) {return {browser: "遨游",version: "Chrome/" + matchBS[2] || "0"};}
//2345浏览器
matchBS = r2345.exec(ua);
if ((matchBS != null) && (!(window.attachEvent))) {return {browser: "2345",version: "Chrome/ " + matchBS[2] || "0"};}
//QQ浏览器
matchBS = rQQ.exec(ua);
if ((matchBS != null) && (!(window.attachEvent))) {return {browser: "QQ",version: "Chrome/" + matchBS[2] || "0"};}
//Safari(苹果)浏览器
matchBS = rSafari.exec(ua);
if ((matchBS != null) && (!(window.attachEvent)) && (!(window.chrome)) && (!(window.opera))) {return {browser: "Safari",version: "Safari/" + matchBS[1] || "0"};}
//谷歌浏览器
matchBS = rChrome.exec(ua);
if ((matchBS != null) && (!(window.attachEvent))) {
matchBS2 = rNewOpera.exec(ua);
if (matchBS2 == null) {
return {browser: "谷歌",version: "Chrome/" + matchBS[2] || "0"};
} else {
return {browser: "Opera",version: "opr/" + matchBS2[2] || "0"};
}
}
},
/**
* 切割长度
*/
splitStr: function (content, length) {
if($.util.isEmpty(content)){
return content;
}
if ($.util.isEmpty(length)) {
length = 30;
}
return (content.length > length ? content.substring(0, length) : content);
},
/**
* 隐藏部分页面内容
*/
hidePartHtml: function (content, width) {
if($.util.isEmpty(content)){
return content;
}
content = "<div style='overflow:hidden;width:"+width+"'>"+content+"</div>...";
return content;
}
}
});
})(jQuery);
/** 消息状态码 */
web_status = {SUCCESS: 0,FAIL: 500};
/** 弹窗状态码 */
modal_status = {SUCCESS: "success",FAIL: "error",WARNING: "warning"};
/*! layer弹层组件拓展类 */
;!function(){layer.use("skin/layer.ext.css",function(){layer.layui_layer_extendlayerextjs=!0});var a=layer.cache||{},b=function(b){return a.skin?" "+a.skin+" "+a.skin+"-"+b:""};layer.prompt=function(a,c){a=a||{},"function"==typeof a&&(c=a);var d,e=2==a.formType?'<textarea class="layui-layer-input">'+(a.value||"")+"</textarea>":function(){return'<input type="'+(1==a.formType?"password":"text")+'" class="layui-layer-input" value="'+(a.value||"")+'">'}();return layer.open($.extend({btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],content:e,skin:"layui-layer-prompt"+b("prompt"),success:function(a){d=a.find(".layui-layer-input"),d.focus()},yes:function(b){var e=d.val();""===e?d.focus():e.length>(a.maxlength||500)?layer.tips("&#x6700;&#x591A;&#x8F93;&#x5165;"+(a.maxlength||500)+"&#x4E2A;&#x5B57;&#x6570;",d,{tips:1}):c&&c(e,b,d)}},a))},layer.tab=function(a){a=a||{};var c=a.tab||{};return layer.open($.extend({type:1,skin:"layui-layer-tab"+b("tab"),title:function(){var a=c.length,b=1,d="";if(a>0)for(d='<span class="layui-layer-tabnow">'+c[0].title+"</span>";a>b;b++)d+="<span>"+c[b].title+"</span>";return d}(),content:'<ul class="layui-layer-tabmain">'+function(){var a=c.length,b=1,d="";if(a>0)for(d='<li class="layui-layer-tabli xubox_tab_layer">'+(c[0].content||"no content")+"</li>";a>b;b++)d+='<li class="layui-layer-tabli">'+(c[b].content||"no content")+"</li>";return d}()+"</ul>",success:function(a){var b=a.find(".layui-layer-title").children(),c=a.find(".layui-layer-tabmain").children();b.on("mousedown",function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0;var b=$(this),d=b.index();b.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),c.eq(d).show().siblings().hide()})}},a))},layer.photos=function(a,c,d){function e(a,b,c){var d=new Image;d.onload=function(){d.onload=null,b(d)},d.onerror=function(a){d.onerror=null,c(a)},d.src=a}var f={};if(a=a||{},a.photos){var g=a.photos.constructor===Object,h=g?a.photos:{},i=h.data||[],j=h.start||0;if(f.imgIndex=j+1,g){if(0===i.length)return void layer.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")}else{var k=$(a.photos),l=k.find(a.img||"img");if(0===l.length)return;if(c||k.find(h.img||"img").each(function(b){var c=$(this);i.push({alt:c.attr("alt"),pid:c.attr("layer-pid"),src:c.attr("layer-src")||c.attr("src"),thumb:c.attr("src")}),c.on("click",function(){layer.photos($.extend(a,{photos:{start:b,data:i,tab:a.tab},full:a.full}),!0)})}),!c)return}f.imgprev=function(a){f.imgIndex--,f.imgIndex<1&&(f.imgIndex=i.length),f.tabimg(a)},f.imgnext=function(a,b){f.imgIndex++,f.imgIndex>i.length&&(f.imgIndex=1,b)||f.tabimg(a)},f.keyup=function(a){if(!f.end){var b=a.keyCode;a.preventDefault(),37===b?f.imgprev(!0):39===b?f.imgnext(!0):27===b&&layer.close(f.index)}},f.tabimg=function(b){i.length<=1||(h.start=f.imgIndex-1,layer.close(f.index),layer.photos(a,!0,b))},f.event=function(){f.bigimg.hover(function(){f.imgsee.show()},function(){f.imgsee.hide()}),f.bigimg.find(".layui-layer-imgprev").on("click",function(a){a.preventDefault(),f.imgprev()}),f.bigimg.find(".layui-layer-imgnext").on("click",function(a){a.preventDefault(),f.imgnext()}),$(document).on("keyup",f.keyup)},f.loadi=layer.load(1,{shade:"shade"in a?!1:.9,scrollbar:!1}),e(i[j].src,function(c){layer.close(f.loadi),f.index=layer.open($.extend({type:1,area:function(){var b=[c.width,c.height],d=[$(window).width()-100,$(window).height()-100];return!a.full&&b[0]>d[0]&&(b[0]=d[0],b[1]=b[0]*d[1]/b[0]),[b[0]+"px",b[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,shift:5*Math.random()|0,skin:"layui-layer-photos"+b("photos"),content:'<div class="layui-layer-phimg"><img src="'+i[j].src+'" alt="'+(i[j].alt||"")+'" layer-pid="'+i[j].pid+'"><div class="layui-layer-imgsee">'+(i.length>1?'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>':"")+'<div class="layui-layer-imgbar" style="display:'+(d?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(i[j].alt||"")+"</a><em>"+f.imgIndex+"/"+i.length+"</em></span></div></div></div>",success:function(b,c){f.bigimg=b.find(".layui-layer-phimg"),f.imgsee=b.find(".layui-layer-imguide,.layui-layer-imgbar"),f.event(b),a.tab&&a.tab(i[j],b)},end:function(){f.end=!0,$(document).off("keyup",f.keyup)}},a))},function(){layer.close(f.loadi),layer.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;",{time:3e4,btn:["下一张","不看了"],yes:function(){i.length>1&&f.imgnext(!0,!0)}})})}}}();
/*! laydate-v5.0.9 日期与时间组件 MIT License http://www.layui.com/laydate/ By 贤心 */
;!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期<br>建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t<n.length;t++)this.push(n[t])};C.prototype=[],C.prototype.constructor=C,w.extend=function(){var e=1,t=arguments,n=function(e,t){e=e||(t.constructor===Array?[]:{});for(var a in t)e[a]=t[a]&&t[a].constructor===Object?n(e[a],t[a]):t[a];return e};for(t[0]="object"==typeof t[0]?t[0]:{};e<t.length;e++)"object"==typeof t[e]&&n(t[0],t[e]);return t[0]},w.ie=function(){var e=navigator.userAgent.toLowerCase();return!!(window.ActiveXObject||"ActiveXObject"in window)&&((e.match(/msie\s(\d+)/)||[])[1]||"11")}(),w.stope=function(e){e=e||window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},w.each=function(e,t){var n,a=this;if("function"!=typeof t)return a;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;n<e.length&&!t.call(e[n],n,e[n]);n++);return a},w.digit=function(e,t,n){var a="";e=String(e),t=t||2;for(var i=e.length;i<t;i++)a+="0";return e<Math.pow(10,t)?a+(0|e):e},w.elem=function(e,t){var n=document.createElement(e);return w.each(t||{},function(e,t){n.setAttribute(e,t)}),n},C.addStr=function(e,t){return e=e.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),w.each(t,function(t,n){new RegExp("\\b"+n+"\\b").test(e)||(e=e+" "+n)}),e.replace(/^\s|\s$/,"")},C.removeStr=function(e,t){return e=e.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),w.each(t,function(t,n){var a=new RegExp("\\b"+n+"\\b");a.test(e)&&(e=e.replace(a,""))}),e.replace(/\s+/," ").replace(/^\s|\s$/,"")},C.prototype.find=function(e){var t=this,n=0,a=[],i="object"==typeof e;return this.each(function(r,o){for(var s=i?[e]:o.querySelectorAll(e||null);n<s.length;n++)a.push(s[n]);t.shift()}),i||(t.selector=(t.selector?t.selector+" ":"")+e),w.each(a,function(e,n){t.push(n)}),t},C.prototype.each=function(e){return w.each.call(this,this,e)},C.prototype.addClass=function(e,t){return this.each(function(n,a){a.className=C[t?"removeStr":"addStr"](a.className,e)})},C.prototype.removeClass=function(e){return this.addClass(e,!0)},C.prototype.hasClass=function(e){var t=!1;return this.each(function(n,a){new RegExp("\\b"+e+"\\b").test(a.className)&&(t=!0)}),t},C.prototype.attr=function(e,t){var n=this;return void 0===t?function(){if(n.length>0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r<s?o+r*s:r:o);a=[l.getFullYear(),l.getMonth()+1,l.getDate()],r<s||(i=[l.getHours(),l.getMinutes(),l.getSeconds()])}else a=(t[n].match(/\d+-\d+-\d+/)||[""])[0].split("-"),i=(t[n].match(/\d+:\d+:\d+/)||[""])[0].split(":");t[n]={year:0|a[0]||(new Date).getFullYear(),month:a[1]?(0|a[1])-1:(new Date).getMonth(),date:0|a[2]||(new Date).getDate(),hours:0|i[0],minutes:0|i[1],seconds:0|i[2]}}),e.elemID="layui-laydate"+t.elem.attr("lay-key"),(t.show||a)&&e.render(),a||e.events(),t.value&&(t.value.constructor===Date?e.setValue(e.parse(0,e.systemDate(t.value))):e.setValue(t.value)))},T.prototype.render=function(){var e=this,t=e.config,n=e.lang(),a="static"===t.position,i=e.elem=w.elem("div",{id:e.elemID,"class":["layui-laydate",t.range?" layui-laydate-range":"",a?" "+c:"",t.theme&&"default"!==t.theme&&!/^#/.test(t.theme)?" laydate-theme-"+t.theme:""].join("")}),r=e.elemMain=[],o=e.elemHeader=[],s=e.elemCont=[],l=e.table=[],d=e.footer=w.elem("div",{"class":p});if(t.zIndex&&(i.style.zIndex=t.zIndex),w.each(new Array(2),function(e){if(!t.range&&e>0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="&#xe65a;",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="&#xe603;",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="&#xe602;",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="&#xe65b;",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push('<span lay-type="datetime" class="laydate-btns-time">'+n.timeTips+"</span>"),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push('<span lay-type="'+r+'" class="laydate-btns-'+r+'">'+o+"</span>"))}),e.push('<div class="laydate-footer-btns">'+i.join("")+"</div>"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3)},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length<l.length&&(a=!0),/yyyy|y/.test(l)?(c<d[0]&&(c=d[0],a=!0),e.year=c):/MM|M/.test(l)?(c<1&&(c=1,a=!0),e.month=c-1):/dd|d/.test(l)?(c<1&&(c=1,a=!0),e.date=c):/HH|H/.test(l)?(c<1&&(c=0,a=!0),e.hours=c,r.range&&(i[o[n]].hours=c)):/mm|m/.test(l)?(c<1&&(c=0,a=!0),e.minutes=c,r.range&&(i[o[n]].minutes=c)):/ss|s/.test(l)&&(c<1&&(c=0,a=!0),e.seconds=c,r.range&&(i[o[n]].seconds=c))}),c(e)};return"limit"===e?(c(o),i):(l=l||r.value,"string"==typeof l&&(l=l.replace(/\s+/g," ").replace(/^\s|\s$/g,"")),i.startState&&!i.endState&&(delete i.startState,i.endState=!0),"string"==typeof l&&l?i.EXP_IF.test(l)?r.range?(l=l.split(" "+r.range+" "),i.startDate=i.startDate||i.systemDate(),i.endDate=i.endDate||i.systemDate(),r.dateTime=w.extend({},i.startDate),w.each([i.startDate,i.endDate],function(e,t){m(t,l[e],e)})):m(o,l):(i.hint("日期格式不合法<br>必须遵循下述格式:<br>"+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"<br>已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html('<span class="laydate-day-mark">'+n+"</span>"),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.now<l.min||l.now>l.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.year<d[0]&&(l.year=d[0],r.hint("最低只能支持到公元"+d[0]+"年")),l.year>d[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e<t?(c=a-t+e,n.addClass("laydate-day-prev"),d=r.getAsYM(l.year,l.month,"sub")):e>=t&&e<i+t?(c=e-t,s.range||c+1===l.date&&n.addClass(o)):(c=e-i-t,n.addClass("laydate-day-next"),d=r.getAsYM(l.year,l.month)),d[1]++,d[2]=c+1,n.attr("lay-ymd",d.join("-")).html(d[2]),r.mark(n,d).limit(n,{year:d[0],month:d[1]-1,date:d[2]},e)}),w(f[0]).attr("lay-ym",l.year+"-"+(l.month+1)),w(f[1]).attr("lay-ym",l.year+"-"+(l.month+1)),"cn"===s.lang?(w(f[0]).attr("lay-type","year").html(l.year+"年"),w(f[1]).attr("lay-type","month").html(l.month+1+"月")):(w(f[0]).attr("lay-type","month").html(m.month[l.month]),w(f[1]).attr("lay-type","year").html(l.year)),u&&(s.range&&(e?r.endDate=r.endDate||{year:l.year+("year"===s.type?1:0),month:l.month+("month"===s.type?0:-1)}:r.startDate=r.startDate||{year:l.year,month:l.month},e&&(r.listYM=[[r.startDate.year,r.startDate.month+1],[r.endDate.year,r.endDate.month+1]],r.list(s.type,0).list(s.type,1),"time"===s.type?r.setBtnStatus("时间",w.extend({},r.systemDate(),r.startTime),w.extend({},r.systemDate(),r.endTime)):r.setBtnStatus(!0))),s.range||(r.listYM=[[l.year,l.month+1]],r.list(s.type,0))),s.range&&!e){var p=r.getAsYM(l.year,l.month);r.calendar(w.extend({},l,{year:p[0],month:p[1]}))}return s.range||r.limit(w(r.footer).find(g),null,0,["hours","minutes","seconds"]),s.range&&e&&!u&&r.stampRange(),r},T.prototype.list=function(e,t){var n=this,a=n.config,i=a.dateTime,r=n.lang(),l=a.range&&"date"!==a.type&&"datetime"!==a.type,d=w.elem("ul",{"class":m+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[e]}),c=n.elemHeader[t],u=w(c[2]).find("span"),h=n.elemCont[t||0],y=w(h).find("."+m)[0],f="cn"===a.lang,p=f?"年":"",T=n.listYM[t]||{},C=["hours","minutes","seconds"],x=["startTime","endTime"][t];if(T[0]<1&&(T[0]=1),"year"===e){var M,b=M=T[0]-7;b<1&&(b=M=1),w.each(new Array(15),function(e){var i=w.elem("li",{"lay-ym":M}),r={year:M};M==T[0]&&w(i).addClass(o),i.innerHTML=M+p,d.appendChild(i),M<n.firstDate.year?(r.month=a.min.month,r.date=a.min.date):M>=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]<n.firstDate.year?s.date=a.min.date:T[0]>=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=["<p>"+r.time[e]+"</p><ol>"];w.each(new Array(t),function(t){i.push("<li"+(n[x][C[e]]===t?' class="'+o+'"':"")+">"+w.digit(t,2)+"</li>")}),a.innerHTML=i.join("")+"</ol>",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s<t&&w(i).addClass(u)})},T.prototype.done=function(e,t){var n=this,a=n.config,i=w.extend({},n.startDate?w.extend(n.startDate,n.startTime):a.dateTime),r=w.extend({},w.extend(n.endDate,n.endTime));return w.each([i,r],function(e,t){"month"in t&&w.extend(t,{month:t.month+1})}),e=e||[n.parse(),i,r],"function"==typeof a[t||"done"]&&a[t||"done"].apply(a,e),n},T.prototype.choose=function(e){var t=this,n=t.config,a=n.dateTime,i=w(t.elem).find("td"),r=e.attr("lay-ymd").split("-"),l=function(e){new Date;e&&w.extend(a,r),n.range&&(t.startDate?w.extend(t.startDate,r):t.startDate=w.extend({},r,t.startTime),t.startYMD=r)};if(r={year:0|r[0],month:(0|r[1])-1,date:0|r[2]},!e.hasClass(s))if(n.range){if(w.each(["startTime","endTime"],function(e,n){t[n]=t[n]||{hours:0,minutes:0,seconds:0}}),t.endState)l(),delete t.endState,delete t.endDate,t.startState=!0,i.removeClass(o+" "+u),e.addClass(o);else if(t.startState){if(e.addClass(o),t.endDate?w.extend(t.endDate,r):t.endDate=w.extend({},r,t.endTime),t.newDate(r).getTime()<t.newDate(t.startYMD).getTime()){var d=w.extend({},t.endDate,{hours:t.startDate.hours,minutes:t.startDate.minutes,seconds:t.startDate.seconds});w.extend(t.endDate,t.startDate,{hours:t.endDate.hours,minutes:t.endDate.minutes,seconds:t.endDate.seconds}),t.startDate=d}n.showBottom||t.done(),t.stampRange(),t.endState=!0,t.done(null,"change")}else e.addClass(o),l(),t.startState=!0;w(t.footer).find(g)[t.endDate?"removeClass":"addClass"](s)}else"static"===n.position?(l(!0),t.calendar().done().done(null,"change")):"date"===n.type?(l(!0),t.setValue(t.parse()).remove().done()):"datetime"===n.type&&(l(!0),t.calendar().done(null,"change"))},T.prototype.tool=function(e,t){var n=this,a=n.config,i=a.dateTime,r="static"===a.position,o={datetime:function(){w(e).hasClass(s)||(n.list("time",0),a.range&&n.list("time",1),w(e).attr("lay-type","date").html(n.lang().dateTips))},date:function(){n.closeList(),w(e).attr("lay-type","datetime").html(n.lang().timeTips)},clear:function(){n.setValue("").remove(),r&&(w.extend(i,n.firstDate),n.calendar()),a.range&&(delete n.startState,delete n.endState,delete n.endDate,delete n.startTime,delete n.endTime),n.done(["",{},{}])},now:function(){var e=new Date;w.extend(i,n.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),n.setValue(n.parse()).remove(),r&&n.calendar(),n.done()},confirm:function(){if(a.range){if(!n.endDate)return n.hint("请先选择日期范围");if(w(e).hasClass(s))return n.hint("time"===a.type?l.replace(/日期/g,"时间"):l)}else if(w(e).hasClass(s))return n.hint("不在有效日期或时间范围内");n.done(),n.setValue(n.parse()).remove()}};o[t]&&o[t]()},T.prototype.change=function(e){var t=this,n=t.config,a=n.dateTime,i=n.range&&("year"===n.type||"month"===n.type),r=t.elemCont[e||0],o=t.listYM[e],s=function(s){var l=["startDate","endDate"][e],d=w(r).find(".laydate-year-list")[0],c=w(r).find(".laydate-month-list")[0];return d&&(o[0]=s?o[0]-15:o[0]+15,t.list("year",e)),c&&(s?o[0]--:o[0]++,t.list("month",e)),(d||c)&&(w.extend(a,{year:o[0]}),i&&(t[l].year=o[0]),n.range||t.done(null,"change"),t.setBtnStatus(),n.range||t.limit(w(t.footer).find(g),{year:o[0]})),d||c};return{prevYear:function(){s("sub")||(a.year--,t.checkDate("limit").calendar(),n.range||t.done(null,"change"))},prevMonth:function(){var e=t.getAsYM(a.year,a.month,"sub");w.extend(a,{year:e[0],month:e[1]}),t.checkDate("limit").calendar(),n.range||t.done(null,"change")},nextMonth:function(){var e=t.getAsYM(a.year,a.month);w.extend(a,{year:e[0],month:e[1]}),t.checkDate("limit").calendar(),n.range||t.done(null,"change")},nextYear:function(){s()||(a.year++,t.checkDate("limit").calendar(),n.range||t.done(null,"change"))}}},T.prototype.changeEvent=function(){var e=this;e.config;w(e.elem).on("click",function(e){w.stope(e)}),w.each(e.elemHeader,function(t,n){w(n[0]).on("click",function(n){e.change(t).prevYear()}),w(n[1]).on("click",function(n){e.change(t).prevMonth()}),w(n[2]).find("span").on("click",function(n){var a=w(this),i=a.attr("lay-ym"),r=a.attr("lay-type");i&&(i=i.split("-"),e.listYM[t]=[0|i[0],0|i[1]],e.list(r,t),w(e.footer).find(D).addClass(s))}),w(n[3]).on("click",function(n){e.change(t).nextMonth()}),w(n[4]).on("click",function(n){e.change(t).nextYear()})}),w.each(e.table,function(t,n){var a=w(n).find("td");a.on("click",function(){e.choose(w(this))})}),w(e.footer).find("span").on("click",function(){var t=w(this).attr("lay-type");e.tool(this,t)})},T.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())},T.prototype.events=function(){var e=this,t=e.config,n=function(n,a){n.on(t.trigger,function(){a&&(e.bindElem=this),e.render()})};t.elem[0]&&!t.elem[0].eventHandler&&(n(t.elem,"bind"),n(t.eventElem),w(document).on("click",function(n){n.target!==t.elem[0]&&n.target!==t.eventElem[0]&&n.target!==w(t.closeStop)[0]&&e.remove()}).on("keydown",function(t){13===t.keyCode&&w("#"+e.elemID)[0]&&e.elemID===T.thisElem&&(t.preventDefault(),w(e.footer).find(g)[0].click())}),w(window).on("resize",function(){return!(!e.elem||!w(r)[0])&&void e.position()}),t.elem[0].eventHandler=!0)},n.render=function(e){var t=new T(e);return a.call(t)},n.getEndDate=function(e,t){var n=new Date;return n.setFullYear(t||n.getFullYear(),e||n.getMonth()+1,1),new Date(n.getTime()-864e5).getDate()},window.lay=window.lay||w,e?(n.ready(),layui.define(function(e){n.path=layui.cache.dir,e(i,n)})):"function"==typeof define&&define.amd?define(function(){return n}):function(){n.ready(),window.laydate=n}()}();
\ No newline at end of file
/**
@Name: laydate 核心样式
@Author:贤心
@Site:http://sentsin.com/layui/laydate
**/
html{_background-image:url(about:blank); _background-attachment:fixed;}
.layer-date{display: inline-block!important;vertical-align:text-top;max-width:240px;}
.laydate_body .laydate_box, .laydate_body .laydate_box *{margin:0; padding:0;}
.laydate-icon,
.laydate-icon-default,
.laydate-icon-danlan,
.laydate-icon-dahong,
.laydate-icon-molv{height:34px; padding-right:20px;min-width:34px;vertical-align: text-top;border:1px solid #C6C6C6; background-repeat:no-repeat; background-position:right center; background-color:#fff; outline:0;}
.laydate-icon-default{ background-image:url(../skins/default/icon.png)}
.laydate-icon-danlan{border:1px solid #B1D2EC; background-image:url(../skins/danlan/icon.png)}
.laydate-icon-dahong{background-image:url(../skins/dahong/icon.png)}
.laydate-icon-molv{background-image:url(../skins/molv/icon.png)}
.laydate_body .laydate_box{width:240px; font:12px '\5B8B\4F53'; z-index:99999999; *margin:-2px 0 0 -2px; *overflow:hidden; _margin:0; _position:absolute!important; background-color:#fff;}
.laydate_body .laydate_box li{list-style:none;}
.laydate_body .laydate_box .laydate_void{cursor:text!important;}
.laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{text-decoration:none; blr:expression(this.onFocus=this.blur()); cursor:pointer;}
.laydate_body .laydate_box a:hover{text-decoration:none;}
.laydate_body .laydate_box cite, .laydate_body .laydate_box label{position:absolute; width:0; height:0; border-width:5px; border-style:dashed; border-color:transparent; overflow:hidden; cursor:pointer;}
.laydate_body .laydate_box .laydate_yms, .laydate_body .laydate_box .laydate_time{display:none;}
.laydate_body .laydate_box .laydate_show{display:block;}
.laydate_body .laydate_box input{outline:0; font-size:14px; background-color:#fff;}
.laydate_body .laydate_top{position:relative; height:26px; padding:5px; *width:100%; z-index:99;}
.laydate_body .laydate_ym{position:relative; float:left; height:24px; cursor:pointer;}
.laydate_body .laydate_ym input{float:left; height:24px; line-height:24px; text-align:center; border:none; cursor:pointer;}
.laydate_body .laydate_ym .laydate_yms{position:absolute; left: -1px; top: 24px; height:181px;}
.laydate_body .laydate_y{width:121px;}
.laydate_body .laydate_y input{width:64px; margin-right:15px;}
.laydate_body .laydate_y .laydate_yms{width:121px; text-align:center;}
.laydate_body .laydate_y .laydate_yms a{position:relative; display:block; height:20px;}
.laydate_body .laydate_y .laydate_yms ul{height:139px; padding:0; *overflow:hidden;}
.laydate_body .laydate_y .laydate_yms ul li{float:left; width:60px; height:20px; line-height: 20px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
.laydate_box *{box-sizing:content-box!important;}
.laydate_body .laydate_m{width:99px;float: right;margin-right:-2px;}
.laydate_body .laydate_m .laydate_yms{width:99px; padding:0;}
.laydate_body .laydate_m input{width:42px; margin-right:15px;}
.laydate_body .laydate_m .laydate_yms span{display:block; float:left; width:42px; margin: 5px 0 0 5px; line-height:24px; text-align:center; _display:inline;}
.laydate_body .laydate_choose{display:block; float:left; position:relative; width:20px; height:24px;}
.laydate_body .laydate_choose cite, .laydate_body .laydate_tab cite{left:50%; top:50%;}
.laydate_body .laydate_chtop cite{margin:-7px 0 0 -5px; border-bottom-style:solid;}
.laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{top:50%; margin:-2px 0 0 -5px; border-top-style:solid;}
.laydate_body .laydate_chprev cite{margin:-5px 0 0 -7px;}
.laydate_body .laydate_chnext cite{margin:-5px 0 0 -2px;}
.laydate_body .laydate_ym label{right:28px;}
.laydate_body .laydate_table{ width:230px; margin:0 5px; border-collapse:collapse; border-spacing:0px; }
.laydate_body .laydate_table td{width:31px; height:19px; line-height:19px; text-align: center; cursor:pointer; font-size: 12px;}
.laydate_body .laydate_table thead{height:22px; line-height:22px;}
.laydate_body .laydate_table thead th{font-weight:400; font-size:12px; text-align:center;}
.laydate_body .laydate_bottom{position:relative; height:22px; line-height:20px; padding:5px; font-size:12px;}
.laydate_body .laydate_bottom #laydate_hms{position: relative; z-index: 1; float:left; }
.laydate_body .laydate_time{ position:absolute; left:5px; bottom: 26px; width:129px; height:125px; *overflow:hidden;}
.laydate_body .laydate_time .laydate_hmsno{ padding:5px 0 0 5px;}
.laydate_body .laydate_time .laydate_hmsno span{display:block; float:left; width:24px; height:19px; line-height:19px; text-align:center; cursor:pointer; *margin-bottom:-5px;}
.laydate_body .laydate_time1{width:228px; height:154px;}
.laydate_body .laydate_time1 .laydate_hmsno{padding: 6px 0 0 8px;}
.laydate_body .laydate_time1 .laydate_hmsno span{width:21px; height:20px; line-height:20px;}
.laydate_body .laydate_msg{left:49px; bottom:67px; width:141px; height:auto; overflow: hidden;}
.laydate_body .laydate_msg p{padding:5px 10px;}
.laydate_body .laydate_bottom li{float:left; height:20px; line-height:20px; border-right:none; font-weight:900;}
.laydate_body .laydate_bottom .laydate_sj{width:33px; text-align:center; font-weight:400;}
.laydate_body .laydate_bottom input{float:left; width:21px; height:20px; line-height:20px; border:none; text-align:center; cursor:pointer; font-size:12px; font-weight:400;}
.laydate_body .laydate_bottom .laydte_hsmtex{height:20px; line-height:20px; text-align:center;}
.laydate_body .laydate_bottom .laydte_hsmtex span{position:absolute; width:20px; top:0; right:0px; cursor:pointer;}
.laydate_body .laydate_bottom .laydte_hsmtex span:hover{font-size:14px;}
.laydate_body .laydate_bottom .laydate_btn{position:absolute; right:5px; top:5px;}
.laydate_body .laydate_bottom .laydate_btn a{float:left; height:20px; padding:0 6px; _padding:0 5px;}
.laydate_body .laydate_bottom .laydate_v{position:absolute; left:10px; top:6px; font-family:Courier; z-index:0;}
/**
@Name: laydate皮肤:墨绿
@Author:贤心
@Site:http://sentsin.com/layui/laydate
**/
.laydate-icon{border:1px solid #ccc; background-image:url(icon.png)}
.laydate_body .laydate_bottom #laydate_hms,
.laydate_body .laydate_time{border:1px solid #ccc;}
.laydate_body .laydate_box,
.laydate_body .laydate_ym .laydate_yms,
.laydate_body .laydate_time{box-shadow: 2px 2px 5px rgba(0,0,0,.1);}
.laydate_body .laydate_box{border-top:none; border-bottom:none; background-color:#fff; color:#00625A;}
.laydate_body .laydate_box input{background:none!important; color:#fff;}
.laydate_body .laydate_box .laydate_void{color:#00E8D7!important;}
.laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{color:#00625A;}
.laydate_body .laydate_box a:hover{color:#666;}
.laydate_body .laydate_click{background-color:#009F95!important; color:#fff!important;}
.laydate_body .laydate_top{border-top:1px solid #009F95; background-color:#009F95}
.laydate_body .laydate_ym{border:1px solid #009F95; background-color:#009F95;}
.laydate_body .laydate_ym .laydate_yms{border:1px solid #009F95; background-color:#009F95; color:#fff;}
.laydate_body .laydate_y .laydate_yms a{border-bottom:1px solid #009F95;}
.laydate_body .laydate_y .laydate_yms .laydate_chdown{border-top:1px solid #009F95; border-bottom:none;}
.laydate_body .laydate_choose{border-left:1px solid #009F95;}
.laydate_body .laydate_chprev{border-left:none; border-right:1px solid #009F95;}
.laydate_body .laydate_choose:hover,
.laydate_body .laydate_y .laydate_yms a:hover{background-color:#00C1B3;}
.laydate_body .laydate_chtop cite{border-bottom-color:#fff;}
.laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{border-top-color:#fff;}
.laydate_body .laydate_chprev cite{border-right-style:solid; border-right-color:#fff;}
.laydate_body .laydate_chnext cite{border-left-style:solid; border-left-color:#fff;}
.laydate_body .laydate_table{width: 240px!important; margin: 0!important; border:1px solid #ccc; border-top:none; border-bottom:none;}
.laydate_body .laydate_table td{border:none; height:21px!important; line-height:21px!important; background-color:#fff; color:#00625A;}
.laydate_body .laydate_table .laydate_nothis{color:#999;}
.laydate_body .laydate_table thead{border-bottom:1px solid #ccc; height:21px!important; line-height:21px!important;}
.laydate_body .laydate_table thead th{}
.laydate_body .laydate_bottom{border:1px solid #ccc; border-top:none;}
.laydate_body .laydate_bottom #laydate_hms{background-color:#fff;}
.laydate_body .laydate_time{background-color:#fff;}
.laydate_body .laydate_time1{width: 226px!important; height: 152px!important;}
.laydate_body .laydate_bottom .laydate_sj{width:31px!important; border-right:1px solid #ccc; background-color:#fff;}
.laydate_body .laydate_bottom input{background-color:#fff; color:#00625A;}
.laydate_body .laydate_bottom .laydte_hsmtex{border-bottom:1px solid #ccc;}
.laydate_body .laydate_bottom .laydate_btn{border-right:1px solid #ccc;}
.laydate_body .laydate_bottom .laydate_v{color:#999}
.laydate_body .laydate_bottom .laydate_btn a{border: 1px solid #ccc; border-right:none; background-color:#fff;}
.laydate_body .laydate_bottom .laydate_btn a:hover{background-color:#F6F6F6; color:#00625A;}
.laydate_body .laydate_m .laydate_yms span:hover,
.laydate_body .laydate_time .laydate_hmsno span:hover,
.laydate_body .laydate_y .laydate_yms ul li:hover,
.laydate_body .laydate_table td:hover{background-color:#00C1B3; color:#fff;}
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="laydate-icon" horiz-adv-x="1024" >
<font-face
font-family="laydate-icon"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5
t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5
t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" />
<glyph glyph-name="youyou" unicode="&#58882;" d="M283.648 721.918976 340.873216 780.926976 740.352 383.997952 340.876288-12.925952 283.648 46.077952 619.52 383.997952Z" horiz-adv-x="1024" />
<glyph glyph-name="zuozuo" unicode="&#58883;" d="M740.352 721.918976 683.126784 780.926976 283.648 383.997952 683.123712-12.925952 740.352 46.077952 404.48 383.997952Z" horiz-adv-x="1024" />
<glyph glyph-name="xiayiye" unicode="&#58970;" d="M62.573 384.103l423.401 423.662c18.985 18.985 49.757 18.985 68.727 0 18.982-18.972 18.985-49.746 0-68.729l-355.058-355.067 356.796-356.796c18.977-18.971 18.976-49.746 0-68.727-18.982-18.976-49.751-18.976-68.727 0l-39.753 39.753 0.269 0.246-385.655 385.661zM451.365 384.103l423.407 423.662c18.985 18.985 49.757 18.985 68.727 0 18.982-18.972 18.985-49.746 0-68.729l-355.058-355.067 356.796-356.796c18.977-18.971 18.976-49.746 0-68.727-18.982-18.976-49.757-18.977-68.727 0l-39.762 39.754 0.273 0.249-385.662 385.661zM451.365 384.103z" horiz-adv-x="1024" />
<glyph glyph-name="xiayiye1" unicode="&#58971;" d="M948.066926 382.958838l-411.990051-412.24426c-18.47333-18.47333-48.417689-18.47333-66.875207 0-18.47333 18.461167-18.47333 48.405526 0 66.875207L814.691135 383.088983 467.512212 730.269123c-18.466032 18.458735-18.466032 48.405526 0 66.873991 18.468465 18.464816 48.410391 18.464816 66.872774 0l38.682336-38.682336-0.261507-0.239614 375.259894-375.265975v0.003649m-378.312834 0L157.756743-29.285422c-18.47333-18.47333-48.415256-18.47333-66.872775 0-18.47333 18.461167-18.47333 48.405526 0 66.875207L436.369787 383.088983 89.19208 730.269123c-18.4636 18.458735-18.4636 48.405526 0 66.873991 18.470898 18.464816 48.415256 18.464816 66.872774 0l38.692067-38.682336-0.266372-0.239614 375.267191-375.265975-0.004865 0.003649m0 0z" horiz-adv-x="1024" />
</font>
</defs></svg>
/*! laydate-v5.0.9 日期与时间组件 MIT License http://www.layui.com/laydate/ By 贤心 */
.laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}@font-face{font-family:laydate-icon;src:url(font/iconfont.eot);src:url(font/iconfont.eot#iefix) format('embedded-opentype'),url(font/iconfont.svg#iconfont) format('svg'),url(font/iconfont.woff) format('woff'),url(font/iconfont.ttf) format('truetype')}.laydate-icon{font-family:laydate-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
\ No newline at end of file
/*!
@Name:layer v2.4 弹层组件
@Author:贤心
@Site:http://layer.layui.com
@License:LGPL
*/
;!function(window, undefined){
"use strict";
var $, win, ready = {
getPath: function(){
var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
if(script.getAttribute('merge')) return;
return jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
}(),
//屏蔽Enter触发弹层
enter: function(e){
if(e.keyCode === 13) e.preventDefault();
},
config: {}, end: {},
btn: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;'],
//五种原始层模式
type: ['dialog', 'page', 'iframe', 'loading', 'tips']
};
//默认内置方法。
var layer = {
v: '2.4',
ie6: !!window.ActiveXObject&&!window.XMLHttpRequest,
index: (window.layer && window.layer.v) ? 100000 : 0,
path: ready.getPath,
config: function(options, fn){
var item = 0;
options = options || {};
layer.cache = ready.config = $.extend(ready.config, options);
layer.path = ready.config.path || layer.path;
typeof options.extend === 'string' && (options.extend = [options.extend]);
layer.use('skin/layer.css', (options.extend && options.extend.length > 0) ? (function loop(){
var ext = options.extend;
layer.use(ext[ext[item] ? item : item-1], item < ext.length ? function(){
++item;
return loop;
}() : fn);
}()) : fn);
return this;
},
//载入配件
use: function(module, fn, readyMethod){
var i = 0, head = $('head')[0];
var module = module.replace(/\s/g, '');
var iscss = /\.css$/.test(module);
var node = document.createElement(iscss ? 'link' : 'script');
var id = 'layui_layer_' + module.replace(/\.|\//g, '');
if(!layer.path) return;
if(iscss){
node.rel = 'stylesheet';
}
node[iscss ? 'href' : 'src'] = /^http:\/\//.test(module) ? module : layer.path + module;
node.id = id;
if(!$('#'+ id)[0]){
head.appendChild(node);
}
//轮询加载就绪
;(function poll() {
;(iscss ? parseInt($('#'+id).css('width')) === 1989 : layer[readyMethod||id]) ? function(){
fn && fn();
try { iscss || head.removeChild(node); } catch(e){};
}() : setTimeout(poll, 100);
}());
return this;
},
ready: function(path, fn){
var type = typeof path === 'function';
if(type) fn = path;
layer.config($.extend(ready.config, function(){
return type ? {} : {path: path};
}()), fn);
return this;
},
//各种快捷引用
alert: function(content, options, yes){
var type = typeof options === 'function';
if(type) yes = options;
return layer.open($.extend({
content: content,
yes: yes
}, type ? {} : options));
},
confirm: function(content, options, yes, cancel){
var type = typeof options === 'function';
if(type){
cancel = yes;
yes = options;
}
return layer.open($.extend({
content: content,
btn: ready.btn,
yes: yes,
btn2: cancel
}, type ? {} : options));
},
msg: function(content, options, end){ //最常用提示层
var type = typeof options === 'function', rskin = ready.config.skin;
var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';
var shift = doms.anim.length - 1;
if(type) end = options;
return layer.open($.extend({
content: content,
time: 3000,
shade: false,
skin: skin,
title: false,
closeBtn: false,
btn: false,
end: end
}, (type && !ready.config.skin) ? {
skin: skin + ' layui-layer-hui',
shift: shift
} : function(){
options = options || {};
if(options.icon === -1 || options.icon === undefined && !ready.config.skin){
options.skin = skin + ' ' + (options.skin||'layui-layer-hui');
}
return options;
}()));
},
load: function(icon, options){
return layer.open($.extend({
type: 3,
icon: icon || 0,
shade: 0.01
}, options));
},
tips: function(content, follow, options){
return layer.open($.extend({
type: 4,
content: [content, follow],
closeBtn: false,
time: 3000,
shade: false,
fix: false,
maxWidth: 210
}, options));
}
};
var Class = function(setings){
var that = this;
that.index = ++layer.index;
that.config = $.extend({}, that.config, ready.config, setings);
that.creat();
};
Class.pt = Class.prototype;
//缓存常用字符
var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
doms.anim = ['layer-anim', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
//默认配置
Class.pt.config = {
type: 0,
shade: 0.3,
fix: true,
move: doms[1],
title: '&#x4FE1;&#x606F;',
offset: 'auto',
area: 'auto',
closeBtn: 1,
time: 0, //0表示不自动关闭
zIndex: 19891014,
maxWidth: 360,
shift: 0,
icon: -1,
scrollbar: true, //是否允许浏览器滚动条
tips: 2
};
//容器
Class.pt.vessel = function(conType, callback){
var that = this, times = that.index, config = that.config;
var zIndex = config.zIndex + times, titype = typeof config.title === 'object';
var ismax = config.maxmin && (config.type === 1 || config.type === 2);
var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">'
+ (titype ? config.title[0] : config.title)
+ '</div>' : '');
config.zIndex = zIndex;
callback([
//遮罩
config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; background-color:'+ (config.shade[1]||'#000') +'; opacity:'+ (config.shade[0]||config.shade) +'; filter:alpha(opacity='+ (config.shade[0]*100||config.shade*100) +');') +'"></div>') : '',
//主体
'<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + (config.fix ? '' : ';position:absolute;') +'">'
+ (conType && config.type != 2 ? '' : titleHTML)
+'<div id="'+ (config.id||'') +'" class="layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' :'') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'">'
+ (config.type == 0 && config.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico'+ config.icon +'"></i>' : '')
+ (config.type == 1 && conType ? '' : (config.content||''))
+'</div>'
+ '<span class="layui-layer-setwin">'+ function(){
var closebtn = ismax ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
return closebtn;
}() + '</span>'
+ (config.btn ? function(){
var button = '';
typeof config.btn === 'string' && (config.btn = [config.btn]);
for(var i = 0, len = config.btn.length; i < len; i++){
button += '<a class="'+ doms[6] +''+ i +'">'+ config.btn[i] +'</a>'
}
return '<div class="'+ doms[6] +'">'+ button +'</div>'
}() : '')
+'</div>'
], titleHTML);
return that;
};
//创建骨架
Class.pt.creat = function(){
var that = this, config = that.config, times = that.index, nodeIndex;
var content = config.content, conType = typeof content === 'object';
if($('#'+config.id)[0]) return;
if(typeof config.area === 'string'){
config.area = config.area === 'auto' ? ['', ''] : [config.area, ''];
}
switch(config.type){
case 0:
config.btn = ('btn' in config) ? config.btn : ready.btn[0];
layer.closeAll('dialog');
break;
case 2:
var content = config.content = conType ? config.content : [config.content||'http://layer.layui.com', 'auto'];
config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'+ doms[4] +''+ times +'" name="'+ doms[4] +''+ times +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + config.content[0] + '"></iframe>';
break;
case 3:
config.title = false;
config.closeBtn = false;
config.icon === -1 && (config.icon === 0);
layer.closeAll('loading');
break;
case 4:
conType || (config.content = [config.content, 'body']);
config.follow = config.content[1];
config.content = config.content[0] + '<i class="layui-layer-TipsG"></i>';
config.title = false;
config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];
config.tipsMore || layer.closeAll('tips');
break;
}
//建立容器
that.vessel(conType, function(html, titleHTML){
$('body').append(html[0]);
conType ? function(){
(config.type == 2 || config.type == 4) ? function(){
$('body').append(html[1]);
}() : function(){
if(!content.parents('.'+doms[0])[0]){
content.show().addClass('layui-layer-wrap').wrap(html[1]);
$('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML);
}
}();
}() : $('body').append(html[1]);
that.layero = $('#'+ doms[0] + times);
config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
}).auto(times);
config.type == 2 && layer.ie6 && that.layero.find('iframe').attr('src', content[0]);
$(document).off('keydown', ready.enter).on('keydown', ready.enter);
that.layero.on('keydown', function(e){
$(document).off('keydown', ready.enter);
});
if (config.type == 2) {
that.layero.find("iframe")[0].api = that;
}
//坐标自适应浏览器窗口尺寸
config.type == 4 ? that.tips() : that.offset();
if(config.fix){
win.on('resize', function(){
that.offset();
(/^\d+%$/.test(config.area[0]) || /^\d+%$/.test(config.area[1])) && that.auto(times);
config.type == 4 && that.tips();
});
}
config.time <= 0 || setTimeout(function(){
layer.close(that.index)
}, config.time);
that.move().callback();
//为兼容jQuery3.0的css动画影响元素尺寸计算
if(doms.anim[config.shift]){
that.layero.addClass(doms.anim[config.shift]);
};
};
//自适应
Class.pt.auto = function(index){
var that = this, config = that.config, layero = $('#'+ doms[0] + index);
if(config.area[0] === '' && config.maxWidth > 0){
//为了修复IE7下一个让人难以理解的bug
if(/MSIE 7/.test(navigator.userAgent) && config.btn){
layero.width(layero.innerWidth());
}
layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
}
var area = [layero.innerWidth(), layero.innerHeight()];
var titHeight = layero.find(doms[1]).outerHeight() || 0;
var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
function setHeight(elem){
elem = layero.find(elem);
elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding'))|0));
}
switch(config.type){
case 2:
setHeight('iframe');
break;
default:
if(config.area[1] === ''){
if(config.fix && area[1] >= win.height()){
area[1] = win.height();
setHeight('.'+doms[5]);
}
} else {
setHeight('.'+doms[5]);
}
break;
}
return that;
};
//计算坐标
Class.pt.offset = function(){
var that = this, config = that.config, layero = that.layero;
var area = [layero.outerWidth(), layero.outerHeight()];
var type = typeof config.offset === 'object';
that.offsetTop = (win.height() - area[1])/2;
that.offsetLeft = (win.width() - area[0])/2;
if(type){
that.offsetTop = config.offset[0];
that.offsetLeft = config.offset[1]||that.offsetLeft;
} else if(config.offset !== 'auto'){
that.offsetTop = config.offset;
if(config.offset === 'rb'){ //右下角
that.offsetTop = win.height() - area[1];
that.offsetLeft = win.width() - area[0];
}
}
if(!config.fix){
that.offsetTop = /%$/.test(that.offsetTop) ?
win.height()*parseFloat(that.offsetTop)/100
: parseFloat(that.offsetTop);
that.offsetLeft = /%$/.test(that.offsetLeft) ?
win.width()*parseFloat(that.offsetLeft)/100
: parseFloat(that.offsetLeft);
that.offsetTop += win.scrollTop();
that.offsetLeft += win.scrollLeft();
}
layero.css({top: that.offsetTop, left: that.offsetLeft});
};
//Tips
Class.pt.tips = function(){
var that = this, config = that.config, layero = that.layero;
var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow);
if(!follow[0]) follow = $('body');
var goal = {
width: follow.outerWidth(),
height: follow.outerHeight(),
top: follow.offset().top,
left: follow.offset().left
}, tipsG = layero.find('.layui-layer-TipsG');
var guide = config.tips[0];
config.tips[1] || tipsG.remove();
goal.autoLeft = function(){
if(goal.left + layArea[0] - win.width() > 0){
goal.tipLeft = goal.left + goal.width - layArea[0];
tipsG.css({right: 12, left: 'auto'});
} else {
goal.tipLeft = goal.left;
};
};
//辨别tips的方位
goal.where = [function(){ //上
goal.autoLeft();
goal.tipTop = goal.top - layArea[1] - 10;
tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]);
}, function(){ //右
goal.tipLeft = goal.left + goal.width + 10;
goal.tipTop = goal.top;
tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]);
}, function(){ //下
goal.autoLeft();
goal.tipTop = goal.top + goal.height + 10;
tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]);
}, function(){ //左
goal.tipLeft = goal.left - layArea[0] - 10;
goal.tipTop = goal.top;
tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]);
}];
goal.where[guide-1]();
/* 8*2为小三角形占据的空间 */
if(guide === 1){
goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2]();
} else if(guide === 2){
win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]()
} else if(guide === 3){
(goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0]();
} else if(guide === 4){
layArea[0] + 8*2 - goal.left > 0 && goal.where[1]()
}
layero.find('.'+doms[5]).css({
'background-color': config.tips[1],
'padding-right': (config.closeBtn ? '30px' : '')
});
layero.css({
left: goal.tipLeft - (config.fix ? win.scrollLeft() : 0),
top: goal.tipTop - (config.fix ? win.scrollTop() : 0)
});
}
//拖拽层
Class.pt.move = function(){
var that = this, config = that.config, conf = {
setY: 0,
moveLayer: function(){
var layero = conf.layero, mgleft = parseInt(layero.css('margin-left'));
var lefts = parseInt(conf.move.css('left'));
mgleft === 0 || (lefts = lefts - mgleft);
if(layero.css('position') !== 'fixed'){
lefts = lefts - layero.parent().offset().left;
conf.setY = 0;
}
layero.css({left: lefts, top: parseInt(conf.move.css('top')) - conf.setY});
}
};
var movedom = that.layero.find(config.move);
config.move && movedom.attr('move', 'ok');
movedom.css({cursor: config.move ? 'move' : 'auto'});
$(config.move).on('mousedown', function(M){
M.preventDefault();
if($(this).attr('move') === 'ok'){
conf.ismove = true;
conf.layero = $(this).parents('.'+ doms[0]);
var xx = conf.layero.offset().left, yy = conf.layero.offset().top, ww = conf.layero.outerWidth() - 6, hh = conf.layero.outerHeight() - 6;
if(!$('#layui-layer-moves')[0]){
$('body').append('<div id="layui-layer-moves" class="layui-layer-moves" style="left:'+ xx +'px; top:'+ yy +'px; width:'+ ww +'px; height:'+ hh +'px; z-index:2147483584"></div>');
}
conf.move = $('#layui-layer-moves');
config.moveType && conf.move.css({visibility: 'hidden'});
conf.moveX = M.pageX - conf.move.position().left;
conf.moveY = M.pageY - conf.move.position().top;
conf.layero.css('position') !== 'fixed' || (conf.setY = win.scrollTop());
}
});
$(document).mousemove(function(M){
if(conf.ismove){
var offsetX = M.pageX - conf.moveX, offsetY = M.pageY - conf.moveY;
M.preventDefault();
//控制元素不被拖出窗口外
if(!config.moveOut){
conf.setY = win.scrollTop();
var setRig = win.width() - conf.move.outerWidth(), setTop = conf.setY;
offsetX < 0 && (offsetX = 0);
offsetX > setRig && (offsetX = setRig);
offsetY < setTop && (offsetY = setTop);
offsetY > win.height() - conf.move.outerHeight() + conf.setY && (offsetY = win.height() - conf.move.outerHeight() + conf.setY);
}
conf.move.css({left: offsetX, top: offsetY});
config.moveType && conf.moveLayer();
offsetX = offsetY = setRig = setTop = null;
}
}).mouseup(function(){
try{
if(conf.ismove){
conf.moveLayer();
conf.move.remove();
config.moveEnd && config.moveEnd();
}
conf.ismove = false;
}catch(e){
conf.ismove = false;
}
});
return that;
};
Class.pt.callback = function(){
var that = this, layero = that.layero, config = that.config;
that.openLayer();
if(config.success){
if(config.type == 2){
layero.find('iframe').on('load', function(){
config.success(layero, that.index);
});
} else {
config.success(layero, that.index);
}
}
layer.ie6 && that.IE6(layero);
//按钮
layero.find('.'+ doms[6]).children('a').on('click', function(){
var index = $(this).index();
if(index === 0){
if(config.yes){
config.yes(that.index, layero)
} else if(config['btn1']){
config['btn1'](that.index, layero)
} else {
layer.close(that.index);
}
} else {
var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero);
close === false || layer.close(that.index);
}
});
//取消
function cancel(){
var close = config.cancel && config.cancel(that.index, layero);
close === false || layer.close(that.index);
}
//右上角关闭回调
layero.find('.'+ doms[7]).on('click', cancel);
//点遮罩关闭
if(config.shadeClose){
$('#layui-layer-shade'+ that.index).on('click', function(){
layer.close(that.index);
});
}
//最小化
layero.find('.layui-layer-min').on('click', function(){
var min = config.min && config.min(layero);
min === false || layer.min(that.index, config);
});
//全屏/还原
layero.find('.layui-layer-max').on('click', function(){
if($(this).hasClass('layui-layer-maxmin')){
layer.restore(that.index);
config.restore && config.restore(layero);
} else {
layer.full(that.index, config);
setTimeout(function(){
config.full && config.full(layero);
}, 100);
}
});
config.end && (ready.end[that.index] = config.end);
};
//for ie6 恢复select
ready.reselect = function(){
$.each($('select'), function(index , value){
var sthis = $(this);
if(!sthis.parents('.'+doms[0])[0]){
(sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show();
}
sthis = null;
});
};
Class.pt.IE6 = function(layero){
var that = this, _ieTop = layero.offset().top;
//ie6的固定与相对定位
function ie6Fix(){
layero.css({top : _ieTop + (that.config.fix ? win.scrollTop() : 0)});
};
ie6Fix();
win.scroll(ie6Fix);
//隐藏select
$('select').each(function(index , value){
var sthis = $(this);
if(!sthis.parents('.'+doms[0])[0]){
sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide();
}
sthis = null;
});
};
//需依赖原型的对外方法
Class.pt.openLayer = function(){
var that = this;
//置顶当前窗口
layer.zIndex = that.config.zIndex;
layer.setTop = function(layero){
var setZindex = function(){
layer.zIndex++;
layero.css('z-index', layer.zIndex + 1);
};
layer.zIndex = parseInt(layero[0].style.zIndex);
layero.on('mousedown', setZindex);
return layer.zIndex;
};
};
ready.record = function(layero){
var area = [
layero.width(),
layero.height(),
layero.position().top,
layero.position().left + parseFloat(layero.css('margin-left'))
];
layero.find('.layui-layer-max').addClass('layui-layer-maxmin');
layero.attr({area: area});
};
ready.rescollbar = function(index){
if(doms.html.attr('layer-full') == index){
if(doms.html[0].style.removeProperty){
doms.html[0].style.removeProperty('overflow');
} else {
doms.html[0].style.removeAttribute('overflow');
}
doms.html.removeAttr('layer-full');
}
};
/** 内置成员 */
window.layer = layer;
//获取子iframe的DOM
layer.getChildFrame = function(selector, index){
index = index || $('.'+doms[4]).attr('times');
return $('#'+ doms[0] + index).find('iframe').contents().find(selector);
};
//得到当前iframe层的索引,子iframe时使用
layer.getFrameIndex = function(name){
return $('#'+ name).parents('.'+doms[4]).attr('times');
};
//iframe层自适应宽高
layer.iframeAuto = function(index){
if(!index) return;
var heg = layer.getChildFrame('html', index).outerHeight();
var layero = $('#'+ doms[0] + index);
var titHeight = layero.find(doms[1]).outerHeight() || 0;
var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
layero.css({height: heg + titHeight + btnHeight});
layero.find('iframe').css({height: heg});
};
//重置iframe url
layer.iframeSrc = function(index, url){
$('#'+ doms[0] + index).find('iframe').attr('src', url);
};
//设定层的样式
layer.style = function(index, options){
var layero = $('#'+ doms[0] + index), type = layero.attr('type');
var titHeight = layero.find(doms[1]).outerHeight() || 0;
var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
if(type === ready.type[1] || type === ready.type[2]){
layero.css(options);
if(type === ready.type[2]){
layero.find('iframe').css({
height: parseFloat(options.height) - titHeight - btnHeight
});
}
}
};
//最小化
layer.min = function(index, options){
var layero = $('#'+ doms[0] + index);
var titHeight = layero.find(doms[1]).outerHeight() || 0;
ready.record(layero);
layer.style(index, {width: 180, height: titHeight, overflow: 'hidden'});
layero.find('.layui-layer-min').hide();
layero.attr('type') === 'page' && layero.find(doms[4]).hide();
ready.rescollbar(index);
};
//还原
layer.restore = function(index){
var layero = $('#'+ doms[0] + index), area = layero.attr('area').split(',');
var type = layero.attr('type');
layer.style(index, {
width: parseFloat(area[0]),
height: parseFloat(area[1]),
top: parseFloat(area[2]),
left: parseFloat(area[3]),
overflow: 'visible'
});
layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');
layero.find('.layui-layer-min').show();
layero.attr('type') === 'page' && layero.find(doms[4]).show();
ready.rescollbar(index);
};
//全屏
layer.full = function(index){
var layero = $('#'+ doms[0] + index), timer;
ready.record(layero);
if(!doms.html.attr('layer-full')){
doms.html.css('overflow','hidden').attr('layer-full', index);
}
clearTimeout(timer);
timer = setTimeout(function(){
var isfix = layero.css('position') === 'fixed';
layer.style(index, {
top: isfix ? 0 : win.scrollTop(),
left: isfix ? 0 : win.scrollLeft(),
width: win.width(),
height: win.height()
});
layero.find('.layui-layer-min').hide();
}, 100);
};
//改变title
layer.title = function(name, index){
var title = $('#'+ doms[0] + (index||layer.index)).find(doms[1]);
title.html(name);
};
//关闭layer总方法
layer.close = function(index){
var layero = $('#'+ doms[0] + index), type = layero.attr('type');
if(!layero[0]) return;
if(type === ready.type[1] && layero.attr('conType') === 'object'){
layero.children(':not(.'+ doms[5] +')').remove();
for(var i = 0; i < 2; i++){
layero.find('.layui-layer-wrap').unwrap().hide();
}
} else {
//低版本IE 回收 iframe
if(type === ready.type[2]){
try {
var iframe = $('#'+doms[4]+index)[0];
iframe.contentWindow.document.write('');
iframe.contentWindow.close();
layero.find('.'+doms[5])[0].removeChild(iframe);
} catch(e){}
}
layero[0].innerHTML = '';
layero.remove();
}
$('#layui-layer-moves, #layui-layer-shade' + index).remove();
layer.ie6 && ready.reselect();
ready.rescollbar(index);
$(document).off('keydown', ready.enter);
typeof ready.end[index] === 'function' && ready.end[index]();
delete ready.end[index];
};
//关闭所有层
layer.closeAll = function(type){
$.each($('.'+doms[0]), function(){
var othis = $(this);
var is = type ? (othis.attr('type') === type) : 1;
is && layer.close(othis.attr('times'));
is = null;
});
};
/**
拓展模块,layui开始合并在一起
*/
var cache = layer.cache||{}, skin = function(type){
return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : '');
};
//仿系统prompt
layer.prompt = function(options, yes){
options = options || {};
if(typeof options === 'function') yes = options;
var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input">'+ (options.value||'') +'</textarea>' : function(){
return '<input type="'+ (options.formType == 1 ? 'password' : 'text') +'" class="layui-layer-input" value="'+ (options.value||'') +'">';
}();
return layer.open($.extend({
btn: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;'],
content: content,
skin: 'layui-layer-prompt' + skin('prompt'),
success: function(layero){
prompt = layero.find('.layui-layer-input');
prompt.focus();
}, yes: function(index){
var value = prompt.val();
if(value === ''){
prompt.focus();
} else if(value.length > (options.maxlength||500)) {
layer.tips('&#x6700;&#x591A;&#x8F93;&#x5165;'+ (options.maxlength || 500) +'&#x4E2A;&#x5B57;&#x6570;', prompt, {tips: 1});
} else {
yes && yes(value, index, prompt);
}
}
}, options));
};
//tab层
layer.tab = function(options){
options = options || {};
var tab = options.tab || {};
return layer.open($.extend({
type: 1,
skin: 'layui-layer-tab' + skin('tab'),
title: function(){
var len = tab.length, ii = 1, str = '';
if(len > 0){
str = '<span class="layui-layer-tabnow">'+ tab[0].title +'</span>';
for(; ii < len; ii++){
str += '<span>'+ tab[ii].title +'</span>';
}
}
return str;
}(),
content: '<ul class="layui-layer-tabmain">'+ function(){
var len = tab.length, ii = 1, str = '';
if(len > 0){
str = '<li class="layui-layer-tabli xubox_tab_layer">'+ (tab[0].content || 'no content') +'</li>';
for(; ii < len; ii++){
str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no content') +'</li>';
}
}
return str;
}() +'</ul>',
success: function(layero){
var btn = layero.find('.layui-layer-title').children();
var main = layero.find('.layui-layer-tabmain').children();
btn.on('mousedown', function(e){
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
var othis = $(this), index = othis.index();
othis.addClass('layui-layer-tabnow').siblings().removeClass('layui-layer-tabnow');
main.eq(index).show().siblings().hide();
typeof options.change === 'function' && options.change(index);
});
}
}, options));
};
//相册层
layer.photos = function(options, loop, key){
var dict = {};
options = options || {};
if(!options.photos) return;
var type = options.photos.constructor === Object;
var photos = type ? options.photos : {}, data = photos.data || [];
var start = photos.start || 0;
dict.imgIndex = (start|0) + 1;
options.img = options.img || 'img';
if(!type){ //页面直接获取
var parent = $(options.photos), pushData = function(){
data = [];
parent.find(options.img).each(function(index){
var othis = $(this);
othis.attr('layer-index', index);
data.push({
alt: othis.attr('alt'),
pid: othis.attr('layer-pid'),
src: othis.attr('layer-src') || othis.attr('src'),
thumb: othis.attr('src')
});
})
};
pushData();
if (data.length === 0) return;
loop || parent.on('click', options.img, function(){
var othis = $(this), index = othis.attr('layer-index');
layer.photos($.extend(options, {
photos: {
start: index,
data: data,
tab: options.tab
},
full: options.full
}), true);
pushData();
})
//不直接弹出
if(!loop) return;
} else if (data.length === 0){
return layer.msg('&#x6CA1;&#x6709;&#x56FE;&#x7247;');
}
//上一张
dict.imgprev = function(key){
dict.imgIndex--;
if(dict.imgIndex < 1){
dict.imgIndex = data.length;
}
dict.tabimg(key);
};
//下一张
dict.imgnext = function(key,errorMsg){
dict.imgIndex++;
if(dict.imgIndex > data.length){
dict.imgIndex = 1;
if (errorMsg) {return};
}
dict.tabimg(key)
};
//方向键
dict.keyup = function(event){
if(!dict.end){
var code = event.keyCode;
event.preventDefault();
if(code === 37){
dict.imgprev(true);
} else if(code === 39) {
dict.imgnext(true);
} else if(code === 27) {
layer.close(dict.index);
}
}
}
//切换
dict.tabimg = function(key){
if(data.length <= 1) return;
photos.start = dict.imgIndex - 1;
layer.close(dict.index);
layer.photos(options, true, key);
}
//一些动作
dict.event = function(){
dict.bigimg.hover(function(){
dict.imgsee.show();
}, function(){
dict.imgsee.hide();
});
dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){
event.preventDefault();
dict.imgprev();
});
dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){
event.preventDefault();
dict.imgnext();
});
$(document).on('keyup', dict.keyup);
};
//图片预加载
function loadImage(url, callback, error) {
var img = new Image();
img.src = url;
if(img.complete){
return callback(img);
}
img.onload = function(){
img.onload = null;
callback(img);
};
img.onerror = function(e){
img.onerror = null;
error(e);
};
};
dict.loadi = layer.load(1, {
shade: 'shade' in options ? false : 0.9,
scrollbar: false
});
loadImage(data[start].src, function(img){
layer.close(dict.loadi);
dict.index = layer.open($.extend({
type: 1,
area: function(){
var imgarea = [img.width, img.height];
var winarea = [$(window).width() - 50, $(window).height() - 50];
if(!options.full && imgarea[0] > winarea[0]){
imgarea[0] = winarea[0];
imgarea[1] = imgarea[0]*img.height/img.width;
}
return [imgarea[0]+'px', imgarea[1]+'px'];
}(),
title: false,
shade: 0.9,
shadeClose: true,
closeBtn: false,
move: '.layui-layer-phimg img',
moveType: 1,
scrollbar: false,
moveOut: true,
shift: Math.random()*5|0,
skin: 'layui-layer-photos' + skin('photos'),
content: '<div class="layui-layer-phimg">'
+'<img src="'+ data[start].src +'" alt="'+ (data[start].alt||'') +'" layer-pid="'+ data[start].pid +'">'
+'<div class="layui-layer-imgsee">'
+(data.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>' : '')
+'<div class="layui-layer-imgbar" style="display:'+ (key ? 'block' : '') +'"><span class="layui-layer-imgtit"><a href="javascript:;">'+ (data[start].alt||'') +'</a><em>'+ dict.imgIndex +'/'+ data.length +'</em></span></div>'
+'</div>'
+'</div>',
success: function(layero, index){
dict.bigimg = layero.find('.layui-layer-phimg');
dict.imgsee = layero.find('.layui-layer-imguide,.layui-layer-imgbar');
dict.event(layero);
options.tab && options.tab(data[start], layero);
}, end: function(){
dict.end = true;
$(document).off('keyup', dict.keyup);
}
}, options));
}, function(){
layer.close(dict.loadi);
layer.msg('&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;', {
time: 30000,
btn: ['&#x4E0B;&#x4E00;&#x5F20;', '&#x4E0D;&#x770B;&#x4E86;'],
yes: function(){
data.length > 1 && dict.imgnext(true,true);
}
});
});
};
//主入口
ready.run = function(){
$ = jQuery;
win = $(window);
doms.html = $('html');
layer.open = function(deliver){
var o = new Class(deliver);
return o.index;
};
};
'function' === typeof define ? define(function(){
ready.run();
return layer;
}) : function(){
ready.run();
layer.use('skin/layer.css');
}();
}(window);
\ No newline at end of file
/*! layer-v2.4.0 Web弹层组件 LGPL License http://layer.layui.com/ By 贤心 */
;!function(e,t){"use strict";var i,n,a={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute("merge"))return i.substring(0,i.lastIndexOf("/")+1)}(),enter:function(e){13===e.keyCode&&e.preventDefault()},config:{},end:{},btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],type:["dialog","page","iframe","loading","tips"]},o={v:"2.4",ie6:!!e.ActiveXObject&&!e.XMLHttpRequest,index:e.layer&&e.layer.v?1e5:0,path:a.getPath,config:function(e,t){var n=0;return e=e||{},o.cache=a.config=i.extend(a.config,e),o.path=a.config.path||o.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.use("skin/layer.css",e.extend&&e.extend.length>0?function r(){var i=e.extend;o.use(i[i[n]?n:n-1],n<i.length?function(){return++n,r}():t)}():t),this},use:function(e,t,n){var a=i("head")[0],e=e.replace(/\s/g,""),r=/\.css$/.test(e),l=document.createElement(r?"link":"script"),s="layui_layer_"+e.replace(/\.|\//g,"");if(o.path)return r&&(l.rel="stylesheet"),l[r?"href":"src"]=/^http:\/\//.test(e)?e:o.path+e,l.id=s,i("#"+s)[0]||a.appendChild(l),function c(){(r?1989===parseInt(i("#"+s).css("width")):o[n||s])?function(){t&&t();try{r||a.removeChild(l)}catch(e){}}():setTimeout(c,100)}(),this},ready:function(e,t){var n="function"==typeof e;return n&&(t=e),o.config(i.extend(a.config,function(){return n?{}:{path:e}}()),t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),o.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,r){var l="function"==typeof t;return l&&(r=n,n=t),o.open(i.extend({content:e,btn:a.btn,yes:n,btn2:r},l?{}:t))},msg:function(e,n,r){var s="function"==typeof n,c=a.config.skin,f=(c?c+" "+c+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(r=n),o.open(i.extend({content:e,time:3e3,shade:!1,skin:f,title:!1,closeBtn:!1,btn:!1,end:r},s&&!a.config.skin?{skin:f+" layui-layer-hui",shift:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!a.config.skin)&&(n.skin=f+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return o.open(i.extend({type:3,icon:e||0,shade:.01},t))},tips:function(e,t,n){return o.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,fix:!1,maxWidth:210},n))}},r=function(e){var t=this;t.index=++o.index,t.config=i.extend({},t.config,a.config,e),t.creat()};r.pt=r.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],r.pt.config={type:0,shade:.3,fix:!0,move:l[1],title:"&#x4FE1;&#x606F;",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,shift:0,icon:-1,scrollbar:!0,tips:2},r.pt.vessel=function(e,t){var i=this,n=i.index,o=i.config,r=o.zIndex+n,s="object"==typeof o.title,c=o.maxmin&&(1===o.type||2===o.type),f=o.title?'<div class="layui-layer-title" style="'+(s?o.title[1]:"")+'">'+(s?o.title[0]:o.title)+"</div>":"";return o.zIndex=r,t([o.shade?'<div class="layui-layer-shade" id="layui-layer-shade'+n+'" times="'+n+'" style="'+("z-index:"+(r-1)+"; background-color:"+(o.shade[1]||"#000")+"; opacity:"+(o.shade[0]||o.shade)+"; filter:alpha(opacity="+(100*o.shade[0]||100*o.shade)+");")+'"></div>':"",'<div class="'+l[0]+(" layui-layer-"+a.type[o.type])+(0!=o.type&&2!=o.type||o.shade?"":" layui-layer-border")+" "+(o.skin||"")+'" id="'+l[0]+n+'" type="'+a.type[o.type]+'" times="'+n+'" showtime="'+o.time+'" conType="'+(e?"object":"string")+'" style="z-index: '+r+"; width:"+o.area[0]+";height:"+o.area[1]+(o.fix?"":";position:absolute;")+'">'+(e&&2!=o.type?"":f)+'<div id="'+(o.id||"")+'" class="layui-layer-content'+(0==o.type&&o.icon!==-1?" layui-layer-padding":"")+(3==o.type?" layui-layer-loading"+o.icon:"")+'">'+(0==o.type&&o.icon!==-1?'<i class="layui-layer-ico layui-layer-ico'+o.icon+'"></i>':"")+(1==o.type&&e?"":o.content||"")+'</div><span class="layui-layer-setwin">'+function(){var e=c?'<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>':"";return o.closeBtn&&(e+='<a class="layui-layer-ico '+l[7]+" "+l[7]+(o.title?o.closeBtn:4==o.type?"1":"2")+'" href="javascript:;"></a>'),e}()+"</span>"+(o.btn?function(){var e="";"string"==typeof o.btn&&(o.btn=[o.btn]);for(var t=0,i=o.btn.length;t<i;t++)e+='<a class="'+l[6]+t+'">'+o.btn[t]+"</a>";return'<div class="'+l[6]+'">'+e+"</div>"}():"")+"</div>"],f),i},r.pt.creat=function(){var e=this,t=e.config,r=e.index,s=t.content,c="object"==typeof s;if(!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.type){case 0:t.btn="btn"in t?t.btn:a.btn[0],o.closeAll("dialog");break;case 2:var s=t.content=c?t.content:[t.content||"http://layer.layui.com","auto"];t.content='<iframe scrolling="'+(t.content[1]||"auto")+'" allowtransparency="true" id="'+l[4]+r+'" name="'+l[4]+r+'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="'+t.content[0]+'"></iframe>';break;case 3:t.title=!1,t.closeBtn=!1,t.icon===-1&&0===t.icon,o.closeAll("loading");break;case 4:c||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'<i class="layui-layer-TipsG"></i>',t.title=!1,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||o.closeAll("tips")}e.vessel(c,function(n,a){i("body").append(n[0]),c?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+r).find("."+l[5]).before(a))}()}():i("body").append(n[1]),e.layero=i("#"+l[0]+r),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",r)}).auto(r),2==t.type&&o.ie6&&e.layero.find("iframe").attr("src",s[0]),i(document).off("keydown",a.enter).on("keydown",a.enter),e.layero.on("keydown",function(e){i(document).off("keydown",a.enter)}),4==t.type?e.tips():e.offset(),t.fix&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(r),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){o.close(e.index)},t.time),e.move().callback(),l.anim[t.shift]&&e.layero.addClass(l.anim[t.shift])}},r.pt.auto=function(e){function t(e){e=r.find(e),e.height(s[1]-c-f-2*(0|parseFloat(e.css("padding"))))}var a=this,o=a.config,r=i("#"+l[0]+e);""===o.area[0]&&o.maxWidth>0&&(/MSIE 7/.test(navigator.userAgent)&&o.btn&&r.width(r.innerWidth()),r.outerWidth()>o.maxWidth&&r.width(o.maxWidth));var s=[r.innerWidth(),r.innerHeight()],c=r.find(l[1]).outerHeight()||0,f=r.find("."+l[6]).outerHeight()||0;switch(o.type){case 2:t("iframe");break;default:""===o.area[1]?o.fix&&s[1]>=n.height()&&(s[1]=n.height(),t("."+l[5])):t("."+l[5])}return a},r.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&(e.offsetTop=t.offset,"rb"===t.offset&&(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0])),t.fix||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.css({top:e.offsetTop,left:e.offsetLeft})},r.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},c=a.find(".layui-layer-TipsG"),f=t.tips[0];t.tips[1]||c.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],c.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,c.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,c.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,c.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,c.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[f-1](),1===f?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===f?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===f?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===f&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fix?n.scrollLeft():0),top:s.tipTop-(t.fix?n.scrollTop():0)})},r.pt.move=function(){var e=this,t=e.config,a={setY:0,moveLayer:function(){var e=a.layero,t=parseInt(e.css("margin-left")),i=parseInt(a.move.css("left"));0===t||(i-=t),"fixed"!==e.css("position")&&(i-=e.parent().offset().left,a.setY=0),e.css({left:i,top:parseInt(a.move.css("top"))-a.setY})}},o=e.layero.find(t.move);return t.move&&o.attr("move","ok"),o.css({cursor:t.move?"move":"auto"}),i(t.move).on("mousedown",function(e){if(e.preventDefault(),"ok"===i(this).attr("move")){a.ismove=!0,a.layero=i(this).parents("."+l[0]);var o=a.layero.offset().left,r=a.layero.offset().top,s=a.layero.outerWidth()-6,c=a.layero.outerHeight()-6;i("#layui-layer-moves")[0]||i("body").append('<div id="layui-layer-moves" class="layui-layer-moves" style="left:'+o+"px; top:"+r+"px; width:"+s+"px; height:"+c+'px; z-index:2147483584"></div>'),a.move=i("#layui-layer-moves"),t.moveType&&a.move.css({visibility:"hidden"}),a.moveX=e.pageX-a.move.position().left,a.moveY=e.pageY-a.move.position().top,"fixed"!==a.layero.css("position")||(a.setY=n.scrollTop())}}),i(document).mousemove(function(e){if(a.ismove){var i=e.pageX-a.moveX,o=e.pageY-a.moveY;if(e.preventDefault(),!t.moveOut){a.setY=n.scrollTop();var r=n.width()-a.move.outerWidth(),l=a.setY;i<0&&(i=0),i>r&&(i=r),o<l&&(o=l),o>n.height()-a.move.outerHeight()+a.setY&&(o=n.height()-a.move.outerHeight()+a.setY)}a.move.css({left:i,top:o}),t.moveType&&a.moveLayer(),i=o=r=l=null}}).mouseup(function(){try{a.ismove&&(a.moveLayer(),a.move.remove(),t.moveEnd&&t.moveEnd()),a.ismove=!1}catch(e){a.ismove=!1}}),e},r.pt.callback=function(){function e(){var e=r.cancel&&r.cancel(t.index,n);e===!1||o.close(t.index)}var t=this,n=t.layero,r=t.config;t.openLayer(),r.success&&(2==r.type?n.find("iframe").on("load",function(){r.success(n,t.index)}):r.success(n,t.index)),o.ie6&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)r.yes?r.yes(t.index,n):r.btn1?r.btn1(t.index,n):o.close(t.index);else{var a=r["btn"+(e+1)]&&r["btn"+(e+1)](t.index,n);a===!1||o.close(t.index)}}),n.find("."+l[7]).on("click",e),r.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){o.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=r.min&&r.min(n);e===!1||o.min(t.index,r)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(o.restore(t.index),r.restore&&r.restore(n)):(o.full(t.index,r),setTimeout(function(){r.full&&r.full(n)},100))}),r.end&&(a.end[t.index]=r.end)},a.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},r.pt.IE6=function(e){function t(){e.css({top:o+(a.config.fix?n.scrollTop():0)})}var a=this,o=e.offset().top;t(),n.scroll(t),i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},r.pt.openLayer=function(){var e=this;o.zIndex=e.config.zIndex,o.setTop=function(e){var t=function(){o.zIndex++,e.css("z-index",o.zIndex+1)};return o.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),o.zIndex}},a.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},a.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=o,o.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},o.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},o.iframeAuto=function(e){if(e){var t=o.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,r=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+r}),n.find("iframe").css({height:t})}},o.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},o.style=function(e,t){var n=i("#"+l[0]+e),o=n.attr("type"),r=n.find(l[1]).outerHeight()||0,s=n.find("."+l[6]).outerHeight()||0;o!==a.type[1]&&o!==a.type[2]||(n.css(t),o===a.type[2]&&n.find("iframe").css({height:parseFloat(t.height)-r-s}))},o.min=function(e,t){var n=i("#"+l[0]+e),r=n.find(l[1]).outerHeight()||0;a.record(n),o.style(e,{width:180,height:r,overflow:"hidden"}),n.find(".layui-layer-min").hide(),"page"===n.attr("type")&&n.find(l[4]).hide(),a.rescollbar(e)},o.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");o.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),overflow:"visible"}),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),a.rescollbar(e)},o.full=function(e){var t,r=i("#"+l[0]+e);a.record(r),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===r.css("position");o.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()}),r.find(".layui-layer-min").hide()},100)},o.title=function(e,t){var n=i("#"+l[0]+(t||o.index)).find(l[1]);n.html(e)},o.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type");if(t[0]){if(n===a.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var r=0;r<2;r++)t.find(".layui-layer-wrap").unwrap().hide()}else{if(n===a.type[2])try{var s=i("#"+l[4]+e)[0];s.contentWindow.document.write(""),s.contentWindow.close(),t.find("."+l[5])[0].removeChild(s)}catch(c){}t[0].innerHTML="",t.remove()}i("#layui-layer-moves, #layui-layer-shade"+e).remove(),o.ie6&&a.reselect(),a.rescollbar(e),i(document).off("keydown",a.enter),"function"==typeof a.end[e]&&a.end[e](),delete a.end[e]}},o.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&o.close(t.attr("times")),n=null})};var s=o.cache||{},c=function(e){return s.skin?" "+s.skin+" "+s.skin+"-"+e:""};o.prompt=function(e,t){e=e||{},"function"==typeof e&&(t=e);var n,a=2==e.formType?'<textarea class="layui-layer-input">'+(e.value||"")+"</textarea>":function(){return'<input type="'+(1==e.formType?"password":"text")+'" class="layui-layer-input" value="'+(e.value||"")+'">'}();return o.open(i.extend({btn:["&#x786E;&#x5B9A;","&#x53D6;&#x6D88;"],content:a,skin:"layui-layer-prompt"+c("prompt"),success:function(e){n=e.find(".layui-layer-input"),n.focus()},yes:function(i){var a=n.val();""===a?n.focus():a.length>(e.maxlength||500)?o.tips("&#x6700;&#x591A;&#x8F93;&#x5165;"+(e.maxlength||500)+"&#x4E2A;&#x5B57;&#x6570;",n,{tips:1}):t&&t(a,i,n)}},e))},o.tab=function(e){e=e||{};var t=e.tab||{};return o.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),title:function(){var e=t.length,i=1,n="";if(e>0)for(n='<span class="layui-layer-tabnow">'+t[0].title+"</span>";i<e;i++)n+="<span>"+t[i].title+"</span>";return n}(),content:'<ul class="layui-layer-tabmain">'+function(){var e=t.length,i=1,n="";if(e>0)for(n='<li class="layui-layer-tabli xubox_tab_layer">'+(t[0].content||"no content")+"</li>";i<e;i++)n+='<li class="layui-layer-tabli">'+(t[i].content||"no content")+"</li>";return n}()+"</ul>",success:function(t){var n=t.find(".layui-layer-title").children(),a=t.find(".layui-layer-tabmain").children();n.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var n=i(this),o=n.index();n.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),a.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)})}},e))},o.photos=function(t,n,a){function r(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var l={};if(t=t||{},t.photos){var s=t.photos.constructor===Object,f=s?t.photos:{},u=f.data||[],d=f.start||0;if(l.imgIndex=(0|d)+1,t.img=t.img||"img",s){if(0===u.length)return o.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")}else{var y=i(t.photos),p=function(){u=[],y.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(p(),0===u.length)return;if(n||y.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");o.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),p()}),!n)return}l.imgprev=function(e){l.imgIndex--,l.imgIndex<1&&(l.imgIndex=u.length),l.tabimg(e)},l.imgnext=function(e,t){l.imgIndex++,l.imgIndex>u.length&&(l.imgIndex=1,t)||l.tabimg(e)},l.keyup=function(e){if(!l.end){var t=e.keyCode;e.preventDefault(),37===t?l.imgprev(!0):39===t?l.imgnext(!0):27===t&&o.close(l.index)}},l.tabimg=function(e){u.length<=1||(f.start=l.imgIndex-1,o.close(l.index),o.photos(t,!0,e))},l.event=function(){l.bigimg.hover(function(){l.imgsee.show()},function(){l.imgsee.hide()}),l.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),l.imgprev()}),l.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),l.imgnext()}),i(document).on("keyup",l.keyup)},l.loadi=o.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),r(u[d].src,function(n){o.close(l.loadi),l.index=o.open(i.extend({type:1,area:function(){var a=[n.width,n.height],o=[i(e).width()-50,i(e).height()-50];return!t.full&&a[0]>o[0]&&(a[0]=o[0],a[1]=a[0]*n.height/n.width),[a[0]+"px",a[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,shift:5*Math.random()|0,skin:"layui-layer-photos"+c("photos"),content:'<div class="layui-layer-phimg"><img src="'+u[d].src+'" alt="'+(u[d].alt||"")+'" layer-pid="'+u[d].pid+'"><div class="layui-layer-imgsee">'+(u.length>1?'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>':"")+'<div class="layui-layer-imgbar" style="display:'+(a?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(u[d].alt||"")+"</a><em>"+l.imgIndex+"/"+u.length+"</em></span></div></div></div>",success:function(e,i){l.bigimg=e.find(".layui-layer-phimg"),l.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),l.event(e),t.tab&&t.tab(u[d],e)},end:function(){l.end=!0,i(document).off("keyup",l.keyup)}},t))},function(){o.close(l.loadi),o.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;",{time:3e4,btn:["&#x4E0B;&#x4E00;&#x5F20;","&#x4E0D;&#x770B;&#x4E86;"],yes:function(){u.length>1&&l.imgnext(!0,!0)}})})}},a.run=function(){i=jQuery,n=i(e),l.html=i("html"),o.open=function(e){var t=new r(e);return t.index}},"function"==typeof define?define(function(){return a.run(),o}):function(){a.run(),o.use("skin/layer.css")}()}(window);
\ No newline at end of file
{
"status": 1,
"msg": "ok",
"data": [
{
"id": "100001",
"name": "Beaut-zihan",
"time": "10:23",
"face": "img/a1.jpg"
},
{
"id": "100002",
"name": "慕容晓晓",
"time": "昨天",
"face": "img/a2.jpg"
},
{
"id": "1000033",
"name": "乔峰",
"time": "2014-4.22",
"face": "img/a3.jpg"
},
{
"id": "10000333",
"name": "高圆圆",
"time": "2014-4.21",
"face": "img/a4.jpg"
}
]
}
{
"status": 1,
"msg": "ok",
"data": [
{
"name": "销售部",
"nums": 36,
"id": 1,
"item": [
{
"id": "100001",
"name": "郭敬明",
"face": "img/a5.jpg"
},
{
"id": "100002",
"name": "作家崔成浩",
"face": "img/a6.jpg"
},
{
"id": "1000022",
"name": "韩寒",
"face": "img/a7.jpg"
},
{
"id": "10000222",
"name": "范爷",
"face": "img/a8.jpg"
},
{
"id": "100002222",
"name": "小马哥",
"face": "img/a9.jpg"
}
]
},
{
"name": "大学同窗",
"nums": 16,
"id": 2,
"item": [
{
"id": "1000033",
"name": "苏醒",
"face": "img/a9.jpg"
},
{
"id": "10000333",
"name": "马云",
"face": "img/a8.jpg"
},
{
"id": "100003",
"name": "鬼脚七",
"face": "img/a7.jpg"
},
{
"id": "100004",
"name": "谢楠",
"face": "img/a6.jpg"
},
{
"id": "100005",
"name": "徐峥",
"face": "img/a5.jpg"
}
]
},
{
"name": "H+后台主题",
"nums": 38,
"id": 3,
"item": [
{
"id": "100006",
"name": "柏雪近在它香",
"face": "img/a4.jpg"
},
{
"id": "100007",
"name": "罗昌平",
"face": "img/a3.jpg"
},
{
"id": "100008",
"name": "Crystal影子",
"face": "img/a2.jpg"
},
{
"id": "100009",
"name": "艺小想",
"face": "img/a1.jpg"
},
{
"id": "100010",
"name": "天猫",
"face": "img/a8.jpg"
},
{
"id": "100011",
"name": "张泉灵",
"face": "img/a7.jpg"
}
]
}
]
}
{
"status": 1,
"msg": "ok",
"data": [
{
"name": "H+交流群",
"nums": 36,
"id": 1,
"item": [
{
"id": "101",
"name": "H+ Bug反馈",
"face": "http://tp2.sinaimg.cn/2211874245/180/40050524279/0"
},
{
"id": "102",
"name": "H+ 技术交流",
"face": "http://tp3.sinaimg.cn/1820711170/180/1286855219/1"
}
]
},
{
"name": "Bootstrap",
"nums": 16,
"id": 2,
"item": [
{
"id": "103",
"name": "Bootstrap中文",
"face": "http://tp2.sinaimg.cn/2211874245/180/40050524279/0"
},
{
"id": "104",
"name": "Bootstrap资源",
"face": "http://tp3.sinaimg.cn/1820711170/180/1286855219/1"
}
]
},
{
"name": "WebApp",
"nums": 106,
"id": 3,
"item": [
{
"id": "105",
"name": "移动开发",
"face": "http://tp2.sinaimg.cn/2211874245/180/40050524279/0"
},
{
"id": "106",
"name": "H5前言",
"face": "http://tp3.sinaimg.cn/1820711170/180/1286855219/1"
}
]
}
]
}
{
"status": 1,
"msg": "ok",
"data": [
{
"id": "100001",
"name": "無言的蒁説",
"face": "img/a1.jpg"
},
{
"id": "100002",
"name": "婷宝奢侈品",
"face": "img/a2.jpg"
},
{
"id": "100003",
"name": "忆恨思爱",
"face": "img/a3.jpg"
},
{
"id": "100004",
"name": "天涯奥拓慢",
"face": "img/a4.jpg"
},
{
"id": "100005",
"name": "雨落无声的天空",
"face": "img/a5.jpg"
},
{
"id": "100006",
"name": "李越LycorisRadiate",
"face": "img/a6.jpg"
},
{
"id": "100007",
"name": "冯胖妞张直丑",
"face": "img/a7.jpg"
},
{
"id": "100008",
"name": "陈龙hmmm",
"face": "img/a8.jpg"
},
{
"id": "100009",
"name": "别闹哥胆儿小",
"face": "img/a9.jpg"
},
{
"id": "100010",
"name": "锅锅锅锅萌哒哒 ",
"face": "img/a10.jpg"
}
]
}
/*
@Name: layim WebIM 1.0.0
@Author:贤心(子涵修改)
@Date: 2014-04-25
@Blog: http://sentsin.com
*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,input,button,textarea,p,blockquote,th,td,form{margin:0; padding:0;}
input,button,textarea,select,optgroup,option{font-family:inherit; font-size:inherit; font-style:inherit; font-weight:inherit; outline: 0;}
li{list-style:none;}
.xxim_icon, .xxim_main i, .layim_chatbox i{position:absolute;}
.loading{background:url(loading.gif) no-repeat center center;}
.layim_chatbox a, .layim_chatbox a:hover{color:#343434; text-decoration:none; }
.layim_zero{position:absolute; width:0; height:0; border-style:dashed; border-color:transparent; overflow:hidden;}
.xxim_main{position:fixed; right:1px; bottom:1px; width:230px; border:1px solid #BEBEBE; background-color:#fff; font-size:12px; box-shadow: 0 0 10px rgba(0,0,0,.2); z-index:99999999}
.layim_chatbox textarea{resize:none;}
.xxim_main em, .xxim_main i, .layim_chatbox em, .layim_chatbox i{font-style:normal; font-weight:400;}
.xxim_main h5{font-size:100%; font-weight:400;}
/* 搜索栏 */
.xxim_search{position:relative; padding-left:40px; height:40px; border-bottom:1px solid #DCDCDC; background-color:#fff;}
.xxim_search i{left:10px; top:12px; width:16px; height:16px;font-size: 16px;color:#999;}
.xxim_search input{border:none; background:none; width: 180px; margin-top:10px; line-height:20px;}
.xxim_search span{display:none; position:absolute; right:10px; top:10px; height:18px; line-height:18px;width:18px;text-align: center;background-color:#AFAFAF; color:#fff; cursor:pointer; border-radius:2px; font-size:12px; font-weight:900;}
.xxim_search span:hover{background-color:#FCBE00;}
/* 主面板tab */
.xxim_tabs{height:45px; border-bottom:1px solid #DBDBDB; background-color:#F4F4F4; font-size:0;}
.xxim_tabs span{position:relative; display:inline-block; *display:inline; *zoom:1; vertical-align:top; width:76px; height:45px; border-right:1px solid #DBDBDB; cursor:pointer; font-size:12px;}
.xxim_tabs span i{top:12px; left:50%; width:20px; margin-left:-10px; height:20px;font-size:20px;color:#ccc;}
.xxim_tabs .xxim_tabnow{height:46px; background-color:#fff;}
.xxim_tabs .xxim_tabnow i{color:#1ab394;}
.xxim_tabs .xxim_latechat{border-right:none;}
.xxim_tabs .xxim_tabfriend i{width:14px; margin-left:-7px;}
/* 主面板列表 */
.xxim_list{display:none; height:350px; padding:5px 0; overflow:hidden;}
.xxim_list:hover{ overflow-y:auto;}
.xxim_list h5{position:relative; padding-left:32px; height:26px; line-height:26px; cursor:pointer; color:#000; font-size:0;}
.xxim_list h5 span{display:inline-block; *display:inline; *zoom:1; vertical-align:top; max-width:140px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; font-size:12px;}
.xxim_list h5 i{left:15px; top:8px; width:10px; height:10px;font-size:10px;color:#666;}
.xxim_list h5 *{font-size:12px;}
.xxim_list .xxim_chatlist{display:none;}
.xxim_list .xxim_liston h5 i{width:8px; height:7px;}
.xxim_list .xxim_liston .xxim_chatlist{display:block;}
.xxim_chatlist {}
.xxim_chatlist li{position:relative; height:40px; line-height:30px; padding:5px 10px; font-size:0; cursor:pointer;}
.xxim_chatlist li:hover{background-color:#F2F4F8}
.xxim_chatlist li *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}
.xxim_chatlist li span{padding-left:10px; max-width:120px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
.xxim_chatlist li img{width:30px; height:30px;}
.xxim_chatlist li .xxim_time{position:absolute; right:10px; color:#999;}
.xxim_list .xxim_errormsg{text-align:center; margin:50px 0; color:#999;}
.xxim_searchmain{position:absolute; width:230px; height:491px; left:0; top:41px; z-index:10; background-color:#fff;}
/* 主面板底部 */
.xxim_bottom{height:34px; border-top:1px solid #D0DCF3; background-color:#F2F4F8;}
.xxim_expend{border-left:1px solid #D0DCF3; border-bottom:1px solid #D0DCF3;}
.xxim_bottom li{position:relative; width:50px; height:32px; line-height:32px; float:left; border-right:1px solid #D0DCF3; cursor:pointer;}
.xxim_bottom li i{ top:9px;}
.xxim_bottom .xxim_hide{border-right:none;}
.xxim_bottom .xxim_online{width:72px; padding-left:35px;}
.xxim_online i{left:13px; width:14px; height:14px;font-size:14px;color:#FFA00A;}
.xxim_setonline{display:none; position:absolute; left:-79px; bottom:-1px; border:1px solid #DCDCDC; background-color:#fff;}
.xxim_setonline span{position:relative; display:block; width:32px;width: 77px; padding:0 10px 0 35px;}
.xxim_setonline span:hover{background-color:#F2F4F8;}
.xxim_offline .xxim_nowstate, .xxim_setoffline i{color:#999;}
.xxim_mymsg i{left:18px; width:14px; height:14px;font-size: 14px;}
.xxim_mymsg a{position:absolute; left:0; top:0; width:50px; height:32px;}
.xxim_seter i{left:18px; width:14px; height:14px;font-size: 14px;}
.xxim_hide i{left:18px; width:14px; height:14px;font-size: 14px;}
.xxim_show i{}
.xxim_bottom .xxim_on{position:absolute; left:-17px; top:50%; width:16px;text-align: center;color:#999;line-height: 97px; height:97px; margin-top:-49px;border:solid 1px #BEBEBE;border-right: none; background:#F2F4F8;}
.xxim_bottom .xxim_off{}
/* 聊天窗口 */
.layim_chatbox{width:620px; border:1px solid #BEBEBE; background-color:#fff; font-size:12px; box-shadow: 0 0 10px rgba(0,0,0,.2);}
.layim_chatbox h6{position:relative; height:40px; border-bottom:1px solid #D9D9D9; background-color:#FCFDFA}
.layim_move{position:absolute; height:40px; width: 620px; z-index:0;}
.layim_face{position:absolute; bottom:-1px; left:10px; width:64px; height:64px;padding:1px;background: #fff; border:1px solid #ccc;}
.layim_face img{width:60px; height:60px;}
.layim_names{position:absolute; left:90px; max-width:300px; line-height:40px; color:#000; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; font-size:14px;}
.layim_rightbtn{position:absolute; right:15px; top:12px; font-size:20px;}
.layim_rightbtn i{position:relative; width:16px; height:16px; display:inline-block; *display:inline; *zoom:1; vertical-align:top; cursor:pointer; transition: all .3s;text-align: center;line-height: 16px;}
.layim_rightbtn .layim_close{background: #FFA00A;color:#fff;}
.layim_rightbtn .layim_close:hover{-webkit-transform: rotate(180deg); -moz-transform: rotate(180deg);}
.layim_rightbtn .layer_setmin{margin-right:5px;color:#999;font-size:14px;font-weight: 700;}
.layim_chat, .layim_chatmore,.layim_groups{height:450px; overflow:hidden;}
.layim_chatmore{display:none; float:left; width:135px; border-right:1px solid #BEBEBE; background-color:#F2F2F2}
.layim_chatlist li, .layim_groups li{position:relative; height:30px; line-height:30px; padding:0 10px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; cursor:pointer;}
.layim_chatlist li{padding:0 20px 0 10px;}
.layim_chatlist li:hover{background-color:#E3E3E3;}
.layim_chatlist li span{display:inline-block; *display:inline; *zoom:1; vertical-align:top; width:90px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
.layim_chatlist li em{display:none; position:absolute; top:6px; right:10px; height:18px; line-height:18px;width:18px;text-align: center;font-size:14px;font-weight:900; border-radius:3px;}
.layim_chatlist li em:hover{background-color: #FCBE00; color:#fff;}
.layim_chatlist .layim_chatnow,.layim_chatlist .layim_chatnow:hover{/*border-top:1px solid #D9D9D9; border-bottom:1px solid #D9D9D9;*/ background-color:#fff;}
.layim_chat{}
.layim_chatarea{height:280px;}
.layim_chatview{display:none; height:280px; overflow:hidden;}
.layim_chatmore:hover, .layim_groups:hover, .layim_chatview:hover{overflow-y:auto;}
.layim_chatview li{margin-bottom:10px; clear:both; *zoom:1;}
.layim_chatview li:after{content:'\20'; clear:both; *zoom:1; display:block; height:0;}
.layim_chatthis{display:block;}
.layim_chatuser{float:left; padding:15px; font-size:0;}
.layim_chatuser *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; line-height:30px; font-size:12px; padding-right:10px;}
.layim_chatuser img{width:30px; height:30px;padding-right: 0;margin-right: 15px;}
.layim_chatuser .layim_chatname{max-width:230px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
.layim_chatuser .layim_chattime{color:#999; padding-left:10px;}
.layim_chatsay{position:relative; float:left; margin:0 15px; padding:10px; line-height:20px; background-color:#F3F3F3; border-radius:3px; clear:both;}
.layim_chatsay .layim_zero{left:5px; top:-8px; border-width:8px; border-right-style:solid; border-right-color:#F3F3F3;}
.layim_chateme .layim_chatuser{float:right;}
.layim_chateme .layim_chatuser *{padding-right:0; padding-left:10px;}
.layim_chateme .layim_chatuser img{margin-left:15px;padding-left: 0;}
.layim_chateme .layim_chatsay .layim_zero{left:auto; right:10px;}
.layim_chateme .layim_chatuser .layim_chattime{padding-left:0; padding-right:10px;}
.layim_chateme .layim_chatsay{float:right; background-color:#EBFBE3}
.layim_chateme .layim_zero{border-right-color:#EBFBE3;}
.layim_groups{display:none; float:right; width:130px; border-left:1px solid #D9D9D9; background-color:#fff;}
.layim_groups ul{display:none;}
.layim_groups ul.layim_groupthis{display:block;}
.layim_groups li *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; margin-right:10px;}
.layim_groups li img{width:20px; height:20px; margin-top:5px;}
.layim_groups li span{max-width:80px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap;}
.layim_groups li:hover{background-color:#F3F3F3;}
.layim_groups .layim_errors{text-align:center; color:#999;}
.layim_tool{position:relative; height:35px; line-height:35px; padding-left:10px; background-color:#F3F3F3;}
.layim_tool i{position:relative; top:10px; display:inline-block; *display:inline; *zoom:1; vertical-align:top; width:16px; height:16px; margin-right:10px; cursor:pointer;font-size:16px;color:#999;font-weight: 700;}
.layim_tool i:hover{color:#FFA00A;}
.layim_tool .layim_seechatlog{position:absolute; right:15px;}
.layim_tool .layim_seechatlog i{}
.layim_write{display:block; border:none; width:98%; height:90px; line-height:20px; margin:5px auto 0;}
.layim_send{position:relative; height:40px; background-color:#F3F3F3;}
.layim_sendbtn{position:absolute; height:26px; line-height:26px; right:10px; top:8px; padding:0 40px 0 20px; background-color:#FFA00A; color:#fff; border-radius:3px; cursor:pointer;}
.layim_enter{position:absolute; right:0; border-left:1px solid #FFB94F; width:24px; height:26px;}
.layim_enter:hover{background-color:#E68A00; border-radius:0 3px 3px 0;}
.layim_enter .layim_zero{left:7px; top:11px; border-width:5px; border-top-style:solid; border-top-color:#FFE0B3;}
.layim_sendtype{display:none; position:absolute; right:10px; bottom:37px; border:1px solid #D9D9D9; background-color:#fff; text-align:left;}
.layim_sendtype span{display:block; line-height:24px; padding:0 10px 0 25px; cursor:pointer;}
.layim_sendtype span:hover{background-color:#F3F3F3;}
.layim_sendtype span i{left:5px;}
.layim_min{display:none; position:absolute; left:-190px; bottom:-1px; width:160px; height:32px; line-height:32px; padding:0 10px; overflow:hidden; text-overflow: ellipsis; white-space:nowrap; border:1px solid #ccc; box-shadow: 0 0 5px rgba(0,0,75,.2); background-color:#FCFDFA; cursor:pointer;}
/*
@Name: layui WebIM 1.0.0
@Author:贤心
@Date: 2014-04-25
@Blog: http://sentsin.com
*/
;!function(win, undefined){
var config = {
msgurl: 'mailbox.html?msg=',
chatlogurl: 'mailbox.html?user=',
aniTime: 200,
right: -232,
api: {
friend: 'js/plugins/layer/layim/data/friend.json', //好友列表接口
group: 'js/plugins/layer/layim/data/group.json', //群组列表接口
chatlog: 'js/plugins/layer/layim/data/chatlog.json', //聊天记录接口
groups: 'js/plugins/layer/layim/data/groups.json', //群组成员接口
sendurl: '' //发送消息接口
},
user: { //当前用户信息
name: '游客',
face: 'img/a1.jpg'
},
//自动回复内置文案,也可动态读取数据库配置
autoReplay: [
'您好,我现在有事不在,一会再和您联系。',
'你没发错吧?',
'洗澡中,请勿打扰,偷窥请购票,个体四十,团体八折,订票电话:一般人我不告诉他!',
'你好,我是主人的美女秘书,有什么事就跟我说吧,等他回来我会转告他的。',
'我正在拉磨,没法招呼您,因为我们家毛驴去动物保护协会把我告了,说我剥夺它休产假的权利。',
'<(@ ̄︶ ̄@)>',
'你要和我说话?你真的要和我说话?你确定自己想说吗?你一定非说不可吗?那你说吧,这是自动回复。',
'主人正在开机自检,键盘鼠标看好机会出去凉快去了,我是他的电冰箱,我打字比较慢,你慢慢说,别急……',
'(*^__^*) 嘻嘻,是贤心吗?'
],
chating: {},
hosts: (function(){
var dk = location.href.match(/\:\d+/);
dk = dk ? dk[0] : '';
return 'http://' + document.domain + dk + '/';
})(),
json: function(url, data, callback, error){
return $.ajax({
type: 'POST',
url: url,
data: data,
dataType: 'json',
success: callback,
error: error
});
},
stopMP: function(e){
e ? e.stopPropagation() : e.cancelBubble = true;
}
}, dom = [$(window), $(document), $('html'), $('body')], xxim = {};
//主界面tab
xxim.tabs = function(index){
var node = xxim.node;
node.tabs.eq(index).addClass('xxim_tabnow').siblings().removeClass('xxim_tabnow');
node.list.eq(index).show().siblings('.xxim_list').hide();
if(node.list.eq(index).find('li').length === 0){
xxim.getDates(index);
}
};
//节点
xxim.renode = function(){
var node = xxim.node = {
tabs: $('#xxim_tabs>span'),
list: $('.xxim_list'),
online: $('.xxim_online'),
setonline: $('.xxim_setonline'),
onlinetex: $('#xxim_onlinetex'),
xximon: $('#xxim_on'),
layimFooter: $('#xxim_bottom'),
xximHide: $('#xxim_hide'),
xximSearch: $('#xxim_searchkey'),
searchMian: $('#xxim_searchmain'),
closeSearch: $('#xxim_closesearch'),
layimMin: $('#layim_min')
};
};
//主界面缩放
xxim.expend = function(){
var node = xxim.node;
if(xxim.layimNode.attr('state') !== '1'){
xxim.layimNode.stop().animate({right: config.right}, config.aniTime, function(){
node.xximon.addClass('xxim_off');
try{
localStorage.layimState = 1;
}catch(e){}
xxim.layimNode.attr({state: 1});
node.layimFooter.addClass('xxim_expend').stop().animate({marginLeft: config.right}, config.aniTime/2);
node.xximHide.addClass('xxim_show');
});
} else {
xxim.layimNode.stop().animate({right: 1}, config.aniTime, function(){
node.xximon.removeClass('xxim_off');
try{
localStorage.layimState = 2;
}catch(e){}
xxim.layimNode.removeAttr('state');
node.layimFooter.removeClass('xxim_expend');
node.xximHide.removeClass('xxim_show');
});
node.layimFooter.stop().animate({marginLeft: 0}, config.aniTime);
}
};
//初始化窗口格局
xxim.layinit = function(){
var node = xxim.node;
//主界面
try{
/*
if(!localStorage.layimState){
config.aniTime = 0;
localStorage.layimState = 1;
}
*/
if(localStorage.layimState === '1'){
xxim.layimNode.attr({state: 1}).css({right: config.right});
node.xximon.addClass('xxim_off');
node.layimFooter.addClass('xxim_expend').css({marginLeft: config.right});
node.xximHide.addClass('xxim_show');
}
}catch(e){
//layer.msg(e.message, 5, -1);
}
};
//聊天窗口
xxim.popchat = function(param){
var node = xxim.node, log = {};
log.success = function(layero){
layer.setMove();
xxim.chatbox = layero.find('#layim_chatbox');
log.chatlist = xxim.chatbox.find('.layim_chatmore>ul');
log.chatlist.html('<li data-id="'+ param.id +'" type="'+ param.type +'" id="layim_user'+ param.type + param.id +'"><span>'+ param.name +'</span><em>×</em></li>')
xxim.tabchat(param, xxim.chatbox);