diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cb9a91d..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/target -/.idea -/cachedata -/logs diff --git a/fiction_hourse.iml b/fiction_hourse.iml deleted file mode 100644 index b61e1e0..0000000 --- a/fiction_hourse.iml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 371d20e..0000000 --- a/pom.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.0.1.RELEASE - - - xyz.zinglizingli - fiction_hourse - 1.3.0 - fiction_hourse - 小说精品楼 - - - - UTF-8 - UTF-8 - 1.8 - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.boot - spring-boot-starter-cache - - - net.sf.ehcache - ehcache - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - - - com.github.pagehelper - pagehelper-spring-boot-starter - 1.2.5 - - - com.cuisongliu - orderbyhelper-spring-boot-starter - 1.0.2 - - - - mysql - mysql-connector-java - 8.0.11 - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.3.2 - - - - - - org.apache.httpcomponents - httpcore - 4.4.10 - - - - - org.apache.httpcomponents - httpclient - 4.5.6 - - - - org.springframework.boot - spring-boot-starter-mail - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - - alimaven - aliyun maven - http://maven.aliyun.com/nexus/content/groups/public/ - - - - - - diff --git a/src/main/java/xyz/zinglizingli/BookApplication.java b/src/main/java/xyz/zinglizingli/BookApplication.java deleted file mode 100644 index 5db3b5f..0000000 --- a/src/main/java/xyz/zinglizingli/BookApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -package xyz.zinglizingli; - -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.context.annotation.Bean; -import org.springframework.scheduling.TaskScheduler; -import org.springframework.scheduling.annotation.EnableScheduling; -import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; - -@SpringBootApplication -@EnableCaching -@EnableScheduling -@MapperScan({"xyz.zinglizingli.*.mapper"}) -public class BookApplication { - - public static void main(String[] args) { - - - SpringApplication.run(BookApplication.class, args); - } - - /** - * 解决同一时间只能一个定时任务执行的问题 - * */ - @Bean - public TaskScheduler taskScheduler() { - ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler(); - taskScheduler.setPoolSize(5); - return taskScheduler; - } - -} diff --git a/src/main/java/xyz/zinglizingli/books/constant/CacheKeyConstans.java b/src/main/java/xyz/zinglizingli/books/constant/CacheKeyConstans.java deleted file mode 100644 index 898daf7..0000000 --- a/src/main/java/xyz/zinglizingli/books/constant/CacheKeyConstans.java +++ /dev/null @@ -1,10 +0,0 @@ -package xyz.zinglizingli.books.constant; - -public class CacheKeyConstans { - public static final String HOT_BOOK_LIST_KEY = "hotBookListKey"; - public static final String NEWST_BOOK_LIST_KEY = "newstBookListKey"; - public static final String BOOK_CONTENT_KEY_PREFIX = "bookContentKeyPrefix"; - public static final String EMAIL_URL_PREFIX_KEY = "emailUrlPrefixKey"; - public static final String RANDOM_NEWS_CONTENT_KEY = "randomNewsContentKey"; - public static final String REC_BOOK_LIST_KEY = "recBookListKey"; -} diff --git a/src/main/java/xyz/zinglizingli/books/mapper/BookContentMapper.java b/src/main/java/xyz/zinglizingli/books/mapper/BookContentMapper.java deleted file mode 100644 index f389b28..0000000 --- a/src/main/java/xyz/zinglizingli/books/mapper/BookContentMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -package xyz.zinglizingli.books.mapper; - -import org.apache.ibatis.annotations.Param; -import xyz.zinglizingli.books.po.BookContent; -import xyz.zinglizingli.books.po.BookContentExample; - -import java.util.List; - -public interface BookContentMapper { - int countByExample(BookContentExample example); - - int deleteByExample(BookContentExample example); - - int deleteByPrimaryKey(Long id); - - int insert(BookContent record); - - int insertSelective(BookContent record); - - List selectByExample(BookContentExample example); - - BookContent selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") BookContent record, @Param("example") BookContentExample example); - - int updateByExample(@Param("record") BookContent record, @Param("example") BookContentExample example); - - int updateByPrimaryKeySelective(BookContent record); - - int updateByPrimaryKey(BookContent record); - - void insertBatch(List bookContent); -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/mapper/BookIndexMapper.java b/src/main/java/xyz/zinglizingli/books/mapper/BookIndexMapper.java deleted file mode 100644 index ac52e37..0000000 --- a/src/main/java/xyz/zinglizingli/books/mapper/BookIndexMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -package xyz.zinglizingli.books.mapper; - -import org.apache.ibatis.annotations.Param; -import xyz.zinglizingli.books.po.Book; -import xyz.zinglizingli.books.po.BookIndex; -import xyz.zinglizingli.books.po.BookIndexExample; - -import java.util.List; -import java.util.Map; - -public interface BookIndexMapper { - int countByExample(BookIndexExample example); - - int deleteByExample(BookIndexExample example); - - int deleteByPrimaryKey(Long id); - - int insert(BookIndex record); - - int insertSelective(BookIndex record); - - List selectByExample(BookIndexExample example); - - BookIndex selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") BookIndex record, @Param("example") BookIndexExample example); - - int updateByExample(@Param("record") BookIndex record, @Param("example") BookIndexExample example); - - int updateByPrimaryKeySelective(BookIndex record); - - int updateByPrimaryKey(BookIndex record); - - void insertBatch(List bookIndex); - - String queryNewstIndexName(@Param("bookId") Long bookId); - - -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/mapper/BookMapper.java b/src/main/java/xyz/zinglizingli/books/mapper/BookMapper.java deleted file mode 100644 index 142ee95..0000000 --- a/src/main/java/xyz/zinglizingli/books/mapper/BookMapper.java +++ /dev/null @@ -1,50 +0,0 @@ -package xyz.zinglizingli.books.mapper; - -import org.apache.ibatis.annotations.Param; -import xyz.zinglizingli.books.po.Book; -import xyz.zinglizingli.books.po.BookExample; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -public interface BookMapper { - int countByExample(BookExample example); - - int deleteByExample(BookExample example); - - int deleteByPrimaryKey(Long id); - - int insert(Book record); - - int insertSelective(Book record); - - List selectByExample(BookExample example); - - Book selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") Book record, @Param("example") BookExample example); - - int updateByExample(@Param("record") Book record, @Param("example") BookExample example); - - int updateByPrimaryKeySelective(Book record); - - int updateByPrimaryKey(Book record); - - List search(@Param("userId") String userId, @Param("ids") String ids, @Param("keyword") String keyword, @Param("catId") Integer catId, @Param("softCat") Integer softCat,@Param("softTag") String softTag, @Param("bookStatus") String bookStatus); - - void addVisitCount(@Param("bookId") Long bookId); - - Book queryRandomBook(); - - Book queryNewstBook(Set sendIds); - - List queryNewstBookIdList(); - - List queryEndBookIdList(); - - /** - * 查询推荐书籍数据 - * */ - List queryRecBooks(List> configMap); -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/mapper/CategoryMapper.java b/src/main/java/xyz/zinglizingli/books/mapper/CategoryMapper.java deleted file mode 100644 index 1a72f1b..0000000 --- a/src/main/java/xyz/zinglizingli/books/mapper/CategoryMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package xyz.zinglizingli.books.mapper; - -import org.apache.ibatis.annotations.Param; -import xyz.zinglizingli.books.po.Category; -import xyz.zinglizingli.books.po.CategoryExample; - -import java.util.List; - -public interface CategoryMapper { - int countByExample(CategoryExample example); - - int deleteByExample(CategoryExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(Category record); - - int insertSelective(Category record); - - List selectByExample(CategoryExample example); - - Category selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") Category record, @Param("example") CategoryExample example); - - int updateByExample(@Param("record") Category record, @Param("example") CategoryExample example); - - int updateByPrimaryKeySelective(Category record); - - int updateByPrimaryKey(Category record); -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/mapper/ScreenBulletMapper.java b/src/main/java/xyz/zinglizingli/books/mapper/ScreenBulletMapper.java deleted file mode 100644 index dbf56ac..0000000 --- a/src/main/java/xyz/zinglizingli/books/mapper/ScreenBulletMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package xyz.zinglizingli.books.mapper; - -import org.apache.ibatis.annotations.Param; -import xyz.zinglizingli.books.po.ScreenBullet; -import xyz.zinglizingli.books.po.ScreenBulletExample; - -import java.util.List; - -public interface ScreenBulletMapper { - int countByExample(ScreenBulletExample example); - - int deleteByExample(ScreenBulletExample example); - - int deleteByPrimaryKey(Long id); - - int insert(ScreenBullet record); - - int insertSelective(ScreenBullet record); - - List selectByExample(ScreenBulletExample example); - - ScreenBullet selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") ScreenBullet record, @Param("example") ScreenBulletExample example); - - int updateByExample(@Param("record") ScreenBullet record, @Param("example") ScreenBulletExample example); - - int updateByPrimaryKeySelective(ScreenBullet record); - - int updateByPrimaryKey(ScreenBullet record); -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/mapper/UserMapper.java b/src/main/java/xyz/zinglizingli/books/mapper/UserMapper.java deleted file mode 100644 index a38478a..0000000 --- a/src/main/java/xyz/zinglizingli/books/mapper/UserMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package xyz.zinglizingli.books.mapper; - -import org.apache.ibatis.annotations.Param; -import xyz.zinglizingli.books.po.User; -import xyz.zinglizingli.books.po.UserExample; - -import java.util.List; - -public interface UserMapper { - int countByExample(UserExample example); - - int deleteByExample(UserExample example); - - int deleteByPrimaryKey(Long id); - - int insert(User record); - - int insertSelective(User record); - - List selectByExample(UserExample example); - - User selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example); - - int updateByExample(@Param("record") User record, @Param("example") UserExample example); - - int updateByPrimaryKeySelective(User record); - - int updateByPrimaryKey(User record); -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/mapper/UserRefBookMapper.java b/src/main/java/xyz/zinglizingli/books/mapper/UserRefBookMapper.java deleted file mode 100644 index 34414b1..0000000 --- a/src/main/java/xyz/zinglizingli/books/mapper/UserRefBookMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package xyz.zinglizingli.books.mapper; - -import org.apache.ibatis.annotations.Param; -import xyz.zinglizingli.books.po.UserRefBook; -import xyz.zinglizingli.books.po.UserRefBookExample; - -import java.util.List; - -public interface UserRefBookMapper { - int countByExample(UserRefBookExample example); - - int deleteByExample(UserRefBookExample example); - - int deleteByPrimaryKey(Long id); - - int insert(UserRefBook record); - - int insertSelective(UserRefBook record); - - List selectByExample(UserRefBookExample example); - - UserRefBook selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") UserRefBook record, @Param("example") UserRefBookExample example); - - int updateByExample(@Param("record") UserRefBook record, @Param("example") UserRefBookExample example); - - int updateByPrimaryKeySelective(UserRefBook record); - - int updateByPrimaryKey(UserRefBook record); -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/Book.java b/src/main/java/xyz/zinglizingli/books/po/Book.java deleted file mode 100644 index ea8f628..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/Book.java +++ /dev/null @@ -1,149 +0,0 @@ -package xyz.zinglizingli.books.po; - - -import java.io.Serializable; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - -public class Book implements Serializable{ - - private Long id; - - private Integer catid; - - private String picUrl; - - private String bookName; - - private String author; - - private String bookDesc; - - private Float score; - - private String bookStatus; - - private Long visitCount; - - private Date updateTime; - - private String updateTimeStr; - - private Integer softCat; - - private String softTag; - - public Integer getSoftCat() { - return softCat; - } - - public void setSoftCat(Integer softCat) { - this.softCat = softCat; - } - - public String getSoftTag() { - return softTag; - } - - public void setSoftTag(String softTag) { - this.softTag = softTag; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getCatid() { - return catid; - } - - public void setCatid(Integer catid) { - this.catid = catid; - } - - public String getPicUrl() { - return picUrl; - } - - public void setPicUrl(String picUrl) { - this.picUrl = picUrl == null ? null : picUrl.trim(); - } - - public String getBookName() { - return bookName; - } - - public void setBookName(String bookName) { - this.bookName = bookName == null ? null : bookName.trim(); - } - - public String getAuthor() { - return author; - } - - public void setAuthor(String author) { - this.author = author == null ? null : author.trim(); - } - - public String getBookDesc() { - return bookDesc; - } - - public void setBookDesc(String bookDesc) { - this.bookDesc = bookDesc == null ? null : bookDesc.trim(); - } - - public Float getScore() { - return score; - } - - public void setScore(Float score) { - this.score = score; - } - - public String getBookStatus() { - return bookStatus; - } - - public void setBookStatus(String bookStatus) { - this.bookStatus = bookStatus == null ? null : bookStatus.trim(); - } - - public Long getVisitCount() { - return visitCount; - } - - public void setVisitCount(Long visitCount) { - this.visitCount = visitCount; - } - - public Date getUpdateTime() - { - SimpleDateFormat format = new SimpleDateFormat(); - try { - if(this.updateTimeStr != null) { - updateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(this.updateTimeStr); - } - } catch (ParseException e) { - e.printStackTrace(); - } - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - public String getUpdateTimeStr() { - return updateTimeStr; - } - - public void setUpdateTimeStr(String updateTimeStr) { - this.updateTimeStr = updateTimeStr; - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/BookContent.java b/src/main/java/xyz/zinglizingli/books/po/BookContent.java deleted file mode 100644 index 47e748d..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/BookContent.java +++ /dev/null @@ -1,55 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.io.Serializable; - -public class BookContent implements Serializable { - private Long id; - - private Long bookId; - - private Long indexId; - - private Integer indexNum; - - private String content; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getBookId() { - return bookId; - } - - public void setBookId(Long bookId) { - this.bookId = bookId; - } - - public Long getIndexId() { - return indexId; - } - - public void setIndexId(Long indexId) { - this.indexId = indexId; - } - - public Integer getIndexNum() { - return indexNum; - } - - public void setIndexNum(Integer indexNum) { - this.indexNum = indexNum; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content == null ? null : content.trim(); - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/BookContentExample.java b/src/main/java/xyz/zinglizingli/books/po/BookContentExample.java deleted file mode 100644 index b3d08f5..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/BookContentExample.java +++ /dev/null @@ -1,510 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.util.ArrayList; -import java.util.List; - -public class BookContentExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public BookContentExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andBookIdIsNull() { - addCriterion("book_id is null"); - return (Criteria) this; - } - - public Criteria andBookIdIsNotNull() { - addCriterion("book_id is not null"); - return (Criteria) this; - } - - public Criteria andBookIdEqualTo(Long value) { - addCriterion("book_id =", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotEqualTo(Long value) { - addCriterion("book_id <>", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdGreaterThan(Long value) { - addCriterion("book_id >", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdGreaterThanOrEqualTo(Long value) { - addCriterion("book_id >=", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdLessThan(Long value) { - addCriterion("book_id <", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdLessThanOrEqualTo(Long value) { - addCriterion("book_id <=", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdIn(List values) { - addCriterion("book_id in", values, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotIn(List values) { - addCriterion("book_id not in", values, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdBetween(Long value1, Long value2) { - addCriterion("book_id between", value1, value2, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotBetween(Long value1, Long value2) { - addCriterion("book_id not between", value1, value2, "bookId"); - return (Criteria) this; - } - - public Criteria andIndexIdIsNull() { - addCriterion("index_id is null"); - return (Criteria) this; - } - - public Criteria andIndexIdIsNotNull() { - addCriterion("index_id is not null"); - return (Criteria) this; - } - - public Criteria andIndexIdEqualTo(Long value) { - addCriterion("index_id =", value, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdNotEqualTo(Long value) { - addCriterion("index_id <>", value, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdGreaterThan(Long value) { - addCriterion("index_id >", value, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdGreaterThanOrEqualTo(Long value) { - addCriterion("index_id >=", value, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdLessThan(Long value) { - addCriterion("index_id <", value, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdLessThanOrEqualTo(Long value) { - addCriterion("index_id <=", value, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdIn(List values) { - addCriterion("index_id in", values, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdNotIn(List values) { - addCriterion("index_id not in", values, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdBetween(Long value1, Long value2) { - addCriterion("index_id between", value1, value2, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexIdNotBetween(Long value1, Long value2) { - addCriterion("index_id not between", value1, value2, "indexId"); - return (Criteria) this; - } - - public Criteria andIndexNumIsNull() { - addCriterion("index_num is null"); - return (Criteria) this; - } - - public Criteria andIndexNumIsNotNull() { - addCriterion("index_num is not null"); - return (Criteria) this; - } - - public Criteria andIndexNumEqualTo(Integer value) { - addCriterion("index_num =", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumNotEqualTo(Integer value) { - addCriterion("index_num <>", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumGreaterThan(Integer value) { - addCriterion("index_num >", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumGreaterThanOrEqualTo(Integer value) { - addCriterion("index_num >=", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumLessThan(Integer value) { - addCriterion("index_num <", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumLessThanOrEqualTo(Integer value) { - addCriterion("index_num <=", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumIn(List values) { - addCriterion("index_num in", values, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumNotIn(List values) { - addCriterion("index_num not in", values, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumBetween(Integer value1, Integer value2) { - addCriterion("index_num between", value1, value2, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumNotBetween(Integer value1, Integer value2) { - addCriterion("index_num not between", value1, value2, "indexNum"); - return (Criteria) this; - } - - public Criteria andContentIsNull() { - addCriterion("content is null"); - return (Criteria) this; - } - - public Criteria andContentIsNotNull() { - addCriterion("content is not null"); - return (Criteria) this; - } - - public Criteria andContentEqualTo(String value) { - addCriterion("content =", value, "content"); - return (Criteria) this; - } - - public Criteria andContentNotEqualTo(String value) { - addCriterion("content <>", value, "content"); - return (Criteria) this; - } - - public Criteria andContentGreaterThan(String value) { - addCriterion("content >", value, "content"); - return (Criteria) this; - } - - public Criteria andContentGreaterThanOrEqualTo(String value) { - addCriterion("content >=", value, "content"); - return (Criteria) this; - } - - public Criteria andContentLessThan(String value) { - addCriterion("content <", value, "content"); - return (Criteria) this; - } - - public Criteria andContentLessThanOrEqualTo(String value) { - addCriterion("content <=", value, "content"); - return (Criteria) this; - } - - public Criteria andContentLike(String value) { - addCriterion("content like", value, "content"); - return (Criteria) this; - } - - public Criteria andContentNotLike(String value) { - addCriterion("content not like", value, "content"); - return (Criteria) this; - } - - public Criteria andContentIn(List values) { - addCriterion("content in", values, "content"); - return (Criteria) this; - } - - public Criteria andContentNotIn(List values) { - addCriterion("content not in", values, "content"); - return (Criteria) this; - } - - public Criteria andContentBetween(String value1, String value2) { - addCriterion("content between", value1, value2, "content"); - return (Criteria) this; - } - - public Criteria andContentNotBetween(String value1, String value2) { - addCriterion("content not between", value1, value2, "content"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/BookExample.java b/src/main/java/xyz/zinglizingli/books/po/BookExample.java deleted file mode 100644 index 9eba411..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/BookExample.java +++ /dev/null @@ -1,851 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class BookExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public BookExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andCatidIsNull() { - addCriterion("catId is null"); - return (Criteria) this; - } - - public Criteria andCatidIsNotNull() { - addCriterion("catId is not null"); - return (Criteria) this; - } - - public Criteria andCatidEqualTo(Integer value) { - addCriterion("catId =", value, "catid"); - return (Criteria) this; - } - - public Criteria andCatidNotEqualTo(Integer value) { - addCriterion("catId <>", value, "catid"); - return (Criteria) this; - } - - public Criteria andCatidGreaterThan(Integer value) { - addCriterion("catId >", value, "catid"); - return (Criteria) this; - } - - public Criteria andCatidGreaterThanOrEqualTo(Integer value) { - addCriterion("catId >=", value, "catid"); - return (Criteria) this; - } - - public Criteria andCatidLessThan(Integer value) { - addCriterion("catId <", value, "catid"); - return (Criteria) this; - } - - public Criteria andCatidLessThanOrEqualTo(Integer value) { - addCriterion("catId <=", value, "catid"); - return (Criteria) this; - } - - public Criteria andCatidIn(List values) { - addCriterion("catId in", values, "catid"); - return (Criteria) this; - } - - public Criteria andCatidNotIn(List values) { - addCriterion("catId not in", values, "catid"); - return (Criteria) this; - } - - public Criteria andCatidBetween(Integer value1, Integer value2) { - addCriterion("catId between", value1, value2, "catid"); - return (Criteria) this; - } - - public Criteria andCatidNotBetween(Integer value1, Integer value2) { - addCriterion("catId not between", value1, value2, "catid"); - return (Criteria) this; - } - - public Criteria andPicUrlIsNull() { - addCriterion("pic_url is null"); - return (Criteria) this; - } - - public Criteria andPicUrlIsNotNull() { - addCriterion("pic_url is not null"); - return (Criteria) this; - } - - public Criteria andPicUrlEqualTo(String value) { - addCriterion("pic_url =", value, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlNotEqualTo(String value) { - addCriterion("pic_url <>", value, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlGreaterThan(String value) { - addCriterion("pic_url >", value, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlGreaterThanOrEqualTo(String value) { - addCriterion("pic_url >=", value, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlLessThan(String value) { - addCriterion("pic_url <", value, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlLessThanOrEqualTo(String value) { - addCriterion("pic_url <=", value, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlLike(String value) { - addCriterion("pic_url like", value, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlNotLike(String value) { - addCriterion("pic_url not like", value, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlIn(List values) { - addCriterion("pic_url in", values, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlNotIn(List values) { - addCriterion("pic_url not in", values, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlBetween(String value1, String value2) { - addCriterion("pic_url between", value1, value2, "picUrl"); - return (Criteria) this; - } - - public Criteria andPicUrlNotBetween(String value1, String value2) { - addCriterion("pic_url not between", value1, value2, "picUrl"); - return (Criteria) this; - } - - public Criteria andBookNameIsNull() { - addCriterion("book_name is null"); - return (Criteria) this; - } - - public Criteria andBookNameIsNotNull() { - addCriterion("book_name is not null"); - return (Criteria) this; - } - - public Criteria andBookNameEqualTo(String value) { - addCriterion("book_name =", value, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameNotEqualTo(String value) { - addCriterion("book_name <>", value, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameGreaterThan(String value) { - addCriterion("book_name >", value, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameGreaterThanOrEqualTo(String value) { - addCriterion("book_name >=", value, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameLessThan(String value) { - addCriterion("book_name <", value, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameLessThanOrEqualTo(String value) { - addCriterion("book_name <=", value, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameLike(String value) { - addCriterion("book_name like", value, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameNotLike(String value) { - addCriterion("book_name not like", value, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameIn(List values) { - addCriterion("book_name in", values, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameNotIn(List values) { - addCriterion("book_name not in", values, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameBetween(String value1, String value2) { - addCriterion("book_name between", value1, value2, "bookName"); - return (Criteria) this; - } - - public Criteria andBookNameNotBetween(String value1, String value2) { - addCriterion("book_name not between", value1, value2, "bookName"); - return (Criteria) this; - } - - public Criteria andAuthorIsNull() { - addCriterion("author is null"); - return (Criteria) this; - } - - public Criteria andAuthorIsNotNull() { - addCriterion("author is not null"); - return (Criteria) this; - } - - public Criteria andAuthorEqualTo(String value) { - addCriterion("author =", value, "author"); - return (Criteria) this; - } - - public Criteria andAuthorNotEqualTo(String value) { - addCriterion("author <>", value, "author"); - return (Criteria) this; - } - - public Criteria andAuthorGreaterThan(String value) { - addCriterion("author >", value, "author"); - return (Criteria) this; - } - - public Criteria andAuthorGreaterThanOrEqualTo(String value) { - addCriterion("author >=", value, "author"); - return (Criteria) this; - } - - public Criteria andAuthorLessThan(String value) { - addCriterion("author <", value, "author"); - return (Criteria) this; - } - - public Criteria andAuthorLessThanOrEqualTo(String value) { - addCriterion("author <=", value, "author"); - return (Criteria) this; - } - - public Criteria andAuthorLike(String value) { - addCriterion("author like", value, "author"); - return (Criteria) this; - } - - public Criteria andAuthorNotLike(String value) { - addCriterion("author not like", value, "author"); - return (Criteria) this; - } - - public Criteria andAuthorIn(List values) { - addCriterion("author in", values, "author"); - return (Criteria) this; - } - - public Criteria andAuthorNotIn(List values) { - addCriterion("author not in", values, "author"); - return (Criteria) this; - } - - public Criteria andAuthorBetween(String value1, String value2) { - addCriterion("author between", value1, value2, "author"); - return (Criteria) this; - } - - public Criteria andAuthorNotBetween(String value1, String value2) { - addCriterion("author not between", value1, value2, "author"); - return (Criteria) this; - } - - public Criteria andBookDescIsNull() { - addCriterion("book_desc is null"); - return (Criteria) this; - } - - public Criteria andBookDescIsNotNull() { - addCriterion("book_desc is not null"); - return (Criteria) this; - } - - public Criteria andBookDescEqualTo(String value) { - addCriterion("book_desc =", value, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescNotEqualTo(String value) { - addCriterion("book_desc <>", value, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescGreaterThan(String value) { - addCriterion("book_desc >", value, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescGreaterThanOrEqualTo(String value) { - addCriterion("book_desc >=", value, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescLessThan(String value) { - addCriterion("book_desc <", value, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescLessThanOrEqualTo(String value) { - addCriterion("book_desc <=", value, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescLike(String value) { - addCriterion("book_desc like", value, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescNotLike(String value) { - addCriterion("book_desc not like", value, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescIn(List values) { - addCriterion("book_desc in", values, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescNotIn(List values) { - addCriterion("book_desc not in", values, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescBetween(String value1, String value2) { - addCriterion("book_desc between", value1, value2, "bookDesc"); - return (Criteria) this; - } - - public Criteria andBookDescNotBetween(String value1, String value2) { - addCriterion("book_desc not between", value1, value2, "bookDesc"); - return (Criteria) this; - } - - public Criteria andScoreIsNull() { - addCriterion("score is null"); - return (Criteria) this; - } - - public Criteria andScoreIsNotNull() { - addCriterion("score is not null"); - return (Criteria) this; - } - - public Criteria andScoreEqualTo(Float value) { - addCriterion("score =", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreNotEqualTo(Float value) { - addCriterion("score <>", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreGreaterThan(Float value) { - addCriterion("score >", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreGreaterThanOrEqualTo(Float value) { - addCriterion("score >=", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreLessThan(Float value) { - addCriterion("score <", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreLessThanOrEqualTo(Float value) { - addCriterion("score <=", value, "score"); - return (Criteria) this; - } - - public Criteria andScoreIn(List values) { - addCriterion("score in", values, "score"); - return (Criteria) this; - } - - public Criteria andScoreNotIn(List values) { - addCriterion("score not in", values, "score"); - return (Criteria) this; - } - - public Criteria andScoreBetween(Float value1, Float value2) { - addCriterion("score between", value1, value2, "score"); - return (Criteria) this; - } - - public Criteria andScoreNotBetween(Float value1, Float value2) { - addCriterion("score not between", value1, value2, "score"); - return (Criteria) this; - } - - public Criteria andBookStatusIsNull() { - addCriterion("book_status is null"); - return (Criteria) this; - } - - public Criteria andBookStatusIsNotNull() { - addCriterion("book_status is not null"); - return (Criteria) this; - } - - public Criteria andBookStatusEqualTo(String value) { - addCriterion("book_status =", value, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusNotEqualTo(String value) { - addCriterion("book_status <>", value, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusGreaterThan(String value) { - addCriterion("book_status >", value, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusGreaterThanOrEqualTo(String value) { - addCriterion("book_status >=", value, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusLessThan(String value) { - addCriterion("book_status <", value, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusLessThanOrEqualTo(String value) { - addCriterion("book_status <=", value, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusLike(String value) { - addCriterion("book_status like", value, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusNotLike(String value) { - addCriterion("book_status not like", value, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusIn(List values) { - addCriterion("book_status in", values, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusNotIn(List values) { - addCriterion("book_status not in", values, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusBetween(String value1, String value2) { - addCriterion("book_status between", value1, value2, "bookStatus"); - return (Criteria) this; - } - - public Criteria andBookStatusNotBetween(String value1, String value2) { - addCriterion("book_status not between", value1, value2, "bookStatus"); - return (Criteria) this; - } - - public Criteria andVisitCountIsNull() { - addCriterion("visit_count is null"); - return (Criteria) this; - } - - public Criteria andVisitCountIsNotNull() { - addCriterion("visit_count is not null"); - return (Criteria) this; - } - - public Criteria andVisitCountEqualTo(Long value) { - addCriterion("visit_count =", value, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountNotEqualTo(Long value) { - addCriterion("visit_count <>", value, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountGreaterThan(Long value) { - addCriterion("visit_count >", value, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountGreaterThanOrEqualTo(Long value) { - addCriterion("visit_count >=", value, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountLessThan(Long value) { - addCriterion("visit_count <", value, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountLessThanOrEqualTo(Long value) { - addCriterion("visit_count <=", value, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountIn(List values) { - addCriterion("visit_count in", values, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountNotIn(List values) { - addCriterion("visit_count not in", values, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountBetween(Long value1, Long value2) { - addCriterion("visit_count between", value1, value2, "visitCount"); - return (Criteria) this; - } - - public Criteria andVisitCountNotBetween(Long value1, Long value2) { - addCriterion("visit_count not between", value1, value2, "visitCount"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("update_time is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("update_time is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("update_time =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("update_time <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("update_time >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("update_time >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("update_time <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("update_time <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("update_time in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("update_time not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("update_time between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("update_time not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/BookIndex.java b/src/main/java/xyz/zinglizingli/books/po/BookIndex.java deleted file mode 100644 index 5451833..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/BookIndex.java +++ /dev/null @@ -1,45 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.io.Serializable; - -public class BookIndex implements Serializable { - private Long id; - - private Long bookId; - - private Integer indexNum; - - private String indexName; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getBookId() { - return bookId; - } - - public void setBookId(Long bookId) { - this.bookId = bookId; - } - - public Integer getIndexNum() { - return indexNum; - } - - public void setIndexNum(Integer indexNum) { - this.indexNum = indexNum; - } - - public String getIndexName() { - return indexName; - } - - public void setIndexName(String indexName) { - this.indexName = indexName == null ? null : indexName.trim(); - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/BookIndexExample.java b/src/main/java/xyz/zinglizingli/books/po/BookIndexExample.java deleted file mode 100644 index 5ad0253..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/BookIndexExample.java +++ /dev/null @@ -1,450 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.util.ArrayList; -import java.util.List; - -public class BookIndexExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public BookIndexExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andBookIdIsNull() { - addCriterion("book_id is null"); - return (Criteria) this; - } - - public Criteria andBookIdIsNotNull() { - addCriterion("book_id is not null"); - return (Criteria) this; - } - - public Criteria andBookIdEqualTo(Long value) { - addCriterion("book_id =", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotEqualTo(Long value) { - addCriterion("book_id <>", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdGreaterThan(Long value) { - addCriterion("book_id >", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdGreaterThanOrEqualTo(Long value) { - addCriterion("book_id >=", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdLessThan(Long value) { - addCriterion("book_id <", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdLessThanOrEqualTo(Long value) { - addCriterion("book_id <=", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdIn(List values) { - addCriterion("book_id in", values, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotIn(List values) { - addCriterion("book_id not in", values, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdBetween(Long value1, Long value2) { - addCriterion("book_id between", value1, value2, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotBetween(Long value1, Long value2) { - addCriterion("book_id not between", value1, value2, "bookId"); - return (Criteria) this; - } - - public Criteria andIndexNumIsNull() { - addCriterion("index_num is null"); - return (Criteria) this; - } - - public Criteria andIndexNumIsNotNull() { - addCriterion("index_num is not null"); - return (Criteria) this; - } - - public Criteria andIndexNumEqualTo(Integer value) { - addCriterion("index_num =", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumNotEqualTo(Integer value) { - addCriterion("index_num <>", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumGreaterThan(Integer value) { - addCriterion("index_num >", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumGreaterThanOrEqualTo(Integer value) { - addCriterion("index_num >=", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumLessThan(Integer value) { - addCriterion("index_num <", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumLessThanOrEqualTo(Integer value) { - addCriterion("index_num <=", value, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumIn(List values) { - addCriterion("index_num in", values, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumNotIn(List values) { - addCriterion("index_num not in", values, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumBetween(Integer value1, Integer value2) { - addCriterion("index_num between", value1, value2, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNumNotBetween(Integer value1, Integer value2) { - addCriterion("index_num not between", value1, value2, "indexNum"); - return (Criteria) this; - } - - public Criteria andIndexNameIsNull() { - addCriterion("index_name is null"); - return (Criteria) this; - } - - public Criteria andIndexNameIsNotNull() { - addCriterion("index_name is not null"); - return (Criteria) this; - } - - public Criteria andIndexNameEqualTo(String value) { - addCriterion("index_name =", value, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameNotEqualTo(String value) { - addCriterion("index_name <>", value, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameGreaterThan(String value) { - addCriterion("index_name >", value, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameGreaterThanOrEqualTo(String value) { - addCriterion("index_name >=", value, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameLessThan(String value) { - addCriterion("index_name <", value, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameLessThanOrEqualTo(String value) { - addCriterion("index_name <=", value, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameLike(String value) { - addCriterion("index_name like", value, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameNotLike(String value) { - addCriterion("index_name not like", value, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameIn(List values) { - addCriterion("index_name in", values, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameNotIn(List values) { - addCriterion("index_name not in", values, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameBetween(String value1, String value2) { - addCriterion("index_name between", value1, value2, "indexName"); - return (Criteria) this; - } - - public Criteria andIndexNameNotBetween(String value1, String value2) { - addCriterion("index_name not between", value1, value2, "indexName"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/Category.java b/src/main/java/xyz/zinglizingli/books/po/Category.java deleted file mode 100644 index a04cce0..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/Category.java +++ /dev/null @@ -1,53 +0,0 @@ -package xyz.zinglizingli.books.po; - -public class Category { - private Integer id; - - private String name; - - private Byte sort; - - private String getUrl; - - private String reqUrl; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public Byte getSort() { - return sort; - } - - public void setSort(Byte sort) { - this.sort = sort; - } - - public String getGetUrl() { - return getUrl; - } - - public void setGetUrl(String getUrl) { - this.getUrl = getUrl == null ? null : getUrl.trim(); - } - - public String getReqUrl() { - return reqUrl; - } - - public void setReqUrl(String reqUrl) { - this.reqUrl = reqUrl == null ? null : reqUrl.trim(); - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/CategoryExample.java b/src/main/java/xyz/zinglizingli/books/po/CategoryExample.java deleted file mode 100644 index 583352a..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/CategoryExample.java +++ /dev/null @@ -1,530 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.util.ArrayList; -import java.util.List; - -public class CategoryExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public CategoryExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andSortIsNull() { - addCriterion("sort is null"); - return (Criteria) this; - } - - public Criteria andSortIsNotNull() { - addCriterion("sort is not null"); - return (Criteria) this; - } - - public Criteria andSortEqualTo(Byte value) { - addCriterion("sort =", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortNotEqualTo(Byte value) { - addCriterion("sort <>", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortGreaterThan(Byte value) { - addCriterion("sort >", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortGreaterThanOrEqualTo(Byte value) { - addCriterion("sort >=", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortLessThan(Byte value) { - addCriterion("sort <", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortLessThanOrEqualTo(Byte value) { - addCriterion("sort <=", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortIn(List values) { - addCriterion("sort in", values, "sort"); - return (Criteria) this; - } - - public Criteria andSortNotIn(List values) { - addCriterion("sort not in", values, "sort"); - return (Criteria) this; - } - - public Criteria andSortBetween(Byte value1, Byte value2) { - addCriterion("sort between", value1, value2, "sort"); - return (Criteria) this; - } - - public Criteria andSortNotBetween(Byte value1, Byte value2) { - addCriterion("sort not between", value1, value2, "sort"); - return (Criteria) this; - } - - public Criteria andGetUrlIsNull() { - addCriterion("get_url is null"); - return (Criteria) this; - } - - public Criteria andGetUrlIsNotNull() { - addCriterion("get_url is not null"); - return (Criteria) this; - } - - public Criteria andGetUrlEqualTo(String value) { - addCriterion("get_url =", value, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlNotEqualTo(String value) { - addCriterion("get_url <>", value, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlGreaterThan(String value) { - addCriterion("get_url >", value, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlGreaterThanOrEqualTo(String value) { - addCriterion("get_url >=", value, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlLessThan(String value) { - addCriterion("get_url <", value, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlLessThanOrEqualTo(String value) { - addCriterion("get_url <=", value, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlLike(String value) { - addCriterion("get_url like", value, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlNotLike(String value) { - addCriterion("get_url not like", value, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlIn(List values) { - addCriterion("get_url in", values, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlNotIn(List values) { - addCriterion("get_url not in", values, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlBetween(String value1, String value2) { - addCriterion("get_url between", value1, value2, "getUrl"); - return (Criteria) this; - } - - public Criteria andGetUrlNotBetween(String value1, String value2) { - addCriterion("get_url not between", value1, value2, "getUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlIsNull() { - addCriterion("req_url is null"); - return (Criteria) this; - } - - public Criteria andReqUrlIsNotNull() { - addCriterion("req_url is not null"); - return (Criteria) this; - } - - public Criteria andReqUrlEqualTo(String value) { - addCriterion("req_url =", value, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlNotEqualTo(String value) { - addCriterion("req_url <>", value, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlGreaterThan(String value) { - addCriterion("req_url >", value, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlGreaterThanOrEqualTo(String value) { - addCriterion("req_url >=", value, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlLessThan(String value) { - addCriterion("req_url <", value, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlLessThanOrEqualTo(String value) { - addCriterion("req_url <=", value, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlLike(String value) { - addCriterion("req_url like", value, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlNotLike(String value) { - addCriterion("req_url not like", value, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlIn(List values) { - addCriterion("req_url in", values, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlNotIn(List values) { - addCriterion("req_url not in", values, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlBetween(String value1, String value2) { - addCriterion("req_url between", value1, value2, "reqUrl"); - return (Criteria) this; - } - - public Criteria andReqUrlNotBetween(String value1, String value2) { - addCriterion("req_url not between", value1, value2, "reqUrl"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/ScreenBullet.java b/src/main/java/xyz/zinglizingli/books/po/ScreenBullet.java deleted file mode 100644 index e8aadef..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/ScreenBullet.java +++ /dev/null @@ -1,45 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.util.Date; - -public class ScreenBullet { - private Long id; - - private Long contentId; - - private String screenBullet; - - private Date createTime; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getContentId() { - return contentId; - } - - public void setContentId(Long contentId) { - this.contentId = contentId; - } - - public String getScreenBullet() { - return screenBullet; - } - - public void setScreenBullet(String screenBullet) { - this.screenBullet = screenBullet == null ? null : screenBullet.trim(); - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/ScreenBulletExample.java b/src/main/java/xyz/zinglizingli/books/po/ScreenBulletExample.java deleted file mode 100644 index b18f015..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/ScreenBulletExample.java +++ /dev/null @@ -1,451 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class ScreenBulletExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ScreenBulletExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andContentIdIsNull() { - addCriterion("content_id is null"); - return (Criteria) this; - } - - public Criteria andContentIdIsNotNull() { - addCriterion("content_id is not null"); - return (Criteria) this; - } - - public Criteria andContentIdEqualTo(Long value) { - addCriterion("content_id =", value, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdNotEqualTo(Long value) { - addCriterion("content_id <>", value, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdGreaterThan(Long value) { - addCriterion("content_id >", value, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdGreaterThanOrEqualTo(Long value) { - addCriterion("content_id >=", value, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdLessThan(Long value) { - addCriterion("content_id <", value, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdLessThanOrEqualTo(Long value) { - addCriterion("content_id <=", value, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdIn(List values) { - addCriterion("content_id in", values, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdNotIn(List values) { - addCriterion("content_id not in", values, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdBetween(Long value1, Long value2) { - addCriterion("content_id between", value1, value2, "contentId"); - return (Criteria) this; - } - - public Criteria andContentIdNotBetween(Long value1, Long value2) { - addCriterion("content_id not between", value1, value2, "contentId"); - return (Criteria) this; - } - - public Criteria andScreenBulletIsNull() { - addCriterion("screen_bullet is null"); - return (Criteria) this; - } - - public Criteria andScreenBulletIsNotNull() { - addCriterion("screen_bullet is not null"); - return (Criteria) this; - } - - public Criteria andScreenBulletEqualTo(String value) { - addCriterion("screen_bullet =", value, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletNotEqualTo(String value) { - addCriterion("screen_bullet <>", value, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletGreaterThan(String value) { - addCriterion("screen_bullet >", value, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletGreaterThanOrEqualTo(String value) { - addCriterion("screen_bullet >=", value, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletLessThan(String value) { - addCriterion("screen_bullet <", value, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletLessThanOrEqualTo(String value) { - addCriterion("screen_bullet <=", value, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletLike(String value) { - addCriterion("screen_bullet like", value, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletNotLike(String value) { - addCriterion("screen_bullet not like", value, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletIn(List values) { - addCriterion("screen_bullet in", values, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletNotIn(List values) { - addCriterion("screen_bullet not in", values, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletBetween(String value1, String value2) { - addCriterion("screen_bullet between", value1, value2, "screenBullet"); - return (Criteria) this; - } - - public Criteria andScreenBulletNotBetween(String value1, String value2) { - addCriterion("screen_bullet not between", value1, value2, "screenBullet"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("create_time is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("create_time =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("create_time <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("create_time >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("create_time >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("create_time <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("create_time <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("create_time in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("create_time not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("create_time between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("create_time not between", value1, value2, "createTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/User.java b/src/main/java/xyz/zinglizingli/books/po/User.java deleted file mode 100644 index 68baa75..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/User.java +++ /dev/null @@ -1,33 +0,0 @@ -package xyz.zinglizingli.books.po; - -public class User { - private Long id; - - private String loginName; - - private String password; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLoginName() { - return loginName; - } - - public void setLoginName(String loginName) { - this.loginName = loginName == null ? null : loginName.trim(); - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password == null ? null : password.trim(); - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/UserExample.java b/src/main/java/xyz/zinglizingli/books/po/UserExample.java deleted file mode 100644 index 1093788..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/UserExample.java +++ /dev/null @@ -1,400 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.util.ArrayList; -import java.util.List; - -public class UserExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public UserExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andLoginNameIsNull() { - addCriterion("login_name is null"); - return (Criteria) this; - } - - public Criteria andLoginNameIsNotNull() { - addCriterion("login_name is not null"); - return (Criteria) this; - } - - public Criteria andLoginNameEqualTo(String value) { - addCriterion("login_name =", value, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameNotEqualTo(String value) { - addCriterion("login_name <>", value, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameGreaterThan(String value) { - addCriterion("login_name >", value, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameGreaterThanOrEqualTo(String value) { - addCriterion("login_name >=", value, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameLessThan(String value) { - addCriterion("login_name <", value, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameLessThanOrEqualTo(String value) { - addCriterion("login_name <=", value, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameLike(String value) { - addCriterion("login_name like", value, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameNotLike(String value) { - addCriterion("login_name not like", value, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameIn(List values) { - addCriterion("login_name in", values, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameNotIn(List values) { - addCriterion("login_name not in", values, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameBetween(String value1, String value2) { - addCriterion("login_name between", value1, value2, "loginName"); - return (Criteria) this; - } - - public Criteria andLoginNameNotBetween(String value1, String value2) { - addCriterion("login_name not between", value1, value2, "loginName"); - return (Criteria) this; - } - - public Criteria andPasswordIsNull() { - addCriterion("password is null"); - return (Criteria) this; - } - - public Criteria andPasswordIsNotNull() { - addCriterion("password is not null"); - return (Criteria) this; - } - - public Criteria andPasswordEqualTo(String value) { - addCriterion("password =", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotEqualTo(String value) { - addCriterion("password <>", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordGreaterThan(String value) { - addCriterion("password >", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordGreaterThanOrEqualTo(String value) { - addCriterion("password >=", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLessThan(String value) { - addCriterion("password <", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLessThanOrEqualTo(String value) { - addCriterion("password <=", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLike(String value) { - addCriterion("password like", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotLike(String value) { - addCriterion("password not like", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordIn(List values) { - addCriterion("password in", values, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotIn(List values) { - addCriterion("password not in", values, "password"); - return (Criteria) this; - } - - public Criteria andPasswordBetween(String value1, String value2) { - addCriterion("password between", value1, value2, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotBetween(String value1, String value2) { - addCriterion("password not between", value1, value2, "password"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/UserRefBook.java b/src/main/java/xyz/zinglizingli/books/po/UserRefBook.java deleted file mode 100644 index a1e058e..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/UserRefBook.java +++ /dev/null @@ -1,33 +0,0 @@ -package xyz.zinglizingli.books.po; - -public class UserRefBook { - private Long id; - - private Long userId; - - private Long bookId; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Long getBookId() { - return bookId; - } - - public void setBookId(Long bookId) { - this.bookId = bookId; - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/po/UserRefBookExample.java b/src/main/java/xyz/zinglizingli/books/po/UserRefBookExample.java deleted file mode 100644 index 6b68a43..0000000 --- a/src/main/java/xyz/zinglizingli/books/po/UserRefBookExample.java +++ /dev/null @@ -1,380 +0,0 @@ -package xyz.zinglizingli.books.po; - -import java.util.ArrayList; -import java.util.List; - -public class UserRefBookExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public UserRefBookExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andUserIdIsNull() { - addCriterion("user_id is null"); - return (Criteria) this; - } - - public Criteria andUserIdIsNotNull() { - addCriterion("user_id is not null"); - return (Criteria) this; - } - - public Criteria andUserIdEqualTo(Long value) { - addCriterion("user_id =", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotEqualTo(Long value) { - addCriterion("user_id <>", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdGreaterThan(Long value) { - addCriterion("user_id >", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdGreaterThanOrEqualTo(Long value) { - addCriterion("user_id >=", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLessThan(Long value) { - addCriterion("user_id <", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLessThanOrEqualTo(Long value) { - addCriterion("user_id <=", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdIn(List values) { - addCriterion("user_id in", values, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotIn(List values) { - addCriterion("user_id not in", values, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdBetween(Long value1, Long value2) { - addCriterion("user_id between", value1, value2, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotBetween(Long value1, Long value2) { - addCriterion("user_id not between", value1, value2, "userId"); - return (Criteria) this; - } - - public Criteria andBookIdIsNull() { - addCriterion("book_id is null"); - return (Criteria) this; - } - - public Criteria andBookIdIsNotNull() { - addCriterion("book_id is not null"); - return (Criteria) this; - } - - public Criteria andBookIdEqualTo(Long value) { - addCriterion("book_id =", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotEqualTo(Long value) { - addCriterion("book_id <>", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdGreaterThan(Long value) { - addCriterion("book_id >", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdGreaterThanOrEqualTo(Long value) { - addCriterion("book_id >=", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdLessThan(Long value) { - addCriterion("book_id <", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdLessThanOrEqualTo(Long value) { - addCriterion("book_id <=", value, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdIn(List values) { - addCriterion("book_id in", values, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotIn(List values) { - addCriterion("book_id not in", values, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdBetween(Long value1, Long value2) { - addCriterion("book_id between", value1, value2, "bookId"); - return (Criteria) this; - } - - public Criteria andBookIdNotBetween(Long value1, Long value2) { - addCriterion("book_id not between", value1, value2, "bookId"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/service/BookService.java b/src/main/java/xyz/zinglizingli/books/service/BookService.java deleted file mode 100644 index 235b55f..0000000 --- a/src/main/java/xyz/zinglizingli/books/service/BookService.java +++ /dev/null @@ -1,609 +0,0 @@ -package xyz.zinglizingli.books.service; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.github.pagehelper.PageHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.util.StringUtils; -import org.springframework.web.client.RestTemplate; -import tk.mybatis.orderbyhelper.OrderByHelper; -import xyz.zinglizingli.books.constant.CacheKeyConstans; -import xyz.zinglizingli.books.mapper.BookContentMapper; -import xyz.zinglizingli.books.mapper.BookIndexMapper; -import xyz.zinglizingli.books.mapper.BookMapper; -import xyz.zinglizingli.books.mapper.ScreenBulletMapper; -import xyz.zinglizingli.books.po.*; -import xyz.zinglizingli.common.cache.CommonCacheUtil; -import xyz.zinglizingli.common.utils.RestTemplateUtil; - -import java.io.IOException; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -@Service -public class BookService { - - @Autowired - private BookMapper bookMapper; - - @Autowired - private BookIndexMapper bookIndexMapper; - - @Autowired - private BookContentMapper bookContentMapper; - - @Autowired - private ScreenBulletMapper screenBulletMapper; - - @Autowired - private CommonCacheUtil cacheUtil; - - RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); - - private Logger log = LoggerFactory.getLogger(BookService.class); - - - public void saveBookAndIndexAndContent(Book book, List bookIndex, List bookContent) { - //一次最多只允许插入20条记录,否则影响服务器响应,如果没有插入所有更新,则更新时间设为昨天 - /*if(bookIndex.size()>100){ - book.setUpdateTime(new Date(book.getUpdateTime().getTime()-1000*60*60*24)); - } -*/ - - boolean isUpdate = false; - Long bookId = -1l; - book.setBookName(book.getBookName().trim()); - book.setAuthor(book.getAuthor().trim()); - BookExample example = new BookExample(); - example.createCriteria().andBookNameEqualTo(book.getBookName()).andAuthorEqualTo(book.getAuthor()); - List books = bookMapper.selectByExample(example); - if (books.size() > 0) { - //更新 - bookId = books.get(0).getId(); - book.setId(bookId); - bookMapper.updateByPrimaryKeySelective(book); - isUpdate = true; - - } else { - if (book.getVisitCount() == null) { - Long visitCount = generateVisiteCount(book.getScore()); - book.setVisitCount(visitCount); - } - //插入 - int rows = bookMapper.insertSelective(book); - if (rows > 0) { - bookId = book.getId(); - } - - - } - - if (bookId >= 0) { - //查询目录已存在数量 - /* BookIndexExample bookIndexExample = new BookIndexExample(); - bookIndexExample.createCriteria().andBookIdEqualTo(bookId); - int indexCount = bookIndexMapper.countByExample(bookIndexExample);*/ - - BookIndex lastIndex = null; - List newBookIndexList = new ArrayList<>(); - List newContentList = new ArrayList<>(); - for (int i = 0; i < bookIndex.size(); i++) { - BookContent bookContentItem = bookContent.get(i); - if (!bookContentItem.getContent().contains("正在手打中,请稍等片刻,内容更新后,需要重新刷新页面,才能获取最新更新")) { - BookIndex bookIndexItem = bookIndex.get(i); - bookIndexItem.setBookId(bookId); - bookContentItem.setBookId(bookId); - //bookContentItem.setIndexId(bookIndexItem.getId());暂时使用bookId和IndexNum查询content - bookContentItem.setIndexNum(bookIndexItem.getIndexNum()); - newBookIndexList.add(bookIndexItem); - newContentList.add(bookContentItem); - lastIndex = bookIndexItem; - } - //一次最多只允许插入20条记录,否则影响服务器响应 - if (isUpdate && i % 20 == 0 && newBookIndexList.size() > 0) { - insertIndexListAndContentList(newBookIndexList, newContentList); - newBookIndexList = new ArrayList<>(); - newContentList = new ArrayList<>(); - try { - Thread.sleep(1000 * 60 * 5); - } catch (InterruptedException e) { - log.error(e.getMessage(), e); - throw new RuntimeException(e.getMessage()); - } - } - } - - - if (newBookIndexList.size() > 0) { - insertIndexListAndContentList(newBookIndexList, newContentList); - } - - if (isUpdate) { - sendNewstIndex(lastIndex); - } else { - sendNewstBook(bookId); - } - cacheUtil.del(CacheKeyConstans.NEWST_BOOK_LIST_KEY); - - - } - - - } - - @Transactional - public void insertIndexListAndContentList(List newBookIndexList, List newContentList) { - bookIndexMapper.insertBatch(newBookIndexList); - bookContentMapper.insertBatch(newContentList); - } - - - private Long generateVisiteCount(Float score) { - int baseNum = (int) (Math.pow(score * 10, (int) (score - 5)) / 2); - return Long.parseLong(baseNum + new Random().nextInt(1000) + ""); - } - - /** - * 分页查询 - */ - public List search(int page, int pageSize, - String userId, String ids, String keyword, String bookStatus, Integer catId, Integer softCat, String softTag, String sortBy, String sort) { - - if (!StringUtils.isEmpty(userId)) { - sortBy = "user_ref_book.id"; - sort = "DESC"; - } - PageHelper.startPage(page, pageSize); - // 排序设置[注意orderby 紧跟分页后面] - if (!StringUtils.isEmpty(sortBy)) { - OrderByHelper.orderBy(sortBy + " " + sort); - } - - List books = bookMapper.search(userId, ids, keyword, catId, softCat, softTag, bookStatus); - - return books; - - } - - public String getCatNameById(Integer catid) { - String catName = "其他"; - - switch (catid) { - case 1: { - catName = "玄幻奇幻"; - break; - } - case 2: { - catName = "武侠仙侠"; - break; - } - case 3: { - catName = "都市言情"; - break; - } - case 4: { - catName = "历史军事"; - break; - } - case 5: { - catName = "科幻灵异"; - break; - } - case 6: { - catName = "网游竞技"; - break; - } - case 7: { - catName = "女生频道"; - break; - } - case 8: { - catName = "轻小说"; - break; - } - default: { - break; - } - - - } - return catName; - } - - public Book queryBaseInfo(Long bookId) { - - return bookMapper.selectByPrimaryKey(bookId); - } - - public List queryNewIndexList(Long bookId) { - PageHelper.startPage(1, 15); - BookIndexExample example = new BookIndexExample(); - example.createCriteria().andBookIdEqualTo(bookId); - example.setOrderByClause("index_num DESC"); - return bookIndexMapper.selectByExample(example); - - } - - public List queryAllIndexList(Long bookId) { - BookIndexExample example = new BookIndexExample(); - example.createCriteria().andBookIdEqualTo(bookId); - example.setOrderByClause("index_num ASC"); - return bookIndexMapper.selectByExample(example); - } - - public BookContent queryBookContent(Long bookId, Integer indexNum) { - BookContent content = (BookContent) cacheUtil.getObject(CacheKeyConstans.BOOK_CONTENT_KEY_PREFIX + "_" + bookId + "_" + indexNum); - if (content == null) { - BookContentExample example = new BookContentExample(); - example.createCriteria().andBookIdEqualTo(bookId).andIndexNumEqualTo(indexNum); - List bookContents = bookContentMapper.selectByExample(example); - content = bookContents.size() > 0 ? bookContents.get(0) : null; - /*try { - content.setContent(chargeBookContent(content.getContent())); - } catch (IOException e) { - log.error(e.getMessage(), e); - }*/ - cacheUtil.setObject(CacheKeyConstans.BOOK_CONTENT_KEY_PREFIX + "_" + bookId + "_" + indexNum, content, 60 * 60 * 24); - } - - return content; - } - - private String chargeBookContent(String content) throws IOException { - StringBuilder contentBuilder = new StringBuilder(content); - int length = content.length(); - if (length > 100) { - String jsonResult = cacheUtil.get(CacheKeyConstans.RANDOM_NEWS_CONTENT_KEY); - if (jsonResult == null) { - RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); - MultiValueMap mmap = new LinkedMultiValueMap<>(); - HttpHeaders headers = new HttpHeaders(); - headers.add("Host", "channel.chinanews.com"); - headers.add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"); - HttpEntity> request = new HttpEntity<>(mmap, headers); - String body = restTemplate.postForEntity("http://channel.chinanews.com/cns/cjs/sh.shtml", request, String.class).getBody(); - Pattern pattern = Pattern.compile("specialcnsdata\\s*=\\s*\\{\"docs\":(.+)};\\s+newslist\\s*=\\s*specialcnsdata;"); - Matcher matcher = pattern.matcher(body); - if (matcher.find()) { - jsonResult = matcher.group(1); - cacheUtil.set(CacheKeyConstans.RANDOM_NEWS_CONTENT_KEY, jsonResult, 60 * 60 * 1); - } - } - - if (jsonResult.length() > 5) { - List> list = new ObjectMapper().readValue(jsonResult, List.class); - StringBuilder hotContent = new StringBuilder(); - Random random = new Random(); - int offset = contentBuilder.indexOf(",", 100); - for (Map map : list) { - if (offset >= 100) { - hotContent.append("

"); - hotContent.append(map.get("pubtime")); - hotContent.append("

"); - contentBuilder.insert(offset + 1, hotContent.toString()); - offset = contentBuilder.indexOf(",", offset + 1 + hotContent.length()); - if (offset > 100) { - hotContent.delete(0, hotContent.length()); - hotContent.append("

"); - hotContent.append(map.get("title")); - hotContent.append("

"); - contentBuilder.insert(offset + 1, hotContent.toString()); - offset = contentBuilder.indexOf(",", offset + 1 + hotContent.length()); - if (offset >= 100) { - hotContent.delete(0, hotContent.length()); - hotContent.append("

"); - hotContent.append(map.get("content")); - hotContent.append("

"); - contentBuilder.insert(offset + 1, hotContent.toString()); - offset = contentBuilder.indexOf(",", offset + 1 + hotContent.length()); - if (offset >= 100) { - hotContent.delete(0, hotContent.length()); - hotContent.append("

"); - hotContent.append(""); - hotContent.append("

"); - contentBuilder.insert(offset + 1, hotContent.toString()); - offset = contentBuilder.indexOf(",", offset + 1 + hotContent.length()); - hotContent.delete(0, hotContent.length()); - } - } - } - } - - } - - } - } - return contentBuilder.toString(); - } - - public void addVisitCount(Long bookId) { - - bookMapper.addVisitCount(bookId); - } - - public String queryIndexNameByBookIdAndIndexNum(Long bookId, Integer indexNum) { - - BookIndexExample example = new BookIndexExample(); - example.createCriteria().andBookIdEqualTo(bookId).andIndexNumEqualTo(indexNum); - return bookIndexMapper.selectByExample(example).get(0).getIndexName(); - } - - public List queryMaxAndMinIndexNum(Long bookId) { - List result = new ArrayList<>(); - BookIndexExample example = new BookIndexExample(); - example.createCriteria().andBookIdEqualTo(bookId); - example.setOrderByClause("index_num desc"); - List bookIndices = bookIndexMapper.selectByExample(example); - if (bookIndices.size() > 0) { - result.add(bookIndices.get(0).getIndexNum()); - result.add(bookIndices.get(bookIndices.size() - 1).getIndexNum()); - } - return result; - } - - /** - * 查询该书籍目录数量 - */ - public List queryIndexCountByBookNameAndBAuthor(String bookName, String author) { - List result = new ArrayList<>(); - BookExample example = new BookExample(); - example.createCriteria().andBookNameEqualTo(bookName).andAuthorEqualTo(author); - List books = bookMapper.selectByExample(example); - if (books.size() > 0) { - - Long bookId = books.get(0).getId(); - BookIndexExample bookIndexExample = new BookIndexExample(); - bookIndexExample.createCriteria().andBookIdEqualTo(bookId); - List bookIndices = bookIndexMapper.selectByExample(bookIndexExample); - if (bookIndices != null && bookIndices.size() > 0) { - for (BookIndex bookIndex : bookIndices) { - result.add(bookIndex.getIndexNum()); - } - } - - } - - return result; - - } - - public Book queryRandomBook() { - - return bookMapper.queryRandomBook(); - } - - public Map queryNewstBook() { - final String SENDIDS = "sendWeiboIds"; - Set sendIds = (Set) cacheUtil.getObject(SENDIDS); - if (sendIds == null) { - sendIds = new HashSet<>(); - } - String newstIndexName = null; - Book book = null; - book = bookMapper.queryNewstBook(sendIds); - Map data = new HashMap<>(); - if (book != null && book.getId() != null) { - newstIndexName = bookIndexMapper.queryNewstIndexName(book.getId()); - if (!StringUtils.isEmpty(newstIndexName)) { - sendIds.add(book.getId()); - cacheUtil.setObject(SENDIDS, sendIds, 60 * 60 * 24 * 2); - data.put("book", book); - data.put("newstIndexName", newstIndexName); - } - } - return data; - } - - public String getSoftCatNameById(Integer softCat) { - String catName = "其他"; - - switch (softCat) { - case 21: { - catName = "魔幻"; - break; - } - case 22: { - catName = "玄幻"; - break; - } - case 23: { - catName = "古风"; - break; - } - case 24: { - catName = "科幻"; - break; - } - case 25: { - catName = "校园"; - break; - } - case 26: { - catName = "都市"; - break; - } - case 27: { - catName = "游戏"; - break; - } - case 28: { - catName = "同人"; - break; - } - case 29: { - catName = "悬疑"; - break; - } - case 0: { - catName = "动漫"; - break; - } - default: { - break; - } - - - } - return catName; - - } - - public void sendBullet(Long contentId, String bullet) { - - ScreenBullet screenBullet = new ScreenBullet(); - screenBullet.setContentId(contentId); - screenBullet.setScreenBullet(bullet); - screenBullet.setCreateTime(new Date()); - - screenBulletMapper.insertSelective(screenBullet); - } - - public List queryBullet(Long contentId) { - - ScreenBulletExample example = new ScreenBulletExample(); - example.createCriteria().andContentIdEqualTo(contentId); - example.setOrderByClause("create_time asc"); - - return screenBulletMapper.selectByExample(example); - } - - public String queryIndexList(Long bookId, int count) { - - BookIndexExample example = new BookIndexExample(); - example.createCriteria().andBookIdEqualTo(bookId).andIndexNumEqualTo(count); - return bookIndexMapper.selectByExample(example).get(0).getIndexName(); - } - - public String queryContentList(Long bookId, int count) { - BookContentExample example = new BookContentExample(); - example.createCriteria().andBookIdEqualTo(bookId).andIndexNumEqualTo(count); - return bookContentMapper.selectByExample(example).get(0).getContent(); - } - - public int countIndex(Long bookId) { - BookIndexExample example = new BookIndexExample(); - example.createCriteria().andBookIdEqualTo(bookId); - return bookIndexMapper.countByExample(example); - } - - public List queryNewstBookIdList() { - return bookMapper.queryNewstBookIdList(); - } - - public List queryEndBookIdList() { - return bookMapper.queryEndBookIdList(); - } - - - private void sendNewstBook(Long bookId) { - try { - if (bookId >= 0) { - - //List idList = queryEndBookIdList(); - MultiValueMap map = new LinkedMultiValueMap<>(); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.TEXT_PLAIN); - //headers.add("User-Agent","curl/7.12.1"); - headers.add("Host", "data.zz.baidu.com"); - - String reqBody = ""; - reqBody += ("https://www.zinglizingli.xyz/book/" + bookId + ".html" + "\n"); - //reqBody += ("http://www.zinglizingli.xyz/book/" + bookId + ".html" + "\n"); - headers.setContentLength(reqBody.length()); - HttpEntity request = new HttpEntity<>(reqBody, headers); - System.out.println("推送数据:" + reqBody); - ResponseEntity stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?site=www.zinglizingli.xyz&token=IuK7oVrPKe3U606x", request, String.class); - System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); - - - Thread.sleep(1000 * 3); - - //reqBody += ("http://www.zinglizingli.xyz/book/" + bookId + ".html" + "\n"); - System.out.println("推送数据:" + reqBody); - stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?appid=1643715155923937&token=fkEcTlId6Cf21Sz3&type=batch", request, String.class); - System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); - } - } catch (InterruptedException e) { - log.info(e.getMessage(), e); - } - } - - - private void sendNewstIndex(BookIndex bookIndex) { - try { - if (bookIndex != null) { - MultiValueMap map = new LinkedMultiValueMap<>(); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.TEXT_PLAIN); - headers.add("Host", "data.zz.baidu.com"); - String reqBody = ""; - //目录只推送最新一条 - reqBody += ("https://www.zinglizingli.xyz/book/" + - bookIndex.getBookId() + "/" + - bookIndex.getIndexNum() + ".html" + "\n"); - headers.setContentLength(reqBody.length()); - HttpEntity request = new HttpEntity<>(reqBody, headers); - System.out.println("推送数据:" + reqBody); - ResponseEntity stringResponseEntity = restTemplate. - postForEntity("http://data.zz.baidu.com/urls?" + - "site=www.zinglizingli.xyz&token=IuK7oVrPKe3U606x" - , request, String.class); - - System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); - - - Thread.sleep(1000 * 3); - //reqBody += ("http://www.zinglizingli.xyz/book/" + index.getBookId() + "/" + index.getIndexNum() + ".html" + "\n"); - System.out.println("推送数据:" + reqBody); - stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?appid=1643715155923937&token=fkEcTlId6Cf21Sz3&type=batch", request, String.class); - System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); - - } - } catch (InterruptedException e) { - log.info(e.getMessage(), e); - } - - - } - - public List queryPreAndNextIndexNum(Long bookId, Integer indexNum) { - List result = new ArrayList<>(); - BookIndexExample example = new BookIndexExample(); - example.createCriteria().andBookIdEqualTo(bookId).andIndexNumGreaterThan(indexNum); - example.setOrderByClause("index_num asc"); - List bookIndices = bookIndexMapper.selectByExample(example); - if (bookIndices.size() > 0) { - result.add(bookIndices.get(0).getIndexNum()); - } else { - result.add(indexNum); - } - example = new BookIndexExample(); - example.createCriteria().andBookIdEqualTo(bookId).andIndexNumLessThan(indexNum); - example.setOrderByClause("index_num DESC"); - bookIndices = bookIndexMapper.selectByExample(example); - if (bookIndices.size() > 0) { - result.add(bookIndices.get(0).getIndexNum()); - } else { - result.add(indexNum); - } - return result; - - } - - /** - * 查询推荐书籍数据 - * */ - public List queryRecBooks(List> configMap) { - return bookMapper.queryRecBooks(configMap); - } -} diff --git a/src/main/java/xyz/zinglizingli/books/service/MailService.java b/src/main/java/xyz/zinglizingli/books/service/MailService.java deleted file mode 100644 index 64af2e9..0000000 --- a/src/main/java/xyz/zinglizingli/books/service/MailService.java +++ /dev/null @@ -1,113 +0,0 @@ -package xyz.zinglizingli.books.service; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.core.io.FileSystemResource; -import org.springframework.mail.SimpleMailMessage; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.mail.javamail.MimeMessageHelper; -import org.springframework.stereotype.Service; - -import javax.mail.MessagingException; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeMessage; -import java.io.File; -import java.io.UnsupportedEncodingException; - -@Service -public class MailService { - - private final Logger logger = LoggerFactory.getLogger(MailService.class); - - @Value("${spring.mail.username}") - //使用@Value注入application.properties中指定的用户名 - private String from; - - String nickName = "精品小说楼"; - - @Autowired - //用于发送文件 - private JavaMailSender mailSender; - - - public void sendSimpleMail(String to, String subject, String content) { - - SimpleMailMessage message = new SimpleMailMessage(); - message.setTo(to);//收信人 - message.setSubject(subject);//主题 - message.setText(content);//内容 - message.setFrom(from);//发信人 - - mailSender.send(message); - } - - - public void sendHtmlMail(String to, String subject, String content){ - - logger.info("发送HTML邮件开始:{},{},{}", to, subject, content); - //使用MimeMessage,MIME协议 - MimeMessage message = mailSender.createMimeMessage(); - - MimeMessageHelper helper; - //MimeMessageHelper帮助我们设置更丰富的内容 - try { - helper = new MimeMessageHelper(message, true); - helper.setFrom(new InternetAddress(from, nickName, "UTF-8")); - helper.setTo(to); - helper.setSubject(subject); - helper.setText(content, true);//true代表支持html - mailSender.send(message); - logger.info("发送HTMLto"+to+"邮件成功"); - } catch (Exception e) { - logger.error("发送HTML邮件失败:", e); - } - } - - public void sendAttachmentMail(String to, String subject, String content, String filePath) { - - logger.info("发送带附件邮件开始:{},{},{},{}", to, subject, content, filePath); - MimeMessage message = mailSender.createMimeMessage(); - - MimeMessageHelper helper; - try { - helper = new MimeMessageHelper(message, true); - //true代表支持多组件,如附件,图片等 - helper.setFrom(from); - helper.setTo(to); - helper.setSubject(subject); - helper.setText(content, true); - FileSystemResource file = new FileSystemResource(new File(filePath)); - String fileName = file.getFilename(); - helper.addAttachment(fileName, file);//添加附件,可多次调用该方法添加多个附件 - mailSender.send(message); - logger.info("发送带附件邮件成功"); - } catch (MessagingException e) { - logger.error("发送带附件邮件失败", e); - } - - - } - - public void sendInlineResourceMail(String to, String subject, String content, String rscPath, String rscId) { - - logger.info("发送带图片邮件开始:{},{},{},{},{}", to, subject, content, rscPath, rscId); - MimeMessage message = mailSender.createMimeMessage(); - - MimeMessageHelper helper; - try { - helper = new MimeMessageHelper(message, true); - helper.setFrom(new InternetAddress(from, nickName, "UTF-8")); - helper.setTo(to); - helper.setSubject(subject); - helper.setText(content, true); - FileSystemResource res = new FileSystemResource(new File(rscPath)); - helper.addInline(rscId, res);//重复使用添加多个图片 - mailSender.send(message); - logger.info("发送带图片邮件成功"); - } catch (Exception e) { - logger.error("发送带图片邮件失败", e); - } - } -} diff --git a/src/main/java/xyz/zinglizingli/books/service/UserService.java b/src/main/java/xyz/zinglizingli/books/service/UserService.java deleted file mode 100644 index 2444318..0000000 --- a/src/main/java/xyz/zinglizingli/books/service/UserService.java +++ /dev/null @@ -1,86 +0,0 @@ -package xyz.zinglizingli.books.service; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import xyz.zinglizingli.books.mapper.UserMapper; -import xyz.zinglizingli.books.mapper.UserRefBookMapper; -import xyz.zinglizingli.books.po.User; -import xyz.zinglizingli.books.po.UserExample; -import xyz.zinglizingli.books.po.UserRefBook; -import xyz.zinglizingli.books.po.UserRefBookExample; -import xyz.zinglizingli.books.util.MD5Util; - -import java.util.List; - -@Service -public class UserService { - - @Autowired - private UserMapper userMapper; - - @Autowired - private UserRefBookMapper userRefBookMapper; - - - public boolean isExistLoginName(String loginName) { - UserExample example = new UserExample(); - example.createCriteria().andLoginNameEqualTo(loginName); - return userMapper.countByExample(example)>0?true:false; - } - - public void regist(User user) { - user.setPassword(MD5Util.MD5Encode(user.getPassword(),"utf-8")); - userMapper.insertSelective(user); - } - - public void login(User user) { - UserExample example = new UserExample(); - example.createCriteria().andLoginNameEqualTo(user.getLoginName()) - .andPasswordEqualTo(MD5Util.MD5Encode(user.getPassword(),"utf-8")); - List users = userMapper.selectByExample(example); - if(users.size() > 0){ - user.setId(users.get(0).getId()); - }else { - user.setId(null); - } - - - } - - public void addToCollect(Long bookId, long userId) { - UserRefBook userRefBook = new UserRefBook(); - userRefBook.setBookId(bookId); - userRefBook.setUserId(userId); - UserRefBookExample example = new UserRefBookExample(); - example.createCriteria().andBookIdEqualTo(bookId).andUserIdEqualTo(userId); - userRefBookMapper.deleteByExample(example); - userRefBookMapper.insertSelective(userRefBook); - - } - - public boolean isCollect(Long bookId, long userId) { - - UserRefBookExample example = new UserRefBookExample(); - example.createCriteria().andBookIdEqualTo(bookId).andUserIdEqualTo(userId); - return userRefBookMapper.countByExample(example)>0?true:false; - - } - - public void cancelToCollect(Long bookId, long userId) { - UserRefBookExample example = new UserRefBookExample(); - example.createCriteria().andBookIdEqualTo(bookId).andUserIdEqualTo(userId); - userRefBookMapper.deleteByExample(example); - } - - public void collectOrCancelBook(Long userid, Long bookId) { - - boolean collect = isCollect(bookId, userid); - - if(collect){ - cancelToCollect(bookId, userid);; - }else{ - addToCollect(bookId, userid); - } - } -} diff --git a/src/main/java/xyz/zinglizingli/books/util/ExcutorUtils.java b/src/main/java/xyz/zinglizingli/books/util/ExcutorUtils.java deleted file mode 100644 index 5e40951..0000000 --- a/src/main/java/xyz/zinglizingli/books/util/ExcutorUtils.java +++ /dev/null @@ -1,20 +0,0 @@ -package xyz.zinglizingli.books.util; - -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -public class ExcutorUtils { - - private static ExecutorService fixedThreadPool; - private static ExecutorService cachedThreadPool ; - static{ - fixedThreadPool = Executors.newFixedThreadPool(5); - cachedThreadPool = Executors.newCachedThreadPool(); - } - public static void excuteFixedTask(Runnable task){ - fixedThreadPool.execute(task); - } - public static void excuteCachedTask(Runnable task){ - cachedThreadPool.execute(task); - } -} diff --git a/src/main/java/xyz/zinglizingli/books/util/MD5Util.java b/src/main/java/xyz/zinglizingli/books/util/MD5Util.java deleted file mode 100644 index cb0ea59..0000000 --- a/src/main/java/xyz/zinglizingli/books/util/MD5Util.java +++ /dev/null @@ -1,39 +0,0 @@ -package xyz.zinglizingli.books.util; - -import java.security.MessageDigest; - -public class MD5Util { - private static String byteArrayToHexString(byte b[]) { - StringBuffer resultSb = new StringBuffer(); - for (int i = 0; i < b.length; i++) - resultSb.append(byteToHexString(b[i])); - - return resultSb.toString(); - } - - private static String byteToHexString(byte b) { - int n = b; - if (n < 0) - n += 256; - int d1 = n / 16; - int d2 = n % 16; - return hexDigits[d1] + hexDigits[d2]; - } - - public static String MD5Encode(String origin, String charsetname) { - String resultString = null; - try { - resultString = new String(origin); - MessageDigest md = MessageDigest.getInstance("MD5"); - if (charsetname == null || "".equals(charsetname)) - resultString = byteArrayToHexString(md.digest(resultString.getBytes())); - else - resultString = byteArrayToHexString(md.digest(resultString.getBytes(charsetname))); - } catch (Exception exception) { - } - return resultString; - } - - private static final String hexDigits[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", - "e", "f" }; -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/util/RandomValueUtil.java b/src/main/java/xyz/zinglizingli/books/util/RandomValueUtil.java deleted file mode 100644 index ce5ccc6..0000000 --- a/src/main/java/xyz/zinglizingli/books/util/RandomValueUtil.java +++ /dev/null @@ -1,125 +0,0 @@ -package xyz.zinglizingli.books.util; - - - - -/**** - * - * 随机数生成工具类,主要包括 - * 中文姓名,性别,Email,手机号,住址 - */ -public class RandomValueUtil { - - //public static String base = "abcdefghijklmnopqrstuvwxyz0123456789"; - public static String base = "0123456789"; - private static String firstName="赵钱孙李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹喻柏水窦章云苏潘葛奚范彭郎鲁韦昌马苗凤花方俞任袁柳酆鲍史唐费廉岑薛雷贺倪汤滕殷罗毕郝邬安常乐于时傅皮卞齐康伍余元卜顾孟平黄和穆萧尹姚邵湛汪祁毛禹狄米贝明臧计伏成戴谈宋茅庞熊纪舒屈项祝董梁杜阮蓝闵席季麻强贾路娄危江童颜郭梅盛林刁钟徐邱骆高夏蔡田樊胡凌霍虞万支柯咎管卢莫经房裘缪干解应宗宣丁贲邓郁单杭洪包诸左石崔吉钮龚程嵇邢滑裴陆荣翁荀羊於惠甄魏加封芮羿储靳汲邴糜松井段富巫乌焦巴弓牧隗山谷车侯宓蓬全郗班仰秋仲伊宫宁仇栾暴甘钭厉戎祖武符刘姜詹束龙叶幸司韶郜黎蓟薄印宿白怀蒲台从鄂索咸籍赖卓蔺屠蒙池乔阴郁胥能苍双闻莘党翟谭贡劳逄姬申扶堵冉宰郦雍却璩桑桂濮牛寿通边扈燕冀郏浦尚农温别庄晏柴瞿阎充慕连茹习宦艾鱼容向古易慎戈廖庚终暨居衡步都耿满弘匡国文寇广禄阙东殴殳沃利蔚越夔隆师巩厍聂晁勾敖融冷訾辛阚那简饶空曾毋沙乜养鞠须丰巢关蒯相查后江红游竺权逯盖益桓公万俟司马上官欧阳夏侯诸葛闻人东方赫连皇甫尉迟公羊澹台公冶宗政濮阳淳于仲孙太叔申屠公孙乐正轩辕令狐钟离闾丘长孙慕容鲜于宇文司徒司空亓官司寇仉督子车颛孙端木巫马公西漆雕乐正壤驷公良拓拔夹谷宰父谷粱晋楚阎法汝鄢涂钦段干百里东郭南门呼延归海羊舌微生岳帅缑亢况后有琴梁丘左丘东门西门商牟佘佴伯赏南宫墨哈谯笪年爱阳佟第五言福百家姓续"; - private static String girl="秀娟英华慧巧美娜静淑惠珠翠雅芝玉萍红娥玲芬芳燕彩春菊兰凤洁梅琳素云莲真环雪荣爱妹霞香月莺媛艳瑞凡佳嘉琼勤珍贞莉桂娣叶璧璐娅琦晶妍茜秋珊莎锦黛青倩婷姣婉娴瑾颖露瑶怡婵雁蓓纨仪荷丹蓉眉君琴蕊薇菁梦岚苑婕馨瑗琰韵融园艺咏卿聪澜纯毓悦昭冰爽琬茗羽希宁欣飘育滢馥筠柔竹霭凝晓欢霄枫芸菲寒伊亚宜可姬舒影荔枝思丽 "; - public static String boy="伟刚勇毅俊峰强军平保东文辉力明永健世广志义兴良海山仁波宁贵福生龙元全国胜学祥才发武新利清飞彬富顺信子杰涛昌成康星光天达安岩中茂进林有坚和彪博诚先敬震振壮会思群豪心邦承乐绍功松善厚庆磊民友裕河哲江超浩亮政谦亨奇固之轮翰朗伯宏言若鸣朋斌梁栋维启克伦翔旭鹏泽晨辰士以建家致树炎德行时泰盛雄琛钧冠策腾楠榕风航弘"; - //public static final String[] email_suffix="@gmail.com,@yahoo.com,@msn.com,@hotmail.com,@aol.com,@ask.com,@live.com,@qq.com,@0355.net,@163.com,@163.net,@263.net,@3721.net,@yeah.net,@googlemail.com,@126.com,@sina.com,@sohu.com,@yahoo.com.cn".split(","); - public static final String[] email_suffix="@126.com,@163.com,@139.com,@sina.com,@aliyun.com,@189.cn,@sohu.com,@qq.com,@sogou.com".split(","); - public static int getNum(int start,int end) { - return (int)(Math.random()*(end-start+1)+start); - } - - /*** - * - * Project Name: recruit-helper-util - *

随机生成Email - * @param lMin - * 最小长度 - * @param lMax - * 最大长度 - * @return - */ - public static String getEmail(int lMin,int lMax) { - int length=getNum(lMin,lMax); - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < length; i++) { - int number = (int)(Math.random()*base.length()); - sb.append(base.charAt(number)); - } - sb.append(email_suffix[(int)(Math.random()*email_suffix.length)]); - return sb.toString(); - } - - public static String getEmail() { - String emailTail = email_suffix[(int)(Math.random()*email_suffix.length)]; - StringBuffer sb = new StringBuffer(); - if(emailTail.equals("@qq.com")) { - int length = getNum(6, 10); - for (int i = 0; i < length; i++) { - int number = (int) (Math.random() * base.length()); - sb.append(base.charAt(number)); - } - }else{ - sb.append(getTelephone()); - } - sb.append(emailTail); - return sb.toString(); - } - - private static String[] telFirst="134,135,136,137,138,139,150,151,152,157,158,159,130,131,132,155,156,133,153".split(","); - - /*** - * - * 随机生成手机号码 - */ - public static String getTelephone() { - int index=getNum(0,telFirst.length-1); - String first=telFirst[index]; - String second=String.valueOf(getNum(1,888)+10000).substring(1); - String thrid=String.valueOf(getNum(1,9100)+10000).substring(1); - return first+second+thrid; - } - - /*** - * - *

随机生成8位电话号码 - */ - public static String getLandline() { - int index=getNum(0,telFirst.length-1); - String first=telFirst[index]; - String second=String.valueOf(getNum(1,888)+10000).substring(1); - String thrid=String.valueOf(getNum(1,9100)+10000).substring(1); - return first+second+thrid; - } - - - - /** - * 返回中文姓名 - */ - public static String name_sex = ""; - - /*** - * - *

返回中文姓名 - * - */ - public static String getChineseName() { - int index = getNum(0, firstName.length() - 1); - String first = firstName.substring(index, index + 1); - int sex = getNum(0, 1); - String str = boy; - int length = boy.length(); - if (sex == 0) { - str = girl; - length = girl.length(); - name_sex = "女"; - } else { - name_sex = "男"; - } - index = getNum(0, length - 1); - String second = str.substring(index, index + 1); - int hasThird = getNum(0, 1); - String third = ""; - if (hasThird == 1) { - index = getNum(0, length - 1); - third = str.substring(index, index + 1); - } - return first + second + third; - } - - -} - diff --git a/src/main/java/xyz/zinglizingli/books/util/UUIDUtils.java b/src/main/java/xyz/zinglizingli/books/util/UUIDUtils.java deleted file mode 100644 index 103fcd9..0000000 --- a/src/main/java/xyz/zinglizingli/books/util/UUIDUtils.java +++ /dev/null @@ -1,93 +0,0 @@ -package xyz.zinglizingli.books.util; - -import java.util.UUID; - -public class UUIDUtils { - - public static final String[] CHARS = new String[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", - "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", - "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", - "S", "T", "U", "V", "W", "X", "Y", "Z" }; - - /** - * 生成指定长度的uuid - * - * @param length - * @return - */ - private static String getUUID(int length, UUID uuid) { - int groupLength = 32 / length; - StringBuilder sb = new StringBuilder(); - String id = uuid.toString().replace("-", ""); - for (int i = 0; i < length; i++) { - String str = id.substring(i * groupLength, i * groupLength + groupLength); - int x = Integer.parseInt(str, 16); - sb.append(CHARS[x % 0x3E]); - } - return sb.toString(); - } - - /** - * 8位UUID - * - * @return - */ - public static String getUUID8() { - return getUUID(8, UUID.randomUUID()); - } - - /** - * 8位UUID - * - * @return - */ - public static String getUUID8(byte[] bytes) { - return getUUID(8, UUID.nameUUIDFromBytes(bytes)); - } - - /** - * 8位UUID - * - * @return - */ - public static String getUUID8(String fromString) { - return getUUID(8, UUID.fromString(fromString)); - } - - /** - * 16位UUID - * - * @return - */ - public static String getUUID16() { - return getUUID(16, UUID.randomUUID()); - } - - /** - * 16位UUID - * - * @return - */ - public static String getUUID16(String fromString) { - return getUUID(16, UUID.fromString(fromString)); - } - - /** - * 16位UUID - * - * @return - */ - public static String getUUID16(byte[] bytes) { - return getUUID(16, UUID.nameUUIDFromBytes(bytes)); - } - - /** - * 32位UUID - * - * @return - */ - public static String getUUID32() { - return UUID.randomUUID().toString().replace("-", ""); - } - -} diff --git a/src/main/java/xyz/zinglizingli/books/vo/BookVO.java b/src/main/java/xyz/zinglizingli/books/vo/BookVO.java deleted file mode 100644 index 4536c16..0000000 --- a/src/main/java/xyz/zinglizingli/books/vo/BookVO.java +++ /dev/null @@ -1,16 +0,0 @@ -package xyz.zinglizingli.books.vo; - -import xyz.zinglizingli.books.po.Book; - -public class BookVO extends Book { - - private String cateName; - - public String getCateName() { - return cateName; - } - - public void setCateName(String cateName) { - this.cateName = cateName; - } -} diff --git a/src/main/java/xyz/zinglizingli/books/web/ApiBookController.java b/src/main/java/xyz/zinglizingli/books/web/ApiBookController.java deleted file mode 100644 index e643dce..0000000 --- a/src/main/java/xyz/zinglizingli/books/web/ApiBookController.java +++ /dev/null @@ -1,188 +0,0 @@ -package xyz.zinglizingli.books.web; - - -import com.github.pagehelper.PageInfo; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.*; -import xyz.zinglizingli.books.po.Book; -import xyz.zinglizingli.books.po.BookContent; -import xyz.zinglizingli.books.po.BookIndex; -import xyz.zinglizingli.books.service.BookService; -import xyz.zinglizingli.books.vo.BookVO; -import xyz.zinglizingli.common.cache.CommonCacheUtil; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.*; - -@RestController -@RequestMapping("api/book") -public class ApiBookController { - - - @Autowired - private BookService bookService; - - @Autowired - private CommonCacheUtil commonCacheUtil; - - - @RequestMapping("hotBook") - public List hotBooks () { - //查询热点数据 - List hotBooks = bookService.search(1, 6, null, null, null, null, null, null, null, "visit_count DESC,score ", "DESC"); - return hotBooks; - } - - @RequestMapping("newstBook") - public List newstBook() { - //查询最近更新数据 - List newBooks = bookService.search(1, 6, null, null, null, null, null, null, null, "update_time", "DESC"); - - return newBooks; - } - - @RequestMapping("search") - public Map search(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "20") int pageSize, - @RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "bookStatus", required = false) String bookStatus, - @RequestParam(value = "catId", required = false) Integer catId, - @RequestParam(value = "historyBookIds", required = false) String ids, - @RequestParam(value = "token", required = false) String token, - @RequestParam(value = "sortBy", defaultValue = "update_time") String sortBy, @RequestParam(value = "sort", defaultValue = "DESC") String sort, - HttpServletRequest req, HttpServletResponse resp) { - - Map modelMap = new HashMap<>(); - String userId = null; - String titleType = "最近更新"; - if (catId != null) { - titleType = bookService.getCatNameById(catId); - ; - } else if (keyword != null) { - titleType = "搜索"; - } else if ("score".equals(sortBy)) { - titleType = "小说排行榜"; - } else if (ids != null) { - titleType = "阅读记录"; - } else if (token != null) { - userId = commonCacheUtil.get(token); - titleType = "我的书架"; - } - modelMap.put("titleType", titleType); - List books = bookService.search(page, pageSize, userId, ids, keyword,bookStatus, catId, null, null, sortBy, sort); - List bookVOList; - if (StringUtils.isEmpty(ids)) { - bookVOList = new ArrayList<>(); - for (Book book : books) { - BookVO bookvo = new BookVO(); - BeanUtils.copyProperties(book, bookvo); - bookvo.setCateName(bookService.getCatNameById(bookvo.getCatid())); - bookVOList.add(bookvo); - } - - } else { - if (!ids.contains("-")) { - List idsArr = Arrays.asList(ids.split(",")); - int length = idsArr.size(); - BookVO[] bookVOArr = new BookVO[length]; - for (Book book : books) { - int index = idsArr.indexOf(book.getId() + ""); - BookVO bookvo = new BookVO(); - BeanUtils.copyProperties(book, bookvo); - bookvo.setCateName(bookService.getCatNameById(bookvo.getCatid())); - bookVOArr[length - index - 1] = bookvo; - } - bookVOList = Arrays.asList(bookVOArr); - } else { - bookVOList = new ArrayList<>(); - } - - } - - PageInfo bookPageInfo = new PageInfo<>(books); - modelMap.put("limit", bookPageInfo.getPageSize()); - modelMap.put("curr", bookPageInfo.getPageNum()); - modelMap.put("total", bookPageInfo.getTotal()); - modelMap.put("books", bookVOList); - modelMap.put("ids", ids); - modelMap.put("keyword", keyword); - modelMap.put("catId", catId); - modelMap.put("sortBy", sortBy); - modelMap.put("sort", sort); - return modelMap; - } - - @RequestMapping("{bookId}.html") - public Map detail(@PathVariable("bookId") Long bookId) { - Map modelMap = new HashMap<>(); - //查询基本信息 - Book book = bookService.queryBaseInfo(bookId); - //查询最新目录信息 - List indexList = bookService.queryNewIndexList(bookId); - - BookVO bookvo = new BookVO(); - BeanUtils.copyProperties(book, bookvo); - bookvo.setCateName(bookService.getCatNameById(bookvo.getCatid())); - modelMap.put("bookId", bookId); - modelMap.put("book", bookvo); - modelMap.put("indexList", indexList); - return modelMap; - } - - @RequestMapping("{bookId}/index.html") - public Map bookIndex(@PathVariable("bookId") Long bookId) { - Map modelMap = new HashMap<>(); - List indexList = bookService.queryAllIndexList(bookId); - String bookName = bookService.queryBaseInfo(bookId).getBookName(); - modelMap.put("indexList", indexList); - modelMap.put("bookName", bookName); - modelMap.put("bookId", bookId); - return modelMap; - } - - @RequestMapping("{bookId}/{indexNum}.html") - public Map bookContent(@PathVariable("bookId") Long bookId, @PathVariable("indexNum") Integer indexNum) { - Map modelMap = new HashMap<>(); - //查询最大章节号 - List maxAndMinIndexNum = bookService.queryMaxAndMinIndexNum(bookId); - if(maxAndMinIndexNum.size()>0) { - int maxIndexNum = maxAndMinIndexNum.get(0); - int minIndexNum = maxAndMinIndexNum.get(1); - if (indexNum < minIndexNum) { - indexNum = maxIndexNum; - } - if (indexNum > maxIndexNum) { - indexNum = minIndexNum; - } - } - BookContent bookContent = bookService.queryBookContent(bookId, indexNum); - String indexName; - if(bookContent==null) { - bookContent = new BookContent(); - bookContent.setId(-1l); - bookContent.setBookId(bookId); - bookContent.setIndexNum(indexNum); - bookContent.setContent("正在手打中,请稍等片刻,内容更新后,需要重新刷新页面,才能获取最新更新"); - indexName="?"; - }else{ - indexName = bookService.queryIndexNameByBookIdAndIndexNum(bookId, indexNum); - } - modelMap.put("indexName", indexName); - String bookName = bookService.queryBaseInfo(bookId).getBookName(); - modelMap.put("bookName", bookName); - modelMap.put("bookContent", bookContent); - return modelMap; - } - - @RequestMapping("addVisit") - public String addVisit(@RequestParam("bookId") Long bookId) { - - bookService.addVisitCount(bookId); - - return "ok"; - } - - -} diff --git a/src/main/java/xyz/zinglizingli/books/web/BookController.java b/src/main/java/xyz/zinglizingli/books/web/BookController.java deleted file mode 100644 index 42902a2..0000000 --- a/src/main/java/xyz/zinglizingli/books/web/BookController.java +++ /dev/null @@ -1,308 +0,0 @@ -package xyz.zinglizingli.books.web; - - -import com.github.pagehelper.PageInfo; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import xyz.zinglizingli.books.po.Book; -import xyz.zinglizingli.books.po.BookContent; -import xyz.zinglizingli.books.po.BookIndex; -import xyz.zinglizingli.books.po.ScreenBullet; -import xyz.zinglizingli.books.service.BookService; -import xyz.zinglizingli.books.vo.BookVO; -import xyz.zinglizingli.common.cache.CommonCacheUtil; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; -import java.io.OutputStream; -import java.net.URLEncoder; -import java.util.*; - -@Controller -@RequestMapping("book") -public class BookController { - - - @Autowired - private BookService bookService; - - @Autowired - private CommonCacheUtil commonCacheUtil; - - - - @RequestMapping("search") - public String search(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "20") int pageSize, - @RequestParam(value = "keyword", required = false) String keyword, @RequestParam(value = "catId", required = false) Integer catId, - @RequestParam(value = "historyBookIds", required = false) String ids, - @RequestParam(value = "bookStatus", required = false) String bookStatus, - @RequestParam(value = "token", required = false) String token, - @RequestParam(value = "sortBy", defaultValue = "update_time") String sortBy, @RequestParam(value = "sort", defaultValue = "DESC") String sort, - HttpServletRequest req, HttpServletResponse resp, ModelMap modelMap) { - - String userId = null; - String titleType = "最近更新"; - if (catId != null) { - titleType = bookService.getCatNameById(catId) + "分类频道"; - ; - } else if ("score".equals(sortBy)) { - titleType = "小说排行"; - } else if (ids != null) { - titleType = "阅读记录"; - } else if (token != null) { - userId = commonCacheUtil.get(token); - titleType = "我的书架"; - } else if (bookStatus != null && bookStatus.contains("完成")) { - titleType = "完本小说"; - } else if (keyword != null) { - titleType = "搜索"; - } - modelMap.put("titleType", titleType); - List books; - List bookVOList; - if (StringUtils.isEmpty(ids) || !StringUtils.isEmpty(keyword)) { - books = bookService.search(page, pageSize, userId, ids, keyword, bookStatus, catId, null, null, sortBy, sort); - bookVOList = new ArrayList<>(); - for (Book book : books) { - BookVO bookvo = new BookVO(); - BeanUtils.copyProperties(book, bookvo); - bookvo.setCateName(bookService.getCatNameById(bookvo.getCatid())); - bookVOList.add(bookvo); - } - - } else { - if (!ids.contains("-")) { - books = bookService.search(page, 50, userId, ids, keyword, null, catId, null, null, sortBy, sort); - List idsArr = Arrays.asList(ids.split(",")); - int length = idsArr.size(); - BookVO[] bookVOArr = new BookVO[books.size()]; - for (Book book : books) { - int index = idsArr.indexOf(book.getId() + ""); - BookVO bookvo = new BookVO(); - BeanUtils.copyProperties(book, bookvo); - bookvo.setCateName(bookService.getCatNameById(bookvo.getCatid())); - bookVOArr[books.size() - index - 1] = bookvo; - } - bookVOList = Arrays.asList(bookVOArr); - } else { - books = new ArrayList<>(); - bookVOList = new ArrayList<>(); - } - - } - - PageInfo bookPageInfo = new PageInfo<>(books); - modelMap.put("limit", bookPageInfo.getPageSize()); - modelMap.put("curr", bookPageInfo.getPageNum()); - modelMap.put("total", bookPageInfo.getTotal()); - modelMap.put("books", bookVOList); - modelMap.put("ids", ids); - modelMap.put("token", token); - modelMap.put("bookStatus", bookStatus); - modelMap.put("keyword", keyword); - modelMap.put("catId", catId); - modelMap.put("sortBy", sortBy); - modelMap.put("sort", sort); - return "books/book_search"; - } - - - @RequestMapping("searchSoftBook.html") - public String searchSoftBook(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "20") int pageSize, - @RequestParam(value = "keyword", required = false) String keyword, @RequestParam(value = "catId", defaultValue = "8") Integer catId, - @RequestParam(value = "softCat", required = false) Integer softCat, - @RequestParam(value = "bookStatus", required = false) String bookStatus, - @RequestParam(value = "softTag", required = false) String softTag, - @RequestParam(value = "sortBy", defaultValue = "update_time") String sortBy, @RequestParam(value = "sort", defaultValue = "DESC") String sort, - HttpServletRequest req, HttpServletResponse resp, ModelMap modelMap) { - - String userId = null; - List books = bookService.search(page, pageSize, userId, null, keyword, bookStatus, catId, softCat, softTag, sortBy, sort); - List bookVOList; - bookVOList = new ArrayList<>(); - for (Book book : books) { - BookVO bookvo = new BookVO(); - BeanUtils.copyProperties(book, bookvo); - bookvo.setCateName(bookService.getSoftCatNameById(bookvo.getSoftCat())); - bookVOList.add(bookvo); - } - - - PageInfo bookPageInfo = new PageInfo<>(books); - modelMap.put("limit", bookPageInfo.getPageSize()); - modelMap.put("curr", bookPageInfo.getPageNum()); - modelMap.put("total", bookPageInfo.getTotal()); - modelMap.put("books", bookVOList); - modelMap.put("keyword", keyword); - modelMap.put("bookStatus", bookStatus); - modelMap.put("softCat", softCat); - modelMap.put("softTag", softTag); - modelMap.put("sortBy", sortBy); - modelMap.put("sort", sort); - return "books/soft_book_search"; - } - - @RequestMapping("{bookId}.html") - public String detail(@PathVariable("bookId") Long bookId, ModelMap modelMap) { - //查询基本信息 - Book book = bookService.queryBaseInfo(bookId); - //查询最新目录信息 - List indexList = bookService.queryNewIndexList(bookId); - - int minIndexNum = 0; - //查询最小目录号 - List integers = bookService.queryMaxAndMinIndexNum(bookId); - if (integers.size() > 1) { - minIndexNum = integers.get(1); - } - - - BookVO bookvo = new BookVO(); - BeanUtils.copyProperties(book, bookvo); - bookvo.setCateName(bookService.getCatNameById(bookvo.getCatid())); - - modelMap.put("bookId", bookId); - modelMap.put("book", bookvo); - modelMap.put("minIndexNum", minIndexNum); - modelMap.put("indexList", indexList); - if (indexList != null && indexList.size() > 0) { - modelMap.put("lastIndexName", indexList.get(0).getIndexName()); - modelMap.put("lastIndexNum", indexList.get(0).getIndexNum()); - } - return "books/book_detail"; - } - - @RequestMapping("{bookId}/index.html") - public String bookIndex(@PathVariable("bookId") Long bookId, ModelMap modelMap) { - List indexList = bookService.queryAllIndexList(bookId); - String bookName = bookService.queryBaseInfo(bookId).getBookName(); - modelMap.put("indexList", indexList); - modelMap.put("bookName", bookName); - modelMap.put("bookId", bookId); - return "books/book_index"; - } - - @RequestMapping("{bookId}/{indexNum}.html") - public String bookContent(@PathVariable("bookId") Long bookId, @PathVariable("indexNum") Integer indexNum, ModelMap modelMap) { - BookContent bookContent = bookService.queryBookContent(bookId, indexNum); - String indexName; - if (bookContent == null) { - bookContent = new BookContent(); - bookContent.setId(-1l); - bookContent.setBookId(bookId); - bookContent.setIndexNum(indexNum); - bookContent.setContent("正在手打中,请稍等片刻,内容更新后,需要重新刷新页面,才能获取最新更新"); - indexName = "更新中。。。"; - } else { - indexName = bookService.queryIndexNameByBookIdAndIndexNum(bookId, indexNum); - } - List preAndNextIndexNum = bookService.queryPreAndNextIndexNum(bookId, indexNum); - modelMap.put("nextIndexNum", preAndNextIndexNum.get(0)); - modelMap.put("preIndexNum", preAndNextIndexNum.get(1)); - modelMap.put("bookContent", bookContent); - modelMap.put("indexName", indexName); - String bookName = bookService.queryBaseInfo(bookId).getBookName(); - modelMap.put("bookName", bookName); - return "books/book_content"; - } - - - @RequestMapping("addVisit") - @ResponseBody - public String addVisit(@RequestParam("bookId") Long bookId) { - - bookService.addVisitCount(bookId); - - return "ok"; - } - - @RequestMapping("sendBullet") - @ResponseBody - public Map sendBullet(@RequestParam("contentId") Long contentId, @RequestParam("bullet") String bullet) { - Map result = new HashMap<>(); - bookService.sendBullet(contentId, bullet); - result.put("code", 1); - result.put("desc", "ok"); - return result; - } - - @RequestMapping("queryIsDownloading") - @ResponseBody - public Map queryIsDownloading(HttpSession session) { - Map result = new HashMap<>(); - if (session.getAttribute("isDownloading") != null) { - result.put("code", 1); - } else { - result.put("code", 0); - } - return result; - } - - - @RequestMapping("queryBullet") - @ResponseBody - public List queryBullet(@RequestParam("contentId") Long contentId) { - - return bookService.queryBullet(contentId); - } - - - /** - * 文件下载 - */ - @RequestMapping(value = "/download") - public void download(@RequestParam("bookId") Long bookId, @RequestParam("bookName") String bookName, HttpServletResponse resp, HttpSession session) { - try { - session.setAttribute("isDownloading", 1); - int count = bookService.countIndex(bookId); - - - OutputStream out = resp.getOutputStream(); - //设置响应头,对文件进行url编码 - bookName = URLEncoder.encode(bookName, "UTF-8"); - resp.setContentType("application/octet-stream");//解决手机端不能下载附件的问题 - resp.setHeader("Content-Disposition", "attachment;filename=" + bookName + ".txt"); - if (count > 0) { - for (int i = 0; i < count; i++) { - String index = bookService.queryIndexList(bookId, i); - String content = bookService.queryContentList(bookId, i); - out.write(index.getBytes("utf-8")); - out.write("\n".getBytes("utf-8")); - content = content.replaceAll("", "\r\n"); - content = content.replaceAll(" ", " "); - content = content.replaceAll("]*>", ""); - content = content.replaceAll("", ""); - content = content.replaceAll("]*>", ""); - content = content.replaceAll("", ""); - content = content.replaceAll("]*>[^<]*]*>[^<]*\\s*

", ""); - content = content.replaceAll("]*>", ""); - content = content.replaceAll("

", "\r\n"); - out.write(content.getBytes("utf-8")); - out.write("\r\n".getBytes("utf-8")); - out.write("\r\n".getBytes("utf-8")); - out.flush(); - } - - } - - out.close(); - - - } catch (Exception e) { - e.printStackTrace(); - } finally { - session.removeAttribute("isDownloading"); - } - - } - - -} \ No newline at end of file diff --git a/src/main/java/xyz/zinglizingli/books/web/UserController.java b/src/main/java/xyz/zinglizingli/books/web/UserController.java deleted file mode 100644 index 48eba05..0000000 --- a/src/main/java/xyz/zinglizingli/books/web/UserController.java +++ /dev/null @@ -1,152 +0,0 @@ -package xyz.zinglizingli.books.web; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import xyz.zinglizingli.books.po.User; -import xyz.zinglizingli.books.service.BookService; -import xyz.zinglizingli.books.service.UserService; -import xyz.zinglizingli.books.util.UUIDUtils; -import xyz.zinglizingli.common.cache.CommonCacheUtil; - -import java.util.*; - -@Controller -@RequestMapping("user") -public class UserController { - - - @Autowired - private UserService userService; - - @Autowired - private BookService bookService; - - @Autowired - private CommonCacheUtil commonCacheUtil; - - - @RequestMapping("login.html") - public String login(Long bookId, ModelMap modelMap) { - modelMap.put("bookId", bookId); - return "user/login"; - } - - - @RequestMapping("loginOrRegist") - @ResponseBody - public Map loginOrRegist(User user,Long bookId) { - Map result = new HashMap<>(); - //查询用户名是否存在 - boolean isExistLoginName = userService.isExistLoginName(user.getLoginName()); - String token = null; - if (isExistLoginName) { - //登录 - userService.login(user); - if (user.getId() != null) { - token = UUIDUtils.getUUID32(); - commonCacheUtil.set(token, user.getId() + ""); - result.put("code", 1); - result.put("desc", "登录成功!"); - if(!StringUtils.isEmpty(bookId)) { - userService.collectOrCancelBook(user.getId(), bookId); - } - } else { - result.put("code", -1); - result.put("desc", "用户名或密码错误!"); - } - } else { - //注册 - userService.regist(user); - Long userId = user.getId(); - token = UUIDUtils.getUUID32(); - commonCacheUtil.set(token, userId + ""); - result.put("code", 2); - result.put("desc", "注册成功!"); - if(!StringUtils.isEmpty(bookId)) { - userService.collectOrCancelBook(user.getId(), bookId); - } - } - if(token != null){ - result.put("token",token); - } - return result; - } - - @RequestMapping("isLogin") - @ResponseBody - public Map isLogin(String token) { - Map result = new HashMap<>(); - String userId = commonCacheUtil.get(token); - if(StringUtils.isEmpty(userId)){ - result.put("code", -1); - result.put("desc", "未登录!"); - }else{ - result.put("code", 1); - result.put("desc", "已登录!"); - } - return result; - } - - - @RequestMapping("addToCollect") - @ResponseBody - public Map addToCollect(Long bookId,String token) { - Map result = new HashMap<>(); - String userId = commonCacheUtil.get(token); - if(StringUtils.isEmpty(userId)){ - result.put("code", -1); - result.put("desc", "未登录!"); - }else { - userService.addToCollect(bookId,Long.parseLong(userId)); - result.put("code", 1); - result.put("desc", "加入成功,请前往我的书架查看!"); - } - return result; - } - - @RequestMapping("cancelToCollect") - @ResponseBody - public Map cancelToCollect(Long bookId,String token) { - Map result = new HashMap<>(); - String userId = commonCacheUtil.get(token); - if(StringUtils.isEmpty(userId)){ - result.put("code", -1); - result.put("desc", "未登录!"); - }else { - userService.cancelToCollect(bookId,Long.parseLong(userId)); - result.put("code", 1); - result.put("desc", "撤下成功!"); - } - return result; - } - - @RequestMapping("isCollect") - @ResponseBody - public Map isCollect(Long bookId,String token) { - Map result = new HashMap<>(); - String userId = commonCacheUtil.get(token); - if(StringUtils.isEmpty(userId)){ - result.put("code", -1); - result.put("desc", "未登录!"); - }else { - boolean isCollect = userService.isCollect(bookId,Long.parseLong(userId)); - if(isCollect) { - result.put("code", 1); - result.put("desc", "已收藏!"); - }else{ - result.put("code", 2); - result.put("desc", "未收藏!"); - } - } - return result; - } - - - - -} diff --git a/src/main/java/xyz/zinglizingli/common/cache/CommonCacheUtil.java b/src/main/java/xyz/zinglizingli/common/cache/CommonCacheUtil.java deleted file mode 100644 index 6ec4fa4..0000000 --- a/src/main/java/xyz/zinglizingli/common/cache/CommonCacheUtil.java +++ /dev/null @@ -1,56 +0,0 @@ -package xyz.zinglizingli.common.cache; - -public interface CommonCacheUtil { - - /** - * 根据key获取缓存的String类型数据 - */ - String get(String key); - - /** - * 设置String类型的缓存 - */ - void set(String key, String value); - - /** - * 设置一个有过期时间的String类型的缓存,单位秒 - */ - void set(String key, String value, long timeout); - - /** - * 根据key获取缓存的Object类型数据 - */ - Object getObject(String key); - - /** - * 设置Object类型的缓存 - */ - void setObject(String key, Object value); - - /** - * 设置一个有过期时间的Object类型的缓存,单位秒 - */ - void setObject(String key, Object value, long timeout); - - /** - * 根据key删除缓存的数据 - */ - void del(String key); - - - /** - * 判断是否存在一个key - * */ - boolean contains(String key); - - /** - * 设置key过期时间 - * */ - void expire(String key, long timeout); - - /** - * 刷新缓存 - * */ - void refresh(String key); - -} diff --git a/src/main/java/xyz/zinglizingli/common/cache/impl/EHCacheUtil.java b/src/main/java/xyz/zinglizingli/common/cache/impl/EHCacheUtil.java deleted file mode 100644 index 1b56da1..0000000 --- a/src/main/java/xyz/zinglizingli/common/cache/impl/EHCacheUtil.java +++ /dev/null @@ -1,150 +0,0 @@ -package xyz.zinglizingli.common.cache.impl; - -import net.sf.ehcache.Cache; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Element; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import xyz.zinglizingli.common.cache.CommonCacheUtil; - -@Service -public class EHCacheUtil implements CommonCacheUtil { - - @Autowired - private CacheManager cacheManager ; - - private static final String CACHE_NAME = "utilCache"; - - - /** - * 获得一个Cache,没有则创建一个。 - * @param cacheName - * @return - */ - private Cache getCache(){ - - /*Cache cache = cacheManager.getCache(cacheName); - if (cache == null){ - cacheManager.addCache(cacheName); - cache = cacheManager.getCache(cacheName); - CacheConfiguration config = cache.getCacheConfiguration(); - config.setEternal(false); - config.internalSetTimeToIdle(0); - config.internalSetTimeToIdle(0); - }*/ - Cache cache = cacheManager.getCache("util_cache"); - return cache; - } - - - public CacheManager getCacheManager() { - return cacheManager; - } - - - - - - @Override - public String get(String key) { - Element element = getCache().get(key); - return element==null?null:(String)element.getObjectValue(); - } - - @Override - public void set(String key, String value) { - Element element = new Element(key, value); - Cache cache = getCache(); - cache.getCacheConfiguration().setEternal(true);//不过期 - cache.put(element); - - } - - @Override - public void set(String key, String value, long timeout) { - Element element = new Element(key, value); - element.setTimeToLive((int) timeout); - Cache cache = getCache(); - cache.put(element); - - } - - @Override - public void del(String key) { - getCache().remove(key); - - - } - - @Override - public boolean contains(String key) { - return getCache().isKeyInCache(key); - } - - @Override - public void expire(String key, long timeout) { - Element element = getCache().get(key); - if (element != null) { - Object value = element.getValue(); - element = new Element(key, value); - element.setTimeToLive((int)timeout); - Cache cache = getCache(); - cache.put(element); - } - } - - - /** - * 根据key获取缓存的Object类型数据 - */ - @Override - public Object getObject(String key) { - Element element = getCache().get(key); - return element==null?null:element.getObjectValue(); - } - - - /** - * 设置Object类型的缓存 - * @param - */ - @Override - public void setObject(String key, Object value) { - Element element = new Element(key, value); - Cache cache = getCache(); - cache.getCacheConfiguration().setEternal(true);//不过期 - cache.put(element); - - } - - - /** - * 设置一个有过期时间的Object类型的缓存,单位秒 - */ - @Override - public void setObject(String key, Object value, long timeout) { - Element element = new Element(key, value); - element.setTimeToLive((int) timeout); - Cache cache = getCache(); - cache.put(element); - - } - - - @Override - public void refresh(String key) { - Element element = getCache().get(key); - if (element != null) { - Object value = element.getValue(); - int timeToLive = element.getTimeToLive(); - element = new Element(key, value); - element.setTimeToLive(timeToLive); - Cache cache = getCache(); - cache.put(element); - } - - } - - - -} diff --git a/src/main/java/xyz/zinglizingli/common/config/ErrorConfig.java b/src/main/java/xyz/zinglizingli/common/config/ErrorConfig.java deleted file mode 100644 index a765149..0000000 --- a/src/main/java/xyz/zinglizingli/common/config/ErrorConfig.java +++ /dev/null @@ -1,23 +0,0 @@ -package xyz.zinglizingli.common.config; - -import org.springframework.boot.web.server.ErrorPage; -import org.springframework.boot.web.server.ErrorPageRegistrar; -import org.springframework.boot.web.server.ErrorPageRegistry; -import org.springframework.context.annotation.Configuration; -import org.springframework.http.HttpStatus; - -/** - *定义配置类 - */ -@Configuration -public class ErrorConfig implements ErrorPageRegistrar { - - @Override - public void registerErrorPages(ErrorPageRegistry registry) { - ErrorPage[] errorPages = new ErrorPage[2]; - errorPages[0] = new ErrorPage(HttpStatus.NOT_FOUND, "/book/index.html"); - errorPages[1] = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/mang.html"); - - registry.addErrorPages(errorPages); - } -} diff --git a/src/main/java/xyz/zinglizingli/common/config/FilterConfig.java b/src/main/java/xyz/zinglizingli/common/config/FilterConfig.java deleted file mode 100644 index 9def961..0000000 --- a/src/main/java/xyz/zinglizingli/common/config/FilterConfig.java +++ /dev/null @@ -1,18 +0,0 @@ -package xyz.zinglizingli.common.config; - -import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.context.annotation.Configuration; -import xyz.zinglizingli.common.filter.SearchFilter; - -@Configuration -public class FilterConfig{ - - //@Bean - public FilterRegistrationBean filterRegist() { - FilterRegistrationBean frBean = new FilterRegistrationBean(); - frBean.setFilter(new SearchFilter()); - frBean.addUrlPatterns("/*"); - return frBean; - } - -} diff --git a/src/main/java/xyz/zinglizingli/common/config/IndexRecBooksConfig.java b/src/main/java/xyz/zinglizingli/common/config/IndexRecBooksConfig.java deleted file mode 100644 index 33088af..0000000 --- a/src/main/java/xyz/zinglizingli/common/config/IndexRecBooksConfig.java +++ /dev/null @@ -1,33 +0,0 @@ -package xyz.zinglizingli.common.config; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -import java.util.List; -import java.util.Map; - -@Component -@ConfigurationProperties(prefix = "index") -public class IndexRecBooksConfig { - - - private List> recBooks; - - private boolean isRead; - - public List> getRecBooks() { - return recBooks; - } - - public void setRecBooks(List> recBooks) { - this.recBooks = recBooks; - } - - public boolean isRead() { - return isRead; - } - - public void setRead(boolean read) { - isRead = read; - } -} diff --git a/src/main/java/xyz/zinglizingli/common/filter/SearchFilter.java b/src/main/java/xyz/zinglizingli/common/filter/SearchFilter.java deleted file mode 100644 index 777b307..0000000 --- a/src/main/java/xyz/zinglizingli/common/filter/SearchFilter.java +++ /dev/null @@ -1,654 +0,0 @@ -package xyz.zinglizingli.common.filter; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.*; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; -import xyz.zinglizingli.common.cache.CommonCacheUtil; -import xyz.zinglizingli.common.utils.RestTemplateUtil; -import xyz.zinglizingli.common.utils.SpringUtil; - -import javax.servlet.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.net.URLDecoder; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class SearchFilter implements Filter { - - private static final Logger log = LoggerFactory.getLogger(SearchFilter.class); - - private CommonCacheUtil cacheUtil; - - private static List picPostFix; - - private static List localFileFix; - - private static List staticFileFix; - - private static List noteURI; - - private RestTemplate restTemplate; - - - private final String SUANWEI_BOOK_REGEX = ""; - private final String SUANWEI_BOOK_HTML_REGEX = "/\\d+_\\d+\\.html"; - - private final String XIYANGYANG_BOOK_REGEX = ""; - private final String XIYANGYANG_BOOK_HTML_REGEX = "/\\d+_\\d+\\.html"; - - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - picPostFix = new ArrayList<>(); - picPostFix.add("jpg"); - picPostFix.add("pcx"); - picPostFix.add("emf"); - picPostFix.add("gif"); - picPostFix.add("bmp"); - picPostFix.add("tga"); - picPostFix.add("jpeg"); - picPostFix.add("tif"); - picPostFix.add("png"); - picPostFix.add("rle"); - localFileFix = new ArrayList<>(); - localFileFix.add("IMG_1470.JPG"); - localFileFix.add("baidu_verify_Ep8xaWQJAI.html"); - localFileFix.add("baidu_verify_L6sR9GjEtg.html"); - localFileFix.add("shenma-site-verification.txt"); - localFileFix.add("favicon.ico"); - localFileFix.add("headerbg.jpg"); - localFileFix.add("mang.png"); - localFileFix.add("HotBook.apk"); - localFileFix.add("wap_collect.js"); - localFileFix.add("note_1.html"); - localFileFix.add("note_2.html"); - localFileFix.add("note_3.html"); - localFileFix.add("note_4.html"); - staticFileFix = new ArrayList<>(); - staticFileFix.add("jpg"); - staticFileFix.add("gif"); - staticFileFix.add("bmp"); - staticFileFix.add("jpeg"); - staticFileFix.add("png"); - staticFileFix.add("js"); - staticFileFix.add("css"); - noteURI = new ArrayList<>(); - noteURI.add("/html/note_1.html"); - noteURI.add("/html/note_2.html"); - - } - - @Override - public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { - String forObject = null; - HttpServletRequest req = (HttpServletRequest) servletRequest; - HttpServletResponse resp = (HttpServletResponse) servletResponse; - String requestURL = req.getRequestURL().toString(); - String requestURI = req.getRequestURI(); - if(requestURL.contains("www.zinglizingli.xyz") || requestURL.contains("sf.zinglizingli.xyz")){ - if(requestURI.matches("/*|(/index\\.html)")){ - String requestDispatcher = "/book/index.html"; - if(requestURL.contains("sf.zinglizingli.xyz")){ - requestDispatcher = "/book/searchSoftBook.html"; - } - req.getRequestDispatcher(requestDispatcher).forward(servletRequest,servletResponse); - return; - } - filterChain.doFilter(servletRequest,servletResponse); - return; - - } - - - try { - - if (requestURL.matches("http://m.zinglizingli.xyz(/*|(/index\\.html))") || requestURI.startsWith("/static/")) { - filterChain.doFilter(req, resp); - return; - } - - - if (cacheUtil == null) { - cacheUtil = SpringUtil.getBean(CommonCacheUtil.class); - } - - if (requestURL.contains("http://m.zinglizingli.xyz/search")) { - //搜索跳转 - Map otherParam = new HashMap<>(); - otherParam.put("t", "1"); - otherParam.put("keyword", req.getParameter("q")); - String realURL = "https://m.biquta.com/SearchBook.php"; - forObject = postBiquta(req, realURL, otherParam); - resp.setCharacterEncoding("utf-8"); - - } else { - - final String method = req.getMethod(); - if (requestURL.contains("www.zinglizingli.xyz")) { - - String realUrl = "https://m.biquge.info" + requestURI; - - String postFix = requestURI.substring(requestURI.lastIndexOf(".") + 1); - - - // 案例:充当客户端通过restTemplate请求网络数据,并充当服务端将数据返回给浏览器 - // 客户端请求数据:输入流(byte[])==》字符串 - // 服务端响应数据:字符串 == 》 输出流(byte[]) - - //默认方式: - //RestTemplate restTemplate = new RestTemplate(); - // ①当返回的response-header的content-type属性有charset值时, - // restTemplate的StringHttpMessageConverter会设置默认charset为content-type属性 - // charset值 - // StringHttpMessageConverter.setDefaultCharset(Charset.forName(charset)); - // ②当返回的response-header的content-type属性没有charset值时 - // restTemplate的StringHttpMessageConverter会使用默认的charset即ISO-8859-1 - - if (picPostFix.contains(postFix)) { - // 对服务端请求返回的输入流(byte[])采用何种编码转换成字符串(String) - restTemplate = RestTemplateUtil.getInstance("ISO-8859-1");//请求图片 - realUrl = "https://www.biquge.info" + requestURI; - resp.setContentType("image/apng"); - } else { - // 对服务端请求返回的输入流(byte[])采用何种编码转换成字符串(String) - restTemplate = RestTemplateUtil.getInstance("utf-8");//请求html/css/js等文件 - // 对客户端响应返回的字符串(String)采用何种编码转换成输出流(byte[]) - resp.setCharacterEncoding("utf-8"); - setContentType(postFix, resp); - - /*//=====现在浏览器有编码自动识别功能,所以上面的代码没有加content-type的Header也没有问题========== - //=====正确做法应该是下面代码片段1和代码片段2二选一========== - - //===============================================代码片段1=============================== - // 对客户端响应返回的字符串(String)采用何种编码转换成输出流(byte[]) - resp.setCharacterEncoding("utf-8"); - // 告诉浏览器对服务端请求返回的输入流(byte[])采用何种编码转换成字符串(String)显示 - resp.setHeader("content-type", "text/html;charset=utf-8"); - //===============================================代码片段1=============================== - - - //===============================================代码片段2=============================== - //对客户端响应返回的字符串(String)采用何种编码转换成输出流(byte[]) - //并且告诉浏览器对服务端请求返回的输入流(byte[])采用何种编码转换成字符串(String)显示 - resp.setContentType("text/html;charset=utf-8"); - //===============================================代码片段2=============================== -*/ - } - - - if (HttpMethod.GET.name().equals(method)) { - - - String fileName = requestURI.substring(requestURI.lastIndexOf("/") + 1); - if (localFileFix.contains(fileName) || fileName.startsWith("9a4a540e-1759-4268-90fa-7fb652c3604a.")) { - filterChain.doFilter(servletRequest, servletResponse); - return; - } - - - if (requestURI.matches(SUANWEI_BOOK_HTML_REGEX)) { - realUrl = realUrl.substring(0, realUrl.length() - 5); - } - - String queryString = req.getQueryString(); - if (queryString != null && queryString.length() > 0 && !queryString.contains("bsh_bid=")) { - queryString = "?" + URLDecoder.decode(req.getQueryString()); - } else { - queryString = ""; - } - realUrl = realUrl + queryString; - - - forObject = cacheUtil.get(realUrl); - if (forObject == null) { - - - ResponseEntity forEntity = restTemplate.getForEntity(realUrl, String.class); - forObject = forEntity.getBody(); - - // forObject = new String(forObject.getBytes("ISO-8859-1"),"utf-8"); - if (!picPostFix.contains(postFix)) { - forObject = forObject.replaceAll("https://m.biquge.info", "http://www.zinglizingli.xyz") - .replaceAll("https://www.biquge.info", "http://www.zinglizingli.xyz") - .replaceAll("笔趣岛", "酸味书屋") - .replaceAll("笔趣阁", "酸味书屋") - .replaceAll("登录", "登录") - .replaceAll("", "") - .replaceFirst("", "") - .replaceAll("", "") - .replaceAll("https://zhannei.baidu.com/cse", "http://m.zinglizingli.xyz") - .replaceAll("返回", "返回") - .replaceAll("加入书架", "加入收藏") - .replaceFirst("", "\n")//页面访问自动推送到百度 - .replaceAll("", "")//去除广告 - ; - forObject = addAttacDivForSearch(forObject, requestURI); - - forObject = setBookURIToHTML(forObject, SUANWEI_BOOK_REGEX); - - if (requestURI.matches(SUANWEI_BOOK_HTML_REGEX)) { - Pattern pattern = Pattern.compile("(.+)\\s+目录共\\d+章"); - Matcher matcher = pattern.matcher(forObject); - String title = ""; - if (matcher.find()) { - title = matcher.group(1); - }//
  • 类别:武侠仙侠
  • - pattern = Pattern.compile("

    作者:(.+)

    "); - matcher = pattern.matcher(forObject); - String author = ""; - if (matcher.find()) { - author = matcher.group(1); - } - pattern = Pattern.compile("(.+)"); - matcher = pattern.matcher(forObject); - String sort = ""; - if (matcher.find()) { - sort = matcher.group(1); - } - String desc = title + "," + title + "小说最新章节免费在线阅读、最新章节列表," + title + "小说最新更新免费提供,《" + title + "》是一本情节与文笔俱佳的" + sort + "小说,由作者" + author + "创建。"; - - forObject = forObject.replaceFirst("]+\"\\s*/?>", "");//[^>]+表示1个或多个不是>的字符 - forObject = forObject.replaceFirst("", ""); - - - } - - if ("/".equals(requestURI)) { - forObject = forObject.replaceFirst("]+\"\\s*/?>", "");//[^>]+表示1个或多个不是>的字符 - forObject = forObject.replaceFirst("", ""); - - - } - } - long timeout = 1800; - if (staticFileFix.contains(postFix)) { - timeout = 60 * 60 * 24; - } - cacheUtil.set(realUrl, forObject, timeout); - } - - - - } else { - - - Map oldParameterMap = req.getParameterMap(); - Map newParameterMap = new HashMap<>(); - Set> entries = oldParameterMap.entrySet(); - for (Map.Entry entry : entries) { - newParameterMap.put(entry.getKey(), entry.getValue()[0]); - } - - MultiValueMap map = new LinkedMultiValueMap<>(); - map.setAll(newParameterMap); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - HttpEntity> request = new HttpEntity<>(map, headers); - forObject = restTemplate.postForEntity(realUrl, request, String.class).getBody(); - // forObject = new String(forObject.getBytes("ISO-8859-1"),"utf-8"); - forObject = forObject.replaceAll("https://m.biquge.info", "http://www.zinglizingli.xyz") - .replaceAll("https://www.biquge.info", "http://www.zinglizingli.xyz") - .replaceAll("笔趣岛", "酸味书屋") - .replaceAll("笔趣阁", "酸味书屋") - .replaceAll("https://zhannei.baidu.com/cse", "http://m.zinglizingli.xyz") - .replaceFirst("", "") - .replaceAll("书架", "笔记") - .replaceAll("返回", "返回") - ; - forObject = setBookURIToHTML(forObject, SUANWEI_BOOK_REGEX); - //resp.setCharacterEncoding("utf-8"); - //setContentType(postFix, resp); - - } - - - } else if (requestURL.contains("m.zinglizingli.xyz")) { - String realUrl = "https://m.biquta.com" + requestURI; - - String postFix = requestURI.substring(requestURI.lastIndexOf(".") + 1); - if (picPostFix.contains(postFix)) { - restTemplate = RestTemplateUtil.getInstance("ISO-8859-1");//请求图片 - resp.setContentType("image/apng"); - } else { - restTemplate = RestTemplateUtil.getInstance("utf-8");//请求html/css/js等文件 - resp.setCharacterEncoding("utf-8"); - setContentType(postFix, resp); - - } - - - if (HttpMethod.GET.name().equals(method)) { - - String fileName = requestURI.substring(requestURI.lastIndexOf("/") + 1); - - if (localFileFix.contains(fileName) || fileName.startsWith("9a4a540e-1759-4268-90fa-7fb652c3604a.")) { - filterChain.doFilter(servletRequest, servletResponse); - return; - } - - - if (requestURI.matches(XIYANGYANG_BOOK_HTML_REGEX)) { - realUrl = realUrl.substring(0, realUrl.length() - 5); - } - String queryString = req.getQueryString(); - if (queryString != null && queryString.length() > 0 && !queryString.contains("bsh_bid=")) { - queryString = "?" + URLDecoder.decode(req.getQueryString()); - } else { - queryString = ""; - } - realUrl = realUrl + queryString; - - - forObject = cacheUtil.get(realUrl); - if (forObject == null) { - forObject = restTemplate.getForEntity(realUrl, String.class).getBody(); - - if (!picPostFix.contains(postFix)) { - forObject = forObject.replaceAll("https://m.biquta.com", "http://m.zinglizingli.xyz") - .replaceAll("笔趣阁", "看小说吧") - .replaceAll("笔趣塔", "看小说吧") - .replaceFirst("看小说吧手机版-看小说吧", "看小说吧") - .replaceFirst("content=\"看小说吧\"", "content=\"小说阅读,小说排行,好看小说排行,热门小说排行,小说阅读手机版\"") - .replaceAll("登录", "登录") - .replaceFirst("", "") - .replaceAll("书架", "收藏") - .replaceAll("加入书架", "加入收藏") - .replaceAll("我的书架", "") - .replaceFirst("阅读记录","客户端下载") - .replaceAll("我的书架", "轻小说精品小说") - .replaceAll("", "") - - .replaceFirst("", "\n") - - .replaceFirst("", "\n")//页面访问自动推送到百度 - .replaceAll("", "");//去除广告 - - forObject = addAttacDivForSearch(forObject, requestURI); - - forObject = setBookURIToHTML(forObject, XIYANGYANG_BOOK_REGEX); - - if (requestURI.matches(XIYANGYANG_BOOK_HTML_REGEX)) { - Pattern pattern = Pattern.compile("(.+)"); - Matcher matcher = pattern.matcher(forObject); - String title = ""; - if (matcher.find()) { - title = matcher.group(1); - }//
  • 类别:武侠仙侠
  • - pattern = Pattern.compile("作者:(.+)"); - matcher = pattern.matcher(forObject); - String author = ""; - if (matcher.find()) { - author = matcher.group(1); - } - pattern = Pattern.compile("\\s+类别:(.+)"); - matcher = pattern.matcher(forObject); - String sort = ""; - if (matcher.find()) { - sort = matcher.group(1); - } - String desc = title + "," + title + "小说最新章节免费在线阅读、最新章节列表," + title + "小说最新更新免费提供,《" + title + "》是一本情节与文笔俱佳的" + sort + "小说,由作者" + author + "创建。"; - - forObject = forObject.replaceFirst("]+\"\\s*/?>", "");//[^>]+表示1个或多个不是>的字符 - forObject = forObject.replaceFirst("", ""); - - - } - - if ("/".equals(requestURI)) { - forObject = forObject.replaceFirst("]+\"\\s*/?>", "");//[^>]+表示1个或多个不是>的字符 - forObject = forObject.replaceFirst("", ""); - - /*forObject = forObject.replaceFirst("", "" + jsString) - .replaceFirst("", "" + imagDiv);*/ - // forObject = forObject.replaceFirst("", "" + imagDiv); - - - } - } - - // forObject = forObject.replaceFirst("", "分享按钮\n" + - // " "); - - /* if (forObject.contains("class=\"sortChannel_nav\"") || forObject.contains("channelHeader2")) { - forObject = forObject.replaceFirst("class=\"searchForm\"", "class=\"searchForm\" style=\"display:none\""); - - }*/ - long timeout = 1800; - if (staticFileFix.contains(postFix)) { - timeout = 60 * 60 * 24; - } - cacheUtil.set(realUrl, forObject, timeout); - } - - - } else { - forObject = postBiquta(req, realUrl, null); - } - } else { - return; - } - } - - } catch (RuntimeException e) { - log.error(e.getMessage(), e); - if (e instanceof HttpClientErrorException && (((HttpClientErrorException) e).getStatusCode() == HttpStatus.NOT_FOUND)) { - //404 - resp.sendRedirect("/"); - return; - } else { - req.getRequestDispatcher("/mang.html").forward(servletRequest, servletResponse); - return; - } - - - //resp.setCharacterEncoding("utf-8"); - - } - resp.getWriter().print(forObject); - return; - } - - private String addAttacDivForSearch(String forObject, String requestURI) { - try { - if (requestURI.endsWith(".html") || requestURI.equals("/")) { - String hotNewsDiv = cacheUtil.get("hotNewsDiv"); - if (hotNewsDiv == null) { - MultiValueMap mmap = new LinkedMultiValueMap<>(); - HttpHeaders headers = new HttpHeaders(); - headers.add("Host", "channel.chinanews.com"); - headers.add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36"); - HttpEntity> request = new HttpEntity<>(mmap, headers); - String body = restTemplate.postForEntity("http://channel.chinanews.com/cns/cjs/sh.shtml", request, String.class).getBody(); - Pattern pattern = Pattern.compile("specialcnsdata\\s*=\\s*\\{\"docs\":(.+)};\\s+newslist\\s*=\\s*specialcnsdata;"); - Matcher matcher = pattern.matcher(body); - if (matcher.find()) { - String jsonResult = matcher.group(1); - if (jsonResult.length() > 5) { - List> list = new ObjectMapper().readValue(jsonResult, List.class); - StringBuilder hotContent = new StringBuilder(); - for (Map map : list) { - hotContent.append("
      \n"); - hotContent.append("
    • \n"); - hotContent.append(map.get("pubtime")); - hotContent.append("
    • \n"); - hotContent.append("
    • \n"); - hotContent.append(map.get("title")); - hotContent.append("
    • \n"); - hotContent.append("
    • \n"); - hotContent.append(map.get("content")); - hotContent.append("
    • \n"); - hotContent.append("
    • \n"); - hotContent.append(""); - hotContent.append("
    • \n"); - hotContent.append("
    \n"); - } - hotNewsDiv = "
    " + hotContent.toString() + "
    "; - cacheUtil.set("hotNewsDiv", hotNewsDiv, 60 * 60 * 24); - forObject = forObject.replaceFirst("", hotNewsDiv + ""); - } - } - } else { - forObject = forObject.replaceFirst("", hotNewsDiv + ""); - - } - } - } catch (Exception e) { - log.error(e.getMessage(), e); - } finally { - - } - - return forObject; - } - - private String setBookURIToHTML(String forObject, String regex) { - String result = forObject; - - Pattern pattern = Pattern.compile(regex); - Matcher matcher = pattern.matcher(forObject); - boolean isFind = matcher.find(); - if (isFind) { - - while (isFind) { - String booURI = matcher.group(1); - String htmlBooURI = booURI.substring(0, booURI.length()) + ".html"; - result = result.replaceFirst(booURI + "/", htmlBooURI); - isFind = matcher.find(); - } - - - } - - return result; - } - - private String postBiquta(HttpServletRequest req, String realUrl, Map otherParam) { - String forObject; - Map oldParameterMap = req.getParameterMap(); - Map newParameterMap = new HashMap<>(); - Set> entries = oldParameterMap.entrySet(); - for (Map.Entry entry : entries) { - newParameterMap.put(entry.getKey(), entry.getValue()[0]); - } - if (otherParam != null) { - newParameterMap.putAll(otherParam); - } - - MultiValueMap map = new LinkedMultiValueMap<>(); - map.setAll(newParameterMap); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - HttpEntity> request = new HttpEntity<>(map, headers); - forObject = restTemplate.postForEntity(realUrl, request, String.class).getBody(); - forObject = forObject.replaceAll("https://m.biquta.com", "http://m.zinglizingli.xyz") - .replaceAll("笔趣阁", "看小说吧") - .replaceAll("笔趣塔", "看小说吧") - .replaceFirst("看小说吧手机版-看小说吧", "看小说吧") - .replaceFirst("content=\"看小说吧\"", "content=\"小说阅读,小说排行,好看小说排行,热门小说排行,小说阅读手机版\"") - .replaceFirst("", "") - .replaceAll("我的书架", "轻小说精品小说") - .replaceFirst("阅读记录","客户端下载") - .replaceFirst("", "\n") - ; - - forObject = setBookURIToHTML(forObject, XIYANGYANG_BOOK_REGEX); - return forObject; - } - - private void setContentType(String fileFix, HttpServletResponse resp) { - String contentType = "text/html"; - switch (fileFix) { - case "js": { - contentType = "application/javascript"; - break; - } - case "css": { - contentType = "text/css"; - break; - } - case "html": { - contentType = "text/html"; - break; - } - default: { - break; - } - } - resp.setContentType(contentType); - - - } - - @Override - public void destroy() { - - } - - -} diff --git a/src/main/java/xyz/zinglizingli/common/schedule/CrawlBooksSchedule.java b/src/main/java/xyz/zinglizingli/common/schedule/CrawlBooksSchedule.java deleted file mode 100644 index 51cce0c..0000000 --- a/src/main/java/xyz/zinglizingli/common/schedule/CrawlBooksSchedule.java +++ /dev/null @@ -1,800 +0,0 @@ -package xyz.zinglizingli.common.schedule; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Service; -import org.springframework.web.client.RestTemplate; -import xyz.zinglizingli.books.po.Book; -import xyz.zinglizingli.books.po.BookContent; -import xyz.zinglizingli.books.po.BookIndex; -import xyz.zinglizingli.books.service.BookService; -import xyz.zinglizingli.books.util.ExcutorUtils; -import xyz.zinglizingli.common.utils.RestTemplateUtil; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -@Service -public class CrawlBooksSchedule { - - - private Logger log = LoggerFactory.getLogger(CrawlBooksSchedule.class); - - - @Autowired - private BookService bookService; - - RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); - - @Value("${books.lowestScore}") - private Float lowestScore; - - @Value("${crawl.website.type}") - private Byte websiteType; - - - private boolean isExcuting = false; - - - @Scheduled(fixedRate = 1000 * 60 * 60 * 3) - public void crawBquge11BooksAtDay() throws Exception { - if (!isExcuting) { - isExcuting = true; - log.debug("crawlBooksSchedule执行中。。。。。。。。。。。。"); - - while (true) { - - try { - switch (websiteType) { - case 1: { - updateBiqudaoBooks(0); - break; - } - case 2: { - updateBiquTaBooks(0); - break; - } - } - Thread.sleep(1000 * 60 * 5); - } catch (Exception e) { - e.printStackTrace(); - } - } - - - } - - - } - - private void updateBiquTaBooks(int finalI) { - String baseUrl = "https://m.biquta.com"; - String catBookListUrlBase = baseUrl + "/class/"; - - int page = 1;//起始页码 - int totalPage = page; - String catBookListUrl = catBookListUrlBase + finalI + "/" + page + ".html"; - String forObject = getByHttpClient(catBookListUrl); - if (forObject != null) { - //匹配分页数 - Pattern pattern = Pattern.compile("value=\"(\\d+)/(\\d+)\""); - Matcher matcher = pattern.matcher(forObject); - boolean isFind = matcher.find(); - System.out.println("匹配分页数" + isFind); - if (isFind) { - int currentPage = Integer.parseInt(matcher.group(1)); - totalPage = Integer.parseInt(matcher.group(2)); - //解析第一页书籍的数据 - Pattern bookPatten = Pattern.compile("href=\"/(\\d+_\\d+)/\""); - parseBiquTaBook(bookPatten, forObject, finalI, baseUrl, true); - } - } - } - - private void parseBiquTaBook(Pattern bookPatten, String forObject, int catNum, String baseUrl, boolean isUpdate) { - Matcher matcher2 = bookPatten.matcher(forObject); - boolean isFind = matcher2.find(); - Pattern scorePatten = Pattern.compile("(\\d+\\.\\d+)分"); - Matcher scoreMatch = scorePatten.matcher(forObject); - boolean scoreFind = scoreMatch.find(); - - Pattern bookNamePatten = Pattern.compile("

    ([^/]+)

    "); - Matcher bookNameMatch = bookNamePatten.matcher(forObject); - boolean isBookNameMatch = bookNameMatch.find(); - - - System.out.println("匹配书籍url" + isFind); - - System.out.println("匹配分数" + scoreFind); - - while (isFind && scoreFind && isBookNameMatch) { - - try { - Float score = Float.parseFloat(scoreMatch.group(1)); - - if (score < lowestScore) {//数据库空间有限,暂时爬取8.0分以上的小说 - continue; - } - - String bokNum = matcher2.group(1); - String bookUrl = baseUrl + "/" + bokNum + "/"; - - String body = getByHttpClient(bookUrl); - if (body != null) { - - String bookName = bookNameMatch.group(1); - Pattern authorPatten = Pattern.compile(">作者:([^/]+)<"); - Matcher authoreMatch = authorPatten.matcher(body); - if (authoreMatch.find()) { - String author = authoreMatch.group(1); - - Pattern statusPatten = Pattern.compile("状态:([^/]+)"); - Matcher statusMatch = statusPatten.matcher(body); - if (statusMatch.find()) { - String status = statusMatch.group(1); - - Pattern updateTimePatten = Pattern.compile("更新:(\\d+-\\d+-\\d+\\s\\d+:\\d+:\\d+)"); - Matcher updateTimeMatch = updateTimePatten.matcher(body); - if (updateTimeMatch.find()) { - String updateTimeStr = updateTimeMatch.group(1); - SimpleDateFormat format = new SimpleDateFormat("yy-MM-dd HH:mm:ss"); - Date updateTime = format.parse(updateTimeStr); - Pattern picPatten = Pattern.compile("]+)\"\\s+onerror=\"this.src="); - Matcher picMather = picPatten.matcher(body); - if (picMather.find()) { - String picSrc = picMather.group(1); - - Pattern descPatten = Pattern.compile("class=\"review\">([^<]+)

    "); - Matcher descMatch = descPatten.matcher(body); - if (descMatch.find()) { - String desc = descMatch.group(1); - - - Book book = new Book(); - book.setAuthor(author); - book.setCatid(catNum); - book.setBookDesc(desc); - book.setBookName(bookName); - book.setScore(score > 10 ? 8.0f : score); - book.setPicUrl(picSrc); - book.setBookStatus(status); - book.setUpdateTime(updateTime); - - List indexList = new ArrayList<>(); - List contentList = new ArrayList<>(); - - //读取目录 - Pattern indexPatten = Pattern.compile("查看完整目录"); - Matcher indexMatch = indexPatten.matcher(body); - if (indexMatch.find()) { - String indexUrl = baseUrl + indexMatch.group(1); - String body2 = getByHttpClient(indexUrl); - if (body2 != null) { - Pattern indexListPatten = Pattern.compile("([^/]+)"); - Matcher indexListMatch = indexListPatten.matcher(body2); - - boolean isFindIndex = indexListMatch.find(); - - int indexNum = 0; - - //查询该书籍已存在目录号 - List hasIndexNum = bookService.queryIndexCountByBookNameAndBAuthor(bookName, author); - //更新和插入分别开,插入只在凌晨做一次 - if ((isUpdate && hasIndexNum.size() > 0) || (!isUpdate && hasIndexNum.size() == 0)) { - while (isFindIndex) { - if (!hasIndexNum.contains(indexNum)) { - - String contentUrl = baseUrl + indexListMatch.group(1); - String indexName = indexListMatch.group(2); - - - //查询章节内容 - String body3 = getByHttpClient(contentUrl); - if (body3 != null) { - Pattern contentPattten = Pattern.compile("章节错误,点此举报(.*)加入书签,方便阅读"); - String start = "『章节错误,点此举报』"; - String end = "『加入书签,方便阅读』"; - String content = body3.substring(body3.indexOf(start) + start.length(), body3.indexOf(end)); - //TODO插入章节目录和章节内容 - BookIndex bookIndex = new BookIndex(); - bookIndex.setIndexName(indexName); - bookIndex.setIndexNum(indexNum); - indexList.add(bookIndex); - BookContent bookContent = new BookContent(); - bookContent.setContent(content); - bookContent.setIndexNum(indexNum); - contentList.add(bookContent); - - - } else { - break; - } - - - } - indexNum++; - isFindIndex = indexListMatch.find(); - } - - if (indexList.size() == contentList.size() && indexList.size() > 0) { - ExcutorUtils.excuteFixedTask(new Runnable() { - @Override - public void run() { - bookService.saveBookAndIndexAndContent(book, indexList, contentList); - } - }); - - } - } - } - - - } - - - } - - - } - } - } - - - } - - } - - - } catch (Exception e) { - - e.printStackTrace(); - - } finally { - matcher2.find(); - isFind = matcher2.find();//需要找两次,应为有两个一样的路径匹配 - scoreFind = scoreMatch.find(); - isBookNameMatch = bookNameMatch.find(); - } - - - } - } - - private void updateBiqudaoBooks(int finalI) { - String baseUrl = "https://m.biqudao.com"; - String catBookListUrlBase = baseUrl + "/bqgeclass/"; - - int page = 1;//起始页码 - int totalPage = page; - String catBookListUrl = catBookListUrlBase + finalI + "/" + page + ".html"; - String forObject = getByHttpClient(catBookListUrl); - if (forObject != null) { - //匹配分页数 - Pattern pattern = Pattern.compile("value=\"(\\d+)/(\\d+)\""); - Matcher matcher = pattern.matcher(forObject); - boolean isFind = matcher.find(); - System.out.println("匹配分页数" + isFind); - if (isFind) { - int currentPage = Integer.parseInt(matcher.group(1)); - totalPage = Integer.parseInt(matcher.group(2)); - //解析第一页书籍的数据 - Pattern bookPatten = Pattern.compile("href=\"/(bqge\\d+)/\""); - //白天更新 - parseBiquDaoBook(bookPatten, forObject, finalI, baseUrl, true); - } - } - - - } - - - //@Scheduled(cron = "0 0 2 * * ?")磁盘空间不足,暂时不抓新书 - //暂定2小说,只爬分类前3本书,一共3*7=21本书,爬等以后书籍多了之后,会适当缩短更新间隔 - public void crawBquge11BooksAtNight() throws Exception { - final String baseUrl = "https://m.biqudao.com"; - log.debug("crawlBooksSchedule执行中。。。。。。。。。。。。"); - - -//①爬分类列表的书籍url和总页数 -// https: -////m.biquta.com/class/1/1.html -// https: -////m.biquta.com/class/2/1.html -// https: -////m.biquta.com/class/2/2.html -// -// -// https: -////m.biquta.com/class/2/2.html -// -// -// -// -// -// - //第一周期全部书拉取完后,可进行第二周期,只拉取前面几页的数据,拉取时间间隔变小 - log.debug("crawlBooksSchedule循环执行中。。。。。。。。。。。。"); - //List classIdList = new ArrayList<>(Arrays.asList(new Integer[]{1,2,3,4,5,6,7})); - // for (int i = 1; i <= 7; i++) { - - // log.debug("crawlBooksSchedule分类"+i+"执行中。。。。。。。。。。。。"); - - // int finalI = i; - /* new Thread( - () -> {*/ - - try { - //先随机更新分类 - //Random random = new Random(); - //int finalI = classIdList.get(new Random().nextInt(classIdList.size())); - //classIdList.remove(finalI); - int finalI = 0; - //拼接分类URL - int page = 1;//起始页码 - int totalPage = page; - String catBookListUrl = baseUrl + "/bqgeclass/" + finalI + "/" + page + ".html"; - String forObject = getByHttpClient(catBookListUrl); - if (forObject != null) { - //匹配分页数 - Pattern pattern = Pattern.compile("value=\"(\\d+)/(\\d+)\""); - Matcher matcher = pattern.matcher(forObject); - boolean isFind = matcher.find(); - System.out.println("匹配分页数" + isFind); - if (isFind) { - int currentPage = Integer.parseInt(matcher.group(1)); - totalPage = Integer.parseInt(matcher.group(2)); - //解析第一页书籍的数据 - Pattern bookPatten = Pattern.compile("href=\"/(bqge\\d+)/\""); - //晚上插入 - parseBiquDaoBook(bookPatten, forObject, finalI, baseUrl, false); - while (currentPage < totalPage) { - if (new Date().getHours() > 5) { - break; - } - catBookListUrl = baseUrl + "/bqgeclass/" + finalI + "/" + (currentPage + 1) + ".html"; - forObject = getByHttpClient(catBookListUrl); - if (forObject != null) { - //匹配分页数 - matcher = pattern.matcher(forObject); - isFind = matcher.find(); - - if (isFind) { - currentPage = Integer.parseInt(matcher.group(1)); - totalPage = Integer.parseInt(matcher.group(2)); - parseBiquDaoBook(bookPatten, forObject, finalI, baseUrl, false); - } - } else { - currentPage++; - } - } - } - } - } catch (Exception e) { - e.printStackTrace(); - } - - /* } - ).start();*/ - - - // } - - - } - - private void parseBiquDaoBook(Pattern bookPatten, String forObject, int catNum, String baseUrl, boolean isUpdate) { - - Matcher matcher2 = bookPatten.matcher(forObject); - boolean isFind = matcher2.find(); - Pattern scorePatten = Pattern.compile("(\\d+\\.\\d+)分"); - Matcher scoreMatch = scorePatten.matcher(forObject); - boolean scoreFind = scoreMatch.find(); - - Pattern bookNamePatten = Pattern.compile("

    ([^/]+)

    "); - Matcher bookNameMatch = bookNamePatten.matcher(forObject); - boolean isBookNameMatch = bookNameMatch.find(); - - - System.out.println("匹配书籍url" + isFind); - - System.out.println("匹配分数" + scoreFind); - - while (isFind && scoreFind && isBookNameMatch) { - - try { - Float score = Float.parseFloat(scoreMatch.group(1)); - - if (score < lowestScore) {//数据库空间有限,暂时爬取8.0分以上的小说 - continue; - } - - String bokNum = matcher2.group(1); - String bookUrl = baseUrl + "/" + bokNum + "/"; - - String body = getByHttpClient(bookUrl); - if (body != null) { - - String bookName = bookNameMatch.group(1); - Pattern authorPatten = Pattern.compile("
  • 作者:([^/]+)
  • "); - Matcher authoreMatch = authorPatten.matcher(body); - if (authoreMatch.find()) { - String author = authoreMatch.group(1); - - Pattern statusPatten = Pattern.compile("状态:([^/]+)"); - Matcher statusMatch = statusPatten.matcher(body); - if (statusMatch.find()) { - String status = statusMatch.group(1); - - Pattern catPatten = Pattern.compile("类别:([^/]+)"); - Matcher catMatch = catPatten.matcher(body); - if (catMatch.find()) { - String catName = catMatch.group(1); - switch (catName) { - case "玄幻奇幻": { - catNum = 1; - break; - } - case "武侠仙侠": { - catNum = 2; - break; - } - case "都市言情": { - catNum = 3; - break; - } - case "历史军事": { - catNum = 4; - break; - } - case "科幻灵异": { - catNum = 5; - break; - } - case "网游竞技": { - catNum = 6; - break; - } - case "女生频道": { - catNum = 7; - break; - } - default: { - catNum = 1; - break; - } - } - Pattern updateTimePatten = Pattern.compile("更新:(\\d+-\\d+-\\d+\\s\\d+:\\d+:\\d+)"); - Matcher updateTimeMatch = updateTimePatten.matcher(body); - if (updateTimeMatch.find()) { - String updateTimeStr = updateTimeMatch.group(1); - SimpleDateFormat format = new SimpleDateFormat("yy-MM-dd HH:mm:ss"); - Date updateTime = format.parse(updateTimeStr); - Pattern picPatten = Pattern.compile("]+)\"\\s+onerror=\"this.src="); - Matcher picMather = picPatten.matcher(body); - if (picMather.find()) { - String picSrc = picMather.group(1); - - Pattern descPatten = Pattern.compile("class=\"review\">([^<]+)

    "); - Matcher descMatch = descPatten.matcher(body); - if (descMatch.find()) { - String desc = descMatch.group(1); - - - Book book = new Book(); - book.setAuthor(author); - book.setCatid(catNum); - book.setBookDesc(desc); - book.setBookName(bookName); - book.setScore(score > 10 ? 8.0f : score); - book.setPicUrl(picSrc); - book.setBookStatus(status); - book.setUpdateTime(updateTime); - - List indexList = new ArrayList<>(); - List contentList = new ArrayList<>(); - - //读取目录 - Pattern indexPatten = Pattern.compile("查看完整目录"); - Matcher indexMatch = indexPatten.matcher(body); - if (indexMatch.find()) { - String indexUrl = baseUrl + indexMatch.group(1); - String body2 = getByHttpClient(indexUrl); - if (body2 != null) { - Pattern indexListPatten = Pattern.compile("([^/]+)"); - Matcher indexListMatch = indexListPatten.matcher(body2); - - boolean isFindIndex = indexListMatch.find(); - - int indexNum = 0; - - //查询该书籍已存在目录号 - List hasIndexNum = bookService.queryIndexCountByBookNameAndBAuthor(bookName, author); - //更新和插入分别开,插入只在凌晨做一次 - if ((isUpdate && hasIndexNum.size() > 0) || (!isUpdate && hasIndexNum.size() == 0)) { - while (isFindIndex) { - if (!hasIndexNum.contains(indexNum)) { - - String contentUrl = baseUrl + indexListMatch.group(1); - String indexName = indexListMatch.group(2); - - - //查询章节内容 - String body3 = getByHttpClient(contentUrl); - if (body3 != null) { - Pattern contentPattten = Pattern.compile("章节错误,点此举报(.*)加入书签,方便阅读"); - String start = "『章节错误,点此举报』"; - String end = "『加入书签,方便阅读』"; - String content = body3.substring(body3.indexOf(start) + start.length(), body3.indexOf(end)); - //TODO插入章节目录和章节内容 - BookIndex bookIndex = new BookIndex(); - bookIndex.setIndexName(indexName); - bookIndex.setIndexNum(indexNum); - indexList.add(bookIndex); - BookContent bookContent = new BookContent(); - bookContent.setContent(content); - bookContent.setIndexNum(indexNum); - contentList.add(bookContent); - - - } else { - break; - } - - - } - indexNum++; - isFindIndex = indexListMatch.find(); - } - - if (indexList.size() == contentList.size() && indexList.size() > 0) { - ExcutorUtils.excuteFixedTask(new Runnable() { - @Override - public void run() { - bookService.saveBookAndIndexAndContent(book, indexList, contentList); - } - }); - - } - } - } - - - } - - - } - - - } - } - } - } - - - } - - } - - - } catch (Exception e) { - - e.printStackTrace(); - - } finally { - matcher2.find(); - isFind = matcher2.find();//需要找两次,应为有两个一样的路径匹配 - scoreFind = scoreMatch.find(); - isBookNameMatch = bookNameMatch.find(); - } - - - } - - } - - private String getByHttpClient(String catBookListUrl) { - try { - /* HttpClient httpClient = new DefaultHttpClient(); - HttpGet getReq = new HttpGet(catBookListUrl); - getReq.setHeader("user-agent", "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1"); - HttpResponse execute = httpClient.execute(getReq); - if (execute.getStatusLine().getStatusCode() == HttpStatus.OK.value()) { - HttpEntity entity = execute.getEntity(); - return EntityUtils.toString(entity, "utf-8"); - } else { - return null; - }*/ - //经测试restTemplate比httpClient效率高出很多倍,所有选择restTemplate - ResponseEntity forEntity = restTemplate.getForEntity(catBookListUrl, String.class); - if (forEntity.getStatusCode() == HttpStatus.OK) { - return forEntity.getBody(); - } else { - return null; - } - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - /*** - * 解析书籍详情之后的页面 - */ - private void parseBook(Pattern bookPatten, String forObject, RestTemplate restTemplate, int catNum, String baseUrl) throws ParseException { - Matcher matcher2 = bookPatten.matcher(forObject); - boolean isFind = matcher2.find(); - Pattern scorePatten = Pattern.compile("(\\d+\\.\\d+)分"); - Matcher scoreMatch = scorePatten.matcher(forObject); - boolean scoreFind = scoreMatch.find(); - - Pattern bookNamePatten = Pattern.compile("

    ([^/]+)

    "); - Matcher bookNameMatch = bookNamePatten.matcher(forObject); - boolean isBookNameMatch = bookNameMatch.find(); - - Pattern authorPatten = Pattern.compile(">作者:([^/]+)<"); - Matcher authoreMatch = authorPatten.matcher(forObject); - boolean isFindAuthor = authoreMatch.find(); - - - System.out.println("匹配书籍url" + isFind); - - System.out.println("匹配分数" + scoreFind); - while (isFind && scoreFind && isBookNameMatch && isFindAuthor) { - - try { - Float score = Float.parseFloat(scoreMatch.group(1)); - - if (score < lowestScore) {//数据库空间有限,暂时爬取8.0分以上的小说 - continue; - } - String bookName = bookNameMatch.group(1); - String author = authoreMatch.group(1); - - String bokNum = matcher2.group(1); - String bookUrl = baseUrl + "/" + bokNum + "/"; - - ResponseEntity forEntity = restTemplate.getForEntity(bookUrl, String.class); - if (forEntity.getStatusCode() == HttpStatus.OK) { - - String body = forEntity.getBody(); - - Pattern statusPatten = Pattern.compile("状态:([^/]+)"); - Matcher statusMatch = statusPatten.matcher(body); - if (statusMatch.find()) { - String status = statusMatch.group(1); - Pattern updateTimePatten = Pattern.compile("更新:(\\d+-\\d+-\\d+\\s\\d+:\\d+:\\d+)"); - Matcher updateTimeMatch = updateTimePatten.matcher(body); - if (updateTimeMatch.find()) { - String updateTimeStr = updateTimeMatch.group(1); - SimpleDateFormat format = new SimpleDateFormat("yy-MM-dd HH:mm:ss"); - Date updateTime = format.parse(updateTimeStr); - Pattern picPatten = Pattern.compile("]+)\"\\s+onerror=\"this.src="); - Matcher picMather = picPatten.matcher(body); - if (picMather.find()) { - String picSrc = picMather.group(1); - - Pattern descPatten = Pattern.compile("class=\"review\">([^<]+)

    "); - Matcher descMatch = descPatten.matcher(body); - if (descMatch.find()) { - String desc = descMatch.group(1); - - - Book book = new Book(); - book.setAuthor(author); - book.setCatid(catNum); - book.setBookDesc(desc); - book.setBookName(bookName); - book.setScore(score > 10 ? 8.0f : score); - book.setPicUrl(picSrc); - book.setBookStatus(status); - book.setUpdateTime(updateTime); - - List indexList = new ArrayList<>(); - List contentList = new ArrayList<>(); - - //读取目录 - Pattern indexPatten = Pattern.compile("查看完整目录"); - Matcher indexMatch = indexPatten.matcher(body); - if (indexMatch.find()) { - String indexUrl = baseUrl + indexMatch.group(1); - ResponseEntity forEntity1 = restTemplate.getForEntity(indexUrl, String.class); - if (forEntity1.getStatusCode() == HttpStatus.OK) { - String body2 = forEntity1.getBody(); - Pattern indexListPatten = Pattern.compile("([^/]+)"); - Matcher indexListMatch = indexListPatten.matcher(body2); - - boolean isFindIndex = indexListMatch.find(); - - int indexNum = 0; - - //查询该书籍已存在目录号 - List hasIndexNum = bookService.queryIndexCountByBookNameAndBAuthor(bookName, author); - - while (isFindIndex) { - if (!hasIndexNum.contains(indexNum)) { - - String contentUrl = baseUrl + indexListMatch.group(1); - String indexName = indexListMatch.group(2); - - - //查询章节内容 - ResponseEntity forEntity2 = restTemplate.getForEntity(contentUrl, String.class); - if (forEntity2.getStatusCode() == HttpStatus.OK) { - String body3 = forEntity2.getBody(); - Pattern contentPattten = Pattern.compile("章节错误,点此举报(.*)加入书签,方便阅读"); - String start = "『章节错误,点此举报』"; - String end = "『加入书签,方便阅读』"; - String content = body3.substring(body3.indexOf(start) + start.length(), body3.indexOf(end)); - //TODO插入章节目录和章节内容 - BookIndex bookIndex = new BookIndex(); - bookIndex.setIndexName(indexName); - bookIndex.setIndexNum(indexNum); - indexList.add(bookIndex); - BookContent bookContent = new BookContent(); - bookContent.setContent(content); - bookContent.setIndexNum(indexNum); - contentList.add(bookContent); - - - } else { - break; - } - - } - - indexNum++; - isFindIndex = indexListMatch.find(); - } - if (indexList.size() == contentList.size() && indexList.size() > 0) { - bookService.saveBookAndIndexAndContent(book, indexList, contentList); - } - - - } - } - - - } - - - } - } - - - } - - } - - } catch (Exception e) { - - e.printStackTrace(); - - } finally { - matcher2.find(); - isFind = matcher2.find();//需要找两次,应为有两个一样的路径匹配 - scoreFind = scoreMatch.find(); - isBookNameMatch = bookNameMatch.find(); - isFindAuthor = authoreMatch.find(); - } - - - } - - } -} diff --git a/src/main/java/xyz/zinglizingli/common/schedule/SendEmaillSchedule.java b/src/main/java/xyz/zinglizingli/common/schedule/SendEmaillSchedule.java deleted file mode 100644 index bda344f..0000000 --- a/src/main/java/xyz/zinglizingli/common/schedule/SendEmaillSchedule.java +++ /dev/null @@ -1,56 +0,0 @@ -package xyz.zinglizingli.common.schedule; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import xyz.zinglizingli.books.constant.CacheKeyConstans; -import xyz.zinglizingli.books.service.MailService; -import xyz.zinglizingli.books.util.RandomValueUtil; -import xyz.zinglizingli.common.cache.CommonCacheUtil; - -import java.util.Random; - - -/* -主动推送:最为快速的提交方式, -建议您将站点当天新产出链接立即通过此方式推送给百度, -以保证新链接可以及时被百度收录。 -*/ -@Service -public class SendEmaillSchedule { - - @Autowired - private CommonCacheUtil cacheUtil; - - @Autowired - private MailService mailService; - - - private Logger log = LoggerFactory.getLogger(SendEmaillSchedule.class); - - - // @Scheduled(fixedRate = 1000*60*60*24) - public void sendEmaill() { - System.out.println("SendEmaillSchedule。。。。。。。。。。。。。。。"); - - for(int i = 0 ; i < 1000; i++){ - String email = RandomValueUtil.getEmail(); - if(cacheUtil.get(CacheKeyConstans.EMAIL_URL_PREFIX_KEY+email)!=null){ - continue; - } - cacheUtil.setObject(CacheKeyConstans.EMAIL_URL_PREFIX_KEY+email,email,60*60*24*30); - String subject = "推荐一个看小说的弹幕网站"; - String content = "精品小说楼是国内优秀的小说弹幕网站,精品小说楼提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。" + - "
    点击进入" - +"
    "; - mailService.sendHtmlMail(email, subject, content); - try { - Thread.sleep(new Random().nextInt(1000*60*10)+1000*60); - } catch (InterruptedException e) { - log.error(e.getMessage(),e); - } - } - - } -} diff --git a/src/main/java/xyz/zinglizingli/common/schedule/SendUrlSchedule.java b/src/main/java/xyz/zinglizingli/common/schedule/SendUrlSchedule.java deleted file mode 100644 index 8175fed..0000000 --- a/src/main/java/xyz/zinglizingli/common/schedule/SendUrlSchedule.java +++ /dev/null @@ -1,84 +0,0 @@ -package xyz.zinglizingli.common.schedule; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Service; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestTemplate; -import xyz.zinglizingli.books.service.BookService; -import xyz.zinglizingli.common.cache.CommonCacheUtil; -import xyz.zinglizingli.common.utils.RestTemplateUtil; - -import java.util.*; - - -/* -主动推送:最为快速的提交方式, -建议您将站点当天新产出链接立即通过此方式推送给百度, -以保证新链接可以及时被百度收录。 -*/ -@Service -public class SendUrlSchedule { - - @Autowired - private CommonCacheUtil cacheUtil; - - @Autowired - private BookService bookService; - - @Value("${baidu.record.ids}") - private String recordedIds; - - private Logger log = LoggerFactory.getLogger(SendUrlSchedule.class); - - - //@Scheduled(cron = "0 0 1 * * 1") - public void sendAllBookToBaidu() { - System.out.println("sendAllBookToBaidu。。。。。。。。。。。。。。。"); - - List recordedIdsList = Arrays.asList(recordedIds.split(",")); - List idList = bookService.queryEndBookIdList(); - RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); - - - String reqBody = ""; - for (String id : idList) { - try { - if (!recordedIdsList.contains(id)) { - reqBody += ("https://www.zinglizingli.xyz/book/" + id + ".html" + "\n"); - //reqBody+=("http://www.zinglizingli.xyz/book/"+id+".html"+"\n"); - if (reqBody.length() > 2000) { - MultiValueMap map = new LinkedMultiValueMap<>(); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.TEXT_PLAIN); - //headers.add("User-Agent","curl/7.12.1"); - headers.add("Host", "data.zz.baidu.com"); - headers.setContentLength(reqBody.length()); - HttpEntity request = new HttpEntity<>(reqBody, headers); - System.out.println("推送数据:" + reqBody); - ResponseEntity stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?site=www.zinglizingli.xyz&token=IuK7oVrPKe3U606x", request, String.class); - System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); - Thread.sleep(1000 * 10); - System.out.println("推送数据:" + reqBody); - stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?appid=1643715155923937&token=fkEcTlId6Cf21Sz3&type=batch", request, String.class); - System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody()); - - reqBody = ""; - Thread.sleep(1000 * 10); - } - } - } catch (Exception e) { - log.error(e.getMessage(), e); - } - } - - } -} diff --git a/src/main/java/xyz/zinglizingli/common/schedule/SendWeiboSchedule.java b/src/main/java/xyz/zinglizingli/common/schedule/SendWeiboSchedule.java deleted file mode 100644 index e689273..0000000 --- a/src/main/java/xyz/zinglizingli/common/schedule/SendWeiboSchedule.java +++ /dev/null @@ -1,497 +0,0 @@ -package xyz.zinglizingli.common.schedule; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Service; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestTemplate; -import xyz.zinglizingli.books.po.Book; -import xyz.zinglizingli.books.service.BookService; -import xyz.zinglizingli.common.cache.CommonCacheUtil; -import xyz.zinglizingli.common.utils.RestTemplateUtil; - -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -@Service -public class SendWeiboSchedule { - - @Autowired - private CommonCacheUtil cacheUtil; - - @Autowired - private BookService bookService; - - private Logger log = LoggerFactory.getLogger(SendWeiboSchedule.class); - - private boolean isExcuting = false;//是否正在执行 - - private long excuteNum = 0; - - @Value("${search.schedule.isRunExcute}") - private String isRunExcute;//是否在运行时就执行sendAtNight定时器 - - @Value("${browser.cookie}") - private String cookieStr; - - private static final String BOOKNAME_CACHE_PREFIX = "bookName_Cache_Prefix:"; - - - //@Scheduled(fixedRate = 1000 * 60 * 35) - public void sendAtDay() { - log.debug("sendWeoboSchedule执行中。。。。。。。。。。。。"); - if (!isExcuting) { - isExcuting = true; - excuteNum++; - //long sleepMillis = 1000 * 60 * 5; - long sleepMillis = 1000 * 60 * 5; - try { - - String name; - String desc; - String author; - String bookNum; - String resultCode; - long realSleepMillis; - - RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); - - //发送数据库中的一篇文章 - Map dataMap = bookService.queryNewstBook(); - log.debug("dataMap大小:" + dataMap.size()); - if (dataMap.size() > 1) { - Book book = (Book) dataMap.get("book"); - String newstIndexName = (String) dataMap.get("newstIndexName"); - name = newstIndexName + "_" + book.getBookName(); - desc = book.getBookDesc(); - author = book.getAuthor(); - bookNum = new Random().nextInt(100) + ""; - realSleepMillis = sleepMillis + (new Random().nextInt(15)) * 60 * 1000; - log.debug("发送微博书籍名:" + book.getBookName()); - if (!name.equals(cacheUtil.get(BOOKNAME_CACHE_PREFIX + name))) { - resultCode = sendOneSiteWeibo(restTemplate, book.getBookName(), newstIndexName, author, desc, "精品小说楼", bookNum, "https://www.zinglizingli.xyz/book/" + book.getId() + ".html"); - log.debug("发送微博书籍名:" + book.getBookName() + " 状态码:" + resultCode); - if ("{\"code\":\"A00006\"}".equals(resultCode)) { - cacheUtil.set(BOOKNAME_CACHE_PREFIX + name, name, 60 * 60 * 24 * 30); - } - Thread.sleep(realSleepMillis + 32); - } - } - - - //分享喜羊羊小说网 - String url2 = "http://m.zinglizingli.xyz/class/0/1.html"; - - ResponseEntity forEntity2 = restTemplate.getForEntity(url2, String.class); - - - String forObject2 = forEntity2.getBody(); - Pattern pattern = Pattern.compile("" + - "\\s*

    ((.*))

    \\s*" + - ""); - Matcher match = pattern.matcher(forObject2); - boolean isFind = match.find(); - if (isFind) { - while (isFind) { - - float score = Float.parseFloat(match.group(4)); - - if (score >= 7.0) { - - bookNum = match.group(1); - String href = "http://m.zinglizingli.xyz/" + bookNum + ".html"; - name = match.group(2); - if (!name.equals(cacheUtil.get(BOOKNAME_CACHE_PREFIX + name))) { - author = match.group(3); - desc = match.group(5); - - resultCode = sendOneSiteWeibo(restTemplate, name, "", author, desc, "看小说吧", bookNum, href); - if ("{\"code\":\"A00006\"}".equals(resultCode)) { - cacheUtil.set(BOOKNAME_CACHE_PREFIX + name, name, 60 * 60 * 24 * 30); - } - - realSleepMillis = sleepMillis + (new Random().nextInt(15)) * 60 * 1000; - Thread.sleep(realSleepMillis); - - } - } - isFind = match.find(); - } - - - } - - } catch (Exception e) { - log.error(e.getMessage(), e); - - } finally { - isExcuting = false; - } - - } - - } - - //@Scheduled(fixedRate = 1000 * 60 * 35) - //@Scheduled(fixedRate = 1000 * 60 * 5) - /*public void sendAtDay() { - if (!isExcuting) { - isExcuting = true; - excuteNum++; - //long sleepMillis = 1000 * 60 * 5; - long sleepMillis = 1000 * 60 * 25; - try { - RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); - //分享酸味书屋 - String url = "http://www.zinglizingli.xyz/paihangbang_lastupdate/1.html"; - - //分享喜羊羊小说网 - String url2 = "http://m.zinglizingli.xyz/class/0/1.html"; - - ResponseEntity forEntity = restTemplate.getForEntity(url, String.class); - ResponseEntity forEntity2 = restTemplate.getForEntity(url2, String.class); - - String forObject = forEntity.getBody(); - Pattern pattern = Pattern.compile("
  • \n" + - "(.*)\n" + - "(.*)\n" + - "(.*)\\.\\.\\.\n" + - "(\\d*)人在看\n" + - "
  • "); - Matcher match = pattern.matcher(forObject); - boolean isFind = match.find(); - if (isFind) { - while (isFind) { - - int lookNum = Integer.parseInt(match.group(5)); - if (lookNum > 5000) { - String bookNum = match.group(1); - String href = "http://www.zinglizingli.xyz/" + bookNum + ".html"; - String name = match.group(2); - log.debug(excuteNum + ":" + name + "_BOOKNAME_CACHE:" + cacheUtil.get(BOOKNAME_CACHE_PREFIX + name)); - if (!name.equals(cacheUtil.get(BOOKNAME_CACHE_PREFIX + name))) { - - String author = match.group(3); - String desc = match.group(4); - log.debug(excuteNum + ":" + name); - String resultCode = sendOneSiteWeibo(restTemplate, name, author, desc, "酸味书屋", bookNum, href); - log.debug(excuteNum + ":" + name + ":" + resultCode); - log.debug(excuteNum + ":resultCode=={\"code\":\"A00006\"}" + "{\"code\":\"A00006\"}".equals(resultCode)); - - if ("{\"code\":\"A00006\"}".equals(resultCode)) { - cacheUtil.set(BOOKNAME_CACHE_PREFIX + name, name, 60 * 60 * 24 * 30); - } - long realSleepMillis = sleepMillis + (new Random().nextInt(15)) * 60 * 1000; - Thread.sleep(realSleepMillis); - } - - } - isFind = match.find(); - } - - - String forObject2 = forEntity2.getBody(); - pattern = Pattern.compile("" + - "\\s*

    ((.*))

    \\s*" + - ""); - match = pattern.matcher(forObject2); - isFind = match.find(); - if (isFind) { - while (isFind) { - - float score = Float.parseFloat(match.group(4)); - - if (score >= 7.0) { - - String bookNum = match.group(1); - String href = "http://m.zinglizingli.xyz/" + bookNum + ".html"; - String name = match.group(2); - if (!name.equals(cacheUtil.get(BOOKNAME_CACHE_PREFIX + name))) { - String author = match.group(3); - String desc = match.group(5); - - String resultCode = sendOneSiteWeibo(restTemplate, name, author, desc, "喜羊羊小说网", bookNum, href); - if ("{\"code\":\"A00006\"}".equals(resultCode)) { - cacheUtil.set(BOOKNAME_CACHE_PREFIX + name, name, 60 * 60 * 24 * 30); - } - - long realSleepMillis = sleepMillis + (new Random().nextInt(15)) * 60 * 1000; - Thread.sleep(realSleepMillis); - - } - } - isFind = match.find(); - } - - - } - } - - } catch (Exception e) { - log.error(e.getMessage(),e); - - } finally { - isExcuting = false; - } - - } - - } -*/ - //19点到23点,1点到4点每隔50分钟执行一次,20本书*2分钟+空闲时间 - //@Scheduled(cron = "0 */50 19-23,1-4 * * ?") - - /* public void sendAtNight() throws InterruptedException, IOException { - if (!isExcuting) { - isExcuting = true; - log.info("sendAtNight定时器开始执行。。。。"); - long sleepMillis = 1000 * 60 * 2; - sendAllSiteWeibo(sleepMillis); - Thread.sleep(1000 * 60 * 10); - isExcuting = false; - } - - - }*/ - - - //6点到17点每隔1小时执行一次,20本书*5分钟+空闲时间 - //@Scheduled(cron = "0 0 6-17/1 * * ?") - /* public void sendAtDayTime() throws InterruptedException, IOException { - - if (!isExcuting) { - isExcuting = true; - log.info("sendAtDayTime定时器开始执行。。。。"); - long sleepMillis = 1000 * 60 * 5; - sendAllSiteWeibo(sleepMillis); - Thread.sleep(1000 * 60 * 10); - isExcuting = false; - } - - }*/ - - /*private void sendAllSiteWeibo(long sleepMillis) throws InterruptedException { - RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); - //分享酸味书屋 - String url = "http://www.zinglizingli.xyz/paihangbang_lastupdate/1.html"; - - //分享喜羊羊小说网 - String url2 = "http://m.zinglizingli.xyz/class/0/1.html"; - - ResponseEntity forEntity = restTemplate.getForEntity(url, String.class); - ResponseEntity forEntity2 = restTemplate.getForEntity(url2, String.class); - - String forObject = forEntity.getBody(); - Pattern pattern = Pattern.compile("
  • \n" + - "(.*)\n" + - "(.*)\n" + - "(.*)\\.\\.\\.\n" + - "(\\d*)人在看\n" + - "
  • "); - Matcher match = pattern.matcher(forObject); - boolean isFind = match.find(); - if (isFind) { - while (isFind) { - - int lookNum = Integer.parseInt(match.group(5)); - if (lookNum > 5000) { - String bookNum = match.group(1); - String href = "http://www.zinglizingli.xyz/" + bookNum; - String name = match.group(2); - String author = match.group(3); - String desc = match.group(4); - sendOneSiteWeibo(restTemplate, name, author, desc, "酸味书屋", bookNum, href); - long realSleepMillis = sleepMillis + (new Random().nextInt(15)) * 60 * 1000; - Thread.sleep(realSleepMillis); - } - - isFind = match.find(); - - } - } - - - String forObject2 = forEntity2.getBody(); - pattern = Pattern.compile("" + - "\\s*

    ((.*))

    \\s*" + - ""); - match = pattern.matcher(forObject2); - isFind = match.find(); - if (isFind) { - while (isFind) { - - float score = Float.parseFloat(match.group(4)); - - if (score >= 7.0) { - - String bookNum = match.group(1); - String href = "http://m.zinglizingli.xyz/" + bookNum; - String name = match.group(2); - String author = match.group(3); - String desc = match.group(5); - - sendOneSiteWeibo(restTemplate, name, author, desc, "喜羊羊小说网", bookNum, href); - - long realSleepMillis = sleepMillis + (new Random().nextInt(15)) * 60 * 1000; - Thread.sleep(realSleepMillis); - } - - isFind = match.find(); - - - } - } - }*/ - - - public static void main(String[] args) throws Exception { - RestTemplate restTemplate = RestTemplateUtil.getInstance("utf-8"); - //分享酸味书屋 - String url = "http://www.zinglizingli.xyz/paihangbang_lastupdate/1.html"; - ResponseEntity forEntity = restTemplate.getForEntity(url, String.class); - String forObject = forEntity.getBody(); - Pattern pattern = Pattern.compile("
  • \n" + - "(.*)\n" + - "(.*)\n" + - "(.*)\\.\\.\\.\n" + - "\\d*人在看\n" + - "
  • "); - Matcher match = pattern.matcher(forObject); - boolean isFind = match.find(); - if (isFind) { - while (isFind) { - String bookNum = match.group(1); - String href = "http://www.zinglizingli.xyz/" + bookNum; - String name = match.group(2); - String author = match.group(3); - String desc = match.group(4); - - - isFind = match.find(); - - } - } - - //分享喜羊羊小说网 - url = "http://m.zinglizingli.xyz/class/0/1.html"; - forEntity = restTemplate.getForEntity(url, String.class); - forObject = forEntity.getBody(); - pattern = Pattern.compile("" + - "\\s*

    ((.*))

    \\s*" + - ""); - match = pattern.matcher(forObject); - isFind = match.find(); - if (isFind) { - while (isFind) { - String bookNum = match.group(1); - String href = "http://m.zinglizingli.xyz/" + bookNum; - String name = match.group(2); - String author = match.group(3); - String desc = match.group(4); - // sendOneSiteWeibo(restTemplate, name, author, desc, "喜羊羊小说网", bookNum, href); - - - isFind = match.find(); - - - } - } - - - } - - private String sendOneSiteWeibo(RestTemplate template, String bookName, String indexName, String author, String desc, String wapName, String bookNum, String href) { - String baseUrl = "http://service.weibo.com/share/aj_share.php"; - Map param = new HashMap<>(); - /*String content = bookName + "小说最新章节列表," + bookName + "小说免费在线阅读," + bookName + - "小说TXT下载,尽在" + wapName +href+ "\n"; - if(indexName != null){ - content+=("最新章节:"+indexName+"\n"); - } - content = content + "作者:"+(author.replace("作者:","")) + "\n"; - content += ("简介:"+desc.replace("简介:",""));*/ - String content = bookName+"最新章节,小说"+bookName+"("+author.replace("作者:","")+")手机阅读,小说"+bookName+"TXT下载 - "+href; - param.put("content", content ); - param.put("styleid", "1"); - param.put("from", "share"); - param.put("appkey", "2351975812"); - param.put("refer", "http://www.zinglizingli.xyz/" + bookNum + "/"); - param.put("url_type", "0"); - param.put("visible", "0"); - //byte[] bytes = sendPostRequest(baseUrl, param); - - - MultiValueMap map = new LinkedMultiValueMap<>(); - map.setAll(param); - HttpHeaders headers = new HttpHeaders(); - headers.add("Accept", "*/*"); - headers.add("Accept-Encoding", "gzip, deflate"); - headers.add("Accept-Language", "zh-CN,zh;q=0.9"); - headers.add("Connection", "keep-alive"); - headers.add("Content-Length", "1146"); - headers.add("Content-Type", "application/x-www-form-urlencoded"); - - String[] cookieArr = cookieStr.split(";"); - List cookies = Arrays.asList(cookieArr); - headers.put(HttpHeaders.COOKIE, cookies); - - headers.add("Host", "service.weibo.com"); - headers.add("Origin", "http://service.weibo.com"); - headers.add("Referer", "http://service.weibo.com/share/share.php?appkey=2351975812&searchPic=true&title=%C2%A1%C2%BE%E4%BF%AE%E7%9C%9F%E8%81%8A%E5%A4%A9%E7%BE%A4%E6%9C%80%E6%96%B0%E7%AB%A0%E8%8A%82%E5%88%97%E8%A1%A8_%E4%BF%AE%E7%9C%9F%E8%81%8A%E5%A4%A9%E7%BE%A4%E6%9C%80%E6%96%B0%E7%AB%A0%E8%8A%82%E7%9B%AE%E5%BD%95_%E9%85%B8%E5%91%B3%E4%B9%A6%E5%B1%8B%C2%A1%C2%BF%E4%BF%AE%E7%9C%9F%E8%81%8A%E5%A4%A9%E7%BE%A4%E6%9C%80%E6%96%B0%E7%AB%A0%E8%8A%82%E7%94%B1%E7%BD%91%E5%8F%8B%E6%8F%90%E4%BE%9B%EF%BC%8C%E3%80%8A%E4%BF%AE%E7%9C%9F%E8%81%8A%E5%A4%A9%E7%BE%A4%E3%80%8B%E6%83%85%E8%8A%82%E8%B7%8C%E5%AE%95%E8%B5%B7%E4%BC%8F%E3%80%81%E6%89%A3%E4%BA%BA%E5%BF%83%E5%BC%A6%EF%BC%8C%E6%98%AF%E4%B8%80%E6%9C%AC%E6%83%85%E8%8A%82%E4%B8%8E%E6%96%87%E7%AC%94%E4%BF%B1%E4%BD%B3%E7%9A%84%E9%83%BD%E5%B8%82%E5%B0%8F%E8%AF%B4%E5%B0%8F%E8%AF%B4%EF%BC%8C%E9%85%B8%E5%91%B3%E4%B9%A6%E5%B1%8B%E5%85%8D%E8%B4%B9%E6%8F%90%E4%BE%9B%E5%94%90%E7%A0%96%E6%9C%80%E6%96%B0%E6%B8%85%E7%88%BD%E5%B9%B2%E5%87%80%E7%9A%84%E6%96%87%E5%AD%97%E7%AB%A0%E8%8A%82%E5%9C%A8%E7%BA%BF%E9%98%85%E8%AF%BB.&url=http%3A//www.zinglizingli.xyz/" + bookNum + "/"); - headers.add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 QIHU 360SE"); - headers.add("X-Requested-With", "XMLHttpRequest"); - headers.add("Accept-Encoding", "gzip, deflate"); - headers.add("Accept-Language", "zh-CN,zh;q=0.9"); - headers.add("Connection", "keep-alive"); - headers.add("Content-Length", "1146"); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - HttpEntity> request = new HttpEntity<>(map, headers); - - ResponseEntity stringResponseEntity = template.postForEntity(baseUrl, request, String.class, map); - - return stringResponseEntity.getBody(); - } - - -} diff --git a/src/main/java/xyz/zinglizingli/common/utils/ContentFactory.java b/src/main/java/xyz/zinglizingli/common/utils/ContentFactory.java deleted file mode 100644 index 2288057..0000000 --- a/src/main/java/xyz/zinglizingli/common/utils/ContentFactory.java +++ /dev/null @@ -1,65 +0,0 @@ -package xyz.zinglizingli.common.utils; - -import java.util.*; - -public class ContentFactory { - - - private static String[] hotWords = {"雪鹰领主是我吃西红柿写作的一本非常经典的玄幻小说,本站免费提供雪鹰领主最新最全的TXT全文小说阅读。", - "飞剑问道是我吃西红柿的经典仙侠小说作品,本站提供我吃西红柿TXT小说免费阅读。","" + - "终极美女保镖小说阅读,《终极美女保镖》情节跌宕起伏、扣人心弦,是一本情节与文笔俱佳的玄幻小说,本站免费提供终极美女保镖最新清爽干净的文字章节在线阅读。", - "一世倾城:冷宫弃妃,一世倾城:冷宫弃妃小说无弹窗阅读,一世倾城:冷宫弃妃小说无广告全文阅读,作者冷青衫", - "校花之贴身高手最新章节,VIP章节免费阅读,校花之贴身高手由寂无倾情打造。看精品小说,上看小说吧!", - "邪王追妻最新章节_邪王追妻免费全文阅读", - "《最强反派系统》免费阅读,最强反派系统小说最新章节免费阅读,VIP章节免费阅读。", - "大妖尊小说试阅读,大妖尊,大妖尊全文阅读,大妖尊最新章节", - "诡秘之主,诡秘之主小说阅读。玄幻小说诡秘之主由作家爱潜水的乌贼创作,看小说吧提供诡秘之主首发最新章节及章节列表,诡秘之主最新更新尽在看小说吧", - "全球高武,全球高武小说免费阅读。都市小说全球高武由作家老鹰吃小鸡创作,本站提供全球高武小说首发最新免费章节及章节列表,全球高武小说最新更新免费阅读","" + - "前任无双由作家跃千愁创作,前任无双小说免费阅读,无双首发最新章节及章节列表免费阅读,无弹窗、无广告小说免费月的", - "万古第一神小说是由作家风青阳所著的东方玄幻小说,本站提供万古第一神小说小说最新章节免费阅读", - "《剑来》小说是烽火戏诸侯在著作的武侠仙侠, 本站提供无广告、无弹窗的剑来小说最新章节全文免费阅读,请随时关注更新最快的小说阅读网看小说吧。", - "免费小说阅读,精彩免费小说最新章节尽在看小说吧,小说,小说网;网络小说;小说下载;小说txt,小说全文阅读,无弹窗广告尽在本站", - "看小说吧收集、整理和免费分享作者几人哀愁的最新免费小说:回到过去当女神最新目录列表,回到过去当女神小说是属于网友受欢迎的奇幻玄幻类型的小说。", - "大主宰无弹窗无广告最新免费章节由网友提供,《大主宰》小说情节跌宕起伏、扣人心弦:是一本情节与文笔俱佳的玄幻小说,看小说吧小说网免费大主宰最新免费的清爽干净的文字VIP章节在线阅读。", - "旋风少女小说最新免费章节由网友提供,《旋风少女》是一本受欢迎的情节和文笔俱佳的都市小说,旋风少女无弹窗无广告小说最新章节目录免费阅读,旋风少女VIP章节免费阅读!", - "斗破苍穹最新章节无弹窗是天蚕土豆倾力打造的一本非常耐读的小说,情节波澜起伏,由浅入深,层层推进,希望你能喜欢本书,支持天蚕土豆请收藏并推荐,斗破苍穹无弹窗最新免费章节目录免费提供" - ,"九星霸体诀是平凡魔术师写作的一本非常经典的玄幻小说,本站免费提供平凡魔术师最新最全的TXT全文小说阅读。", - "万古神帝是飞天鱼的经典仙侠小说作品,本站提供万古神帝TXT小说免费阅读。","" + - "无敌真寂寞小说阅读,《无敌真寂寞》情节跌宕起伏、扣人心弦,是一本情节与文笔俱佳的玄幻小说,本站免费提供无敌真寂寞最新清爽干净的文字章节在线阅读。", - "绝鼎丹尊,绝鼎丹尊小说无弹窗阅读,绝鼎丹尊小说无广告全文阅读,作者万古青莲", - "龙王传说最新章节,VIP章节免费阅读,龙王传说由唐家三少打造。看精品小说,上看小说吧!", - "人道至尊,人道至尊小说阅读。玄幻小说人道至尊由作家宅猪创作,看小说吧提供人道至尊首发最新章节及章节列表,人道至尊最新更新尽在看小说吧小说网", - "还是地球人狠,还是地球人狠免费阅读。都市小说全球高武由作家剑舞秀创作,本站提供还是地球人狠小说首发最新免费章节及章节列表,全球高武小说最新更新免费阅读","" + - "《求魔》小说是在耳根著作的武侠仙侠, 本站提供无广告、无弹窗的求魔小说最新章节全文免费阅读,请随时关注更新最快的小说阅读网看小说吧。", - "看小说吧收集、整理和免费分享作者唐家三少的最新免费小说:天火大道最新目录列表,天火大道小说是属于网友受欢迎的奇幻玄幻类型的小说。", - "饲养全人类无弹窗无广告最新免费章节由网友提供,《饲养全人类》小说情节跌宕起伏、扣人心弦:是一本情节与文笔俱佳的玄幻小说,看小说吧小说网免费饲养全人类最新免费的清爽干净的文字VIP章节在线阅读。", - "方外:消失的八门小说最新免费章节由网友提供,《方外:消失的八门》是一本受欢迎的情节和文笔俱佳的都市小说,方外:消失的八门无弹窗无广告小说最新章节目录免费阅读,方外:消失的八门VIP章节免费阅读!", - "武林赘婿最新章节无弹窗是左山左行倾力打造的一本非常耐读的小说,情节波澜起伏,由浅入深,层层推进,希望你能喜欢本书,支持武林赘婿请收藏并推荐,武林赘婿无弹窗最新免费章节目录免费提供"}; - - - - public static Map giveRandomContent(){ - Map contentMap = new HashMap<>(); - int size = 0; - - for(int i = 0 ; i < hotWords.length ; i++){ - if(size >= 18){ - break; - } - String value = hotWords[new Random().nextInt(hotWords.length)]; - if(contentMap.values().contains(value)){ - continue; - } - contentMap.put("hotWord_"+size,value); - size++; - } - if(size < 18){ - for(int i = 0 ; i< 18 - size ; i++){ - contentMap.put("hotWord_"+size,hotWords[new Random().nextInt(hotWords.length)]); - size++; - } - } - return contentMap; - - } -} diff --git a/src/main/java/xyz/zinglizingli/common/utils/NumberUtil.java b/src/main/java/xyz/zinglizingli/common/utils/NumberUtil.java deleted file mode 100644 index f66bb4f..0000000 --- a/src/main/java/xyz/zinglizingli/common/utils/NumberUtil.java +++ /dev/null @@ -1,117 +0,0 @@ -package xyz.zinglizingli.common.utils; - - -public class NumberUtil { - - public static int solve(String s) { - int i = s.indexOf("万"); - if (i != -1) { - int l = solve(s.substring(0, i)); - int r = solve(s.substring(i+1)); - return l*10000 + r; - } - i = s.indexOf("千"); - if (i != -1) { - int l = solve(s.substring(0, i)); - int r = solve(s.substring(i+1)); - return l*1000 + r; - } - i = s.indexOf("百"); - if (i != -1) { - int l = solve(s.substring(0, i)); - int r = solve(s.substring(i+1)); - return l*100 + r; - } - i = s.indexOf("十"); - if (i != -1) { - int l = solve(s.substring(0, i)); - if (l == 0) - l = 1; - int r = solve(s.substring(i+1)); - return l*10 + r; - } - i = s.indexOf("零"); - if (i != -1) { - int l = solve(s.substring(0, i)); - int r = solve(s.substring(i+1)); - return l + r; - } - i = 0; - switch (s) { - case "九": - return 9; - case "八": - return 8; - case "七": - return 7; - case "六": - return 6; - case "五": - return 5; - case "四": - return 4; - case "三": - return 3; - case "二": - return 2; - case "一": - return 1; - } - return 0; - } - public static String solve(int n) { - int w = n / 10000, q = n / 1000, b = n / 100, s = n / 10; - if (w > 0) { - String l = solve(n/10000); - String r = solve(n%10000); - if ((n%10000)/1000 == 0) - r = "零" + r; - return l + "万" + r; - } - if (q > 0) { - String l = solve(n/1000); - String r = solve(n%1000); - if ((n%1000)/100 == 0) - r = "零" + r; - return l + "千" + r; - } - if (b > 0) { - String l = solve(n/100); - String r = solve(n%100); - if ((n%100)/10 == 0) - r = "零" + r; - return l + "百" + r; - } - if (s > 0) { - String l = solve(n/10); - String r = solve(n%10); - return l + "十" + r; - } - switch (n){ - case 1: - return "一"; - case 2: - return "二"; - case 3: - return "三"; - case 4: - return "四"; - case 5: - return "五"; - case 6: - return "六"; - case 7: - return "七"; - case 8: - return "八"; - case 9: - return "九"; - } - return ""; - } - - public static void main(String[] args) { - System.out.println(solve("五百七十八")); - System.out.println(solve(3786)); - } -} diff --git a/src/main/java/xyz/zinglizingli/common/utils/RestTemplateUtil.java b/src/main/java/xyz/zinglizingli/common/utils/RestTemplateUtil.java deleted file mode 100644 index 2dd180b..0000000 --- a/src/main/java/xyz/zinglizingli/common/utils/RestTemplateUtil.java +++ /dev/null @@ -1,30 +0,0 @@ -package xyz.zinglizingli.common.utils; - -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.http.converter.StringHttpMessageConverter; -import org.springframework.web.client.RestTemplate; - -import java.nio.charset.Charset; -import java.util.List; - -public class RestTemplateUtil { - - - public static RestTemplate getInstance(String charset) { - HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory(); - httpRequestFactory.setConnectionRequestTimeout(3000); - httpRequestFactory.setConnectTimeout(3000); - httpRequestFactory.setReadTimeout(10000); - RestTemplate restTemplate = new RestTemplate(httpRequestFactory); - List> list = restTemplate.getMessageConverters(); - for (HttpMessageConverter httpMessageConverter : list) { - if(httpMessageConverter instanceof StringHttpMessageConverter) { - ((StringHttpMessageConverter) httpMessageConverter).setDefaultCharset(Charset.forName(charset)); - break; - } - } - return restTemplate; - } - -} diff --git a/src/main/java/xyz/zinglizingli/common/utils/SpringUtil.java b/src/main/java/xyz/zinglizingli/common/utils/SpringUtil.java deleted file mode 100644 index 53d452f..0000000 --- a/src/main/java/xyz/zinglizingli/common/utils/SpringUtil.java +++ /dev/null @@ -1,54 +0,0 @@ -package xyz.zinglizingli.common.utils; - -import org.springframework.context.ApplicationContext; -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; - -import java.io.UnsupportedEncodingException; - - -@Component -public class SpringUtil implements ApplicationContextAware { - - - public static void main(String[] args) { - String a = "���"; - try { - String b = new String(a.getBytes("ISO-8859-1"),"gbk"); - System.out.println(b); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - } - - - private static ApplicationContext applicationContext; - - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - if (SpringUtil.applicationContext == null) { - SpringUtil.applicationContext = applicationContext; - } - } - - // 获取applicationContext - public static ApplicationContext getApplicationContext() { - return applicationContext; - } - - // 通过name获取 Bean. - public static Object getBean(String name) { - return getApplicationContext().getBean(name); - } - - // 通过class获取Bean. - public static T getBean(Class clazz) { - return getApplicationContext().getBean(clazz); - } - - // 通过name,以及Clazz返回指定的Bean - public static T getBean(String name, Class clazz) { - return getApplicationContext().getBean(name, clazz); - } - -} diff --git a/src/main/java/xyz/zinglizingli/common/web/IndexController.java b/src/main/java/xyz/zinglizingli/common/web/IndexController.java deleted file mode 100644 index bd5749f..0000000 --- a/src/main/java/xyz/zinglizingli/common/web/IndexController.java +++ /dev/null @@ -1,64 +0,0 @@ -package xyz.zinglizingli.common.web; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import xyz.zinglizingli.books.constant.CacheKeyConstans; -import xyz.zinglizingli.books.po.Book; -import xyz.zinglizingli.books.service.BookService; -import xyz.zinglizingli.common.cache.CommonCacheUtil; -import xyz.zinglizingli.common.config.IndexRecBooksConfig; - -import java.util.List; -import java.util.Map; - -@Controller -@RequestMapping -public class IndexController { - - - @Autowired - private BookService bookService; - - @Autowired - private CommonCacheUtil commonCacheUtil; - - @Autowired - private IndexRecBooksConfig indexRecBooksConfig; - - - - - @RequestMapping(value = {"/index.html","/","/books","/book","/book/index.html"}) - public String index(ModelMap modelMap){ - List recBooks = (List) commonCacheUtil.getObject(CacheKeyConstans.REC_BOOK_LIST_KEY); - if (!indexRecBooksConfig.isRead() || recBooks == null) { - List> configMap = indexRecBooksConfig.getRecBooks(); - //查询推荐书籍数据 - recBooks = bookService.queryRecBooks(configMap); - commonCacheUtil.setObject(CacheKeyConstans.REC_BOOK_LIST_KEY, recBooks, 60 * 60 * 24 * 10); - indexRecBooksConfig.setRead(true); - } - - - List hotBooks = (List) commonCacheUtil.getObject(CacheKeyConstans.HOT_BOOK_LIST_KEY); - if (hotBooks == null) { - //查询热点数据 - hotBooks = bookService.search(1, 9, null, null, null, null, null, null, null, "visit_count DESC,score ", "DESC"); - commonCacheUtil.setObject(CacheKeyConstans.HOT_BOOK_LIST_KEY, hotBooks, 60 * 60 * 24); - } - List newBooks = (List) commonCacheUtil.getObject(CacheKeyConstans.NEWST_BOOK_LIST_KEY); - if (newBooks == null) { - //查询最近更新数据 - newBooks = bookService.search(1, 20, null, null, null, null, null, null, null, "update_time", "DESC"); - commonCacheUtil.setObject(CacheKeyConstans.NEWST_BOOK_LIST_KEY, newBooks, 60 * 30); - } - modelMap.put("recBooks", recBooks); - modelMap.put("hotBooks", hotBooks); - modelMap.put("newBooks", newBooks); - - return "books/index"; - } -} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml deleted file mode 100644 index 9a41764..0000000 --- a/src/main/resources/application.yml +++ /dev/null @@ -1,89 +0,0 @@ -server: - port: 80 - -spring: - datasource: - url: jdbc:mysql://148.70.59.92:3306/books?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai - username: xiongxiaoyang - password: Lzslov123! -# url: jdbc:mysql://127.0.0.1:3306/books?useUnicode=true&characterEncoding=utf-8 -# username: books -# password: books - cache: - ehcache: - config: classpath:ehcache.xml - thymeleaf: - mode: LEGACYHTML5 #去除thymeleaf的html严格校验thymeleaf.mode=LEGACYHTML5 - cache: true # 是否开启模板缓存,默认true,建议在开发时关闭缓存,不然没法看到实时 - freemarker: - template-loader-path: classpath:/templates #设定freemarker文件路径 默认为src/main/resources/templatestemplate-loader-path=classpath:/templates - charset: UTF-8 # 模板编码 - #邮箱服务器 - mail: - host: smtp.163.com - #邮箱账户 - username: 13560421324@163.com - #邮箱第三方授权码 - password: xiong13560421324 - #编码类型 - default-encoding: UTF-8 - port: 465 - properties: - mail: - smtp: - auth: true - starttls: - enable: true - required: rue - socketFactory: - port: 465 - class: javax.net.ssl.SSLSocketFactory - fallback: false - - - - -# mvc: -# static-path-pattern: /static/** #设定静态文件路径,js,css等 -mybatis: - mapper-locations: classpath:mybatis/mapping/*.xml - type-aliases-package: xyz.zinglizingli.books.po - - -#首页本站推荐小说配置 -index: - recBooks: - - {bookName: 黎明之剑,bookAuthor: 远瞳} - - {bookName: 诸天投影,bookAuthor: 裴屠狗} - - {bookName: 我有一座恐怖屋,bookAuthor: 我会修空调} - - -#mysql编码 -mysql: - charset: utf8mb4 - -#爬取小说数据的最低评分 -books: - lowestScore: 6.0 - -#爬取的网站名称类型 1:笔趣岛 ,2:笔趣塔 更多网站解析中,敬请期待 -crawl: - website: - type: 1 - -search: - schedule: - isRunExcute: 0; - - -logging: - config: classpath:logback-boot.xml - - -baidu: - record: - ids: 999999,888888 - - -browser: - cookie: SINAGLOBAL=5945695441587.724.1559298271897; __guid=109181959.2094437407894937900.1565875017257.2095; un=13560421324; _s_tentry=login.sina.com.cn; Apache=967339021599.2916.1567743040489; ULV=1567743040504:8:1:1:967339021599.2916.1567743040489:1566918991855; login_sid_t=d172b083637b1186ebcd624a1259a05f; cross_origin_proto=SSL; appkey=; SSOLoginState=1567744755; YF-Widget-G0=4a4609df0e4ef6187a7b4717d4e6cf12; wvr=6; WBtopGlobal_register_version=307744aa77dd5677; un=13560421324; SCF=AsBEGOtiUG1hPLyZCxI1FunZd9Hg9hWWkgyzcAZjG6AxlhR9sKuWXBhvg1TG9iDWygqPlKun5aazN3Jc6Rky8lQ.; SUB=_2A25wfnGoDeRhGeNL41YR9SnNwzyIHXVTCuRgrDV8PUJbmtANLRWgkW9NSM603g9LJN13ACge6_UUjKxvhLP4TXZi; SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9WFRg9065OjUyD0aaGsKRxPW5JpX5K-hUgL.Fo-f1hB7SKMp1h52dJLoI0qLxK-L1KqL1-eLxKMLB.-L122LxKMLB.-L122LxK-LBo5L12qLxKnLB-qLBoBLxKMLB.BL1K2t; SUHB=0XDVz5Bh1mkWFA; ALF=1599812938; UOR=,,sf.zinglizingli.xyz; monitor_count=13; webim_unReadCount=%7B%22time%22%3A1568285775036%2C%22dm_pub_total%22%3A1%2C%22chat_group_client%22%3A0%2C%22allcountNum%22%3A29%2C%22msgbox%22%3A0%7D \ No newline at end of file diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt deleted file mode 100644 index d763a17..0000000 --- a/src/main/resources/banner.txt +++ /dev/null @@ -1,6 +0,0 @@ - -|| / | / / -|| / | / / ___ // ___ ___ _ __ -|| / /||/ / //___) ) // // ) ) // ) ) // ) ) ) ) -||/ / | / // // // // / / // / / / / -| / | / ((____ // ((____ ((___/ / // / / / / 小说精品屋欢迎您!!! \ No newline at end of file diff --git a/src/main/resources/ehcache.xml b/src/main/resources/ehcache.xml deleted file mode 100644 index 6ccf83d..0000000 --- a/src/main/resources/ehcache.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/logback-boot.xml b/src/main/resources/logback-boot.xml deleted file mode 100644 index 6f378ac..0000000 --- a/src/main/resources/logback-boot.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - ${CONSOLE_LOG_PATTERN} - - UTF-8 - - - - - - - - - logs/debug.log - - - - - - logs/debug.%d.%i.log - - 30 - - - 10MB - - - - - - %d %p (%file:%line\)- %m%n - - - UTF-8 - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/mybatis/generatorConfig.xml b/src/main/resources/mybatis/generatorConfig.xml deleted file mode 100644 index 25a1408..0000000 --- a/src/main/resources/mybatis/generatorConfig.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/BookContentMapper.xml b/src/main/resources/mybatis/mapping/BookContentMapper.xml deleted file mode 100644 index 1eb1d04..0000000 --- a/src/main/resources/mybatis/mapping/BookContentMapper.xml +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, book_id, index_id, index_num, content - - - - - delete from book_content - where id = #{id,jdbcType=BIGINT} - - - delete from book_content - - - - - - insert into book_content (id, book_id, index_id, - index_num, content) - values (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{indexId,jdbcType=BIGINT}, - #{indexNum,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}) - - - insert into book_content - - - id, - - - book_id, - - - index_id, - - - index_num, - - - content, - - - - - #{id,jdbcType=BIGINT}, - - - #{bookId,jdbcType=BIGINT}, - - - #{indexId,jdbcType=BIGINT}, - - - #{indexNum,jdbcType=INTEGER}, - - - #{content,jdbcType=VARCHAR}, - - - - - - update book_content - - - id = #{record.id,jdbcType=BIGINT}, - - - book_id = #{record.bookId,jdbcType=BIGINT}, - - - index_id = #{record.indexId,jdbcType=BIGINT}, - - - index_num = #{record.indexNum,jdbcType=INTEGER}, - - - content = #{record.content,jdbcType=VARCHAR}, - - - - - - - - update book_content - set id = #{record.id,jdbcType=BIGINT}, - book_id = #{record.bookId,jdbcType=BIGINT}, - index_id = #{record.indexId,jdbcType=BIGINT}, - index_num = #{record.indexNum,jdbcType=INTEGER}, - content = #{record.content,jdbcType=VARCHAR} - - - - - - update book_content - - - book_id = #{bookId,jdbcType=BIGINT}, - - - index_id = #{indexId,jdbcType=BIGINT}, - - - index_num = #{indexNum,jdbcType=INTEGER}, - - - content = #{content,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=BIGINT} - - - update book_content - set book_id = #{bookId,jdbcType=BIGINT}, - index_id = #{indexId,jdbcType=BIGINT}, - index_num = #{indexNum,jdbcType=INTEGER}, - content = #{content,jdbcType=VARCHAR} - where id = #{id,jdbcType=BIGINT} - - - - - insert into book_content (book_id, index_num, content) - values - - - #{item.bookId,jdbcType=VARCHAR}, - #{item.indexNum,jdbcType=VARCHAR}, - #{item.content,jdbcType=VARCHAR}, - - - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/BookIndexMapper.xml b/src/main/resources/mybatis/mapping/BookIndexMapper.xml deleted file mode 100644 index 5400ea4..0000000 --- a/src/main/resources/mybatis/mapping/BookIndexMapper.xml +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, book_id, index_num, index_name - - - - - delete from book_index - where id = #{id,jdbcType=BIGINT} - - - delete from book_index - - - - - - insert into book_index (id, book_id, index_num, - index_name) - values (#{id,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT}, #{indexNum,jdbcType=INTEGER}, - #{indexName,jdbcType=VARCHAR}) - - - insert into book_index - - - id, - - - book_id, - - - index_num, - - - index_name, - - - - - #{id,jdbcType=BIGINT}, - - - #{bookId,jdbcType=BIGINT}, - - - #{indexNum,jdbcType=INTEGER}, - - - #{indexName,jdbcType=VARCHAR}, - - - - - - update book_index - - - id = #{record.id,jdbcType=BIGINT}, - - - book_id = #{record.bookId,jdbcType=BIGINT}, - - - index_num = #{record.indexNum,jdbcType=INTEGER}, - - - index_name = #{record.indexName,jdbcType=VARCHAR}, - - - - - - - - update book_index - set id = #{record.id,jdbcType=BIGINT}, - book_id = #{record.bookId,jdbcType=BIGINT}, - index_num = #{record.indexNum,jdbcType=INTEGER}, - index_name = #{record.indexName,jdbcType=VARCHAR} - - - - - - update book_index - - - book_id = #{bookId,jdbcType=BIGINT}, - - - index_num = #{indexNum,jdbcType=INTEGER}, - - - index_name = #{indexName,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=BIGINT} - - - update book_index - set book_id = #{bookId,jdbcType=BIGINT}, - index_num = #{indexNum,jdbcType=INTEGER}, - index_name = #{indexName,jdbcType=VARCHAR} - where id = #{id,jdbcType=BIGINT} - - - - - insert into book_index (book_id, index_num, index_name) - values - - - #{item.bookId,jdbcType=VARCHAR}, - #{item.indexNum,jdbcType=VARCHAR}, - #{item.indexName,jdbcType=VARCHAR}, - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/BookMapper.xml b/src/main/resources/mybatis/mapping/BookMapper.xml deleted file mode 100644 index cd89155..0000000 --- a/src/main/resources/mybatis/mapping/BookMapper.xml +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, catId, pic_url, book_name, author, book_desc, score, book_status, visit_count, - update_time,soft_cat,soft_tag - - - - - delete from book - where id = #{id,jdbcType=BIGINT} - - - delete from book - - - - - - insert into book (id, catId, pic_url, - book_name, author, book_desc, - score, book_status, visit_count, - update_time) - values (#{id,jdbcType=BIGINT}, #{catid,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR}, - #{bookName,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{bookDesc,jdbcType=VARCHAR}, - #{score,jdbcType=REAL}, #{bookStatus,jdbcType=VARCHAR}, #{visitCount,jdbcType=BIGINT}, - #{updateTime,jdbcType=TIMESTAMP}) - - - insert into book - - - id, - - - catId, - - - pic_url, - - - book_name, - - - author, - - - book_desc, - - - score, - - - book_status, - - - visit_count, - - - update_time, - - - - - #{id,jdbcType=BIGINT}, - - - #{catid,jdbcType=INTEGER}, - - - #{picUrl,jdbcType=VARCHAR}, - - - #{bookName,jdbcType=VARCHAR}, - - - #{author,jdbcType=VARCHAR}, - - - #{bookDesc,jdbcType=VARCHAR}, - - - #{score,jdbcType=REAL}, - - - #{bookStatus,jdbcType=VARCHAR}, - - - #{visitCount,jdbcType=BIGINT}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - - update book - - - id = #{record.id,jdbcType=BIGINT}, - - - catId = #{record.catid,jdbcType=INTEGER}, - - - pic_url = #{record.picUrl,jdbcType=VARCHAR}, - - - book_name = #{record.bookName,jdbcType=VARCHAR}, - - - author = #{record.author,jdbcType=VARCHAR}, - - - book_desc = #{record.bookDesc,jdbcType=VARCHAR}, - - - score = #{record.score,jdbcType=REAL}, - - - book_status = #{record.bookStatus,jdbcType=VARCHAR}, - - - visit_count = #{record.visitCount,jdbcType=BIGINT}, - - - update_time = #{record.updateTime,jdbcType=TIMESTAMP}, - - - - - - - - update book - set id = #{record.id,jdbcType=BIGINT}, - catId = #{record.catid,jdbcType=INTEGER}, - pic_url = #{record.picUrl,jdbcType=VARCHAR}, - book_name = #{record.bookName,jdbcType=VARCHAR}, - author = #{record.author,jdbcType=VARCHAR}, - book_desc = #{record.bookDesc,jdbcType=VARCHAR}, - score = #{record.score,jdbcType=REAL}, - book_status = #{record.bookStatus,jdbcType=VARCHAR}, - visit_count = #{record.visitCount,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update book - - - catId = #{catid,jdbcType=INTEGER}, - - - pic_url = #{picUrl,jdbcType=VARCHAR}, - - - book_name = #{bookName,jdbcType=VARCHAR}, - - - author = #{author,jdbcType=VARCHAR}, - - - book_desc = #{bookDesc,jdbcType=VARCHAR}, - - - score = #{score,jdbcType=REAL}, - - - book_status = #{bookStatus,jdbcType=VARCHAR}, - - - visit_count = #{visitCount,jdbcType=BIGINT}, - - - update_time = #{updateTime,jdbcType=TIMESTAMP}, - - - where id = #{id,jdbcType=BIGINT} - - - update book - set catId = #{catid,jdbcType=INTEGER}, - pic_url = #{picUrl,jdbcType=VARCHAR}, - book_name = #{bookName,jdbcType=VARCHAR}, - author = #{author,jdbcType=VARCHAR}, - book_desc = #{bookDesc,jdbcType=VARCHAR}, - score = #{score,jdbcType=REAL}, - book_status = #{bookStatus,jdbcType=VARCHAR}, - visit_count = #{visitCount,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=TIMESTAMP} - where id = #{id,jdbcType=BIGINT} - - - - - - - - update book set visit_count = visit_count + 1 - where id = #{bookId,jdbcType=BIGINT} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/CategoryMapper.xml b/src/main/resources/mybatis/mapping/CategoryMapper.xml deleted file mode 100644 index 0eb67db..0000000 --- a/src/main/resources/mybatis/mapping/CategoryMapper.xml +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, name, sort, get_url, req_url - - - - - delete from category - where id = #{id,jdbcType=INTEGER} - - - delete from category - - - - - - insert into category (id, name, sort, - get_url, req_url) - values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=TINYINT}, - #{getUrl,jdbcType=VARCHAR}, #{reqUrl,jdbcType=VARCHAR}) - - - insert into category - - - id, - - - name, - - - sort, - - - get_url, - - - req_url, - - - - - #{id,jdbcType=INTEGER}, - - - #{name,jdbcType=VARCHAR}, - - - #{sort,jdbcType=TINYINT}, - - - #{getUrl,jdbcType=VARCHAR}, - - - #{reqUrl,jdbcType=VARCHAR}, - - - - - - update category - - - id = #{record.id,jdbcType=INTEGER}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - sort = #{record.sort,jdbcType=TINYINT}, - - - get_url = #{record.getUrl,jdbcType=VARCHAR}, - - - req_url = #{record.reqUrl,jdbcType=VARCHAR}, - - - - - - - - update category - set id = #{record.id,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=TINYINT}, - get_url = #{record.getUrl,jdbcType=VARCHAR}, - req_url = #{record.reqUrl,jdbcType=VARCHAR} - - - - - - update category - - - name = #{name,jdbcType=VARCHAR}, - - - sort = #{sort,jdbcType=TINYINT}, - - - get_url = #{getUrl,jdbcType=VARCHAR}, - - - req_url = #{reqUrl,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update category - set name = #{name,jdbcType=VARCHAR}, - sort = #{sort,jdbcType=TINYINT}, - get_url = #{getUrl,jdbcType=VARCHAR}, - req_url = #{reqUrl,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/ScreenBulletMapper.xml b/src/main/resources/mybatis/mapping/ScreenBulletMapper.xml deleted file mode 100644 index 9594d99..0000000 --- a/src/main/resources/mybatis/mapping/ScreenBulletMapper.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, content_id, screen_bullet, create_time - - - - - delete from screen_bullet - where id = #{id,jdbcType=BIGINT} - - - delete from screen_bullet - - - - - - insert into screen_bullet (id, content_id, screen_bullet, - create_time) - values (#{id,jdbcType=BIGINT}, #{contentId,jdbcType=BIGINT}, #{screenBullet,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}) - - - insert into screen_bullet - - - id, - - - content_id, - - - screen_bullet, - - - create_time, - - - - - #{id,jdbcType=BIGINT}, - - - #{contentId,jdbcType=BIGINT}, - - - #{screenBullet,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - - - - update screen_bullet - - - id = #{record.id,jdbcType=BIGINT}, - - - content_id = #{record.contentId,jdbcType=BIGINT}, - - - screen_bullet = #{record.screenBullet,jdbcType=VARCHAR}, - - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - - - - - - - - update screen_bullet - set id = #{record.id,jdbcType=BIGINT}, - content_id = #{record.contentId,jdbcType=BIGINT}, - screen_bullet = #{record.screenBullet,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP} - - - - - - update screen_bullet - - - content_id = #{contentId,jdbcType=BIGINT}, - - - screen_bullet = #{screenBullet,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - where id = #{id,jdbcType=BIGINT} - - - update screen_bullet - set content_id = #{contentId,jdbcType=BIGINT}, - screen_bullet = #{screenBullet,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP} - where id = #{id,jdbcType=BIGINT} - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/UserMapper.xml b/src/main/resources/mybatis/mapping/UserMapper.xml deleted file mode 100644 index 44384ba..0000000 --- a/src/main/resources/mybatis/mapping/UserMapper.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, login_name, password - - - - - delete from user - where id = #{id,jdbcType=BIGINT} - - - delete from user - - - - - - insert into user (id, login_name, password - ) - values (#{id,jdbcType=BIGINT}, #{loginName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR} - ) - - - insert into user - - - id, - - - login_name, - - - password, - - - - - #{id,jdbcType=BIGINT}, - - - #{loginName,jdbcType=VARCHAR}, - - - #{password,jdbcType=VARCHAR}, - - - - - - update user - - - id = #{record.id,jdbcType=BIGINT}, - - - login_name = #{record.loginName,jdbcType=VARCHAR}, - - - password = #{record.password,jdbcType=VARCHAR}, - - - - - - - - update user - set id = #{record.id,jdbcType=BIGINT}, - login_name = #{record.loginName,jdbcType=VARCHAR}, - password = #{record.password,jdbcType=VARCHAR} - - - - - - update user - - - login_name = #{loginName,jdbcType=VARCHAR}, - - - password = #{password,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=BIGINT} - - - update user - set login_name = #{loginName,jdbcType=VARCHAR}, - password = #{password,jdbcType=VARCHAR} - where id = #{id,jdbcType=BIGINT} - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapping/UserRefBookMapper.xml b/src/main/resources/mybatis/mapping/UserRefBookMapper.xml deleted file mode 100644 index 89c23f8..0000000 --- a/src/main/resources/mybatis/mapping/UserRefBookMapper.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, user_id, book_id - - - - - delete from user_ref_book - where id = #{id,jdbcType=BIGINT} - - - delete from user_ref_book - - - - - - insert into user_ref_book (id, user_id, book_id - ) - values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{bookId,jdbcType=BIGINT} - ) - - - insert into user_ref_book - - - id, - - - user_id, - - - book_id, - - - - - #{id,jdbcType=BIGINT}, - - - #{userId,jdbcType=BIGINT}, - - - #{bookId,jdbcType=BIGINT}, - - - - - - update user_ref_book - - - id = #{record.id,jdbcType=BIGINT}, - - - user_id = #{record.userId,jdbcType=BIGINT}, - - - book_id = #{record.bookId,jdbcType=BIGINT}, - - - - - - - - update user_ref_book - set id = #{record.id,jdbcType=BIGINT}, - user_id = #{record.userId,jdbcType=BIGINT}, - book_id = #{record.bookId,jdbcType=BIGINT} - - - - - - update user_ref_book - - - user_id = #{userId,jdbcType=BIGINT}, - - - book_id = #{bookId,jdbcType=BIGINT}, - - - where id = #{id,jdbcType=BIGINT} - - - update user_ref_book - set user_id = #{userId,jdbcType=BIGINT}, - book_id = #{bookId,jdbcType=BIGINT} - where id = #{id,jdbcType=BIGINT} - - \ No newline at end of file diff --git a/src/main/resources/static/HotBook.apk b/src/main/resources/static/HotBook.apk deleted file mode 100644 index 346fb9a..0000000 Binary files a/src/main/resources/static/HotBook.apk and /dev/null differ diff --git a/src/main/resources/static/IMG_1470.JPG b/src/main/resources/static/IMG_1470.JPG deleted file mode 100644 index 26304c5..0000000 Binary files a/src/main/resources/static/IMG_1470.JPG and /dev/null differ diff --git a/src/main/resources/static/baidu_verify_ANtJi2eSPQ.html b/src/main/resources/static/baidu_verify_ANtJi2eSPQ.html deleted file mode 100644 index 494b211..0000000 --- a/src/main/resources/static/baidu_verify_ANtJi2eSPQ.html +++ /dev/null @@ -1 +0,0 @@ -ANtJi2eSPQ \ No newline at end of file diff --git a/src/main/resources/static/baidu_verify_Ep8xaWQJAI.html b/src/main/resources/static/baidu_verify_Ep8xaWQJAI.html deleted file mode 100644 index 98d54f8..0000000 --- a/src/main/resources/static/baidu_verify_Ep8xaWQJAI.html +++ /dev/null @@ -1 +0,0 @@ -Ep8xaWQJAI \ No newline at end of file diff --git a/src/main/resources/static/baidu_verify_L6sR9GjEtg.html b/src/main/resources/static/baidu_verify_L6sR9GjEtg.html deleted file mode 100644 index 7ddd7fd..0000000 --- a/src/main/resources/static/baidu_verify_L6sR9GjEtg.html +++ /dev/null @@ -1 +0,0 @@ -L6sR9GjEtg \ No newline at end of file diff --git a/src/main/resources/static/book_content.html b/src/main/resources/static/book_content.html deleted file mode 100644 index d6d9d48..0000000 --- a/src/main/resources/static/book_content.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - 帝霸 - - - - - -
    - -
    - - -
    - -
    - -
    -
    - - -
    - - - - 字体: - - - -
    - -
    -

         - 『章节错误,点此举报』

    -   很快,所有人都离开了小圣山,只有独孤岚留下。

      当众人都离开之后,独孤岚起身,行至溪边,向李七夜鞠身大拜,说道:“云泥学院弟子,拜见少爷。”

      独孤岚行大礼,李七夜缓缓张开眼睛,看了她一眼,点了点头。

      “有事吗?”李七夜也仅仅是看了独孤岚一眼,依然持钓杆,神态自若,似乎没有什么比钓鱼更吸引他一样。

      那怕独孤岚这样的绝世美女,李七夜那也仅仅是看了一眼而已。

      独孤岚也是十分好奇,难道李七夜真的是在钓鱼吗?这都让她不由有点出神,但,她很快就收回了心思,她轻轻地向李七夜说道:“弟子只怕不是正一少师的对手。”

      独孤岚也没有转弯抹角,而是直接说出了自己心中的疑惑。

      李七夜不由笑了一下,轻轻地摇头,说道:“不是只怕,你的的确确不是他的对手。你与他一战,必败。”

      李七夜这样的断言,独孤岚也不由沉默了一下,没有生气,也没有发怒。

      换作是其他人,或者有些不悦,甚至是怒火上冲,毕竟,决战还没有开始,就已经断言独孤岚不敌正一少师了,这不是一种羞辱是什么?

      独孤岚回过神来,向李七夜一鞠身,说道:“所以,弟子向少爷请教,还望少爷指点迷津。”

      独孤岚的态度很诚恳,也十分的谦卑,这样的姿态,的的确确是让人喜欢,更何况她不仅仅是绝世美女,还是天姿绝世的天才。

      “我没有什么好指点的。”李七夜轻轻摇了摇头,笑了笑,说道:“你对大道的领悟,已经超过了许许多多的同辈中人,你自己心里面也应该一清二楚。”

      这样的赞美,独孤岚没有自傲,她沉吟了一下,最后轻轻地说道:“弟子见少爷可破解‘吞攻’,我想,少爷一定会破……”

      “你猜对了。”李七夜笑着说道:“没错,我可以破正一教的‘魔吞七卷’。”

      李七夜这样的话,独孤岚并没有吃惊,这是她意料之中,如果换作是别人,一定会大吃一惊,甚至对李七夜的话将信将疑。

      毕竟,“魔吞七卷”那是博大精深,能破一卷,那都已经是天纵其才了,更何况是七卷呢。

      说到这里,李七夜是顿了一下,看了独孤岚一眼,淡淡地说道:“就算我授你破七卷之法,你认为你就能战胜正一少师吗?”

      “这个”李七夜这样的话,顿时让独孤岚不由沉吟了一下,最后她轻轻摇头,说道:“我未与正一少师交过手,不敢下断论,但,我尽全力而为。”

      “心态很好。”李七夜笑了一下,淡淡地说道:“就算你修练了破解七法之术,也不见得你就是胜券在握。”

      独孤岚不由沉默了一下,最后她轻轻地说道:“但,少爷一定有击败正一少师之法。”

      独孤岚这样的话,李七夜没有立即回答,只是看着自己的钓杆而已,过了好一会儿之后,他这才轻轻点头,说道:“是的,击败正一少师,有何难也,千百种手段,随手拈来而已。”

      李七夜这样的话是轻措淡写,若是在场有外人听了,一定会认为李七夜口出狂言,一定是会认为李七夜又在吹牛皮。

      正一少师是何许人也,当今南西皇第一天才,大道无双,毫不夸张地说,在当今南西皇,举世之间,年轻一辈,只怕无人能敌也。

      李七夜竟然说可以轻而易举地击败他,这只怕连正一少师自己都不会相信。

      独孤岚没有置疑,她静静地听着李七夜的话,她说道:“若是少爷出手,必定是威慑八荒,正一少师败北,那也是意料中的事情。”

      “好了,别给我戴高帽子。”李七夜不由笑了一下,轻轻摆手,打断了独孤岚的话。

      说到这里,李七夜顿了一下,看着独孤岚,徐徐地说道:“你是想赢正一少师,还是想怎么样呢?”

      独孤岚沉默了一下,然后抬头,迎上李七夜的目光,认真而坦然,说道:“对于我来说,若是能赢正一少师,那是再好不过,若是不敌,那也是情理之中的事情。我道行不如正一少师,实力有着甚大的差距,败在正一少师的手中,也未见得是什么耻辱之事。”

      说到这里,独孤岚顿了一下,说道:“败在正一少师手中,只能说是愧对师门,也愧于佛陀圣地。当然,佛陀圣地屹立千百万年之久,不会因为我败于正一少师而没落,也不会因为我败于正一少师而崩溃倒塌。只能说,是我自己不够优秀,未能做到尽善尽美。”

      说出这样的一席话,独孤岚神态自然,也没有任何矫情之处。

      “这话说得好,说得很好。”李七夜笑了起来,为独孤岚鼓掌,这可以说是对独孤岚极高的赞美了。

      独孤岚也只是笑了笑,她展颜一笑,那是美丽绝伦,不知道让多少男人是神魂颠倒,让多少男人为之一见倾魂。

      李七夜也仅仅是含笑看了一眼而已。

      “少爷是不是也会出手呢?”过了片刻之后,独孤岚轻轻地问道。

      李七夜笑了一下,说道:“你不也是说了吗?佛陀圣地屹立千百万年之久,不会因为一败而衰落,也不会因为一败而崩分离析,佛陀圣地的底蕴依然还在,依然是藏龙卧虎,这样的一场挑战,战与不战,有什么区别呢。对于我来说,没有任何区别,也没有任何影响。”

      “可是。”独孤岚忍不住说道:“以少爷的身份而言,可代表着佛陀圣地,少爷乃是佛陀圣地的……”

      “不,你理解错了。”李七夜轻轻地摆手,笑着摇了摇头说道:“我从来没有代表过佛陀圣地,也没有代表过金杵王朝,那只不过是世人自作多情而已。我只是我,我也仅仅是代表着我自己而已,没有任何其他的身份。”

      李七夜这样的话,让独孤岚不由呆了一下,在此之前,李七夜说出的其他任何话,独孤岚都并不为奇,但是,现在李七夜说出了这样的话,却让独孤岚不由为之吃惊了。

      “少爷的意思……”独孤岚不由犹豫地看了李七夜一眼,她都不是十分肯定了。

      李七夜淡淡地笑了一下,看了独孤岚一眼,意味深长,淡淡地说道:“这一战,你不能指望于我,对于这样的决战,我是没有什么兴趣。这场关乎佛陀圣地和正一教的年轻一辈之争,最后还是需要你扛起大旗,去面对这一场艰难的决战。”

      独孤岚不由怔了怔,过了好一会儿,她不由深深地呼吸了一口气,不由苦笑地说道:“少爷这样的话,顿时让我感觉肩上如负千钧之重,让人窒息。”

      “对于你来说,不也是一件好事?”李七夜淡淡地说道:“这正是你独挡一面的时候,也是你迈向更高峰的时刻。”独孤岚不由苦笑,说道:“但,少爷也知道,背负佛陀圣地名誉,此乃是大任也。”

      天将降斯人也,必劳其心智。“李七夜悠然地说道。

      既然李七夜都这样说话了,独孤岚那也没什么话可以说了。

      “那,那,决战一天,少爷会来吗?”最后,独孤岚只能是这样轻轻地问道。

      李七夜没有立即回答,过了片刻之后,这才看了独孤岚一下,淡淡地笑着说道:“放心吧,出不了什么大事,既然是了不起的一战,那我当然是捧场了。”

      不知道为什么,李七夜这样的话,顿时让独孤岚在心里面长长地吁了一口气,李七夜没有给出任何承诺,但却让独孤岚如释重负一般。

      说完这话,李七夜没有再多说什么,他闭目养神,手持钓杆,好像是睡着了一样。

      独孤岚也十分好奇,为什么李七夜会一直在这里钓鱼呢,难道李七夜真的是在这里钓鱼吗?这让独孤岚充满了好奇,但,李七夜已经钓了这么久了,好像是一条鱼都没有钓到。

      “少爷真的是在钓鱼吗?”过了好一会儿,独孤岚就忍不住轻轻地问道了。

      但是,李七夜没有回答独孤岚的话,依然静静地坐在那里,好像真的睡着了一样。

      独孤岚也没有再打扰,只是静静地站在一旁,静静地看着李七夜手持着钓杆,不过,说来也奇怪,也不知道多久过去了,李七夜的钓杆一点动静都没有,根本就没有钓到一条鱼,这都让人怀疑,李七夜会不会钓鱼呢?

      也不知道过了多久,李七夜这才睁开眼睛,看了独孤岚一下,笑了一下,轻轻摇头,说道:“谁说,持杆,一定就是要钓鱼?”

      独孤岚不由怔了一下,但,也觉得这话有道理,这不一定是需要钓鱼。

      就在这个时候,李七夜开始收线了,一直在收,也不知道这钓线究竟有多长,一直收线都好像收不完一样,收了大半天,都没有看到钓钩。

      也不知道过了多久要,李七夜终于收完了错,钓钩脱水而出。

      但,当钓钩脱水而出的时候,独孤岚看得一清二楚,那根本就不是什么钓钩。

      大爆料,杀死贼老天的一千种方法曝光啦!想知道怎么杀死贼老天吗?想了解这些手段都有哪些吗?来这里!!关注贼老天”即可阅览相关信息!! -

    『加入书签,方便阅读』

    -
    - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/book_detail.html b/src/main/resources/static/book_detail.html deleted file mode 100644 index d63e88e..0000000 --- a/src/main/resources/static/book_detail.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - 帝霸 - - - - - -
    - -
    - - -
    - 帝霸 -
    - -
    -
    - -
    -
    - - -
    -
    -
    作者:厌笔萧生
    -
    类别:玄幻奇幻
    -
    状态:连载
    -
    更新:2019-08-22
    -
    评分:9.2分
    - -
    -
    -
    - - -
    -

    -   万火儿莫名其妙的重生了,而且从堂堂的金丹修士,直接坠落尘埃,变成天赋极差的炼气期小透明。

      小透明无父无母小可怜,柔弱无骨真小白花。

      万火儿仰天长叹。

      天道你大爷!

      不过这一次不仅附赠随身空间,还另有极重承诺的天之骄子美貌未婚夫一枚。

      万火儿抚胸感叹:还好,还好。

      但是,除此之外,还附赠另一枚重生女!

      重生女杂灵根,蓦然醒转变为天之骄女,自此之后,丹药在她手,神兽就她有。人生处处是机缘,所到处处有福缘,更有无数美男前仆后继,后宫日益壮大。

      万火儿哀叹。

      不同命啊~

      什么?

      重生女抢她名额,找未婚夫揍她。

      什么?

      重生女抢她好友?让好友接着揍她。

      什么?

      重生女要将她未婚夫收后宫?

      抱歉,绝对不行!

      自此之后,柔弱小白花,踏上漫漫极品女盗之路。

      信奉宗旨,只要是重生女的机缘,那就抢抢抢。只要是重生女的桃花,那就破破破。

      什么?机缘本是她的?桃花也是她的?

      桃花就算了,机缘绝对不放过。

      敬请收看:妖孽无双女盗贼是如何装作可怜无助小白花,一路扮猪吃老虎,踏上漫漫修仙路的。 -

    - - - -
    - - 查看完整目录 -
    - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/book_index.html b/src/main/resources/static/book_index.html deleted file mode 100644 index d21f887..0000000 --- a/src/main/resources/static/book_index.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - 帝霸 - - - - - -
    - -
    - - -
    - 帝霸 -
    - -
    -
    - - - -

    - -↓直达页面底部 -

    - -

    第345章 我在钓鱼

    -

    第344章 我在钓鱼

    -

    第343章 我在钓鱼

    -

    第342章 我在钓鱼

    -

    第341章 我在钓鱼

    -

    第340章 我在钓鱼

    -

    第345章 我在钓鱼

    -

    第344章 我在钓鱼

    -

    第343章 我在钓鱼

    -

    第342章 我在钓鱼

    -

    第341章 我在钓鱼

    -

    第340章 我在钓鱼

    -

    第345章 我在钓鱼

    -

    第344章 我在钓鱼

    -

    第343章 我在钓鱼

    -

    第342章 我在钓鱼

    -

    第341章 我在钓鱼

    -

    第340章 我在钓鱼

    -

    第345章 我在钓鱼

    -

    第344章 我在钓鱼

    -

    第343章 我在钓鱼

    -

    第342章 我在钓鱼

    -

    第341章 我在钓鱼

    -

    第340章 我在钓鱼

    -

    第345章 我在钓鱼

    -

    第344章 我在钓鱼

    -

    第343章 我在钓鱼

    -

    第342章 我在钓鱼

    -

    第341章 我在钓鱼

    -

    第340章 我在钓鱼

    -

    第345章 我在钓鱼

    -

    第344章 我在钓鱼

    -

    第343章 我在钓鱼

    -

    第342章 我在钓鱼

    -

    第341章 我在钓鱼

    -

    第340章 我在钓鱼

    - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/book_search.html b/src/main/resources/static/book_search.html deleted file mode 100644 index 81e5183..0000000 --- a/src/main/resources/static/book_search.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - 帝霸 - - - - - -
    - -
    - - -
    - 搜索小说 -
    - -
    -
    - -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    帝霸
    -
    9.2分
    -
    作者:厌笔萧生
    -
    类别:玄幻奇幻
    -
    状态:连载
    -
    更新:2019-08-22
    -
    -
    -

    简介:

    -
    - - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
    -
    -
    - - -
    - -
    -
    -
    - -
    -
    -
    帝霸
    -
    9.2分
    -
    作者:厌笔萧生
    -
    类别:玄幻奇幻
    -
    状态:连载
    -
    更新:2019-08-22
    -
    -
    -

    简介:

    -
    - - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
    -
    -
    - - -
    - -
    -
    -
    - -
    -
    -
    帝霸
    -
    9.2分
    -
    作者:厌笔萧生
    -
    类别:玄幻奇幻
    -
    状态:连载
    -
    更新:2019-08-22
    -
    -
    -

    简介:

    -
    - - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
    -
    -
    - - -
    - -
    -
    -
    - -
    -
    -
    帝霸
    -
    9.2分
    -
    作者:厌笔萧生
    -
    类别:玄幻奇幻
    -
    状态:连载
    -
    更新:2019-08-22
    -
    -
    -

    简介:

    -
    - - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
    -
    -
    - - -
    - -
    -
    -
    - -
    -
    -
    帝霸
    -
    9.2分
    -
    作者:厌笔萧生
    -
    类别:玄幻奇幻
    -
    状态:连载
    -
    更新:2019-08-22
    -
    -
    -

    简介:

    -
    - - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
    -
    -
    - - -
    - -
    -
    -
    - -
    -
    -
    帝霸
    -
    9.2分
    -
    作者:厌笔萧生
    -
    类别:玄幻奇幻
    -
    状态:连载
    -
    更新:2019-08-22
    -
    -
    -

    简介:

    -
    - - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
    -
    -
    - - -
    - -
    -
    -
    - -
    -
    -
    帝霸
    -
    9.2分
    -
    作者:厌笔萧生
    -
    类别:玄幻奇幻
    -
    状态:连载
    -
    更新:2019-08-22
    -
    -
    -

    简介:

    -
    - - 一觉醒来,世界大变。熟悉的高中传授的是魔法, - 告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽, - 虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师, - 一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师! -
    -
    -
    - - -
    - -
    - - -
    - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/favicon.ico b/src/main/resources/static/favicon.ico deleted file mode 100644 index 7782d23..0000000 Binary files a/src/main/resources/static/favicon.ico and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.001.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.001.png deleted file mode 100644 index f1aa8a5..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.001.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.002.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.002.png deleted file mode 100644 index f7ade17..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.002.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.003.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.003.png deleted file mode 100644 index 3cf0cb5..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.003.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.004.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.004.png deleted file mode 100644 index 6b9d22a..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.004.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.005.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.005.png deleted file mode 100644 index eab4c71..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.005.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.006.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.006.png deleted file mode 100644 index 47ca516..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.006.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.007.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.007.png deleted file mode 100644 index e7c4cfe..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.007.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.008.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.008.png deleted file mode 100644 index 5564cf1..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.008.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.009.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.009.png deleted file mode 100644 index c452adf..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.009.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.010.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.010.png deleted file mode 100644 index a4b26c9..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.010.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.011.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.011.png deleted file mode 100644 index 71c445f..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.011.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.012.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.012.png deleted file mode 100644 index 381c5fe..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.012.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.013.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.013.png deleted file mode 100644 index 91b237c..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.013.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.014.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.014.png deleted file mode 100644 index 646bb42..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.014.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.015.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.015.png deleted file mode 100644 index bca9ffc..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.015.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.016.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.016.png deleted file mode 100644 index eee0a1e..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.016.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.017.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.017.png deleted file mode 100644 index 25856dd..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.017.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.018.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.018.png deleted file mode 100644 index 7771bfb..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.018.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.019.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.019.png deleted file mode 100644 index c6947cc..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.019.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.020.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.020.png deleted file mode 100644 index 58bcb5c..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.020.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.021.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.021.png deleted file mode 100644 index 05bd1d2..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.021.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.022.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.022.png deleted file mode 100644 index dacaf46..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.022.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.023.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.023.png deleted file mode 100644 index badaaa1..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.023.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.024.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.024.png deleted file mode 100644 index 9e10a80..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.024.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.025.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.025.png deleted file mode 100644 index 2de1e28..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.025.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.026.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.026.png deleted file mode 100644 index e140735..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.026.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.027.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.027.png deleted file mode 100644 index 7133a5d..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.027.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.028.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.028.png deleted file mode 100644 index 799e145..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.028.png and /dev/null differ diff --git a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.030.png b/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.030.png deleted file mode 100644 index 6d9e86f..0000000 Binary files a/src/main/resources/static/html/9a4a540e-1759-4268-90fa-7fb652c3604a.030.png and /dev/null differ diff --git a/src/main/resources/static/html/note_1.html b/src/main/resources/static/html/note_1.html deleted file mode 100644 index 1f729f5..0000000 --- a/src/main/resources/static/html/note_1.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - RestTemplate中文乱码问题源码分析与解决 - -

    RestTemplate中文乱码问题源码分析与解决 -

    -

    ---  请求响应数据乱码源码原理分析 -

    -

     

    -

     

    -

    ============================原理=================== -

    -

    //默认方式:

    -

    //RestTemplate restTemplate = new RestTemplate(); -

    -

    // 当返回的response-header的content-type属性有charset值时, -

    -

    // restTemplate的 StringHttpMessageConverter会读取该charset值,并使用该值进行 -

    -

    //IO流 = 》字符串的转换,否则则使用默认的字符集 -

    -

    //

    -

     

    -

    通过源码可以发现restTemplate底层默认使用了HttpURLConnection,可以支持其他多种http客户端,如httpclient、okhttp等,通过工厂方法模式创建请求:

    -

     

    -

    clipboard.png -

    -

     

    -

    clipboard.png -

    -

     

    -

     

    -

     

    -

     

    -

    clipboard.png -

    -

     

    -

     

    -

                             restTemplate调用excute方法 -

    -

    clipboard.png -

    -

                             restTemplate调用了doExecute方法 -

    -

    clipboard.png -

    -

                             执行请求,调用ResponseExtractor responseExtractor.extractData()对相应结果进行数据提取 -

    -

    clipboard.png -

    -

                             调用HttpMessageConverterExtractor this.delegate.extractData()执行抽取数据的操作 -

    -

    clipboard.png -

    -

                             获取response-header的content-type, -

    -

    clipboard.png -

    -

     

    -

    clipboard.png -

    -

                             判断消息转换器对应的支持媒体类型supportMediaType是否包含该content-type -

    -

    clipboard.png -

    -

                             调用第一个包含该content-type的GenericHttpMessageConverter转换数据读取数据 -

    -

    clipboard.png -

    -

     

    -

    clipboard.png -

    -

                             读取数据的时候会再一次获取response-header的content-type的字符集

    -

    如果该字符集存在,则使用该字符集进行 IO流 =》字符串 转换 -

    -

    clipboard.png -

    -

     

    -

    clipboard.png -

    -

     

    -

     

    -

     

    -

    案例

    -

     

    -

    clipboard.png -

    -

     

    -

     

    -

    clipboard.png -

    -

     

    -

    响应头中并没有content-type的header,照理说浏览器应该不知道服务端返回的输入流编码,如果和浏览器默认的编码不匹配应该会出现乱码,但是现在浏览器有编码自动识别功能,所以上面的代码没有加content-type的Header也没有问题 -

    -

     

    -

             

    -

    clipboard.png -

    -

     

    -

     

    -

     

    -

    实际上下面的做法更规范:

    -

    clipboard.png -

    -

    源码:

    -

    clipboard.png -

    -

     

    -

    clipboard.png -

    -

     

    -

    clipboard.png -

    -

      -

    -

      -

    -

    ============================原理===================== -

    -

     

    -

     

    -

     

    -

     

    -

     

    -

     

    -

     

    -

     

    -

     

    -

    初探RestTemplate--解决中文乱码问题 - mryang125的博客 - CSDN博客.jpg -

    -

     

    - - \ No newline at end of file diff --git a/src/main/resources/static/html/note_2.html b/src/main/resources/static/html/note_2.html deleted file mode 100644 index af7383f..0000000 --- a/src/main/resources/static/html/note_2.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - 服务器跨域处理 - -

    跨域处理 -

    -

     

    -

    跨域是什么?浏览器从一个域名的网页去请求另一个域名的资源时,域名、端口、 协议任一不同,都是跨域 。我们是采用前后端分离开发的,也是前后端分离部署的,必然会存在跨域问题。 怎么解决跨域?很简单,只需要在controller类上添加注解 @CrossOrigin 即可!这个注解其实是CORS的实现。 -

    -

    CORS(Cross-Origin Resource Sharing, 跨源资源共享)是W3C出的一个标准,其思 想是使用自定义的HTTP头部让浏览器与服务器进行沟通,从而决定请求或响应是应该成 功,还是应该失败。因此,要想实现CORS进行跨域,需要服务器进行一些设置,同时前端也需要做一些配置和分析。本文简单的对服务端的配置和前端的一些设置进行分析。 -

    -

     

    -

    1️⃣在controller类上添加注解 @CrossOrigin,表示Controller上的所以方法允许跨域,在方法上添加注解 @CrossOrigin,表示该方法允许跨域 -

    -

     

    -

    @Target({ ElementType.METHOD, ElementType.TYPE }) -

    -

    @Retention(RetentionPolicy.RUNTIME)

    -

    @Documented

    -

    public @interface CrossOrigin {

    -

     

    -

        String[] DEFAULT_ORIGINS = { "*" };

    -

     

    -

        String[] DEFAULT_ALLOWED_HEADERS = { "*" }; -

    -

     

    -

        boolean DEFAULT_ALLOW_CREDENTIALS = true; -

    -

     

    -

        long DEFAULT_MAX_AGE = 1800;

    -

     

    -

     

    -

        /**

    -

         * 同origins属性一样

    -

         */

    -

        @AliasFor("origins")

    -

        String[] value() default {};

    -

     

    -

        /**

    -

         * 所有支持域的集合,例如"http://domain1.com"。

    -

         * <p>这些值都显示在请求头中的Access-Control-Allow-Origin -

    -

         * "*"代表所有域的请求都支持

    -

         * <p>如果没有定义,所有请求的域都支持

    -

         * @see #value

    -

         */

    -

        @AliasFor("value")

    -

        String[] origins() default {};

    -

     

    -

        /**

    -

         * 允许请求头中的header,默认都支持

    -

         */

    -

        String[] allowedHeaders() default {};

    -

     

    -

        /**

    -

         * 响应头中允许访问的header,默认为空

    -

         */

    -

        String[] exposedHeaders() default {};

    -

     

    -

        /**

    -

         * 请求支持的方法,例如"{RequestMethod.GET, RequestMethod.POST}"}。 -

    -

         * 默认支持RequestMapping中设置的方法

    -

         */

    -

        RequestMethod[] methods() default {};

    -

     

    -

        /**

    -

         * 是否允许cookie随请求发送,使用时必须指定具体的域

    -

         */

    -

        String allowCredentials() default "";

    -

     

    -

        /**

    -

         * 预请求的结果的有效期,默认30分钟

    -

         */

    -

        long maxAge() default -1;

    -

     

    -

    }

    -

     

    -

     

    -

    2️⃣配置 CorsFilter(全局配置)

    -

     

    -

    @Configuration -

    -

    public class GlobalCorsConfig {

    -

     

    -

        @Bean

    -

        public CorsFilter corsFilter() {

    -

            //1.添加CORS配置信息 -

    -

            CorsConfiguration config = new CorsConfiguration();

    -

            //1) 允许的域,不要写*,否则cookie就无法使用了 -

    -

            config.addAllowedOrigin("http://manage.shop.com");

    -

            config.addAllowedOrigin("http://www.shop.com");

    -

            //2) 是否发送Cookie信息 -

    -

            config.setAllowCredentials(true);

    -

            //3) 允许的请求方式 -

    -

            config.addAllowedMethod("OPTIONS");

    -

            config.addAllowedMethod("HEAD");

    -

            config.addAllowedMethod("GET");

    -

            config.addAllowedMethod("PUT");

    -

            config.addAllowedMethod("POST");

    -

            config.addAllowedMethod("DELETE");

    -

            config.addAllowedMethod("PATCH");

    -

            // 4)允许的头信息 -

    -

            config.addAllowedHeader("*");

    -

            // 5) 有效时长 -

    -

    //        config.setMaxAge(3600L); -

    -

     

    -

            //2.添加映射路径,我们拦截一切请求 -

    -

            UrlBasedCorsConfigurationSource configSource = new UrlBasedCorsConfigurationSource(); -

    -

            configSource.registerCorsConfiguration("/**", config);

    -

     

    -

            //3.返回新的CorsFilter. -

    -

            return new CorsFilter(configSource);

    -

        }

    -

    }

    - - \ No newline at end of file diff --git a/src/main/resources/static/html/note_3.html b/src/main/resources/static/html/note_3.html deleted file mode 100644 index 32eb232..0000000 --- a/src/main/resources/static/html/note_3.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - 对分布式事务的理解 - -

    对分布式事务及两阶段提交和三阶段提交的理解

    -

     

    -

    一、分布式数据一致性 -

    -

    在分布式系统中,为了保证数据的高可用,通常会将数据保留多个副本(replica),这些副本会放置在不同的物理的机器上。 -

    -

    1.什么是数据一致性 -

    -

    在数据有多份副本的情况下,如果网络、服务器或者软件出现故障,会导致部分副本写入成功,部分副本写入失败。这就造成各个副本之间的数据不一致,数据内容冲突。 -

    -

    造成事实上的数据不一致。

    -

    2.CAP定理

    -

    CAP理论认为在分布式的环境下设计和部署系统时,有3个核心的需求: -

    -

    Consistency,Availability和Partition Tolerance,即CAP。 -

    -

     

    -

    Consistency:一致性,这个和数据库ACID的一致性类似,但这里关注的所有数据节点上的数据一致性和正确性,而数据库的ACID关注的是在在一个事务内,对数据的一些约束。系统在执行过某项操作后仍然处于一致的状态。在分布式系统中,更新操作执行成功后所有的用户都应该读取到最新值。 -

    -

    Availability:可用性,每一个操作总是能够在一定时间内返回结果。需要注意“一定时间”和“返回结果”。“一定时间”是指,系统结果必须在给定时间内返回。“返回结果”是指系统返回操作成功或失败的结果。 -

    -

    Partition Tolerance:分区容忍性,是否可以对数据进行分区。这是考虑到性能和可伸缩性。 -

    -

    3.数据一致性模型

    -

    一些分布式系统通过复制数据来提高系统的可靠性和容错性,并且将数据的不同的副本存放在不同的机器。 -

    -

    强一致性:

    -

    当更新操作完成之后,任何多个后续进程或者线程的访问都会返回最新的更新过的值。这种是对用户最友好的,就是用户上一次写什么,下一次就保证能读到什么。根据 CAP 理论,这种实现需要牺牲可用性。 -

    -

    弱一致性:

    -

    系统并不保证续进程或者线程的访问都会返回最新的更新过的值。用户读到某一操作对系统特定数据的更新需要一段时间,我们称这段时间为“不一致性窗口”。系统在数据写入成功之后,不承诺立即可以读到最新写入的值,也不会具体的承诺多久之后可以读到。 -

    -

    最终一致性:

    -

    是弱一致性的一种特例。系统保证在没有后续更新的前提下,系统最终返回上一次更新操作的值。在没有故障发生的前提下,不一致窗口的时间主要受通信延迟,系统负载和复制副本的个数影响。DNS 是一个典型的最终一致性系统。 -

    -

     

    -

    二、典型的分布式事务实例 -

    -

    跨行转账问题是一个典型的分布式事务,用户A向B的一个转账1000,要进行A的余额-1000,B的余额+1000,显然必须保证这两个操作的事务性。 -

    -

    类似的还有,电商系统中,当有用户下单后,除了在订单表插入记,还要在商品表更新库存等,特别是随着微服务架构的流行,分布式事务的场景更变得更普遍。 -

    -

     

    -

    三、两阶段提交协议 -

    -

    两阶段提交协议是协调所有分布式原子事务参与者,并决定提交或取消(回滚)的分布式算法。 -

    -

    1.协议参与者

    -

    在两阶段提交协议中,系统一般包含两类机器(或节点):一类为协调者(coordinator),通常一个系统中只有一个;另一类为事务参与者(participants,cohorts或workers),一般包含多个,在数据存储系统中可以理解为数据副本的个数。协议中假设每个节点都会记录写前日志(write-ahead log)并持久性存储,即使节点发生故障日志也不会丢失。协议中同时假设节点不会发生永久性故障而且任意两个节点都可以互相通信。 -

    -

    61-160357634.png -

    -

    2.两个阶段的执行

    -

    1.请求阶段(commit-request phase,或称表决阶段,voting phase) -

    -

    在请求阶段,协调者将通知事务参与者准备提交或取消事务,然后进入表决过程。 -

    -

    在表决过程中,参与者将告知协调者自己的决策:同意(事务参与者本地作业执行成功)或取消(本地作业执行故障)。 -

    -

    2.提交阶段(commit phase)

    -

    在该阶段,协调者将基于第一个阶段的投票结果进行决策:提交或取消。 -

    -

    当且仅当所有的参与者同意提交事务协调者才通知所有的参与者提交事务,否则协调者将通知所有的参与者取消事务。 -

    -

    参与者在接收到协调者发来的消息后将执行响应的操作。

    -

    (3)两阶段提交的缺点 -

    -

    1.同步阻塞问题。执行过程中,所有参与节点都是事务阻塞型的。 -

    -

    当参与者占有公共资源时,其他第三方节点访问公共资源不得不处于阻塞状态。 -

    -

    2.单点故障。由于协调者的重要性,一旦协调者发生故障。

    -

    参与者会一直阻塞下去。尤其在第二阶段,协调者发生故障,那么所有的参与者还都处于锁定事务资源的状态中,而无法继续完成事务操作。(如果是协调者挂掉,可以重新选举一个协调者,但是无法解决因为协调者宕机导致的参与者处于阻塞状态的问题) -

    -

    3.数据不一致。在二阶段提交的阶段二中,当协调者向参与者发送commit请求之后,发生了局部网络异常或者在发送commit请求过程中协调者发生了故障,这回导致只有一部分参与者接受到了commit请求。 -

    -

    而在这部分参与者接到commit请求之后就会执行commit操作。但是其他部分未接到commit请求的机器则无法执行事务提交。于是整个分布式系统便出现了数据部一致性的现象。 -

    -

    (4)两阶段提交无法解决的问题 -

    -

    当协调者出错,同时参与者也出错时,两阶段无法保证事务执行的完整性。 -

    -

    考虑协调者再发出commit消息之后宕机,而唯一接收到这条消息的参与者同时也宕机了。 -

    -

    那么即使协调者通过选举协议产生了新的协调者,这条事务的状态也是不确定的,没人知道事务是否被已经提交。 -

    -

     

    -

    四、三阶段提交协议 -

    -

    三阶段提交协议在协调者和参与者中都引入超时机制,并且把两阶段提交协议的第一个阶段拆分成了两步:询问,然后再锁资源,最后真正提交。 -

    -

    92-920273519.png -

    -

    (1)三个阶段的执行 -

    -

    1.CanCommit阶段

    -

    3PC的CanCommit阶段其实和2PC的准备阶段很像。 -

    -

    协调者向参与者发送commit请求,参与者如果可以提交就返回Yes响应,否则返回No响应。 -

    -

    2.PreCommit阶段

    -

    Coordinator根据Cohort的反应情况来决定是否可以继续事务的PreCommit操作。 -

    -

    根据响应情况,有以下两种可能。

    -

    A.假如Coordinator从所有的Cohort获得的反馈都是Yes响应,那么就会进行事务的预执行: -

    -

    发送预提交请求。Coordinator向Cohort发送PreCommit请求,并进入Prepared阶段。 -

    -

    事务预提交。Cohort接收到PreCommit请求后,会执行事务操作,并将undo和redo信息记录到事务日志中。 -

    -

    响应反馈。如果Cohort成功的执行了事务操作,则返回ACK响应,同时开始等待最终指令。 -

    -

    B.假如有任何一个Cohort向Coordinator发送了No响应,或者等待超时之后,Coordinator都没有接到Cohort的响应,那么就中断事务: -

    -

    发送中断请求。Coordinator向所有Cohort发送abort请求。 -

    -

    中断事务。Cohort收到来自Coordinator的abort请求之后(或超时之后,仍未收到Cohort的请求),执行事务的中断。 -

    -

    3.DoCommit阶段

    -

    该阶段进行真正的事务提交,也可以分为以下两种情况:

    -

    执行提交

    -

    A.发送提交请求。Coordinator接收到Cohort发送的ACK响应,那么他将从预提交状态进入到提交状态。并向所有Cohort发送doCommit请求。 -

    -

    B.事务提交。Cohort接收到doCommit请求之后,执行正式的事务提交。并在完成事务提交之后释放所有事务资源。 -

    -

    C.响应反馈。事务提交完之后,向Coordinator发送ACK响应。 -

    -

    D.完成事务。Coordinator接收到所有Cohort的ACK响应之后,完成事务。 -

    -

    中断事务

    -

    Coordinator没有接收到Cohort发送的ACK响应(可能是接受者发送的不是ACK响应,也可能响应超时),那么就会执行中断事务。 -

    -

    (2)三阶段提交协议和两阶段提交协议的不同 -

    -

    对于协调者(Coordinator)和参与者(Cohort)都设置了超时机制(在2PC中,只有协调者拥有超时机制,即如果在一定时间内没有收到cohort的消息则默认失败)。 -

    -

    在2PC的准备阶段和提交阶段之间,插入预提交阶段,使3PC拥有CanCommit、PreCommit、DoCommit三个阶段。 -

    -

    PreCommit是一个缓冲,保证了在最后提交阶段之前各参与节点的状态是一致的。 -

    -

    (2)三阶段提交协议的缺点 -

    -

    如果进入PreCommit后,Coordinator发出的是abort请求,假设只有一个Cohort收到并进行了abort操作, -

    -

    而其他对于系统状态未知的Cohort会根据3PC选择继续Commit,此时系统状态发生不一致性。 -

    - - \ No newline at end of file diff --git a/src/main/resources/static/html/note_4.html b/src/main/resources/static/html/note_4.html deleted file mode 100644 index 82e2955..0000000 --- a/src/main/resources/static/html/note_4.html +++ /dev/null @@ -1,2019 +0,0 @@ - - - - - - SpringCloud使用问题汇总 - -

    SpringCloud使用问题汇总:

    -

     

    -

    1.当feign调用复杂的服务接口时,报错

    -

    @PostMapping("/jobPosition/listJobPositionByPage") -

    -

    List<MiniJobPositionVO> listJobPositionByPage(@RequestParam(value = "posName") String posName,@RequestParam(value = "jobTypeId") String jobTypeId, @RequestBody PageBean pageBean); -

    -

    当调用该接口时,posName或jobTypeId传递为null时报错400 bad request,提示需要string parameter -

    -

    解决方案:给参数设置required = false

    -

    clipboard.png -

    -

    2.集成zipkin时配置正确,zipkin-server却收不到调用信息

    -

    通过HTTP使用基于Zipkin的Sleuth时,如果框架集成了rabbitmq,默认会按rabbitmq的异步方式发送调用链信息,默认的以http同步方式发送调用链信息就不会生效,注释rabbitmq配置后,发送成功。 -

    -

     

    -

    3.rabbitmq的异步方式发送调用链信息

    -

    ①加入maven依赖

    -

    clipboard.png -

    -

    ②配置rabbitmq连接信息

    -

    clipboard.png -

    -

    ③rabbitmq控制台创建zipkin队列

    -

    clipboard.png -

    -

    ④启动zipkin-server

    -

    java -jar D:\software\zipkin-server-2.10.1-exec.jar --zipkin.collector.rabbitmq.addresses=192.168.99.100:5673 --zipkin.collector.rabbitmq.username=guest --zipkin.collector.rabbitmq.password=test --zipkin.collector.rabbitmq.useSsl=false  --zipkin.collector.rabbitmq.virtual-host=/ --zipkin.collector.rabbitmq.queue=zipkin -

    -

     

    -

     

    -

    clipboard.png -

    -

    ⑤docker 方式启动

    -

    docker run -d -p 9411:9411 --env RABBIT_ADDRESSES=192.168.99.100:5673  --env  RABBIT_USER=guest  --env  RABBIT_P -

    -

    ASSWORD=test --env RABBIT_USE_SSL=false --env RABBIT_VIRTUAL_HOST=/ --env RABBIT_QUEUE=zipkin openzipkin/zipkin -

    -

     

    -

    ⑥zipkin所有属性

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    zipkin:

    -

     

    -

     

    -

    self-tracing:

    -

     

    -

    # Set to true to enable self-tracing. -

    -

     

    -

    enabled: ${SELF_TRACING_ENABLED:false} -

    -

     

    -

    # percentage to self-traces to retain -

    -

     

    -

    sample-rate: ${SELF_TRACING_SAMPLE_RATE:1.0} -

    -

     

    -

    # Timeout in seconds to flush self-tracing data to storage. -

    -

     

    -

    message-timeout: ${SELF_TRACING_FLUSH_INTERVAL:1} -

    -

     

    -

    collector:

    -

     

    -

    # percentage to traces to retain -

    -

     

    -

    sample-rate: ${COLLECTOR_SAMPLE_RATE:1.0} -

    -

     

    -

    http:

    -

     

    -

    # Set to false to disable creation of spans via HTTP collector API -

    -

     

    -

    enabled: ${HTTP_COLLECTOR_ENABLED:true} -

    -

     

    -

    kafka:

    -

     

    -

    # Kafka bootstrap broker list, comma-separated host:port values. Setting this activates the -

    -

     

    -

    # Kafka 0.10+ collector. -

    -

     

    -

    bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:} -

    -

     

    -

    # Name of topic to poll for spans -

    -

     

    -

    topic: ${KAFKA_TOPIC:zipkin} -

    -

     

    -

    # Consumer group this process is consuming on behalf of. -

    -

     

    -

    group-id: ${KAFKA_GROUP_ID:zipkin} -

    -

     

    -

    # Count of consumer threads consuming the topic -

    -

     

    -

    streams: ${KAFKA_STREAMS:1} -

    -

     

    -

    rabbitmq:

    -

     

    -

    # RabbitMQ server address list (comma-separated list of host:port) -

    -

     

    -

    addresses: ${RABBIT_ADDRESSES:} -

    -

     

    -

    concurrency: ${RABBIT_CONCURRENCY:1} -

    -

     

    -

    # TCP connection timeout in milliseconds -

    -

     

    -

    connection-timeout: ${RABBIT_CONNECTION_TIMEOUT:60000} -

    -

     

    -

    password: ${RABBIT_PASSWORD:guest} -

    -

     

    -

    queue: ${RABBIT_QUEUE:zipkin} -

    -

     

    -

    username: ${RABBIT_USER:guest} -

    -

     

    -

    virtual-host: ${RABBIT_VIRTUAL_HOST:/} -

    -

     

    -

    useSsl: ${RABBIT_USE_SSL:false} -

    -

     

    -

    uri: ${RABBIT_URI:}

    -
    -

     

    -

    query:

    -

     

    -

    enabled: ${QUERY_ENABLED:true} -

    -

     

    -

    # 1 day in millis -

    -

     

    -

    lookback: ${QUERY_LOOKBACK:86400000} -

    -

     

    -

    # The Cache-Control max-age (seconds) for /api/v2/services and /api/v2/spans -

    -

     

    -

    names-max-age: 300

    -

     

    -

    # CORS allowed-origins. -

    -

     

    -

    allowed-origins: "*"

    -

     

    -

     

    -

     

    -

    storage:

    -

     

    -

    strict-trace-id: ${STRICT_TRACE_ID:true} -

    -

     

    -

    search-enabled: ${SEARCH_ENABLED:true} -

    -

     

    -

    type: ${STORAGE_TYPE:mem} -

    -

     

    -

    mem:

    -

     

    -

    # Maximum number of spans to keep in memory. When exceeded, oldest traces (and their spans) will be purged. -

    -

     

    -

    # A safe estimate is 1K of memory per span (each span with 2 annotations + 1 binary annotation), plus -

    -

     

    -

    # 100 MB for a safety buffer. You'll need to verify in your own environment. -

    -

     

    -

    # Experimentally, it works with: max-spans of 500000 with JRE argument -Xmx600m. -

    -

     

    -

    max-spans: 500000

    -

     

    -

    cassandra:

    -

     

    -

    # Comma separated list of host addresses part of Cassandra cluster. Ports default to 9042 but you can also specify a custom port with 'host:port'. -

    -

     

    -

    contact-points: ${CASSANDRA_CONTACT_POINTS:localhost} -

    -

     

    -

    # Name of the datacenter that will be considered "local" for latency load balancing. When unset, load-balancing is round-robin. -

    -

     

    -

    local-dc: ${CASSANDRA_LOCAL_DC:} -

    -

     

    -

    # Will throw an exception on startup if authentication fails. -

    -

     

    -

    username: ${CASSANDRA_USERNAME:} -

    -

     

    -

    password: ${CASSANDRA_PASSWORD:} -

    -

     

    -

    keyspace: ${CASSANDRA_KEYSPACE:zipkin} -

    -

     

    -

    # Max pooled connections per datacenter-local host. -

    -

     

    -

    max-connections: ${CASSANDRA_MAX_CONNECTIONS:8} -

    -

     

    -

    # Ensuring that schema exists, if enabled tries to execute script /zipkin-cassandra-core/resources/cassandra-schema-cql3.txt. -

    -

     

    -

    ensure-schema: ${CASSANDRA_ENSURE_SCHEMA:true} -

    -

     

    -

    # 7 days in seconds -

    -

     

    -

    span-ttl: ${CASSANDRA_SPAN_TTL:604800} -

    -

     

    -

    # 3 days in seconds -

    -

     

    -

    index-ttl: ${CASSANDRA_INDEX_TTL:259200} -

    -

     

    -

    # the maximum trace index metadata entries to cache -

    -

     

    -

    index-cache-max: ${CASSANDRA_INDEX_CACHE_MAX:100000} -

    -

     

    -

    # how long to cache index metadata about a trace. 1 minute in seconds -

    -

     

    -

    index-cache-ttl: ${CASSANDRA_INDEX_CACHE_TTL:60} -

    -

     

    -

    # how many more index rows to fetch than the user-supplied query limit -

    -

     

    -

    index-fetch-multiplier: ${CASSANDRA_INDEX_FETCH_MULTIPLIER:3} -

    -

     

    -

    # Using ssl for connection, rely on Keystore -

    -

     

    -

    use-ssl: ${CASSANDRA_USE_SSL:false} -

    -

     

    -

    cassandra3:

    -

     

    -

    # Comma separated list of host addresses part of Cassandra cluster. Ports default to 9042 but you can also specify a custom port with 'host:port'. -

    -

     

    -

    contact-points: ${CASSANDRA_CONTACT_POINTS:localhost} -

    -

     

    -

    # Name of the datacenter that will be considered "local" for latency load balancing. When unset, load-balancing is round-robin. -

    -

     

    -

    local-dc: ${CASSANDRA_LOCAL_DC:} -

    -

     

    -

    # Will throw an exception on startup if authentication fails. -

    -

     

    -

    username: ${CASSANDRA_USERNAME:} -

    -

     

    -

    password: ${CASSANDRA_PASSWORD:} -

    -

     

    -

    keyspace: ${CASSANDRA_KEYSPACE:zipkin2} -

    -

     

    -

    # Max pooled connections per datacenter-local host. -

    -

     

    -

    max-connections: ${CASSANDRA_MAX_CONNECTIONS:8} -

    -

     

    -

    # Ensuring that schema exists, if enabled tries to execute script /zipkin2-schema.cql -

    -

     

    -

    ensure-schema: ${CASSANDRA_ENSURE_SCHEMA:true} -

    -

     

    -

    # how many more index rows to fetch than the user-supplied query limit -

    -

     

    -

    index-fetch-multiplier: ${CASSANDRA_INDEX_FETCH_MULTIPLIER:3} -

    -

     

    -

    # Using ssl for connection, rely on Keystore -

    -

     

    -

    use-ssl: ${CASSANDRA_USE_SSL:false} -

    -

     

    -

    elasticsearch:

    -

     

    -

    # host is left unset intentionally, to defer the decision -

    -

     

    -

    hosts: ${ES_HOSTS:}

    -
    -

     

    -

    pipeline: ${ES_PIPELINE:}

    -
    -

     

    -

    max-requests: ${ES_MAX_REQUESTS:64} -

    -

     

    -

    timeout: ${ES_TIMEOUT:10000} -

    -

     

    -

    index: ${ES_INDEX:zipkin} -

    -

     

    -

    date-separator: ${ES_DATE_SEPARATOR:-} -

    -

     

    -

    index-shards: ${ES_INDEX_SHARDS:5} -

    -

     

    -

    index-replicas: ${ES_INDEX_REPLICAS:1} -

    -

     

    -

    username: ${ES_USERNAME:}

    -
    -

     

    -

    password: ${ES_PASSWORD:}

    -
    -

     

    -

    http-logging: ${ES_HTTP_LOGGING:} -

    -

     

    -

    legacy-reads-enabled: ${ES_LEGACY_READS_ENABLED:true} -

    -

     

    -

    mysql:

    -

     

    -

    host: ${MYSQL_HOST:localhost} -

    -

     

    -

    port: ${MYSQL_TCP_PORT:3306} -

    -

     

    -

    username: ${MYSQL_USER:}

    -
    -

     

    -

    password: ${MYSQL_PASS:}

    -
    -

     

    -

    db: ${MYSQL_DB:zipkin} -

    -

     

    -

    max-active: ${MYSQL_MAX_CONNECTIONS:10} -

    -

     

    -

    use-ssl: ${MYSQL_USE_SSL:false} -

    -

     

    -

    ui:

    -

     

    -

    enabled: ${QUERY_ENABLED:true} -

    -

     

    -

    ## Values below here are mapped to ZipkinUiProperties, served as /config.json -

    -

     

    -

    # Default limit for Find Traces -

    -

     

    -

    query-limit: 10

    -

     

    -

    # The value here becomes a label in the top-right corner -

    -

     

    -

    environment:

    -

     

    -

    # Default duration to look back when finding traces. -

    -

     

    -

    # Affects the "Start time" element in the UI. 1 hour in millis -

    -

     

    -

    default-lookback: 3600000

    -

     

    -

    # When false, disables the "find a trace" screen -

    -

     

    -

    search-enabled: ${SEARCH_ENABLED:true} -

    -

     

    -

    # Which sites this Zipkin UI covers. Regex syntax. (e.g. http:\/\/example.com\/.*) -

    -

     

    -

    # Multiple sites can be specified, e.g. -

    -

     

    -

    # - .*example1.com -

    -

     

    -

    # - .*example2.com -

    -

     

    -

    # Default is "match all websites" -

    -

     

    -

    instrumented: .*

    -

     

    -

    # URL placed into the <base> tag in the HTML -

    -

     

    -

    base-path: /zipkin

    -

     

    -

     

    -

     

    -

    server:

    -

     

    -

    port: ${QUERY_PORT:9411} -

    -

     

    -

    use-forward-headers: true

    -

     

    -

    compression:

    -

     

    -

    enabled: true

    -

     

    -

    # compresses any response over min-response-size (default is 2KiB) -

    -

     

    -

    # Includes dynamic json content and large static assets from zipkin-ui -

    -

     

    -

    mime-types: application/json,application/javascript,text/css,image/svg -

    -

     

    -

     

    -

     

    -

    spring:

    -

     

    -

    jmx:

    -

     

    -

    # reduce startup time by excluding unexposed JMX service -

    -

     

    -

    enabled: false

    -

     

    -

    mvc:

    -

     

    -

    favicon:

    -

     

    -

    # zipkin has its own favicon -

    -

     

    -

    enabled: false

    -

     

    -

    autoconfigure:

    -

     

    -

    exclude:

    -

     

    -

    # otherwise we might initialize even when not needed (ex when storage type is cassandra) -

    -

     

    -

    - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration -

    -

     

    -

    info:

    -

     

    -

    zipkin:

    -

     

    -

    version: "@project.version@" -

    -

     

    -

     

    -

     

    -

    logging:

    -

     

    -

    pattern:

    -

     

    -

    level: "%clr(%5p) %clr([%X{traceId}/%X{spanId}]){yellow}" -

    -

     

    -

    level:

    -

     

    -

    # Silence Invalid method name: '__can__finagle__trace__v3__' -

    -

     

    -

    com.facebook.swift.service.ThriftServiceProcessor: 'OFF'

    -

     

    -

    # # investigate /api/v2/dependencies -

    -

     

    -

    # zipkin2.internal.DependencyLinker: 'DEBUG' -

    -

     

    -

    # # log cassandra queries (DEBUG is without values) -

    -

     

    -

    # com.datastax.driver.core.QueryLogger: 'TRACE' -

    -

     

    -

    # # log cassandra trace propagation -

    -

     

    -

    # com.datastax.driver.core.Message: 'TRACE' -

    -

     

    -

    # # log reason behind http collector dropped messages -

    -

     

    -

    # zipkin2.server.ZipkinHttpCollector: 'DEBUG' -

    -

     

    -

    # zipkin2.collector.kafka.KafkaCollector: 'DEBUG' -

    -

     

    -

    # zipkin2.collector.kafka08.KafkaCollector: 'DEBUG' -

    -

     

    -

    # zipkin2.collector.rabbitmq.RabbitMQCollector: 'DEBUG' -

    -

     

    -

    # zipkin2.collector.scribe.ScribeCollector: 'DEBUG' -

    -

     

    -

     

    -

     

    -

    management:

    -

     

    -

    endpoints:

    -

     

    -

    web:

    -

     

    -

    exposure:

    -

     

    -

    include: '*'

    -

     

    -

    endpoint:

    -

     

    -

    health:

    -

     

    -

    show-details: always

    -

     

    -

    # Disabling auto time http requests since it is added in Undertow HttpHandler in Zipkin autoconfigure -

    -

     

    -

    # Prometheus module. In Zipkin we use different naming for the http requests duration -

    -

     

    -

    metrics:

    -

     

    -

    web:

    -

     

    -

    server:

    -

     

    -

    auto-time-requests: false

    -

     

    - - \ No newline at end of file diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html deleted file mode 100644 index e78ef2d..0000000 --- a/src/main/resources/static/index.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - 首页 - - - - - - - - -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    -
    -

    本站推荐

    -
    - - -
    - -
    -
    - -
    - 三寸人间 - - -
    -
    - -
    - 三寸人间 -
    -
    - -
    - 三寸人间 -
    -
    -
    -
    -
    -
    -

    热门小说推荐

    -
    - -
    -
    -
    -
    - -
    -
    -
    绝世唐门 -
    9.3分
    -
    -
    作者:唐家三少
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    -
    -
    - -
    -
    -
    绝世唐门 -
    9.3分
    -
    -
    作者:唐家三少
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    -
    -
    - -
    -
    -
    绝世唐门 -
    9.3分
    -
    -
    作者:唐家三少
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    -
    -
    - -
    -
    -
    绝世唐门 -
    9.3分
    -
    -
    作者:唐家三少
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    -
    -
    - -
    -
    -
    绝世唐门 -
    9.3分
    -
    -
    作者:唐家三少
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    -
    -
    - -
    -
    -
    绝世唐门 -
    9.3分
    -
    -
    作者:唐家三少
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    -
    -
    - -
    -
    -
    绝世唐门 -
    9.3分
    -
    -
    作者:唐家三少
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    -
    - -
    -
    -
    -
    -

    最近更新小说

    -
    - -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    -
    - -
    1.我真的要飞天了 - 柳一条 -
    -
    08-22 19:13
    -
    -
    - 这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌? - 百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门! -
    -
    - - -
    -
    - -
    -
    -
    - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/js/common.js b/src/main/resources/static/js/common.js deleted file mode 100644 index a6db1ed..0000000 --- a/src/main/resources/static/js/common.js +++ /dev/null @@ -1,36 +0,0 @@ -Array.prototype.indexOf = function (val) { - for (var i = 0; i < this.length; i++) { - if (this[i] == val) return i; - } - return -1; -}; - -Array.prototype.remove = function (val) { - var index = this.indexOf(val); - if (index > -1) { - this.splice(index, 1); - } -}; - -var token = localStorage.getItem("token"); -if (token) { - $.get("/user/isLogin", {"token": token}, function (data) { - if (data.code != 1) {//未登录 - localStorage.removeItem("token"); - } - }) -} - - -function readHistory() { - - var books = localStorage.getItem("historyBooks"); - var bookIds = "-1929"; - if (books) { - bookIds = JSON.parse(localStorage.getItem("historyBooks")).join(","); - } - window.location.href = "/book/search?historyBookIds=" + bookIds; -}; - - - diff --git a/src/main/resources/static/js/jquery-1.9.1.js b/src/main/resources/static/js/jquery-1.9.1.js deleted file mode 100644 index e2c203f..0000000 --- a/src/main/resources/static/js/jquery-1.9.1.js +++ /dev/null @@ -1,9597 +0,0 @@ -/*! - * jQuery JavaScript Library v1.9.1 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-2-4 - */ -(function( window, undefined ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -//"use strict"; -var - // The deferred used on DOM ready - readyList, - - // A central reference to the root jQuery(document) - rootjQuery, - - // Support: IE<9 - // For `typeof node.method` instead of `node.method !== undefined` - core_strundefined = typeof undefined, - - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - location = window.location, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.9.1", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler - completed = function( event ) { - - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } - }, - // Clean-up method for dom ready events - detach = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, all, a, - input, select, fragment, - opt, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = "
    a"; - - // Support tests won't run in some limited or non-browser environments - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - if ( !all || !a || !all.length ) { - return {}; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - support = { - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: a.getAttribute("href") === "/a", - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - checkOn: !!input.value, - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Tests for enctype support on a form (#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: document.compatMode === "CSS1Compat", - - // Will be defined later - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
    t
    "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== core_strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "
    "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - if ( support.inlineBlockNeedsLayout ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})(); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var i, l, thisCache, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - // Do not set data on non-element because it will not be cleared (#8335). - if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { - return false; - } - - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( !name.indexOf( "data-" ) ) { - name = jQuery.camelCase( name.slice(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - // Try to fetch any internally stored data first - return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - } - - this.each(function() { - jQuery.data( this, key, value ); - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - hooks.cur = fn; - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - // Toggle whole class name - } else if ( type === core_strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var ret, hooks, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var hooks, notxml, ret, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === core_strundefined ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - // In IE9+, Flash objects don't have .getAttribute (#12945) - // Support: IE9+ - if ( typeof elem.getAttribute !== core_strundefined ) { - ret = elem.getAttribute( name ); - } - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( rboolean.test( name ) ) { - // Set corresponding property to false for boolean attributes - // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 - if ( !getSetAttribute && ruseDefault.test( name ) ) { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } else { - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - var - // Use .prop to determine if this attribute is understood as boolean - prop = jQuery.prop( elem, name ), - - // Fetch it accordingly - attr = typeof prop === "boolean" && elem.getAttribute( name ), - detail = typeof prop === "boolean" ? - - getSetInput && getSetAttribute ? - attr != null : - // oldIE fabricates an empty string for missing boolean attributes - // and conflates checked/selected into attroperties - ruseDefault.test( name ) ? - elem[ jQuery.camelCase( "default-" + name ) ] : - !!attr : - - // fetch an attribute node for properties not recognized as boolean - elem.getAttributeNode( name ); - - return detail && detail.value !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; - -// fix oldIE value attroperty -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return jQuery.nodeName( elem, "input" ) ? - - // Ignore the value *property* by using defaultValue - elem.defaultValue : - - ret && ret.specified ? ret.value : undefined; - }, - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret == null ? undefined : ret; - } - }); - }); - - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - event.isTrigger = true; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var sel, handleObj, matches, i, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur != this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - 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( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - } - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== document.activeElement && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === document.activeElement && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === core_strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var i, - cachedruns, - Expr, - getText, - isXML, - compile, - hasDuplicate, - outermostContext, - - // Local document vars - setDocument, - document, - docElem, - documentIsXML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - sortOrder, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - support = {}, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Array methods - arr = [], - pop = arr.pop, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - - rnative = /^[^{]+\{\s*\[native code/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, - funescape = function( _, escaped ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - return high !== high ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Use a stripped-down slice if we can't use a native one -try { - slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, - results = []; - while ( (elem = this[i++]) ) { - results.push( elem ); - } - return results; - }; -} - -/** - * For feature detection - * @param {Function} fn The function to test for native support - */ -function isNative( fn ) { - return rnative.test( fn + "" ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var cache, - keys = []; - - return (cache = function( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - }); -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return fn( div ); - } catch (e) { - return false; - } finally { - // release memory in IE - div = null; - } -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !documentIsXML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - - // QSA path - if ( support.qsa && !rbuggyQSA.test(selector) ) { - old = true; - nid = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, slice.call( newContext.querySelectorAll( - newSelector - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsXML = isXML( doc ); - - // Check if getElementsByTagName("*") returns only elements - support.tagNameNoComments = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if attributes should be retrieved by attribute nodes - support.attributes = assert(function( div ) { - div.innerHTML = ""; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }); - - // Check if getElementsByClassName can be trusted - support.getByClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = ""; - if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { - return false; - } - - // Safari 3.2 caches class attributes and doesn't catch changes - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length === 2; - }); - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - support.getByName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "
    "; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = doc.getElementsByName && - // buggy browsers will return fewer than the correct 2 - doc.getElementsByName( expando ).length === 2 + - // buggy browsers will return more than the correct 0 - doc.getElementsByName( expando + 0 ).length; - support.getIdNotName = !doc.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }); - - // IE6/7 return modified attributes - Expr.attrHandle = assert(function( div ) { - div.innerHTML = ""; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }) ? - {} : - { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; - - // ID find and filter - if ( support.getIdNotName ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.tagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Name - Expr.find["NAME"] = support.getByName && function( tag, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; - - // Class - Expr.find["CLASS"] = support.getByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { - return context.getElementsByClassName( className ); - } - }; - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21), - // no need to also add to buggyMatches since matches checks buggyQSA - // A support test would require too much code (would include document ready) - rbuggyQSA = [ ":focus" ]; - - if ( (support.qsa = isNative(doc.querySelectorAll)) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explictly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE8 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = ""; - if ( div.querySelectorAll("[i^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - var compare; - - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { - if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { - if ( a === doc || contains( preferredDoc, a ) ) { - return -1; - } - if ( b === doc || contains( preferredDoc, b ) ) { - return 1; - } - return 0; - } - return compare & 4 ? -1 : 1; - } - - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - // Always assume the presence of duplicates if sort doesn't - // pass them to our comparison function (as in Google Chrome). - hasDuplicate = false; - [0, 0].sort( sortOrder ); - support.detectDuplicates = hasDuplicate; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyQSA always contains :focus, so no need for an existence check - if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - var val; - - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - if ( !documentIsXML ) { - name = name.toLowerCase(); - } - if ( (val = Expr.attrHandle[ name ]) ) { - return val( elem ); - } - if ( documentIsXML || support.attributes ) { - return elem.getAttribute( name ); - } - return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? - name : - val && val.specified ? val.value : null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - i = 1, - j = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -// Returns a function to use in pseudos for input types -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -// Returns a function to use in pseudos for buttons -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -// Returns a function to use in pseudos for positionals -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[4] ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - - nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifider - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsXML ? - elem.getAttribute("xml:lang") || elem.getAttribute("lang") : - elem.lang) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push( { - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && !documentIsXML && - Expr.relative[ tokens[1].type ] ) { - - context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, slice.call( seed, 0 ) ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - documentIsXML, - results, - rsibling.test( selector ) - ); - return results; -} - -// Deprecated -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Easy API for creating new setFilters -function setFilters() {} -Expr.filters = setFilters.prototype = Expr.pseudos; -Expr.setFilters = new setFilters(); - -// Initialize with the default document -setDocument(); - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, ret, self, - len = this.length; - - if ( typeof selector !== "string" ) { - self = this; - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - ret = []; - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, this[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true) ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
    ", "
    " ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
    " ], - tr: [ 2, "", "
    " ], - col: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
    ", "
    " ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - var isFunc = jQuery.isFunction( value ); - - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( !isFunc && typeof value !== "string" ) { - value = jQuery( value ).not( this ).detach(); - } - - return this.domManip( [ value ], true, function( elem ) { - var next = this.nextSibling, - parent = this.parentNode; - - if ( parent ) { - jQuery( this ).remove(); - parent.insertBefore( elem, next ); - } - }); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, table ? self.html() : undefined ); - } - self.domManip( args, table, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - node, - i - ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery.ajax({ - url: node.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - var attr = elem.getAttributeNode("type"); - elem.type = ( attr && attr.specified ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
    " && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== core_strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - } -}); -var iframe, getStyles, curCSS, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - - if ( !values[ index ] ) { - hidden = isHidden( elem ); - - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var len, styles, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - var bool = typeof state === "boolean"; - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var num, val, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("',"",""].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

    ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

    "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

    "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

      ','
    • ','','
      ','',"
      ","
    • ",'
    • ','','
      ','",'","
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
  • '+e+'
  • ')}),'
      '+t.join("")+"
    "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
      ','
    • ','','
      ','","
      ","
    • ",'
    • ','','
      ','',"
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/layer.js b/src/main/resources/static/layui/lay/modules/layer.js deleted file mode 100644 index c6d5378..0000000 --- a/src/main/resources/static/layui/lay/modules/layer.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.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-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
    '+(f?r.title[0]:r.title)+"
    ":"";return r.zIndex=s,t([r.shade?'
    ':"",'
    '+(e&&2!=r.type?"":u)+'
    '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
    '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
    '+e+"
    "}():"")+(r.resize?'':"")+"
    "],u,i('
    ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.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&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(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.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.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},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.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,f.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,f.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,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&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.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.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})},s.pt.IE6=function(e){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})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.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})},o.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=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
      '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
    • '+(t[0].content||"no content")+"
    • ";i'+(t[i].content||"no content")+"";return a}()+"
    ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(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 s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.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(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
    '+(u.length>1?'':"")+'
    '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
    ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/layim.js b/src/main/resources/static/layui/lay/modules/layim.js deleted file mode 100644 index 74aa620..0000000 --- a/src/main/resources/static/layui/lay/modules/layim.js +++ /dev/null @@ -1,3 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define(["layer","laytpl","upload"],function(i){var a="3.8.0",e=layui.$,t=layui.layer,n=layui.laytpl,l=layui.device(),s="layui-show",o="layim-this",d=20,r={},c=function(){this.v=a,e("body").on("click","*[layim-event]",function(i){var a=e(this),t=a.attr("layim-event");ti[t]?ti[t].call(this,a,i):""})};c.prototype.config=function(i){var a=[];if(layui.each(Array(5),function(i){a.push(layui.cache.dir+"css/modules/layim/skin/"+(i+1)+".jpg")}),i=i||{},i.skin=i.skin||[],layui.each(i.skin,function(i,e){a.unshift(e)}),i.skin=a,i=e.extend({isfriend:!0,isgroup:!0,voice:"default.mp3"},i),window.JSON&&window.JSON.parse)return H(i),this},c.prototype.on=function(i,a){return"function"==typeof a&&(r[i]?r[i].push(a):r[i]=[a]),this},c.prototype.cache=function(){return j},c.prototype.chat=function(i){if(window.JSON&&window.JSON.parse)return z(i),this},c.prototype.setChatMin=function(){return N(),this},c.prototype.setChatStatus=function(i){var a=_();if(a){var e=a.elem.find(".layim-chat-status");return e.html(i),this}},c.prototype.getMessage=function(i){return K(i),this},c.prototype.notice=function(i){return J(i),this},c.prototype.add=function(i){return M(i),this},c.prototype.setFriendGroup=function(i){return M(i,"setGroup"),this},c.prototype.msgbox=function(i){return V(i),this},c.prototype.addList=function(i){return P(i),this},c.prototype.removeList=function(i){return W(i),this},c.prototype.setFriendStatus=function(i,a){var t=e(".layim-friend"+i);t["online"===a?"removeClass":"addClass"]("layim-list-gray")},c.prototype.content=function(i){return layui.data.content(i)};var u=function(i){var a={friend:"该分组下暂无好友",group:"暂无群组",history:"暂无历史会话"};return i=i||{},i.item=i.item||"d."+i.type,["{{# var length = 0; layui.each("+i.item+", function(i, data){ length++; }}",'
  • {{ data.username||data.groupname||data.name||"佚名" }}

    {{ data.remark||data.sign||"" }}

    new
  • ',"{{# }); if(length === 0){ }}",'
  • '+(a[i.type]||"暂无数据")+"
  • ","{{# } }}"].join("")},y=['
    ','
    ','
    {{ d.mine.username }}
    ','
    ','{{# if(d.mine.status === "online"){ }}','','{{# } else if(d.mine.status === "hide") { }}','',"{{# } }}",'
      ','
    • 在线
    • ','
    • 隐身
    • ',"
    ","
    ",'',"
    ",'
      ','
    • ','
    • ','
    • ',"
    ",'
      ','{{# layui.each(d.friend, function(index, item){ var spread = d.local["spread"+index]; }}',"
    • ",'
      {{# if(spread === "true"){ }}{{# } else { }}{{# } }}{{ item.groupname||"未命名分组"+index }}( {{ (item.list||[]).length }})
      ','
        ',u({type:"friend",item:"item.list",index:"index"}),"
      ","
    • ","{{# }); if(d.friend.length === 0){ }}",'
      • 暂无联系人
      ',"{{# } }}","
    ",'
      ',"
    • ",'
        ',u({type:"group"}),"
      ","
    • ","
    ",'
      ',"
    • ",'
        ',u({type:"history"}),"
      ","
    • ","
    ",'
      ',"
    • ",'',"
    • ","
    ",'
      ','',"{{# if(d.base.msgbox){ }}",'
    • ',"{{# } }}","{{# if(d.base.find){ }}",'
    • ',"{{# } }}",'
    • ',"{{# if(!d.base.copyright){ }}",'
    • ',"{{# } }}","
    ",'',"
    "].join(""),m=['
      ',"{{# layui.each(d.skin, function(index, item){ }}",'
    • ',"{{# }); }}",'
    • 简约
    • ',"
    "].join(""),f=['
    ','
    ','
    ','{{ d.data.name||"佚名" }} {{d.data.temporary ? "临时会话" : ""}} {{# if(d.data.type==="group"){ }} {{# } }}','

    ',"
    ","
    ",'
    ',"
      ","
      ",'","
      "].join(""),p=['
      ','

      {{ d.data.name||"" }}

      ','
      ','{{# if(d.data.type === "friend" && d.type === "setGroup"){ }}',"

      选择分组

      ",'{{# } if(d.data.type === "friend"){ }}','","{{# } }}",'{{# if(d.data.type === "group"){ }}',"

      请输入验证信息

      ",'{{# } if(d.type !== "setGroup"){ }}','',"{{# } }}","
      ","
      "].join(""),h=['
    • ','
      ',"{{# if(d.mine){ }}",'{{ layui.data.date(d.timestamp) }}{{ d.username||"佚名" }}',"{{# } else { }}",'{{ d.username||"佚名" }}{{ layui.data.date(d.timestamp) }}',"{{# } }}","
      ",'
      {{ layui.data.content(d.content||" ") }}
      ',"
    • "].join(""),v='
    • {{ d.data.name||"佚名" }}{{# if(!d.base.brief){ }}{{# } }}
    • ',g=function(i){return i<10?"0"+(0|i):i};layui.data.date=function(i){var a=new Date(i||new Date);return a.getFullYear()+"-"+g(a.getMonth()+1)+"-"+g(a.getDate())+" "+g(a.getHours())+":"+g(a.getMinutes())+":"+g(a.getSeconds())},layui.data.content=function(i){var a=function(i){return new RegExp("\\n*\\["+(i||"")+"(code|pre|div|span|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)\\]\\n*","g")};return i=(i||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(/@(\S+)(\s+?|$)/g,'@$1$2').replace(/face\[([^\s\[\]]+?)\]/g,function(i){var a=i.replace(/^face/g,"");return''+a+''}).replace(/img\[([^\s]+?)\]/g,function(i){return''}).replace(/file\([\s\S]+?\)\[[\s\S]*?\]/g,function(i){var a=(i.match(/file\(([\s\S]+?)\)\[/)||[])[1],e=(i.match(/\)\[([\s\S]*?)\]/)||[])[1];return a?''+(e||a)+"":i}).replace(/audio\[([^\s]+?)\]/g,function(i){return'

      音频消息

      '}).replace(/video\[([^\s]+?)\]/g,function(i){return'
      '}).replace(/a\([\s\S]+?\)\[[\s\S]*?\]/g,function(i){var a=(i.match(/a\(([\s\S]+?)\)\[/)||[])[1],e=(i.match(/\)\[([\s\S]*?)\]/)||[])[1];return a?''+(e||a)+"":i}).replace(a(),"<$1 $2>").replace(a("/"),"").replace(/\n/g,"
      ")};var x,b,w,k,C,S=function(i,a,n){return i=i||{},e.ajax({url:i.url,type:i.type||"get",data:i.data,dataType:i.dataType||"json",cache:!1,success:function(i){0==i.code?a&&a(i.data||{}):t.msg(i.msg||(n||"Error")+": LAYIM_NOT_GET_DATA",{time:5e3})},error:function(i,a){window.console&&console.log&&console.error("LAYIM_DATE_ERROR:"+a)}})},j={message:{},chat:[]},H=function(i){var a=i.init||{};return mine=a.mine||{},local=layui.data("layim")[mine.id]||{},obj={base:i,local:local,mine:mine,history:local.history||{}},create=function(a){var t=a.mine||{},l=layui.data("layim")[t.id]||{},s={base:i,local:l,mine:t,friend:a.friend||[],group:a.group||[],history:l.history||{}};j=e.extend(j,s),L(n(y).render(s)),(l.close||i.min)&&T(),layui.each(r.ready,function(i,a){a&&a(s)})},j=e.extend(j,obj),i.brief?layui.each(r.ready,function(i,a){a&&a(obj)}):void(a.url?S(a,create,"INIT"):create(a))},L=function(i){return t.open({type:1,area:["260px","520px"],skin:"layui-box layui-layim",title:"​",offset:"rb",id:"layui-layim",shade:!1,anim:2,resize:!1,content:i,success:function(i){x=i,R(i),j.base.right&&i.css("margin-left","-"+j.base.right),b&&t.close(b.attr("times"));var a=[],n=i.find(".layim-list-history");n.find("li").each(function(){a.push(e(this).prop("outerHTML"))}),a.length>0&&(a.reverse(),n.html(a.join(""))),A(),ti.sign()},cancel:function(i){T();var a=layui.data("layim")[j.mine.id]||{};return a.close=!0,layui.data("layim",{key:j.mine.id,value:a}),!1}})},A=function(){x.on("contextmenu",function(i){return i.cancelBubble=!0,i.returnValue=!1,!1});var i=function(){t.closeAll("tips")};x.find(".layim-list-history").on("contextmenu","li",function(a){var n=e(this),l='
      • 移除该会话
      • 清空全部会话列表
      ';n.hasClass("layim-null")||(t.tips(l,this,{tips:1,time:0,anim:5,fixed:!0,skin:"layui-box layui-layim-contextmenu",success:function(i){var a=function(i){ii(i)};i.off("mousedown",a).on("mousedown",a)}}),e(document).off("mousedown",i).on("mousedown",i),e(window).off("resize",i).on("resize",i))})},T=function(i){return b&&t.close(b.attr("times")),x&&x.hide(),j.mine=j.mine||{},t.open({type:1,title:!1,id:"layui-layim-close",skin:"layui-box layui-layim-min layui-layim-close",shade:!1,closeBtn:!1,anim:2,offset:"rb",resize:!1,content:''+(i||j.base.title||"我的LayIM")+"",move:"#layui-layim-close img",success:function(i,a){b=i,j.base.right&&i.css("margin-left","-"+j.base.right),i.on("click",function(){t.close(a),x.show();var i=layui.data("layim")[j.mine.id]||{};delete i.close,layui.data("layim",{key:j.mine.id,value:i})})}})},z=function(i){i=i||{};var a=e("#layui-layim-chat"),l={data:i,base:j.base,local:j.local};if(!i.id)return t.msg("非法用户");if(a[0]){var s=w.find(".layim-chat-list"),o=s.find(".layim-chatlist-"+i.type+i.id),d=w.find(".layui-layer-max").hasClass("layui-layer-maxmin"),c=a.children(".layim-chat-box");return"none"===w.css("display")&&w.show(),k&&t.close(k.attr("times")),1!==s.find("li").length||o[0]||(d||w.css("width",800),s.css({height:w.height()}).show(),c.css("margin-left","200px")),o[0]||(s.append(n(v).render(l)),c.append(n(f).render(l)),I(i),E()),O(s.find(".layim-chatlist-"+i.type+i.id)),o[0]||U(),$(i),Q(),C}l.first=!0;var u=C=t.open({type:1,area:"600px",skin:"layui-box layui-layim-chat",id:"layui-layim-chat",title:"​",shade:!1,maxmin:!0,offset:i.offset||"auto",anim:i.anim||0,closeBtn:!j.base.brief&&1,content:n('
        '+v+'
      '+f+"
      ").render(l),success:function(a){w=a,a.css({"min-width":"500px","min-height":"420px"}),I(i),"function"==typeof i.success&&i.success(a),Q(),R(a),$(i),U(),q(),layui.each(r.chatChange,function(i,a){a&&a(_())}),a.on("dblclick",".layui-layim-photos",function(){var i=this.src;t.close(z.photosIndex),t.photos({photos:{data:[{alt:"大图模式",src:i}]},shade:.01,closeBtn:2,anim:0,resize:!1,success:function(i,a){z.photosIndex=a}})})},full:function(i){t.style(u,{width:"100%",height:"100%"},!0),E()},resizing:E,restore:E,min:function(){return N(),!1},end:function(){t.closeAll("tips"),w=null}});return u},I=function(i){e(".layim-"+i.type+i.id).each(function(){e(this).hasClass("layim-list-gray")&&layui.layim.setFriendStatus(i.id,"offline")})},E=function(){var i=w.find(".layim-chat-list"),a=w.find(".layim-chat-main"),e=w.height();i.css({height:e}),a.css({height:e-20-80-158})},N=function(i){var a=i||_().data,n=layui.layim.cache().base;w&&!i&&w.hide(),t.close(N.index),N.index=t.open({type:1,title:!1,skin:"layui-box layui-layim-min",shade:!1,closeBtn:!1,anim:a.anim||2,offset:"b",move:"#layui-layim-min",resize:!1,area:["182px","50px"],content:''+a.name+"",success:function(a,l){i||(k=a),n.minRight&&t.style(l,{left:e(window).width()-a.outerWidth()-parseFloat(n.minRight)}),a.find(".layui-layer-content span").on("click",function(){t.close(l),i?layui.each(j.chat,function(i,a){z(a)}):w.show(),i&&(j.chat=[],Z())}),a.find(".layui-layer-content img").on("click",function(i){ii(i)})}})},M=function(i,a){return i=i||{},t.close(M.index),M.index=t.open({type:1,area:"430px",title:{friend:"添加好友",group:"加入群组"}[i.type]||"",shade:!1,resize:!1,btn:a?["确认","取消"]:["发送申请","关闭"],content:n(p).render({data:{name:i.username||i.groupname,avatar:i.avatar,group:i.group||parent.layui.layim.cache().friend||[],type:i.type},type:a}),yes:function(e,t){var n=t.find("#LAY_layimGroup"),l=t.find("#LAY_layimRemark");a?i.submit&&i.submit(n.val(),e):i.submit&&i.submit(n.val(),l.val(),e)}})},O=function(i,a){i=i||e(".layim-chat-list ."+o);var n=i.index()===-1?0:i.index(),l=".layim-chat",d=w.find(l).eq(n),c=w.find(".layui-layer-max").hasClass("layui-layer-maxmin");if(a){i.hasClass(o)&&O(0===n?i.next():i.prev());var u=w.find(l).length;return 1===u?t.close(C):(i.remove(),d.remove(),2===u&&(w.find(".layim-chat-list").hide(),c||w.css("width","600px"),w.find(".layim-chat-box").css("margin-left",0)),!1)}i.addClass(o).siblings().removeClass(o),d.addClass(s).siblings(l).removeClass(s),d.find("textarea").focus(),layui.each(r.chatChange,function(i,a){a&&a(_())}),q()},q=function(){var i=_(),a=j.message[i.data.type+i.data.id];a&&delete j.message[i.data.type+i.data.id]},_=c.prototype.thisChat=function(){if(w){var i=e(".layim-chat-list ."+o).index(),a=w.find(".layim-chat").eq(i),t=JSON.parse(decodeURIComponent(a.find(".layim-chat-tool").data("json")));return{elem:a,data:t,textarea:a.find("textarea")}}},R=function(i){var a=layui.data("layim")[j.mine.id]||{},e=a.skin;i.css({"background-image":e?"url("+e+")":function(){return j.base.initSkin?"url("+(layui.cache.dir+"css/modules/layim/skin/"+j.base.initSkin)+")":"none"}()})},$=function(i){var a=layui.data("layim")[j.mine.id]||{},e={},t=a.history||{},l=t[i.type+i.id];if(x){var s=x.find(".layim-list-history");if(i.historyTime=(new Date).getTime(),t[i.type+i.id]=i,a.history=t,layui.data("layim",{key:j.mine.id,value:a}),!l){e[i.type+i.id]=i;var o=n(u({type:"history",item:"d.data"})).render({data:e});s.prepend(o),s.find(".layim-null").remove()}}},D=function(){var i={username:j.mine?j.mine.username:"访客",avatar:j.mine?j.mine.avatar:layui.cache.dir+"css/pc/layim/skin/logo.jpg",id:j.mine?j.mine.id:null,mine:!0},a=_(),e=a.elem.find(".layim-chat-main ul"),l=j.base.maxLength||3e3;if(i.content=a.textarea.val(),""!==i.content.replace(/\s/g,"")){if(i.content.length>l)return t.msg("内容最长不能超过"+l+"个字符");e.append(n(h).render(i));var s={mine:i,to:a.data},o={username:s.mine.username,avatar:s.mine.avatar,id:s.to.id,type:s.to.type,content:s.mine.content,timestamp:(new Date).getTime(),mine:!0};B(o),layui.each(r.sendMessage,function(i,a){a&&a(s)})}Z(),a.textarea.val("").focus()},J=function(i){if(i=i||{},window.Notification)if("granted"===Notification.permission){new Notification(i.title||"",{body:i.content||"",icon:i.avatar||"http://tp2.sinaimg.cn/5488749285/50/5719808192/1"})}else Notification.requestPermission()},F=function(){if(!(l.ie&&l.ie<9)){var i=document.createElement("audio");i.src=layui.cache.dir+"css/modules/layim/voice/"+j.base.voice,i.play()}},G={},K=function(i){i=i||{};var a=e(".layim-chatlist-"+i.type+i.id),t={},l=a.index();if(i.timestamp=i.timestamp||(new Date).getTime(),i.fromid==j.mine.id&&(i.mine=!0),i.system||B(i),G=JSON.parse(JSON.stringify(i)),j.base.voice&&F(),!w&&i.content||l===-1){if(j.message[i.type+i.id])j.message[i.type+i.id].push(i);else if(j.message[i.type+i.id]=[i],"friend"===i.type){var s;layui.each(j.friend,function(a,e){if(layui.each(e.list,function(a,e){if(e.id==i.id)return e.type="friend",e.name=e.username,j.chat.push(e),s=!0}),s)return!0}),s||(i.name=i.username,i.temporary=!0,j.chat.push(i))}else if("group"===i.type){var o;layui.each(j.group,function(a,e){if(e.id==i.id)return e.type="group",e.name=e.groupname,j.chat.push(e),o=!0}),o||(i.name=i.groupname,j.chat.push(i))}else i.name=i.name||i.username||i.groupname,j.chat.push(i);if("group"===i.type&&layui.each(j.group,function(a,e){if(e.id==i.id)return t.avatar=e.avatar,!0}),!i.system)return j.base.notice&&J({title:"来自 "+i.username+" 的消息",content:i.content,avatar:t.avatar||i.avatar}),N({name:"收到新消息",avatar:t.avatar||i.avatar,anim:6})}if(w){var d=_();d.data.type+d.data.id!==i.type+i.id&&(a.addClass("layui-anim layer-anim-06"),setTimeout(function(){a.removeClass("layui-anim layer-anim-06")},300));var r=w.find(".layim-chat").eq(l),c=r.find(".layim-chat-main ul");i.system?l!==-1&&c.append('
    • '+i.content+"
    • "):""!==i.content.replace(/\s/g,"")&&c.append(n(h).render(i)),Z()}},Y="layui-anim-loop layer-anim-05",V=function(i){var a=x.find(".layim-tool-msgbox");a.find("span").addClass(Y).html(i)},B=function(i){var a=layui.data("layim")[j.mine.id]||{};a.chatlog=a.chatlog||{};var e=a.chatlog[i.type+i.id];if(e){var t;layui.each(e,function(a,e){e.timestamp===i.timestamp&&e.type===i.type&&e.id===i.id&&e.content===i.content&&(t=!0)}),t||i.fromid==j.mine.id||e.push(i),e.length>d&&e.shift()}else a.chatlog[i.type+i.id]=[i];layui.data("layim",{key:j.mine.id,value:a})},U=function(){var i=layui.data("layim")[j.mine.id]||{},a=_(),e=i.chatlog||{},t=a.elem.find(".layim-chat-main ul");layui.each(e[a.data.type+a.data.id],function(i,a){t.append(n(h).render(a))}),Z()},P=function(i){var a,e={},l=x.find(".layim-list-"+i.type);if(j[i.type])if("friend"===i.type)layui.each(j.friend,function(n,l){if(i.groupid==l.id)return layui.each(j.friend[n].list,function(e,t){if(t.id==i.id)return a=!0}),a?t.msg("好友 ["+(i.username||"")+"] 已经存在列表中",{anim:6}):(j.friend[n].list=j.friend[n].list||[],e[j.friend[n].list.length]=i,i.groupIndex=n,j.friend[n].list.push(i),!0)});else if("group"===i.type){if(layui.each(j.group,function(e,t){if(t.id==i.id)return a=!0}),a)return t.msg("您已是 ["+(i.groupname||"")+"] 的群成员",{anim:6});e[j.group.length]=i,j.group.push(i)}if(!a){var s=n(u({type:i.type,item:"d.data",index:"friend"===i.type?"data.groupIndex":null})).render({data:e});if("friend"===i.type){var o=l.find(">li").eq(i.groupIndex);o.find(".layui-layim-list").append(s),o.find(".layim-count").html(j.friend[i.groupIndex].list.length),o.find(".layim-null")[0]&&o.find(".layim-null").remove()}else"group"===i.type&&(l.append(s),l.find(".layim-null")[0]&&l.find(".layim-null").remove())}},W=function(i){var a=x.find(".layim-list-"+i.type);j[i.type]&&("friend"===i.type?layui.each(j.friend,function(e,t){layui.each(t.list,function(t,n){if(i.id==n.id){var l=a.find(">li").eq(e);l.find(".layui-layim-list>li");return l.find(".layui-layim-list>li").eq(t).remove(),j.friend[e].list.splice(t,1),l.find(".layim-count").html(j.friend[e].list.length),0===j.friend[e].list.length&&l.find(".layui-layim-list").html('
    • 该分组下已无好友了
    • '),!0}})}):"group"===i.type&&layui.each(j.group,function(e,t){if(i.id==t.id)return a.find(">li").eq(e).remove(),j.group.splice(e,1),0===j.group.length&&a.html('
    • 暂无群组
    • '),!0}))},Z=function(){var i=_(),a=i.elem.find(".layim-chat-main"),e=a.find("ul"),t=e.find("li").length;if(t>=d){var n=e.find("li").eq(0);e.prev().hasClass("layim-chat-system")||e.before('
      查看更多记录
      '),t>d&&n.remove()}a.scrollTop(a[0].scrollHeight+1e3),a.find("ul li:last").find("img").load(function(){a.scrollTop(a[0].scrollHeight+1e3)})},Q=function(){var i=_(),a=i.textarea;a.focus(),a.off("keydown").on("keydown",function(i){var e=layui.data("layim")[j.mine.id]||{},t=i.keyCode;if("Ctrl+Enter"===e.sendHotKey)return void(i.ctrlKey&&13===t&&D());if(13===t){if(i.ctrlKey)return a.val(a.val()+"\n");if(i.shiftKey)return;i.preventDefault(),D()}})},X=function(){var i=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],a={};return layui.each(i,function(i,e){a[e]=layui.cache.dir+"images/face/"+i+".gif"}),a}(),ii=layui.stope,ai=function(i,a){var e,t=i.value;i.focus(),document.selection?(e=document.selection.createRange(),document.selection.empty(),e.text=a):(e=[t.substring(0,i.selectionStart),a,t.substr(i.selectionEnd)],i.focus(),i.value=e.join(""))},ei="layui-anim-upbit",ti={status:function(i,a){var t=function(){i.next().hide().removeClass(ei)},n=i.attr("lay-type");if("show"===n)ii(a),i.next().show().addClass(ei),e(document).off("click",t).on("click",t);else{var l=i.parent().prev();i.addClass(o).siblings().removeClass(o),l.html(i.find("cite").html()),l.removeClass("layim-status-"+("online"===n?"hide":"online")).addClass("layim-status-"+n),layui.each(r.online,function(i,a){a&&a(n)})}},sign:function(){var i=x.find(".layui-layim-remark");i.on("change",function(){var i=this.value;layui.each(r.sign,function(a,e){e&&e(i)})}),i.on("keyup",function(i){var a=i.keyCode;13===a&&this.blur()})},tab:function(i){var a,e=".layim-tab-content",t=x.find(".layui-layim-tab>li");"number"==typeof i?(a=i,i=t.eq(a)):a=i.index(),a>2?t.removeClass(o):(ti.tab.index=a,i.addClass(o).siblings().removeClass(o)),x.find(e).eq(a).addClass(s).siblings(e).removeClass(s)},spread:function(i){var a=i.attr("lay-type"),e="true"===a?"false":"true",t=layui.data("layim")[j.mine.id]||{};i.next()["true"===a?"removeClass":"addClass"](s),t["spread"+i.parent().index()]=e,layui.data("layim",{key:j.mine.id,value:t}),i.attr("lay-type",e),i.find(".layui-icon").html("true"===e?"":"")},search:function(i){var a=x.find(".layui-layim-search"),e=x.find("#layui-layim-search"),t=a.find("input"),n=function(i){var a=t.val().replace(/\s/);if(""===a)ti.tab(0|ti.tab.index);else{for(var n=[],l=j.friend||[],s=j.group||[],o="",d=0;d0)for(var u=0;u'+(n[u].username||n[u].groupname||"佚名")+"

      "+(n[u].remark||n[u].sign||"")+"

      ";else o='
    • 无搜索结果
    • ';e.html(o),ti.tab(3)}};!j.base.isfriend&&j.base.isgroup?ti.tab.index=1:j.base.isfriend||j.base.isgroup||(ti.tab.index=2),a.show(),t.focus(),t.off("keyup",n).on("keyup",n)},closeSearch:function(i){i.parent().hide(),ti.tab(0|ti.tab.index)},msgbox:function(){var i=x.find(".layim-tool-msgbox");return t.close(ti.msgbox.index),i.find("span").removeClass(Y).html(""),ti.msgbox.index=t.open({type:2,title:"消息盒子",shade:!1,maxmin:!0,area:["600px","520px"],skin:"layui-box layui-layer-border",resize:!1,content:j.base.msgbox})},find:function(){return t.close(ti.find.index),ti.find.index=t.open({type:2,title:"查找",shade:!1,maxmin:!0,area:["1000px","520px"],skin:"layui-box layui-layer-border",resize:!1,content:j.base.find})},skin:function(){t.open({type:1,title:"更换背景",shade:!1,area:"300px",skin:"layui-box layui-layer-border",id:"layui-layim-skin",zIndex:66666666,resize:!1,content:n(m).render({skin:j.base.skin})})},about:function(){t.alert("版本: "+a+'
      版权所有:layim.layui.com',{title:"关于 LayIM",shade:!1})},setSkin:function(i){var a=i.attr("src"),e=layui.data("layim")[j.mine.id]||{};e.skin=a,a||delete e.skin,layui.data("layim",{key:j.mine.id,value:e});try{x.css({"background-image":a?"url("+a+")":"none"}),w.css({"background-image":a?"url("+a+")":"none"})}catch(t){}layui.each(r.setSkin,function(i,e){var t=(a||"").replace(layui.cache.dir+"css/modules/layim/skin/","");e&&e(t,a)})},chat:function(i){var a=layui.data("layim")[j.mine.id]||{},e=i.data("type"),t=i.data("index"),n=i.attr("data-list")||i.index(),l={};"friend"===e?l=j[e][t].list[n]:"group"===e?l=j[e][n]:"history"===e&&(l=(a.history||{})[t]||{}),l.name=l.name||l.username||l.groupname,"history"!==e&&(l.type=e),z(l)},tabChat:function(i){O(i)},closeChat:function(i,a){O(i.parent(),1),ii(a)},closeThisChat:function(){O(null,1)},groupMembers:function(i,a){var n=i.find(".layui-icon"),l=function(){n.html(""),i.data("down",null),t.close(ti.groupMembers.index)},s=function(i){ii(i)};i.data("down")?l():(n.html(""),i.data("down",!0),ti.groupMembers.index=t.tips('
        ',i,{tips:3,time:0,anim:5,fixed:!0,skin:"layui-box layui-layim-members",success:function(a){var t=j.base.members||{},n=_(),s=a.find(".layim-members-list"),o="",d={},c=w.find(".layui-layer-max").hasClass("layui-layer-maxmin"),u="none"===w.find(".layim-chat-list").css("display");c&&s.css({width:e(window).width()-22-(u||200)}),t.data=e.extend(t.data,{id:n.data.id}),S(t,function(a){layui.each(a.list,function(i,a){o+='
      • '+a.username+"
      • ",d[a.id]=a}),s.html(o),i.find(".layim-chat-members").html(a.members||(a.list||[]).length+"人"),s.find("li").on("click",function(){var i=e(this).data("uid"),a=d[i];z({name:a.username,type:"friend",avatar:a.avatar,id:a.id}),l()}),layui.each(r.members,function(i,e){e&&e(a)})}),a.on("mousedown",function(i){ii(i)})}}),e(document).off("mousedown",l).on("mousedown",l),e(window).off("resize",l).on("resize",l),i.off("mousedown",s).on("mousedown",s))},send:function(){D()},setSend:function(i,a){var t=ti.setSend.box=i.siblings(".layim-menu-box"),n=i.attr("lay-type");if("show"===n)ii(a),t.show().addClass(ei),e(document).off("click",ti.setSendHide).on("click",ti.setSendHide);else{i.addClass(o).siblings().removeClass(o);var l=layui.data("layim")[j.mine.id]||{};l.sendHotKey=n,layui.data("layim",{key:j.mine.id,value:l}),ti.setSendHide(a,i.parent())}},setSendHide:function(i,a){(a||ti.setSend.box).hide().removeClass(ei)},face:function(i,a){var n="",l=_();for(var s in X)n+='
      • ';n='
          '+n+"
        ",ti.face.index=t.tips(n,i,{tips:1,time:0,fixed:!0,skin:"layui-box layui-layim-face",success:function(i){i.find(".layim-face-list>li").on("mousedown",function(i){ii(i)}).on("click",function(){ai(l.textarea[0],"face"+this.title+" "),t.close(ti.face.index); -})}}),e(document).off("mousedown",ti.faceHide).on("mousedown",ti.faceHide),e(window).off("resize",ti.faceHide).on("resize",ti.faceHide),ii(a)},faceHide:function(){t.close(ti.face.index)},image:function(i){var a=i.data("type")||"images",e={images:"uploadImage",file:"uploadFile"},n=_(),l=j.base[e[a]]||{};layui.upload.render({url:l.url||"",method:l.type,elem:i.find("input")[0],accept:a,done:function(i){0==i.code?(i.data=i.data||{},"images"===a?ai(n.textarea[0],"img["+(i.data.src||"")+"]"):"file"===a&&ai(n.textarea[0],"file("+(i.data.src||"")+")["+(i.data.name||"下载文件")+"]"),D()):t.msg(i.msg||"上传失败")}})},media:function(i){var a=i.data("type"),n={audio:"音频",video:"视频"},l=_();t.prompt({title:"请输入网络"+n[a]+"地址",shade:!1,offset:[i.offset().top-e(window).scrollTop()-158+"px",i.offset().left+"px"]},function(i,e){ai(l.textarea[0],a+"["+i+"]"),D(),t.close(e)})},extend:function(i){var a=i.attr("lay-filter"),e=_();layui.each(r["tool("+a+")"],function(a,t){t&&t.call(i,function(i){ai(e.textarea[0],i)},D,e)})},playAudio:function(i){var a=i.data("audio"),e=a||document.createElement("audio"),n=function(){e.pause(),i.removeAttr("status"),i.find("i").html("")};return i.data("error")?t.msg("播放音频源异常"):e.play?void(i.attr("status")?n():(a||(e.src=i.data("src")),e.play(),i.attr("status","pause"),i.data("audio",e),i.find("i").html(""),e.onended=function(){n()},e.onerror=function(){t.msg("播放音频源异常"),i.data("error",!0),n()})):t.msg("您的浏览器不支持audio")},playVideo:function(i){var a=i.data("src"),e=document.createElement("video");return e.play?(t.close(ti.playVideo.index),void(ti.playVideo.index=t.open({type:1,title:"播放视频",area:["460px","300px"],maxmin:!0,shade:!1,content:'
        '}))):t.msg("您的浏览器不支持video")},chatLog:function(i){var a=_();return j.base.chatLog?(t.close(ti.chatLog.index),ti.chatLog.index=t.open({type:2,maxmin:!0,title:"与 "+a.data.name+" 的聊天记录",area:["450px","100%"],shade:!1,offset:"rb",skin:"layui-box",anim:2,id:"layui-layim-chatlog",content:j.base.chatLog+"?id="+a.data.id+"&type="+a.data.type})):t.msg("未开启更多聊天记录")},menuHistory:function(i,a){var n=layui.data("layim")[j.mine.id]||{},l=i.parent(),s=i.data("type"),o=x.find(".layim-list-history"),d='
      • 暂无历史会话
      • ';if("one"===s){var r=n.history;delete r[l.data("index")],n.history=r,layui.data("layim",{key:j.mine.id,value:n}),e("#"+l.data("id")).remove(),0===o.find("li").length&&o.html(d)}else"all"===s&&(delete n.history,layui.data("layim",{key:j.mine.id,value:n}),o.html(d));t.closeAll("tips")}};i("layim",new c)}).addcss("modules/layim/layim.css?v=3.8.0","skinlayimcss"); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/laypage.js b/src/main/resources/static/layui/lay/modules/laypage.js deleted file mode 100644 index 167a1a2..0000000 --- a/src/main/resources/static/layui/lay/modules/laypage.js +++ /dev/null @@ -1,95 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ -;layui.define(function (e) { - "use strict"; - var a = document, t = "getElementById", n = "getElementsByTagName", i = "laypage", r = "layui-disabled", - u = function (e) { - var a = this; - a.config = e || {}, a.config.index = ++s.index, a.render(!0) - }; - u.prototype.type = function () { - var e = this.config; - if ("object" == typeof e.elem) return void 0 === e.elem.length ? 2 : 3 - }, u.prototype.view = function () { - var e = this, a = e.config, t = a.groups = "groups" in a ? 0 | a.groups : 5; - a.layout = "object" == typeof a.layout ? a.layout : ["prev", "page", "next"], a.count = 0 | a.count, a.curr = 0 | a.curr || 1, a.limits = "object" == typeof a.limits ? a.limits : [10, 20, 30, 40, 50], a.limit = 0 | a.limit || 10, a.pages = Math.ceil(a.count / a.limit) || 1, a.curr > a.pages && (a.curr = a.pages), t < 0 ? t = 1 : t > a.pages && (t = a.pages), a.prev = "prev" in a ? a.prev : "上一页", a.next = "next" in a ? a.next : "下一页"; - var n = a.pages > t ? Math.ceil((a.curr + (t > 1 ? 1 : 0)) / (t > 0 ? t : 1)) : 1, i = { - prev: function () { - return a.prev ? '' + a.prev + "" : "" - }(), - page: function () { - var e = []; - if (a.count < 1) return ""; - n > 1 && a.first !== !1 && 0 !== t && e.push('' + (a.first || 1) + ""); - var i = Math.floor((t - 1) / 2), r = n > 1 ? a.curr - i : 1, u = n > 1 ? function () { - var e = a.curr + (t - i - 1); - return e > a.pages ? a.pages : e - }() : t; - for (u - r < t - 1 && (r = u - t + 1), a.first !== !1 && r > 2 && e.push(''); r <= u; r++) r === a.curr ? e.push('" + r + "") : e.push('' + r + ""); - return a.pages > t && a.pages > u && a.last !== !1 && (u + 1 < a.pages && e.push(''), 0 !== t && e.push('' + (a.last || a.pages) + "")), e.join("") - }(), - next: function () { - return a.next ? '' + a.next + "" : "" - }(), - count: '共 ' + a.count + " 条", - limit: function () { - var e = ['" - }(), - refresh: ['', '', ""].join(""), - skip: function () { - return ['到第', '', '页', ""].join("") - }() - }; - return ['
        ', function () { - var e = []; - return layui.each(a.layout, function (a, t) { - i[t] && e.push(i[t]) - }), e.join("") - }(), "
        "].join("") - }, u.prototype.jump = function (e, a) { - if (e) { - var t = this, i = t.config, r = e.children, u = e[n]("button")[0], l = e[n]("input")[0], - p = e[n]("select")[0], c = function () { - var e = 0 | l.value.replace(/\s|\D/g, ""); - e && (i.curr = e, t.render()) - }; - if (a) return c(); - for (var o = 0, y = r.length; o < y; o++) "a" === r[o].nodeName.toLowerCase() && s.on(r[o], "click", function () { - var e = 0 | this.getAttribute("data-page"); - e < 1 || e > i.pages || (i.curr = e, t.render()) - }); - p && s.on(p, "change", function () { - var e = this.value; - i.curr * e > i.count && (i.curr = Math.ceil(i.count / e)), i.limit = e, t.render() - }), u && s.on(u, "click", function () { - c() - }) - } - }, u.prototype.skip = function (e) { - if (e) { - var a = this, t = e[n]("input")[0]; - t && s.on(t, "keyup", function (t) { - var n = this.value, i = t.keyCode; - /^(37|38|39|40)$/.test(i) || (/\D/.test(n) && (this.value = n.replace(/\D/, "")), 13 === i && a.jump(e, !0)) - }) - } - }, u.prototype.render = function (e) { - var n = this, i = n.config, r = n.type(), u = n.view(); - 2 === r ? i.elem && (i.elem.innerHTML = u) : 3 === r ? i.elem.html(u) : a[t](i.elem) && (a[t](i.elem).innerHTML = u), i.jump && i.jump(i, e); - var s = a[t]("layui-laypage-" + i.index); - n.jump(s), i.hash && !e && (location.hash = "!" + i.hash + "=" + i.curr), n.skip(s) - }; - var s = { - render: function (e) { - var a = new u(e); - return a.index - }, index: layui.laypage ? layui.laypage.index + 1e4 : 0, on: function (e, a, t) { - return e.attachEvent ? e.attachEvent("on" + a, function (a) { - a.target = a.srcElement, t.call(e, a) - }) : e.addEventListener(a, t, !1), this - } - }; - e(i, s) -}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/laytpl.js b/src/main/resources/static/layui/lay/modules/laytpl.js deleted file mode 100644 index d482d4e..0000000 --- a/src/main/resources/static/layui/lay/modules/laytpl.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/mobile.js b/src/main/resources/static/layui/lay/modules/mobile.js deleted file mode 100644 index ff0a7d5..0000000 --- a/src/main/resources/static/layui/lay/modules/mobile.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define(function(i){i("layui.mobile",layui.v)});layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var t=(window,document),i="querySelectorAll",n="getElementsByClassName",a=function(e){return t[i](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var i in e)t[i]=e[i];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var o=0,r=["layui-m-layer"],d=function(e){var t=this;t.config=l.extend(e),t.view()};d.prototype.view=function(){var e=this,i=e.config,s=t.createElement("div");e.id=s.id=r[0]+o,s.setAttribute("class",r[0]+" "+r[0]+(i.type||0)),s.setAttribute("index",o);var l=function(){var e="object"==typeof i.title;return i.title?'

        '+(e?i.title[0]:i.title)+"

        ":""}(),d=function(){"string"==typeof i.btn&&(i.btn=[i.btn]);var e,t=(i.btn||[]).length;return 0!==t&&i.btn?(e=''+i.btn[0]+"",2===t&&(e=''+i.btn[1]+""+e),'
        '+e+"
        "):""}();if(i.fixed||(i.top=i.hasOwnProperty("top")?i.top:100,i.style=i.style||"",i.style+=" top:"+(t.body.scrollTop+i.top)+"px"),2===i.type&&(i.content='

        '+(i.content||"")+"

        "),i.skin&&(i.anim="up"),"msg"===i.skin&&(i.shade=!1),s.innerHTML=(i.shade?"
        ':"")+'
        "+l+'
        '+i.content+"
        "+d+"
        ",!i.type||2===i.type){var y=t[n](r[0]+i.type),u=y.length;u>=1&&c.close(y[0].getAttribute("index"))}document.body.appendChild(s);var m=e.elem=a("#"+e.id)[0];i.success&&i.success(m),e.index=o++,e.action(i,m)},d.prototype.action=function(e,t){var i=this;e.time&&(l.timer[i.index]=setTimeout(function(){c.close(i.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),c.close(i.index)):e.yes?e.yes(i.index):c.close(i.index)};if(e.btn)for(var s=t[n]("layui-m-layerbtn")[0].children,o=s.length,r=0;r0&&e-1 in t)}function s(t){return A.call(t,function(t){return null!=t})}function u(t){return t.length>0?T.fn.concat.apply([],t):t}function c(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in F?F[t]:F[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||k[c(t)]?e:e+"px"}function h(t){var e,n;return $[t]||(e=L.createElement(t),L.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),$[t]=n),$[t]}function p(t){return"children"in t?D.call(t.children):T.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function d(t,e){var n,r=t?t.length:0;for(n=0;n]*>/,R=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Z=/^(?:body|html)$/i,q=/([A-Z])/g,H=["val","css","html","text","data","width","height","offset"],I=["after","prepend","before","append"],V=L.createElement("table"),_=L.createElement("tr"),B={tr:L.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:_,th:_,"*":L.createElement("div")},U=/complete|loaded|interactive/,X=/^[\w-]*$/,J={},W=J.toString,Y={},G=L.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return Y.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=G).appendChild(t),r=~Y.qsa(i,e).indexOf(t),o&&G.removeChild(t),r},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return A.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var r,i,a;return R.test(t)&&(r=T(L.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(z,"<$1>")),e===E&&(e=M.test(t)&&RegExp.$1),e in B||(e="*"),a=B[e],a.innerHTML=""+t,r=T.each(D.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=T(r),T.each(n,function(t,e){H.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},Y.Z=function(t,e){return new d(t,e)},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var r;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}else{if(e(t))return T(L).ready(t);if(Y.isZ(t))return t;if(Q(t))r=s(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}}return Y.Z(r,t)},T=function(t,e){return Y.init(t,e)},T.extend=function(t){var e,n=D.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},Y.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=X.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:D.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},T.contains=L.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},T.type=t,T.isFunction=e,T.isWindow=n,T.isArray=Q,T.isPlainObject=o,T.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},T.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},T.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},T.camelCase=C,T.trim=function(t){return null==t?"":String.prototype.trim.call(t)},T.uuid=0,T.support={},T.expr={},T.noop=function(){},T.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):T(A.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return T(N(this.concat(T(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==E)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?D.call(t):T(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return T(n)},has:function(t){return this.filter(function(){return i(t)?T.contains(this,t):T(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:T(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:T(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?T(t).filter(function(){var t=this;return O.some.call(n,function(e){return T.contains(e,t)})}):1==this.length?T(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):T()},closest:function(t,e){var n=[],i="object"==typeof t&&T(t);return this.each(function(o,a){for(;a&&!(i?i.indexOf(a)>=0:Y.matches(a,t));)a=a!==e&&!r(a)&&a.parentNode;a&&n.indexOf(a)<0&&n.push(a)}),T(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=T.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return v(e,t)},parent:function(t){return v(N(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||D.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return A.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return T.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=T(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){T(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){T(this[0]).before(t=T(t));for(var e;(e=t.children()).length;)t=e.first();T(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=T(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){T(this).replaceWith(T(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=T(this);(t===E?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return T(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return T(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;T(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(j in t)y(this,j,t[j]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:E},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=K[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=K[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(q,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?b(r):E},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=g(this,t,e,this.value)})):this[0]&&(this[0].multiple?T(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=T(this),r=g(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(L.documentElement!==this[0]&&!T.contains(L.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[C(e)]||getComputedStyle(r,"").getPropertyValue(e)}if(Q(e)){if(!r)return;var i={},o=getComputedStyle(r,"");return T.each(e,function(t,e){i[e]=r.style[C(e)]||o.getPropertyValue(e)}),i}}var a="";if("string"==t(e))n||0===n?a=c(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(j in e)e[j]||0===e[j]?a+=c(j)+":"+f(j,e[j])+";":this.each(function(){this.style.removeProperty(c(j))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(T(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&O.some.call(this,function(t){return this.test(x(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){S=[];var n=x(this),r=g(this,t,e,n);r.split(/\s+/g).forEach(function(t){T(this).hasClass(t)||S.push(t)},this),S.length&&x(this,n+(n?" ":"")+S.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===E)return x(this,"");S=x(this),g(this,t,e,S).split(/\s+/g).forEach(function(t){S=S.replace(l(t)," ")}),x(this,S.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=T(this),i=g(this,t,n,x(this));i.split(/\s+/g).forEach(function(t){(e===E?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===E?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===E?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=Z.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(T(t).css("margin-top"))||0,n.left-=parseFloat(T(t).css("margin-left"))||0,r.top+=parseFloat(T(e[0]).css("border-top-width"))||0,r.left+=parseFloat(T(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||L.body;t&&!Z.test(t.nodeName)&&"static"==T(t).css("position");)t=t.offsetParent;return t})}},T.fn.detach=T.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});T.fn[t]=function(i){var o,a=this[0];return i===E?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=T(this),a.css(t,g(this,i,e,a[t]()))})}}),I.forEach(function(e,n){var r=n%2;T.fn[e]=function(){var e,i,o=T.map(arguments,function(n){var r=[];return e=t(n),"array"==e?(n.forEach(function(t){return t.nodeType!==E?r.push(t):T.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(Y.fragment(t)))}),r):"object"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=T.contains(L.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return T(t).remove();i.insertBefore(t,e),s&&w(t,function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}})})})},T.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return T(t)[e](this),this}}),Y.Z.prototype=d.prototype=T.fn,Y.uniq=N,Y.deserializeValue=b,T.zepto=Y,T}();!function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function a(t){return b[t]||y&&x[t]||t}function s(n,i,s,u,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=l,i.e in b&&(s=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=h;var d=h||s;i.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,p))})}function u(t,r,i,s,u){var c=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(T,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=E}),e.timeStamp||(e.timeStamp=Date.now()),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===f||(n[e]=t[e]);return c(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:s,remove:u},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,T={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,c,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),i!==f&&r!==!1||(i=r,r=f),i===!1&&(i=E),h.each(function(f,h){o&&(a=function(t){return u(h,t.type,i),i.apply(this,arguments)}),n&&(c=function(e){var r,o=t(e.target).closest(n,h).get(0);if(o&&o!==h)return r=t.extend(l(e),{currentTarget:o,liveFired:h}),(a||i).apply(o,[r].concat(p.call(arguments,1)))}),s(h,e,i,r,n,c||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=E),i.each(function(){u(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=l(m(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),c(n)}}(e),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||x,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),u(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),u(e,r,i)}function u(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function c(t,e,n){if(n.dataFilter==l)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function l(){}function f(t){return t&&(t=t.split(";",2)[0]),t&&(t==T?"html":t==j?"json":w.test(t)?"script":E.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function p(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=h(e.url,e.data),e.data=void 0)}function d(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function m(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(u.name,u.value):"array"==o||!r&&"object"==o?m(e,u,r,n):e.add(n,u)})}var v,g,y=+new Date,x=window.document,b=/)<[^<]*)*<\/script>/gi,w=/^(?:text|application)\/javascript/i,E=/^(?:text|application)\/xml/i,j="application/json",T="text/html",S=/^\s*$/,C=x.createElement("a");C.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"Zepto"+y++,l=x.createElement("script"),f=window[c],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?a(r[0],p,e,n):s(null,u||"error",p,e,n),window[c]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[c]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),x.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:l,success:l,error:l,complete:l,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:j,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:l},t.ajax=function(e){var n,i,u=t.extend({},e||{}),d=t.Deferred&&t.Deferred();for(v in t.ajaxSettings)void 0===u[v]&&(u[v]=t.ajaxSettings[v]);r(u),u.crossDomain||(n=x.createElement("a"),n.href=u.url,n.href=n.href,u.crossDomain=C.protocol+"//"+C.host!=n.protocol+"//"+n.host),u.url||(u.url=window.location.toString()),(i=u.url.indexOf("#"))>-1&&(u.url=u.url.slice(0,i)),p(u);var m=u.dataType,y=/\?.+=\?/.test(u.url);if(y&&(m="jsonp"),u.cache!==!1&&(e&&e.cache===!0||"script"!=m&&"jsonp"!=m)||(u.url=h(u.url,"_="+Date.now())),"jsonp"==m)return y||(u.url=h(u.url,u.jsonp?u.jsonp+"=?":u.jsonp===!1?"":"callback=?")),t.ajaxJSONP(u,d);var b,w=u.accepts[m],E={},j=function(t,e){E[t.toLowerCase()]=[t,e]},T=/^([\w-]+:)\/\//.test(u.url)?RegExp.$1:window.location.protocol,N=u.xhr(),O=N.setRequestHeader;if(d&&d.promise(N),u.crossDomain||j("X-Requested-With","XMLHttpRequest"),j("Accept",w||"*/*"),(w=u.mimeType||w)&&(w.indexOf(",")>-1&&(w=w.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(w)),(u.contentType||u.contentType!==!1&&u.data&&"GET"!=u.type.toUpperCase())&&j("Content-Type",u.contentType||"application/x-www-form-urlencoded"),u.headers)for(g in u.headers)j(g,u.headers[g]);if(N.setRequestHeader=j,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=l,clearTimeout(b);var e,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==T){if(m=m||f(u.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)e=N.response;else{e=N.responseText;try{e=c(e,m,u),"script"==m?(0,eval)(e):"xml"==m?e=N.responseXML:"json"==m&&(e=S.test(e)?null:t.parseJSON(e))}catch(r){n=r}if(n)return s(n,"parsererror",N,u,d)}a(e,N,u,d)}else s(N.statusText||null,N.status?"error":"abort",N,u,d)}},o(N,u)===!1)return N.abort(),s(null,"abort",N,u,d),N;var P=!("async"in u)||u.async;if(N.open(u.type,u.url,P,u.username,u.password),u.xhrFields)for(g in u.xhrFields)N[g]=u.xhrFields[g];for(g in E)O.apply(N,E[g]);return u.timeout>0&&(b=setTimeout(function(){N.onreadystatechange=l,N.abort(),s(null,"timeout",N,u,d)},u.timeout)),N.send(u.data?u.data:null),N},t.get=function(){return t.ajax(d.apply(null,arguments))},t.post=function(){var e=d.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=d.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=d(e,n,r),u=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("
        ").html(e.replace(b,"")).find(i):e),u&&u.apply(o,arguments)},t.ajax(s),this};var N=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(e)+"="+N(n))},m(r,e,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,n){try{return e(t,n)}catch(r){return null}}}}(),t("zepto",e)});layui.define(["layer-mobile","zepto"],function(e){"use strict";var t=layui.zepto,a=layui["layer-mobile"],i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"};a.msg=function(e){return a.open({content:e||"",skin:"msg",time:2})};var s=function(e){this.options=e};s.prototype.init=function(){var e=this,a=e.options,r=t("body"),s=t(a.elem||".layui-upload-file"),u=t('');return t("#"+n)[0]||r.append(u),s.each(function(r,s){s=t(s);var u='
        ',l=s.attr("lay-type")||a.type;a.unwrap||(u='
        '+u+''+(s.attr("lay-title")||a.title||"上传"+(o[l]||"图片"))+"
        "),u=t(u),a.unwrap||u.on("dragover",function(e){e.preventDefault(),t(this).addClass(i)}).on("dragleave",function(){t(this).removeClass(i)}).on("drop",function(){t(this).removeClass(i)}),s.parent("form").attr("target")===n&&(a.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=t(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return a.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return a.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return a.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return a.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=t("#"+n),f=setInterval(function(){var t;try{t=c.contents().find("body").text()}catch(i){a.msg("上传接口存在跨域",r),clearInterval(f)}if(t){clearInterval(f),c.contents().find("body").html("");try{t=JSON.parse(t)}catch(i){return t={},a.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(t,e)}},30);e.value=""}},e("upload-mobile",function(e){var t=new s(e=e||{});t.init()})});layui.define(["laytpl","upload-mobile","layer-mobile","zepto"],function(i){var e="2.1.0",a=layui.zepto,t=layui.laytpl,n=layui["layer-mobile"],l=layui["upload-mobile"],s=layui.device(),o="layui-show",c="layim-this",d=20,r={},u=function(){this.v=e,m(a("body"),"*[layim-event]",function(i){var e=a(this),t=e.attr("layim-event");U[t]?U[t].call(this,e,i):""})},m=function(i,e,t){var n,l="function"==typeof e,s=function(i){var e=a(this);e.data("lock")||(n||t.call(this,i),n=!1,e.data("lock","true"),setTimeout(function(){e.removeAttr("data-lock")},e.data("locktime")||0))};return l&&(t=e),i="string"==typeof i?a(i):i,y?void(l?i.on("touchmove",function(){n=!0}).on("touchend",s):i.on("touchmove",e,function(){n=!0}).on("touchend",e,s)):void(l?i.on("click",s):i.on("click",e,s))},y=/Android|iPhone|SymbianOS|Windows Phone|iPad|iPod/.test(navigator.userAgent);n.popBottom=function(i){n.close(n.popBottom.index),n.popBottom.index=n.open(a.extend({type:1,content:i.content||"",shade:!1,className:"layim-layer"},i))},u.prototype.config=function(i){i=i||{},i=a.extend({title:"我的IM",isgroup:0,isNewFriend:!0,voice:"default.mp3",chatTitleColor:"#36373C"},i),k(i)},u.prototype.on=function(i,e){return"function"==typeof e&&(r[i]?r[i].push(e):r[i]=[e]),this},u.prototype.chat=function(i){if(window.JSON&&window.JSON.parse)return L(i,-1),this},u.prototype.panel=function(i){return N(i)},u.prototype.cache=function(){return C},u.prototype.getMessage=function(i){return M(i),this},u.prototype.addList=function(i){return O(i),this},u.prototype.removeList=function(i){return Y(i),this},u.prototype.setFriendStatus=function(i,e){var t=a(".layim-friend"+i);t["online"===e?"removeClass":"addClass"]("layim-list-gray")},u.prototype.setChatStatus=function(i){var e=A(),a=e.elem.find(".layim-chat-status");return a.html(i),this},u.prototype.showNew=function(i,e){I(i,e)},u.prototype.content=function(i){return layui.data.content(i)};var p=function(i){var e={friend:"该分组下暂无好友",group:"暂无群组",history:"暂无任何消息"};return i=i||{},"history"===i.type&&(i.item=i.item||"d.sortHistory"),["{{# var length = 0; layui.each("+i.item+", function(i, data){ length++; }}",'
      • {{ data.username||data.groupname||data.name||"佚名" }}

        {{ data.remark||data.sign||"" }}

        new
      • ',"{{# }); if(length === 0){ }}",'
      • '+(e[i.type]||"暂无数据")+"
      • ","{{# } }}"].join("")},f=function(i,e,a){return['
        ','
        ',"

        ",a?'':"",'{{ d.title || d.base.title }}',"{{# if(d.data){ }}",'{{# if(d.data.type === "group"){ }}','',"{{# } }}","{{# } }}","

        ","
        ",'
        ',i,"
        ","
        "].join("")},h=['
        ','
        ','
          ','
            ',p({type:"history"}),"
          ","
        ","
        ",'
        ','
          ',"{{# if(d.base.isNewFriend){ }}",'
        • 新的朋友
        • ',"{{# } if(d.base.isgroup){ }}",'
        • 群聊
        • ',"{{# } }}","
        ",'
          ','{{# layui.each(d.friend, function(index, item){ var spread = d.local["spread"+index]; }}',"
        • ",'
          {{# if(spread === "true"){ }}{{# } else { }}{{# } }}{{ item.groupname||"未命名分组"+index }}( {{ (item.list||[]).length }})
          ','
            ',p({type:"friend",item:"item.list",index:"index"}),"
          ","
        • ","{{# }); if(d.friend.length === 0){ }}",'
          • 暂无联系人
          ',"{{# } }}","
        ","
        ",'
        ','
          ',"{{# layui.each(d.base.moreList, function(index, item){ }}",'
        • ','{{item.iconUnicode||""}}{{item.title}}',"
        • ","{{# }); if(!d.base.copyright){ }}",'
        • 关于
        • ',"{{# } }}","
        ","
        ","
        ",'
          ','
        • 消息
        • ','
        • 联系人
        • ','
        • 更多
        • ',"
        "].join(""),v=['
        ','
        ',"
          ","
          ",'","
          "].join(""),g=function(i){return i<10?"0"+(0|i):i};layui.data.date=function(i){var e=new Date(i||new Date);return g(e.getMonth()+1)+"-"+g(e.getDate())+" "+g(e.getHours())+":"+g(e.getMinutes())},layui.data.content=function(i){var e=function(i){return new RegExp("\\n*\\["+(i||"")+"(pre|div|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)\\]\\n*","g")};return i=(i||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(/@(\S+)(\s+?|$)/g,'@$1$2').replace(/face\[([^\s\[\]]+?)\]/g,function(i){var e=i.replace(/^face/g,"");return''+e+''}).replace(/img\[([^\s]+?)\]/g,function(i){return''}).replace(/file\([\s\S]+?\)\[[\s\S]*?\]/g,function(i){var e=(i.match(/file\(([\s\S]+?)\)\[/)||[])[1],a=(i.match(/\)\[([\s\S]*?)\]/)||[])[1];return e?''+(a||e)+"":i}).replace(/audio\[([^\s]+?)\]/g,function(i){return'

          音频消息

          '}).replace(/video\[([^\s]+?)\]/g,function(i){return'
          '}).replace(/a\([\s\S]+?\)\[[\s\S]*?\]/g,function(i){var e=(i.match(/a\(([\s\S]+?)\)\[/)||[])[1],a=(i.match(/\)\[([\s\S]*?)\]/)||[])[1];return e?''+(a||e)+"":i}).replace(e(),"<$1 $2>").replace(e("/"),"").replace(/\n/g,"
          ")};var b,x,w=['
        • ','
          ','{{ d.username||"佚名" }}',"
          ",'
          {{ layui.data.content(d.content||" ") }}
          ',"
        • "].join(""),C={message:{},chat:[]},k=function(i){var e=i.init||{};return mine=e.mine||{},local=layui.data("layim-mobile")[mine.id]||{},obj={base:i,local:local,mine:mine,history:local.history||[]},create=function(e){var n=e.mine||{},l=layui.data("layim-mobile")[n.id]||{},s={base:i,local:l,mine:n,friend:e.friend||[],group:e.group||[],history:l.history||[]};s.sortHistory=j(s.history,"historyTime"),C=a.extend(C,s),S(t(f(h)).render(s)),layui.each(r.ready,function(i,e){e&&e(s)})},C=a.extend(C,obj),i.brief?layui.each(r.ready,function(i,e){e&&e(obj)}):void create(e)},S=function(i){return n.open({type:1,shade:!1,shadeClose:!1,anim:-1,content:i,success:function(i){b=a(i),T(b.find(".layui-layim")),C.base.tabIndex&&U.tab(a(".layui-layim-tab>li").eq(C.base.tabIndex))}})},N=function(i,e){i=i||{};var l=a.extend({},C,{title:i.title||"",data:i.data});return n.open({type:1,shade:!1,shadeClose:!1,anim:-1,content:t(f(i.tpl,e!==-1,!0)).render(l),success:function(e){var t=a(e);t.prev().find(".layim-panel").addClass("layui-m-anim-lout"),i.success&&i.success(e),i.isChat||T(t.find(".layim-content"))},end:i.end})},L=function(i,e,t){return i=i||{},i.id?(n.close(L.index),L.index=N({tpl:v,data:i,title:i.name,isChat:!0,success:function(e){x=a(e),B(),$(),delete C.message[i.type+i.id],I("Msg");var t=A(),n=t.elem.find(".layim-chat-main");layui.each(r.chatChange,function(i,e){e&&e(t)}),T(n),t.textarea.on("focus",function(){setTimeout(function(){n.scrollTop(n[0].scrollHeight+1e3)},500)})},end:function(){x=null,q.time=0}},e)):n.msg("非法用户")},T=function(i){s.ios&&i.on("touchmove",function(e){var a=i.scrollTop();a<=0&&(i.scrollTop(1),e.preventDefault(e)),this.scrollHeight-a-i.height()<=0&&(i.scrollTop(i.scrollTop()-1),e.preventDefault(e))})},A=function(){if(!x)return{};var i=x.find(".layim-chat"),e=JSON.parse(decodeURIComponent(i.find(".layim-chat-tool").data("json")));return{elem:i,data:e,textarea:i.find("input")}},j=function(i,e,a){var t=[],n=function(i,a){var t=i[e],n=a[e];return nt?1:0};return layui.each(i,function(i,e){t.push(e)}),t.sort(n),a&&t.reverse(),t},H=function(i){var e=layui.data("layim-mobile")[C.mine.id]||{},a={},n=e.history||{};n[i.type+i.id];if(b){var l=b.find(".layim-list-history");i.historyTime=(new Date).getTime(),i.sign=i.content,n[i.type+i.id]=i,e.history=n,layui.data("layim-mobile",{key:C.mine.id,value:e});var s=l.find(".layim-"+i.type+i.id),c=(C.message[i.type+i.id]||[]).length,d=function(){s=l.find(".layim-"+i.type+i.id),s.find("p").html(i.content),c>0&&s.find(".layim-msg-status").html(c).addClass(o)};if(s.length>0)d(),l.prepend(s.clone()),s.remove();else{a[i.type+i.id]=i;var r=t(p({type:"history",item:"d.data"})).render({data:a});l.prepend(r),d(),l.find(".layim-null").remove()}I("Msg")}},I=function(i,e){if(!e){var e;layui.each(C.message,function(){return e=!0,!1})}a("#LAY_layimNew"+i)[e?"addClass":"removeClass"](o)},q=function(){var i={username:C.mine?C.mine.username:"访客",avatar:C.mine?C.mine.avatar:layui.cache.dir+"css/pc/layim/skin/logo.jpg",id:C.mine?C.mine.id:null,mine:!0},e=A(),a=e.elem.find(".layim-chat-main ul"),l=e.data,s=C.base.maxLength||3e3,o=(new Date).getTime(),c=e.textarea;if(i.content=c.val(),""!==i.content){if(i.content.length>s)return n.msg("内容最长不能超过"+s+"个字符");o-(q.time||0)>6e4&&(a.append('
        • '+layui.data.date()+"
        • "),q.time=o),a.append(t(w).render(i));var d={mine:i,to:l},u={username:d.mine.username,avatar:d.mine.avatar,id:l.id,type:l.type,content:d.mine.content,timestamp:o,mine:!0};F(u),layui.each(r.sendMessage,function(i,e){e&&e(d)}),l.content=i.content,H(l),J(),c.val(""),c.next().addClass("layui-disabled")}},_=function(){var i=document.createElement("audio");i.src=layui.cache.dir+"css/modules/layim/voice/"+C.base.voice,i.play()},D={},M=function(i){i=i||{};var e={},n=A(),l=n.data||{},s=l.id==i.id&&l.type==i.type;i.timestamp=i.timestamp||(new Date).getTime(),i.system||F(i),D=JSON.parse(JSON.stringify(i)),C.base.voice&&_(),(!x&&i.content||!s)&&(C.message[i.type+i.id]?C.message[i.type+i.id].push(i):C.message[i.type+i.id]=[i]);var e={};if("friend"===i.type){var o;layui.each(C.friend,function(e,a){if(layui.each(a.list,function(e,a){if(a.id==i.id)return i.type="friend",i.name=a.username,o=!0}),o)return!0}),o||(i.temporary=!0)}else"group"===i.type?layui.each(C.group,function(a,t){if(t.id==i.id)return i.type="group",i.name=i.groupname=t.groupname,e.avatar=t.avatar,!0}):i.name=i.name||i.username||i.groupname;var c=a.extend({},i,{avatar:e.avatar||i.avatar});if("group"===i.type&&delete c.username,H(c),x&&s){var d=x.find(".layim-chat"),r=d.find(".layim-chat-main ul");i.system?r.append('
        • '+i.content+"
        • "):""!==i.content.replace(/\s/g,"")&&(i.timestamp-(q.time||0)>6e4&&(r.append('
        • '+layui.data.date(i.timestamp)+"
        • "),q.time=i.timestamp),r.append(t(w).render(i))),J()}},F=function(i){var e=layui.data("layim-mobile")[C.mine.id]||{},a=e.chatlog||{};a[i.type+i.id]?(a[i.type+i.id].push(i),a[i.type+i.id].length>d&&a[i.type+i.id].shift()):a[i.type+i.id]=[i],e.chatlog=a,layui.data("layim-mobile",{key:C.mine.id,value:e})},$=function(){var i=layui.data("layim-mobile")[C.mine.id]||{},e=A(),a=i.chatlog||{},n=e.elem.find(".layim-chat-main ul");layui.each(a[e.data.type+e.data.id],function(i,e){(new Date).getTime()>e.timestamp&&e.timestamp-(q.time||0)>6e4&&(n.append('
        • '+layui.data.date(e.timestamp)+"
        • "),q.time=e.timestamp),n.append(t(w).render(e))}),J()},O=function(i){var e,a={},l=b.find(".layim-list-"+i.type);if(C[i.type])if("friend"===i.type)layui.each(C.friend,function(t,l){if(i.groupid==l.id)return layui.each(C.friend[t].list,function(a,t){if(t.id==i.id)return e=!0}),e?n.msg("好友 ["+(i.username||"")+"] 已经存在列表中",{anim:6}):(C.friend[t].list=C.friend[t].list||[],a[C.friend[t].list.length]=i,i.groupIndex=t,C.friend[t].list.push(i),!0)});else if("group"===i.type){if(layui.each(C.group,function(a,t){if(t.id==i.id)return e=!0}),e)return n.msg("您已是 ["+(i.groupname||"")+"] 的群成员",{anim:6});a[C.group.length]=i,C.group.push(i)}if(!e){var s=t(p({type:i.type,item:"d.data",index:"friend"===i.type?"data.groupIndex":null})).render({data:a});if("friend"===i.type){var o=l.children("li").eq(i.groupIndex);o.find(".layui-layim-list").append(s),o.find(".layim-count").html(C.friend[i.groupIndex].list.length),o.find(".layim-null")[0]&&o.find(".layim-null").remove()}else"group"===i.type&&(l.append(s),l.find(".layim-null")[0]&&l.find(".layim-null").remove())}},Y=function(i){var e=b.find(".layim-list-"+i.type);C[i.type]&&("friend"===i.type?layui.each(C.friend,function(a,t){layui.each(t.list,function(t,n){if(i.id==n.id){var l=e.children("li").eq(a);l.find(".layui-layim-list").children("li");return l.find(".layui-layim-list").children("li").eq(t).remove(),C.friend[a].list.splice(t,1),l.find(".layim-count").html(C.friend[a].list.length),0===C.friend[a].list.length&&l.find(".layui-layim-list").html('
        • 该分组下已无好友了
        • '),!0}})}):"group"===i.type&&layui.each(C.group,function(a,t){if(i.id==t.id)return e.children("li").eq(a).remove(),C.group.splice(a,1),0===C.group.length&&e.html('
        • 暂无群组
        • '),!0}))},J=function(){var i=A(),e=i.elem.find(".layim-chat-main"),a=e.find("ul"),t=a.children(".layim-chat-li");if(t.length>=d){var n=t.eq(0);n.prev().remove(),a.prev().hasClass("layim-chat-system")||a.before('
          查看更多记录
          '),n.remove()}e.scrollTop(e[0].scrollHeight+1e3)},B=function(){var i=A(),e=i.textarea,a=e.next();e.off("keyup").on("keyup",function(i){var t=i.keyCode;13===t&&(i.preventDefault(),q()),a[""===e.val()?"addClass":"removeClass"]("layui-disabled")})},E=function(){var i=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(i,function(i,a){e[a]=layui.cache.dir+"images/face/"+i+".gif"}),e}(),P=layui.stope,R=function(i,e,a){var t,n=i.value;a||i.focus(),document.selection?(t=document.selection.createRange(),document.selection.empty(),t.text=e):(t=[n.substring(0,i.selectionStart),e,n.substr(i.selectionEnd)],a||i.focus(),i.value=t.join(""))},U={chat:function(i){var e=layui.data("layim-mobile")[C.mine.id]||{},t=i.data("type"),n=i.data("index"),l=i.attr("data-list")||i.index(),s={};"friend"===t?s=C[t][n].list[l]:"group"===t?s=C[t][l]:"history"===t&&(s=(e.history||{})[n]||{}),s.name=s.name||s.username||s.groupname,"history"!==t&&(s.type=t),L(s,!0),a(".layim-"+s.type+s.id).find(".layim-msg-status").removeClass(o)},spread:function(i){var e=i.attr("lay-type"),a="true"===e?"false":"true",t=layui.data("layim-mobile")[C.mine.id]||{};i.next()["true"===e?"removeClass":"addClass"](o),t["spread"+i.parent().index()]=a,layui.data("layim-mobile",{key:C.mine.id,value:t}),i.attr("lay-type",a),i.find(".layui-icon").html("true"===a?"":"")},tab:function(i){var e=i.index(),a=".layim-tab-content";i.addClass(c).siblings().removeClass(c),b.find(a).eq(e).addClass(o).siblings(a).removeClass(o)},back:function(i){var e=i.parents(".layui-m-layer").eq(0),a=e.attr("index"),t=".layim-panel";setTimeout(function(){n.close(a)},300),i.parents(t).eq(0).removeClass("layui-m-anim-left").addClass("layui-m-anim-rout"),e.prev().find(t).eq(0).removeClass("layui-m-anim-lout").addClass("layui-m-anim-right"),layui.each(r.back,function(i,e){setTimeout(function(){e&&e()},200)})},send:function(){q()},face:function(i,e){var t="",l=A(),s=l.textarea;layui.each(E,function(i,e){t+='
        • '}),t='
            '+t+"
          ",n.popBottom({content:t,success:function(i){var e=a(i).find(".layui-layim-face").children("li");m(e,function(){return R(s[0],"face"+this.title+" ",!0),s.next()[""===s.val()?"addClass":"removeClass"]("layui-disabled"),!1})}});var o=a(document);y?o.off("touchend",U.faceHide).on("touchend",U.faceHide):o.off("click",U.faceHide).on("click",U.faceHide),P(e)},faceHide:function(){n.close(n.popBottom.index),a(document).off("touchend",U.faceHide).off("click",U.faceHide)},image:function(i){var e=i.data("type")||"images",a={images:"uploadImage",file:"uploadFile"},t=A(),s=C.base[a[e]]||{};l({url:s.url||"",method:s.type,elem:i.find("input")[0],unwrap:!0,type:e,success:function(i){0==i.code?(i.data=i.data||{},"images"===e?R(t.textarea[0],"img["+(i.data.src||"")+"]"):"file"===e&&R(t.textarea[0],"file("+(i.data.src||"")+")["+(i.data.name||"下载文件")+"]"),q()):n.msg(i.msg||"上传失败")}})},extend:function(i){var e=i.attr("lay-filter"),a=A();layui.each(r["tool("+e+")"],function(e,t){t&&t.call(i,function(i){R(a.textarea[0],i)},q,a)})},newFriend:function(){layui.each(r.newFriend,function(i,e){e&&e()})},group:function(){N({title:"群聊",tpl:['
          ',p({type:"group",item:"d.group"}),"
          "].join(""),data:{}})},detail:function(){var i=A();layui.each(r.detail,function(e,a){a&&a(i.data)})},playAudio:function(i){var e=i.data("audio"),a=e||document.createElement("audio"),t=function(){a.pause(),i.removeAttr("status"),i.find("i").html("")};return i.data("error")?n.msg("播放音频源异常"):a.play?void(i.attr("status")?t():(e||(a.src=i.data("src")),a.play(),i.attr("status","pause"),i.data("audio",a),i.find("i").html(""),a.onended=function(){t()},a.onerror=function(){n.msg("播放音频源异常"),i.data("error",!0),t()})):n.msg("您的浏览器不支持audio")},playVideo:function(i){var e=i.data("src"),a=document.createElement("video");return a.play?(n.close(U.playVideo.index),void(U.playVideo.index=n.open({type:1,anim:!1,style:"width: 100%; height: 50%;",content:'
          '}))):n.msg("您的浏览器不支持video")},chatLog:function(i){var e=A();layui.each(r.chatlog,function(i,a){a&&a(e.data,e.elem.find(".layim-chat-main>ul"))})},moreList:function(i){var e=i.attr("lay-filter");layui.each(r.moreList,function(i,a){a&&a({alias:e})})},about:function(){n.open({content:'

          LayIM属于付费产品,欢迎通过官网获得授权,促进良性发展!

          当前版本:layim mobile v'+e+'

          版权所有:layim.layui.com

          ',className:"layim-about",shadeClose:!1,btn:"我知道了"})}};i("layim-mobile",new u)}).addcss("modules/layim/mobile/layim.css?v=2.10","skinlayim-mobilecss");layui["layui.mobile"]||layui.config({base:layui.cache.dir+"lay/modules/mobile/"}).extend({"layer-mobile":"layer-mobile",zepto:"zepto","upload-mobile":"upload-mobile","layim-mobile":"layim-mobile"}),layui.define(["layer-mobile","zepto","layim-mobile"],function(l){l("mobile",{layer:layui["layer-mobile"],layim:layui["layim-mobile"]})}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/rate.js b/src/main/resources/static/layui/lay/modules/rate.js deleted file mode 100644 index 762fb3a..0000000 --- a/src/main/resources/static/layui/lay/modules/rate.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
            ",u=1;u<=i.length;u++){var r='
          • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
          • ":n+=r}n+="
          "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/slider.js b/src/main/resources/static/layui/lay/modules/slider.js deleted file mode 100644 index 446378d..0000000 --- a/src/main/resources/static/layui/lay/modules/slider.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
          '+(t.tips?'
          ':"")+'
          '+(t.range?'
          ':"")+"
          ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
          ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
          ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
          f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/table.js b/src/main/resources/static/layui/lay/modules/table.js deleted file mode 100644 index e9217db..0000000 --- a/src/main/resources/static/layui/lay/modules/table.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,u,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)},config:t}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u="table",h=".layui-table",y="layui-hide",f="layui-none",p="layui-table-view",v=".layui-table-tool",m=".layui-table-box",g=".layui-table-init",b=".layui-table-header",x=".layui-table-body",k=".layui-table-main",C=".layui-table-fixed",w=".layui-table-fixed-l",T=".layui-table-fixed-r",A=".layui-table-total",L=".layui-table-page",S=".layui-table-sort",N="layui-table-edit",W="layui-table-hover",_=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['
          ',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
          ','
          ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
          ","
          "].join("")},E=['',"","
          "].join(""),z=['
          ',"{{# if(d.data.toolbar){ }}",'
          ','
          ','
          ',"
          ","{{# } }}",'
          ',"{{# if(d.data.loading){ }}",'
          ','',"
          ","{{# } }}","{{# var left, right; }}",'
          ',_(),"
          ",'
          ',E,"
          ","{{# if(left){ }}",'
          ','
          ',_({fixed:!0}),"
          ",'
          ',E,"
          ","
          ","{{# }; }}","{{# if(right){ }}",'
          ','
          ',_({fixed:"right"}),'
          ',"
          ",'
          ',E,"
          ","
          ","{{# }; }}","
          ","{{# if(d.data.totalRow){ }}",'
          ','','',"
          ","
          ","{{# } }}","{{# if(d.data.page){ }}",'
          ','
          ',"
          ","{{# } }}","","
          "].join(""),H=t(window),R=t(document),F=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};F.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},F.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=H.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+p),o=e.elem=t(i(z).render({VIEW_CLASS:p,data:a,index:e.index}));if(a.index=e.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(v),e.layBox=o.find(m),e.layHeader=o.find(b),e.layMain=o.find(k),e.layBody=o.find(x),e.layFixed=o.find(C),e.layFixLeft=o.find(w),e.layFixRight=o.find(T),e.layTotal=o.find(A),e.layPage=o.find(L),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(b).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},F.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},F.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},F.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
          ','
          ','
          '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i=r[t];i&&d.push('
          ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},F.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](y),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},F.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},F.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},F.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},F.prototype.reload=function(e){var i=this;i.config.data&&i.config.data.constructor===Array&&delete i.config.data,i.config=t.extend({},i.config,e),i.render()},F.prototype.page=1,F.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.layMain.html('
          '+(t[n.msgName]||"返回的数据不符合规范,正确的成功状态码 ("+n.statusName+") 应为:"+n.statusCode)+"
          ")):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.layMain.html('
          数据接口请求异常:'+t+"
          "),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,i.renderData(c,e,a.data.length),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},F.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},F.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,u=e[s.response.dataName]||[],h=[],p=[],v=[],m=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(u,function(a,l){var o=[],u=[],f=[],m=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,h=s.index+"-"+r.key,p=l[c];if(void 0!==p&&null!==p||(p=""),!r.colGroup){var v=['','
          '+function(){var n=t.extend(!0,{LAY_INDEX:m},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return m}return r.toolbar?i(t(r.toolbar).html()||"").render(n):r.templet?function(){return"function"==typeof r.templet?r.templet(n):i(t(r.templet).html()||String(p)).render(n)}():p}(),"
          "].join("");o.push(v),r.fixed&&"right"!==r.fixed&&u.push(v),"right"===r.fixed&&f.push(v)}}),h.push(''+o.join("")+""),p.push(''+u.join("")+""),v.push(''+f.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+f).remove(),c.layMain.find("tbody").html(h.join("")),c.layFixLeft.find("tbody").html(p.join("")),c.layFixRight.find("tbody").html(v.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return c.key=s.id||s.index,d.cache[c.key]=u,c.layPage[0==o||0===u.length&&1==n?"addClass":"removeClass"](y),r?m():0===u.length?(c.renderForm(),c.layFixed.remove(),c.layMain.find("tbody").html(""),c.layMain.find("."+f).remove(),c.layMain.append('
          '+s.text.none+"
          ")):(m(),c.renderTotal(u),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.loading(),c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},F.prototype.renderTotal=function(e){var t=this,i=t.config,a={};if(i.totalRow){layui.each(e,function(e,i){0!==i.length&&t.eachCols(function(e,t){var l=t.field||e,n=i[l];t.totalRow&&(a[l]=(a[l]||0)+(parseFloat(n)||0))})});var l=[];t.eachCols(function(e,t){var n=t.field||e,o=['','
          '+function(){var e=t.totalRowText||"";return t.totalRow?parseFloat(a[n]).toFixed(2)||e:e}(),"
          "].join("");l.push(o)}),t.layTotal.find("tbody").html(""+l.join("")+"")}},F.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},F.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},F.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},F.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},h=c.config,y=h.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},h.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[h.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,u,"sort("+y+")",{field:n,type:i})},F.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(g).remove()):(i.layInit=t(['
          ','',"
          "].join("")),i.layBox.append(i.layInit)))},F.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},F.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},F.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},F.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=H.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e=e-(t.layPage.outerHeight()||41)-2),t.layMain.css("height",e))},F.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},F.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
          ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(x).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](y),e.layFixRight.css("right",a-1)},F.prototype.events=function(){var e,a=this,o=a.config,c=t("body"),s={},h=a.layHeader.find("th"),f=".layui-table-cell",p=o.elem.attr("lay-filter");a.layTool.on("click","*[lay-event]",function(e){var i=t(this),c=i.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
            ');n.html(l),o.height&&n.css("max-height",o.height-(a.layTool.outerHeight()||50)),i.find(".layui-table-tool-panel")[0]||i.append(n),a.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),R.trigger("table.tool.panel.remove"),l.close(a.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return a.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
          • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var i=t(e.elem),l=this.checked,n=i.data("key"),r=i.data("parentkey");layui.each(o.cols,function(e,t){layui.each(t,function(t,i){if(e+"-"+t===n){var d=i.hide;i.hide=!l,a.elem.find('*[data-key="'+o.index+"-"+n+'"]')[l?"removeClass":"addClass"](y),d!=i.hide&&a.setParentCol(!l,r),a.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
          • 导出到 Csv 文件
          • ','
          • 导出到 Excel 文件
          • '].join("")}(),done:function(e,i){i.on("click",function(){var e=t(this).data("type");d.exportFile(o.id,null,e)})}});break;case"LAYTABLE_PRINT":var h=window.open("打印窗口","_blank"),f=[""].join(""),v=t(a.layHeader.html());v.append(a.layMain.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),h.document.write(f+v.prop("outerHTML")),h.document.close(),h.print(),h.close()}layui.event.call(this,u,"toolbar("+p+")",t.extend({event:c,config:o},{}))}),h.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||s.resizeStart||(s.allowResize=i.width()-l<=10,c.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);s.resizeStart||c.css("cursor","")}).on("mousedown",function(e){var i=t(this);if(s.allowResize){var l=i.data("key");e.preventDefault(),s.resizeStart=!0,s.offset=[e.clientX,e.clientY],a.getCssRule(l,function(e){var t=e.style.width||i.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=i.data("minwidth")||o.cellMinWidth})}}),R.on("mousemove",function(t){if(s.resizeStart){if(t.preventDefault(),s.rule){var i=s.ruleWidth+t.clientX-s.offset[0];i');return n[0].value=i.data("content")||l.text(),i.find("."+N)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(f);if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
            ')}};a.layBody.on("click","."+g,function(e){var i=t(this),n=i.parent(),d=n.children(f);a.tipsIndex=l.tips(['
            ',d.html(),"
            ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:a.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),a.layBody.on("click","*[lay-event]",function(){var e=t(this),i=e.parents("tr").eq(0).data("index");layui.event.call(this,u,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),a.setThisRowChecked(i)}),a.layMain.on("scroll",function(){var e=t(this),i=e.scrollLeft(),n=e.scrollTop();a.layHeader.scrollLeft(i),a.layTotal.scrollLeft(i),a.layFixed.find(x).scrollTop(n),l.close(a.tipsIndex)}),R.on("click",function(){R.trigger("table.remove.tool.panel")}),R.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()}),H.on("resize",function(){a.resize()})},d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var a=c.config[e]||{},l={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],n=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(n.href="data:"+l+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],a=[];return layui.each(t,function(t,l){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(l),function(e,t){n.push(t)})):d.eachCols(e,function(e,a){a.field&&"normal"==a.type&&!a.hide&&(0==t&&i.push(a.title||""),n.push(l[a.field]))}),a.push(n.join(","))}),i.join(",")+"\r\n"+a.join("\r\n")}()),n.download=(a.title||"table_"+(a.index||""))+"."+i,document.body.appendChild(n),n.click(),void document.body.removeChild(n))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,i){i=i||{};var a=s(e);if(a)return i.data&&i.data.constructor===Array&&delete a.data,d.render(t.extend(!0,{},a,i))},d.render=function(e){var t=new F(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(u,d)}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/tree.js b/src/main/resources/static/layui/lay/modules/tree.js deleted file mode 100644 index e8c053d..0000000 --- a/src/main/resources/static/layui/lay/modules/tree.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
              '),s=o(["
            • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
            • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
              '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/upload.js b/src/main/resources/static/layui/lay/modules/upload.js deleted file mode 100644 index 404d534..0000000 --- a/src/main/resources/static/layui/lay/modules/upload.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
              '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
              ',"
              "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)}); \ No newline at end of file diff --git a/src/main/resources/static/layui/lay/modules/util.js b/src/main/resources/static/layui/lay/modules/util.js deleted file mode 100644 index 8d38508..0000000 --- a/src/main/resources/static/layui/lay/modules/util.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
                ',t.bar1?'
              • '+c[0]+"
              • ":"",t.bar2?'
              • '+c[1]+"
              • ":"",'
              • '+c[2]+"
              • ","
              "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)}); \ No newline at end of file diff --git a/src/main/resources/static/layui/layui.all.js b/src/main/resources/static/layui/layui.all.js deleted file mode 100644 index 5cd5973..0000000 --- a/src/main/resources/static/layui/layui.all.js +++ /dev/null @@ -1,5 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
              ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
              "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)});!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="开始日期超出了结束日期
              建议重新选择",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));t0)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,isInitValue:!0,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?r0)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="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",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="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",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(''+n.timeTips+""),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(''+o+""))}),e.push('"),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}));t.elem&&(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必须遵循下述格式:
              "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"
              已为你重置"),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(''+n+""),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.nowl.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.yeard[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&&e=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.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=["

              "+r.time[e]+"

                "];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+"")}),a.innerHTML=i.join("")+"
              ",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&&s0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), -l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
              a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
              ","
              "],area:[1,"",""],param:[1,"",""],thead:[1,"","
              "],tr:[2,"","
              "],col:[2,"","
              "],td:[3,"","
              "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
              ","
              "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,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":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
              a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.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(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
              ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ -for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe});!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.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-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
              '+(f?r.title[0]:r.title)+"
              ":"";return r.zIndex=s,t([r.shade?'
              ':"",'
              '+(e&&2!=r.type?"":u)+'
              '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
              '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
              '+e+"
              "}():"")+(r.resize?'':"")+"
              "],u,i('
              ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.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&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(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.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.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},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.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,f.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,f.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,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&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.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.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})},s.pt.IE6=function(e){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})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.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})},o.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=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
                '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
              • '+(t[0].content||"no content")+"
              • ";i'+(t[i].content||"no content")+"";return a}()+"
              ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(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 s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.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(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
              '+(u.length>1?'':"")+'
              '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
              ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
              是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
            • "+(i.title||"unnaming")+"
            • ";return s[0]?s.before(r):n.append(r),o.append('
              '+(i.content||"")+"
              "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)});layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
              '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
              ',"
              "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
              '+(t.tips?'
              ':"")+'
              '+(t.range?'
              ':"")+"
              ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
              ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
              f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
              ',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
              "].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
              ','
              ','
              ','
              ','
              ','
              ',"
              ",'
              ','
              ',"
              ","
              ",'
              ','
              ','
              ',"
              ","
              ",function(){if(o.predefine){var e=['
              '];return layui.each(o.colors,function(i,o){e.push(['
              ','
              ',"
              "].join(""))}),e.push("
              "),e.join("")}return""}(),'
              ','
              ','',"
              ",'
              ','','',"","
              "].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
              t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=t(r+'[lay-filter="'+e+'"]');a.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value===t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e)},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),x=i.find("dl"),g=x.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=x.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),g.removeClass(o),y=null,g.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),$()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||T(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},$=function(){var e=x.children("dd."+s);if(e[0]){var t=e.position().top,i=x.height(),a=e.height();t>i&&x.scrollTop(t+x.scrollTop()-i+a-5),t<0&&x.scrollTop(t+x.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),x.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=x.children("dd."+s);if(x.children("dd."+o)[0]&&"next"===t){var i=x.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

              '):x.find("."+r).remove()},"keyup"),""===t&&x.find("."+r).remove(),void $())};f&&k.on("keyup",j).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){T(k.val(),function(e){d||k.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
              ','
              ','','
              ','
              ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
              "+a.label+"
              "):t.push('
              '+a.innerHTML+"
              "):t.push('
              '+(a.innerHTML||i)+"
              ")}),0===t.length&&t.push('
              没有选项
              '),t.join("")}(r.find("*"))+"
              ","
              "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
              ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
              "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
              ',''+i[l.checked?0:1]+"","
              "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
              ","
              "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),v=e.parents("form")[0],h=u.find("input,select,textarea"),y=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),c=r.attr("lay-verify").split("|"),u=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(c,function(e,t){var c,f="",v="function"==typeof a[t];if(a[t]){var c=v?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],c)return"tips"===u?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(h,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(c[t.name]=t.value)}}),layui.event.call(this,l,"submit("+y+")",{elem:this,form:v,field:c})},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)});layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
                '),s=o(["
              • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
              • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
                '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})});layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,u,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)},config:t}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u="table",h=".layui-table",y="layui-hide",f="layui-none",p="layui-table-view",v=".layui-table-tool",m=".layui-table-box",g=".layui-table-init",b=".layui-table-header",x=".layui-table-body",k=".layui-table-main",C=".layui-table-fixed",w=".layui-table-fixed-l",T=".layui-table-fixed-r",A=".layui-table-total",L=".layui-table-page",S=".layui-table-sort",N="layui-table-edit",W="layui-table-hover",_=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
                ','
                ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
                ","
                "].join("")},E=['',"","
                "].join(""),z=['
                ',"{{# if(d.data.toolbar){ }}",'
                ','
                ','
                ',"
                ","{{# } }}",'
                ',"{{# if(d.data.loading){ }}",'
                ','',"
                ","{{# } }}","{{# var left, right; }}",'
                ',_(),"
                ",'
                ',E,"
                ","{{# if(left){ }}",'
                ','
                ',_({fixed:!0}),"
                ",'
                ',E,"
                ","
                ","{{# }; }}","{{# if(right){ }}",'
                ','
                ',_({fixed:"right"}),'
                ',"
                ",'
                ',E,"
                ","
                ","{{# }; }}","
                ","{{# if(d.data.totalRow){ }}",'
                ','','',"
                ","
                ","{{# } }}","{{# if(d.data.page){ }}",'
                ','
                ',"
                ","{{# } }}","","
                "].join(""),H=t(window),R=t(document),F=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};F.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},F.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=H.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+p),o=e.elem=t(i(z).render({VIEW_CLASS:p,data:a,index:e.index}));if(a.index=e.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(v),e.layBox=o.find(m),e.layHeader=o.find(b),e.layMain=o.find(k),e.layBody=o.find(x),e.layFixed=o.find(C),e.layFixLeft=o.find(w),e.layFixRight=o.find(T),e.layTotal=o.find(A),e.layPage=o.find(L),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(b).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},F.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},F.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},F.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
                ','
                ','
                '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i=r[t];i&&d.push('
                ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},F.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](y),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},F.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},F.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},F.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},F.prototype.reload=function(e){var i=this;i.config.data&&i.config.data.constructor===Array&&delete i.config.data,i.config=t.extend({},i.config,e),i.render()},F.prototype.page=1,F.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.layMain.html('
                '+(t[n.msgName]||"返回的数据不符合规范,正确的成功状态码 ("+n.statusName+") 应为:"+n.statusCode)+"
                ")):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.layMain.html('
                数据接口请求异常:'+t+"
                "),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,i.renderData(c,e,a.data.length),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},F.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},F.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,u=e[s.response.dataName]||[],h=[],p=[],v=[],m=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(u,function(a,l){var o=[],u=[],f=[],m=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,h=s.index+"-"+r.key,p=l[c];if(void 0!==p&&null!==p||(p=""),!r.colGroup){var v=['','
                '+function(){var n=t.extend(!0,{LAY_INDEX:m},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return m}return r.toolbar?i(t(r.toolbar).html()||"").render(n):r.templet?function(){return"function"==typeof r.templet?r.templet(n):i(t(r.templet).html()||String(p)).render(n)}():p}(),"
                "].join("");o.push(v),r.fixed&&"right"!==r.fixed&&u.push(v),"right"===r.fixed&&f.push(v)}}),h.push(''+o.join("")+""),p.push(''+u.join("")+""),v.push(''+f.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+f).remove(),c.layMain.find("tbody").html(h.join("")),c.layFixLeft.find("tbody").html(p.join("")),c.layFixRight.find("tbody").html(v.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return c.key=s.id||s.index,d.cache[c.key]=u,c.layPage[0==o||0===u.length&&1==n?"addClass":"removeClass"](y),r?m():0===u.length?(c.renderForm(),c.layFixed.remove(),c.layMain.find("tbody").html(""),c.layMain.find("."+f).remove(),c.layMain.append('
                '+s.text.none+"
                ")):(m(),c.renderTotal(u),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.loading(),c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},F.prototype.renderTotal=function(e){var t=this,i=t.config,a={};if(i.totalRow){layui.each(e,function(e,i){0!==i.length&&t.eachCols(function(e,t){var l=t.field||e,n=i[l];t.totalRow&&(a[l]=(a[l]||0)+(parseFloat(n)||0))})});var l=[];t.eachCols(function(e,t){var n=t.field||e,o=['','
                '+function(){var e=t.totalRowText||"";return t.totalRow?parseFloat(a[n]).toFixed(2)||e:e}(),"
                "].join("");l.push(o)}),t.layTotal.find("tbody").html(""+l.join("")+"")}},F.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},F.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},F.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},F.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},h=c.config,y=h.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},h.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[h.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,u,"sort("+y+")",{field:n,type:i})},F.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(g).remove()):(i.layInit=t(['
                ','',"
                "].join("")),i.layBox.append(i.layInit)))},F.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},F.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},F.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},F.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=H.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e=e-(t.layPage.outerHeight()||41)-2),t.layMain.css("height",e))},F.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},F.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
                ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(x).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](y),e.layFixRight.css("right",a-1)},F.prototype.events=function(){var e,a=this,o=a.config,c=t("body"),s={},h=a.layHeader.find("th"),f=".layui-table-cell",p=o.elem.attr("lay-filter");a.layTool.on("click","*[lay-event]",function(e){var i=t(this),c=i.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
                  ');n.html(l),o.height&&n.css("max-height",o.height-(a.layTool.outerHeight()||50)),i.find(".layui-table-tool-panel")[0]||i.append(n),a.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),R.trigger("table.tool.panel.remove"),l.close(a.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return a.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
                • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var i=t(e.elem),l=this.checked,n=i.data("key"),r=i.data("parentkey");layui.each(o.cols,function(e,t){layui.each(t,function(t,i){if(e+"-"+t===n){var d=i.hide;i.hide=!l,a.elem.find('*[data-key="'+o.index+"-"+n+'"]')[l?"removeClass":"addClass"](y),d!=i.hide&&a.setParentCol(!l,r),a.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
                • 导出到 Csv 文件
                • ','
                • 导出到 Excel 文件
                • '].join("")}(),done:function(e,i){i.on("click",function(){var e=t(this).data("type");d.exportFile(o.id,null,e)})}});break;case"LAYTABLE_PRINT":var h=window.open("打印窗口","_blank"),f=[""].join(""),v=t(a.layHeader.html());v.append(a.layMain.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),h.document.write(f+v.prop("outerHTML")),h.document.close(),h.print(),h.close()}layui.event.call(this,u,"toolbar("+p+")",t.extend({event:c,config:o},{}))}),h.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||s.resizeStart||(s.allowResize=i.width()-l<=10,c.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);s.resizeStart||c.css("cursor","")}).on("mousedown",function(e){var i=t(this);if(s.allowResize){var l=i.data("key");e.preventDefault(),s.resizeStart=!0,s.offset=[e.clientX,e.clientY],a.getCssRule(l,function(e){var t=e.style.width||i.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=i.data("minwidth")||o.cellMinWidth})}}),R.on("mousemove",function(t){if(s.resizeStart){if(t.preventDefault(),s.rule){var i=s.ruleWidth+t.clientX-s.offset[0];i');return n[0].value=i.data("content")||l.text(),i.find("."+N)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(f);if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
                  ')}};a.layBody.on("click","."+g,function(e){var i=t(this),n=i.parent(),d=n.children(f);a.tipsIndex=l.tips(['
                  ',d.html(),"
                  ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:a.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),a.layBody.on("click","*[lay-event]",function(){var e=t(this),i=e.parents("tr").eq(0).data("index");layui.event.call(this,u,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),a.setThisRowChecked(i)}),a.layMain.on("scroll",function(){var e=t(this),i=e.scrollLeft(),n=e.scrollTop();a.layHeader.scrollLeft(i),a.layTotal.scrollLeft(i),a.layFixed.find(x).scrollTop(n),l.close(a.tipsIndex)}),R.on("click",function(){R.trigger("table.remove.tool.panel")}),R.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()}),H.on("resize",function(){a.resize()})},d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var a=c.config[e]||{},l={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],n=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(n.href="data:"+l+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],a=[];return layui.each(t,function(t,l){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(l),function(e,t){n.push(t)})):d.eachCols(e,function(e,a){a.field&&"normal"==a.type&&!a.hide&&(0==t&&i.push(a.title||""),n.push(l[a.field]))}),a.push(n.join(","))}),i.join(",")+"\r\n"+a.join("\r\n")}()),n.download=(a.title||"table_"+(a.index||""))+"."+i,document.body.appendChild(n),n.click(),void document.body.removeChild(n))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,i){i=i||{};var a=s(e);if(a)return i.data&&i.data.constructor===Array&&delete a.data,d.render(t.extend(!0,{},a,i))},d.render=function(e){var t=new F(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(u,d)});layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
                    ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
                  "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a",u=1;u<=i.length;u++){var r='
                • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
                • ":n+=r}n+=""+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)});layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
                    ',t.bar1?'
                  • '+c[0]+"
                  • ":"",t.bar2?'
                  • '+c[1]+"
                  • ":"",'
                  • '+c[2]+"
                  • ","
                  "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)});layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
                  ','
                  '+f+"
                  ",'
                  ','',"
                  ","
                  "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

                  ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

                  "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

                  "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

                    ','
                  • ','','
                    ','',"
                    ","
                  • ",'
                  • ','','
                    ','",'","
                    ","
                  • ",'
                  • ','','',"
                  • ","
                  "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
                • '+e+'
                • ')}),'
                    '+t.join("")+"
                  "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
                    ','
                  • ','','
                    ','","
                    ","
                  • ",'
                  • ','','
                    ','',"
                    ","
                  • ",'
                  • ','','',"
                  • ","
                  "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)});layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
                  1. '+o.replace(/[\r\t\n]+/g,"
                  2. ")+"
                  "),c.find(">.layui-code-h3")[0]||c.prepend('

                  '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

                  ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/src/main/resources/static/layui/layui.js b/src/main/resources/static/layui/layui.js deleted file mode 100644 index 3cd51c2..0000000 --- a/src/main/resources/static/layui/layui.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v2.4.5 MIT License By https://www.layui.com */ - ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r - - - - 服务器忙 - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/mang.png b/src/main/resources/static/mang.png deleted file mode 100644 index c7d20d7..0000000 Binary files a/src/main/resources/static/mang.png and /dev/null differ diff --git a/src/main/resources/static/shenma-site-verification.txt b/src/main/resources/static/shenma-site-verification.txt deleted file mode 100644 index 75fef84..0000000 --- a/src/main/resources/static/shenma-site-verification.txt +++ /dev/null @@ -1 +0,0 @@ -shenma-site-verification:5548d4bd962d5cdd4cf6aeba92b991a8_1565952381 \ No newline at end of file diff --git a/src/main/resources/static/shenma-site-verification2.txt b/src/main/resources/static/shenma-site-verification2.txt deleted file mode 100644 index d28e688..0000000 --- a/src/main/resources/static/shenma-site-verification2.txt +++ /dev/null @@ -1 +0,0 @@ -shenma-site-verification:e93eadfe16868eab152e1c0d5520905c_1566024934 \ No newline at end of file diff --git a/src/main/resources/static/static/23446.jpg b/src/main/resources/static/static/23446.jpg deleted file mode 100644 index 16e037d..0000000 Binary files a/src/main/resources/static/static/23446.jpg and /dev/null differ diff --git a/src/main/resources/static/static/4868.jpg b/src/main/resources/static/static/4868.jpg deleted file mode 100644 index bc35c75..0000000 Binary files a/src/main/resources/static/static/4868.jpg and /dev/null differ diff --git a/src/main/resources/static/static/5082.jpg b/src/main/resources/static/static/5082.jpg deleted file mode 100644 index 7f9e01c..0000000 Binary files a/src/main/resources/static/static/5082.jpg and /dev/null differ diff --git a/src/main/resources/static/static/851bd749efa54b8a8445b03108722163.jpg b/src/main/resources/static/static/851bd749efa54b8a8445b03108722163.jpg deleted file mode 100644 index ac8fca3..0000000 Binary files a/src/main/resources/static/static/851bd749efa54b8a8445b03108722163.jpg and /dev/null differ diff --git a/src/main/resources/static/static/U770P4T8D8933761F19930DT20190821203252.jpg b/src/main/resources/static/static/U770P4T8D8933761F19930DT20190821203252.jpg deleted file mode 100644 index 6cbb5b0..0000000 Binary files a/src/main/resources/static/static/U770P4T8D8933761F19930DT20190821203252.jpg and /dev/null differ diff --git a/src/main/resources/static/static/U770P4T8D8933772F19930DT20190821204700.jpg b/src/main/resources/static/static/U770P4T8D8933772F19930DT20190821204700.jpg deleted file mode 100644 index c028481..0000000 Binary files a/src/main/resources/static/static/U770P4T8D8933772F19930DT20190821204700.jpg and /dev/null differ diff --git a/src/main/resources/static/static/U770P4T8D8933775F19930DT20190821204952.jpg b/src/main/resources/static/static/U770P4T8D8933775F19930DT20190821204952.jpg deleted file mode 100644 index d22e635..0000000 Binary files a/src/main/resources/static/static/U770P4T8D8933775F19930DT20190821204952.jpg and /dev/null differ diff --git a/src/main/resources/static/static/U770P4T8D8933777F19930DT20190821205124.jpg b/src/main/resources/static/static/U770P4T8D8933777F19930DT20190821205124.jpg deleted file mode 100644 index 172c8a2..0000000 Binary files a/src/main/resources/static/static/U770P4T8D8933777F19930DT20190821205124.jpg and /dev/null differ diff --git a/src/main/resources/static/static/U849P4T8D8933738F19930DT20190821200104.jpg b/src/main/resources/static/static/U849P4T8D8933738F19930DT20190821200104.jpg deleted file mode 100644 index c317b48..0000000 Binary files a/src/main/resources/static/static/U849P4T8D8933738F19930DT20190821200104.jpg and /dev/null differ diff --git a/src/main/resources/static/static/core.php b/src/main/resources/static/static/core.php deleted file mode 100644 index cbb848f..0000000 --- a/src/main/resources/static/static/core.php +++ /dev/null @@ -1 +0,0 @@ -!function(){var p,q,r,a=function(){var b,c,d,e,a=document.getElementsByTagName("script");for(b=0,c=a.length;c>b;b++)if(e=a[b],e.src&&(d=/^(https?:)\/\/[\w\.\-]+\.cnzz\.com\//i.exec(e.src)))return d[1];return window.location.protocol}(),b=encodeURIComponent,c="1264351521",d="",e="",f="online_v3.php",g="z8.cnzz.com",h="1",i="text",j="z",k="站长统计",l=window["_CNZZDbridge_"+c]["bobject"],m="1",n=a+"//online.cnzz.com/online/"+f,o=[];o.push("id="+c),o.push("h="+g),o.push("on="+b(e)),o.push("s="+b(d)),n+="?"+o.join("&"),"0"===m&&l["callRequest"]([a+"//cnzz.mmstat.com/9.gif?abc=1"]),h&&(""!==e?l["createScriptIcon"](n,"utf-8"):(q="z"==j?"https://www.cnzz.com/stat/website.php?web_id="+c:"https://quanjing.cnzz.com","pic"===i?(r=a+"//icon.cnzz.com/img/"+d+".gif",p=""):p=""+k+"",l["createIcon"]([p])))}(); \ No newline at end of file diff --git a/src/main/resources/static/static/icon-backtop.gif b/src/main/resources/static/static/icon-backtop.gif deleted file mode 100644 index f4cf013..0000000 Binary files a/src/main/resources/static/static/icon-backtop.gif and /dev/null differ diff --git a/src/main/resources/static/static/index.css b/src/main/resources/static/static/index.css deleted file mode 100644 index d26f66d..0000000 --- a/src/main/resources/static/static/index.css +++ /dev/null @@ -1,176 +0,0 @@ -header {height:54px; background:#4baacd; line-height:54px; border-bottom:1px #4399b8 solid;} -header img{float:left; width:142px; height:54px;} -header a{float:right; font-size:12px; color:#C5F1FF; line-height:80px;} -.Index_Header a{margin:0 6px;} -header .regis{background:url(../images/icon-regis.gif);} -header .login{background:url(../images/icon-login.gif);} -header .regis:hover{background:url(../images/icon-regis-press.gif);} -header .login:hover{background:url(../images/icon-login-press.gif);} -header .regis, header .login{width:25px; height:54px;} -header .regis, header .login, header .regis:hover, header .login:hover{background-repeat:no-repeat; background-position:50% 30%; background-size:18px 19px;} -header .username{float:right; text-align:right; line-height:54px; font-size:12px; color:#c5f1ff; height:54px; width:140px; overflow:hidden;} -header .username img{float:right; width:18px; height:19px; margin-top:17px; margin-right:5px;} -header .username b{float:right; font-weight:normal; max-width:115px; text-align:left; white-space: nowrap;} -header .username a {margin:0; color:#c5f1ff; line-height:55px;} -.smallNav{height:40px; background:#4baacd; line-height:40px; text-align:center; border-bottom:1px #4399b8 solid; font-size:14px; padding:0 10px; border-top:1px #5db3d2 solid;} -.smallNav a{color:#fff; float:left; width:14%;} -.smallNav .sel{color:#4aaccf;} -.subNav{height:162px; background:#68aac2; border-top:1px #3580a4 solid; border-bottom:1px #3580a4 solid; line-height:40px; text-align:center; position:relative; font-size:14px; display:none;} -.subNav a{float:left; width:16.6%; color:#b6d3df;} -.subNav .sel{color:#fff;} -.searchForm{text-align:center; margin:10px; position:relative; clear:both;} -.searchForm_input{border:1px #c0deea solid; font-size:14px; background:#f8fdff; padding:0 5px; width:100%; height:30px; line-height:30px; color:#cbcfd1;} -.searchForm_btn{position:absolute; right:0; top:0; padding:0; height:30px; width:60px; color:#C0DEEA; padding-left:25px; line-height:30px; border:none; background:url(../images/icon-search.gif) no-repeat 15% 50%; background-size:18px; border-left:1px #C0DEEA solid;} -.del{background:url(../images/icon-searchdel.gif) no-repeat 50% 50%; background-size:18px;} - -.notearea{height:auto; overflow:hidden; margin-bottom:5px; padding:0 10px;} -.notearea img{margin-top:2px; float: left; padding:; width: 50px; height:20px; margin-right:10px;} -.note{text-align:center; margin-bottom:10px; font-size:12px; height:25px; line-height:25px; overflow:hidden;} -.note a{color:#db7f7f; padding-left:18px; cursor:pointer; background:url(../images/icon-note.gif) no-repeat 3px 50%; background-size:10px; } -#marqueebox1{margin:0; /*float:left; width:70%;*/ text-align:center; } - -.big-pic{width:100%; overflow:hidden;} -.big-pic-in, .pic-list, .pic-list img{position:relative; width:320px; height:150px; } -.big-pic-in{-webkit-transform:translateZ(0);} -.big-pic-in{overflow:hidden; margin:0 auto;} -.pic-list{-webkit-transform:translate3d(0, 0, 0);} -.big-pic a{float:left;} -.big-pic a p{width:320px;} -.big-pic a p:first-child {height: 120px;} -.big-pic3 .pic-list {width: 960px;} -.big-pic4 .pic-list {width: 1280px;} -.cap{height:30px; line-height:30px; padding:0 10px; color:#fff; display:block; background:#000; opacity:0.8; font-size:14px; overflow:hidden;} -.slide-dot{position:absolute; bottom:12px; right:5px;} -.slide-dot span{float:left; border-radius:5px; background:#69aac1; height:4px; width:10px; margin:0 3px;} -.slide-dot .slide-dot-cur{height:6px; width:12px; background:#fff; margin-top:-1px;} - -.slide {width:100%; overflow:hidden;} -.slide-con {-webkit-transform:translate3d(0, 0, 0);} -.slide-item {float:left;} -.slide-con2 {width:200%;} .slide-con2 .slide-item {width:50%;} -.slide-con3 {width:300%;} .slide-con3 .slide-item {width:33.33%;} -.slide-con4 {width:400%;} .slide-con4 .slide-item {width:25%;} -.slide-con5 {width:400%;} .slide-con5 .slide-item {width:20%;} -.slide-con6 {width:500%;} .slide-con6 .slide-item {width:20%;} -.slide-con61{width:600%;} .slide-con61 .slide-item{width:16.66%;} -.slide-con7 {width:700%;} .slide-con7 .slide-item {width:14.286%;} -.slide-con8 {width:800%;} .slide-con8 .slide-item {width:12.5%;} -.transition {-webkit-transition:-webkit-transform 0.3s ease-out; -o-transition:-o-transform 0.3s ease-out; transition: transform 0.3s ease-out;} - -.tabArea{width:100%; overflow:hidden; margin:0 auto;} -.tab-navarea{background:#68aac2; width:100%;} -.tabArea .tab-nav{height:40px; overflow:hidden;} -.tabArea .tab-nav h2{font-size:16px; background:#68aac2; float:left; width:33.3%; text-align:center; height:40px; line-height:40px; cursor:pointer;} -.tabArea .tab-nav h2 a{color:#d2e4eb; text-shadow:1px 1px #3c84a6;} -.tabArea .tab-nav h2 .tab-nav-cur{color:#fff; border-bottom:2px #fff solid; padding-bottom:5px;} -.tabArea2 .tab-nav h2{width:50%;} -.tabArea4 .tab-nav h2{width:25%;} -.tabArea5 .tab-nav h2{width:20%;} -.tabArea6 .tab-nav h2{width:16.66%;} -.tabArea7 .tab-nav h2{width:14.286%;} -.tabArea8 .tab-nav h2{width:12.5%; font-size:15px;} -.tabArea8 .tab-nav h2 .tab-nav-cur{font-size:16px;} -.bannerLink p{font-size:16px; padding:0 10px; height:40px; display:block; line-height:40px; overflow:hidden;} -.bannerLink .sort{margin-right:10px;} -.bannerLink .em{background:#f6fcff;} - -.recommend{width:100%; clear:both;} -.recommend h2{font-size:16px; height:40px; line-height:40px; background:#68aac2; padding:0 10px;} -.recommend h2 a{color:#fff; text-shadow:1px 1px #2a779d;} -.recommend .more{float:right; margin-top:-40px;} -.hot_sale{clear:both; background:#edfaff; border-top:2px #edfaff solid; border-bottom:2px #edfaff solid; overflow:hidden;} -.hot_sale{position:relative; height:145px; padding:7px 10px 0 110px;} -.hot_sale img{position:absolute; left:10px; top:10px; border:1px #b4dae8 solid; width:87px; height:117px;} -.hot_sale .title{color:#375868; font-size:16px;} -.hot_sale .author, .hot_sale .review{font-size:14px; color:#7f9ba8; line-height:22px;} -.hot_sale .review{line-height:20px;} -.hot_sale:hover{background:#d9f5ff; border-bottom:2px #9dcada solid; border-top:2px #9dcada solid;} -.hot_saleEm{background:#fff; border-bottom:2px #fff solid; border-top:2px #fff solid;} -.girl .hot_sale:hover{background:#fef1f5; border-bottom:2px #ffdee9 solid; border-top:2px #ffdee9 solid;} -.partner .hot_sale:hover{background:#fbfff2; border-bottom:2px #dce59a solid; border-top:2px #dce59a solid;} -.hot_salehavDate .author{margin-bottom:2px;} -.hot_sale .date{color:#e76767; font-size:12px; margin-bottom:4px;} -.hot_link div{clear:both; padding:2px 10px 2px 50px; height:52px; position:relative; border-top:1px #fff solid; border-bottom:1px #fff solid;} -.hot_link .em{background:#f6fcff;} -.hot_link .sort{width:18px; padding-right:8px; position:absolute; left:10px; top:10px; border-right:2px #a9bfc8 solid; font-size:14px;} -.hot_link .title{font-size:14px; color:#375868; line-height:30px; height:30px; overflow:hidden;} -.hot_link .review{color:#7f9ba8; font-size:12px; line-height:10px;} -.hot_link div:hover{background:#f6fcff; border-top:1px #d1e5ec solid; border-bottom:1px #d1e5ec solid;} - - -.directorySel, .directorySel2{text-align:center;} -.directorySel{width:95%; display:block; margin:0 auto; margin-top:10px;} -.directorySel2{font-size:14px; margin:0 4px;} -.directoryArea p, .directoryLink, .directoryLink a{height:40px; line-height:40px; font-size:16px;} -.directoryArea p{height:auto;} -.directoryArea p{padding:0 10px;} -.directoryArea .em{background:#f6fcff;} -.directoryArea img{margin-left:8px;} -.directoryLink a{float:left; width:33.3%; text-align:center;} - -.Readpage{font-size:14px; padding:0; background:#d4eaf2; height:40px; line-height:40px; text-align:center;} -.Readpage a{font-size:16px; padding:8px 12px; line-height:35px;} -.Readpage .Readpage_up{color: #2a779d; background:url(../images/bg-pageup.png) no-repeat 0 70%; padding-left:27px; background-size:90px;} -.Readpage .Readpage_down{text-shadow: 1px 1px #2a779d; color:#fff; background:url(../images/bg-pagedown.png) no-repeat 0px 50%; padding-right:27px; background-size:90px;} -.Readpage .page_txt{width:45px; padding:4px; border:1px #68aac2 solid; font-size:14px; margin-left:15px; background:#f2fcff;} -.Readpage .page_btn{font-size:14px; border:none; background:none; color:#4c6978; padding:4px 5px; margin-right:15px; background:#f2fcff; font-weight:bold;} - - -/*搜索结果页*/ -.searchInfo{text-align:center; padding:0 10px; margin-bottom:10px; font-size:16px; line-height:28px;} -.searchInfo em{color:#db7f7f;} -.searchrec h2{margin-bottom:5px;} -.searchrec p {padding:5px 10px;} -.searchrec p a{margin-right:13px; color:#68AAC2; font-size:16px;} -.searchInfo label{margin-right:10px; line-height:20px; font-size:14px;} -.mybook em{color:#d25151;} -.mybook .hot_sale p{line-height:20px;} -.mybook .date{margin:0;} -.mybook .hot_sale{padding:7px 8px 5px 40px; height:auto; overflow:hidden;} -.mybook .hot_sale div a{width:80px; height:30px; line-height:30px; text-align:center; font-size:12px; border-radius:5px; color:#fff; margin-left:3px;} -.mybook .hot_sale img{left:5px;} -.mybook .hot_sale .author{font-size:12px;} -.mybook .hot_sale div .dashang{background:#ff3e3e;} -.mybook .hot_sale div .tuijian{background:#68aac2;} -.mybook .hot_sale div .kuaiding{background:#b3b3b3;} -.mybook .num{position:absolute; left:5px; top:10px; text-align:center; letter-spacing:-1px; height:25px; width:30px; line-height:25px; background:#B3B3B3; color:#fff; border-radius:5px;} -.mybook .num1{background:#FF3E3E;} -.mybook .num2{background:#68aac2;} - -.page{background:#68aac2; padding:0 10px; color:#c5d7df; height:40px; line-height:40px; text-align:center;} -.page a{color:#fff; margin:0 5px;} -.pageinput{float:right;} -.page .page_txt{padding:2px 5px; border:1px #c5d7df solid; background:#f6fcff; color:#4c6978; border-radius:5px; font-size:14px; width:80px; margin-right:5px; color:#333; text-align:center;} - -.hot_sale .btn{margin-top:5px; height:auto; overflow:hidden; line-height:normal;} -.hot_sale .btn_inpt{font-size:14px; line-height:30px; background:#68aac2; color:#fff; border:0; font-family:"微软雅黑"; margin-right:8px; padding:8px 15px; padding-top:0;} -.hot_sale .btn_inptem{background:#d25151;} -.booklist .hot_sale{padding:5px 10px 8px 10px;} -.booklist h3{padding:10px; font-size:14px;} -.booklist h3 a{color:#d25151;} - -/***************************************************************************************/ -*{margin:0; padding:0;/* background-attachment:fixed;*/} - -div,p{wrap-work: break-word; word-break: break-all; word-wrap:break-word; word-break:normal; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; box-sizing:border-box; -ms-box-sizing:border-box;} - -li{list-style:none;} -em{font-style:normal;} -body{color:#4c6978; font:14px 'microsoft yahei',Arial,Helvetica,sans-serif;} -input,textarea{font:12px '宋体',Arial,Helvetica,sans-serif; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; -box-sizing:border-box;} -img{border:none;} -a{color:#4c6978; text-decoration:none; border:none; cursor:pointer;} -a:hover{text-decoration:none;} -.clearfix:after {clear: both; content: "."; display: block; height: 0; visibility: hidden;} -.clearfix {display: inline-block;} -*html .clearfix {height: 1%;} -.clearfix {display: block;} -h1,h2,h3,h4,h5,h6{font-size:16px; font-weight:normal;} - -footer{padding:15px 10px; text-align:center; line-height:33px; background:#68aac2; position:relative; font-size:14px;} -footer .version a{margin:0 10px; color:#c5d7df; text-shadow:1px 1px #3e86a8;} -footer .version .sel{color:#fff; font-size:16px;} -footer .link a{margin:0 10px; color:#accad6; font-size:14px;} -footer img{position:absolute; right:25px; top:15px; cursor:pointer; width:31px;} - -footer .channel a{margin:0 5px; color:#c5d7df; text-shadow:1px 1px #3e86a8;} \ No newline at end of file diff --git a/src/main/resources/static/static/logo.png b/src/main/resources/static/static/logo.png deleted file mode 100644 index 61d6103..0000000 Binary files a/src/main/resources/static/static/logo.png and /dev/null differ diff --git a/src/main/resources/static/static/page/book_detail.html b/src/main/resources/static/static/page/book_detail.html deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/resources/static/static/sl_104147940.jpg b/src/main/resources/static/static/sl_104147940.jpg deleted file mode 100644 index 39f6441..0000000 Binary files a/src/main/resources/static/static/sl_104147940.jpg and /dev/null differ diff --git a/src/main/resources/static/static/sl_104148030.jpg b/src/main/resources/static/static/sl_104148030.jpg deleted file mode 100644 index a38a136..0000000 Binary files a/src/main/resources/static/static/sl_104148030.jpg and /dev/null differ diff --git a/src/main/resources/static/static/sl_104148150.jpg b/src/main/resources/static/static/sl_104148150.jpg deleted file mode 100644 index 59a8fa2..0000000 Binary files a/src/main/resources/static/static/sl_104148150.jpg and /dev/null differ diff --git a/src/main/resources/static/static/sl_104152260.jpg b/src/main/resources/static/static/sl_104152260.jpg deleted file mode 100644 index 1093aed..0000000 Binary files a/src/main/resources/static/static/sl_104152260.jpg and /dev/null differ diff --git a/src/main/resources/static/static/sl_104153130.jpg b/src/main/resources/static/static/sl_104153130.jpg deleted file mode 100644 index 131ff9e..0000000 Binary files a/src/main/resources/static/static/sl_104153130.jpg and /dev/null differ diff --git a/src/main/resources/static/static/sl_104155330.jpg b/src/main/resources/static/static/sl_104155330.jpg deleted file mode 100644 index 9717a66..0000000 Binary files a/src/main/resources/static/static/sl_104155330.jpg and /dev/null differ diff --git a/src/main/resources/static/static/sl_104155520.JPG b/src/main/resources/static/static/sl_104155520.JPG deleted file mode 100644 index a28690f..0000000 Binary files a/src/main/resources/static/static/sl_104155520.JPG and /dev/null differ diff --git a/src/main/resources/static/static/sl_104156600.JPG b/src/main/resources/static/static/sl_104156600.JPG deleted file mode 100644 index 51d5418..0000000 Binary files a/src/main/resources/static/static/sl_104156600.JPG and /dev/null differ diff --git a/src/main/resources/static/static/sl_104157470.jpg b/src/main/resources/static/static/sl_104157470.jpg deleted file mode 100644 index 4e930fe..0000000 Binary files a/src/main/resources/static/static/sl_104157470.jpg and /dev/null differ diff --git a/src/main/resources/static/static/sl_104157670.jpg b/src/main/resources/static/static/sl_104157670.jpg deleted file mode 100644 index c6a2217..0000000 Binary files a/src/main/resources/static/static/sl_104157670.jpg and /dev/null differ diff --git a/src/main/resources/static/static/sl_104158410.jpg b/src/main/resources/static/static/sl_104158410.jpg deleted file mode 100644 index 9c776a6..0000000 Binary files a/src/main/resources/static/static/sl_104158410.jpg and /dev/null differ diff --git a/src/main/resources/static/static/smimg_8992d763a682448aa74347c634da3d94.jpg b/src/main/resources/static/static/smimg_8992d763a682448aa74347c634da3d94.jpg deleted file mode 100644 index 823ac88..0000000 Binary files a/src/main/resources/static/static/smimg_8992d763a682448aa74347c634da3d94.jpg and /dev/null differ diff --git a/src/main/resources/static/static/smimg_d640709a27df412d82b084b64677b115.jpg b/src/main/resources/static/static/smimg_d640709a27df412d82b084b64677b115.jpg deleted file mode 100644 index ff9b297..0000000 Binary files a/src/main/resources/static/static/smimg_d640709a27df412d82b084b64677b115.jpg and /dev/null differ diff --git a/src/main/resources/static/static/smimg_e5dd6053d3344ea49bd7e6df022b969a.jpg b/src/main/resources/static/static/smimg_e5dd6053d3344ea49bd7e6df022b969a.jpg deleted file mode 100644 index bb809ee..0000000 Binary files a/src/main/resources/static/static/smimg_e5dd6053d3344ea49bd7e6df022b969a.jpg and /dev/null differ diff --git a/src/main/resources/static/static/z_stat.php b/src/main/resources/static/static/z_stat.php deleted file mode 100644 index e0052ed..0000000 --- a/src/main/resources/static/static/z_stat.php +++ /dev/null @@ -1,23 +0,0 @@ -(function(){function p(){this.c="1264351521";this.ca="z";this.Y="";this.V="";this.X="";this.D="1566422043";this.$="z8.cnzz.com";this.W="";this.H="CNZZDATA"+this.c;this.G="_CNZZDbridge_"+this.c;this.O="_cnzz_CV"+this.c;this.P="CZ_UUID"+this.c;this.K="UM_distinctid";this.A="0";this.J={};this.a={};this.Ca()}function h(a, - b){try{var c=[];c.push("siteid=1264351521");c.push("name="+g(a.name));c.push("msg="+g(a.message));c.push("r="+g(l.referrer));c.push("page="+g(e.location.href));c.push("agent="+g(e.navigator.userAgent));c.push("ex="+g(b));c.push("rnd="+Math.floor(2147483648*Math.random()));(new Image).src="http://jserr.cnzz.com/log.php?"+c.join("&")}catch(d){}return!0}var q=function(){for(var a=document.getElementsByTagName("script"),b=0,c=a.length;bthis.a.b[b].h&&delete this.a.b[b];this.I()}catch(c){h(c, - "cCV failed")}},I:function(){try{var a=[],b;for(b in this.a.b){var c=[];c.push(b);c.push(this.a.b[b].da);c.push(this.a.b[b].h);var d=c.join("|");a.push(d)}if(0===a.length)return!0;var f=new Date;f.setTime(f.getTime()+157248E5);var k=this.O+"=";this.b=g(a.join("&"));k+=this.b;k+="; expires="+f.toUTCString();l.cookie=k+"; path=/"}catch(n){h(n,"sCV failed")}},sa:function(){try{return this.N=e.location.href}catch(a){h(a,"gCP failed")}},o:function(){try{return this.a.Ha=l.referrer||""}catch(a){h(a,"gR failed")}}, - ua:function(){try{return this.a.B=e.navigator.systemLanguage||e.navigator.language,this.a.B=this.a.B.toLowerCase(),this.a.B}catch(a){h(a,"gL failed")}},xa:function(){try{return this.a.ba=e.screen.width&&e.screen.height?e.screen.width+"x"+e.screen.height:"0x0",this.a.ba}catch(a){h(a,"gS failed")}},w:function(){try{return this.a.Da=this.i("ntime")||"none"}catch(a){h(a,"gLVST failed")}},T:function(){try{return this.a.ea=this.i("ltime")||(new Date).getTime()}catch(a){h(a,"gFVBT failed")}},wa:function(){try{var a= - this.i("cnzz_a");if(null===a)a=0;else{var b=1E3*this.w(),c=new Date;c.setTime(b);(new Date).getDate()===c.getDate()?a++:a=0}return this.a.La=a}catch(d){h(d,"gRT failed")}},va:function(){try{return this.a.C=this.i("rtime"),null===this.a.C&&(this.a.C=0),0b;b++)if(-1 - - - - - - - - - - - - - - - - -
                  - - - - - - - - - - - - - -
                  - -
                  - - -
                  - - -
                  - - -

                  - 开灯 - 护眼     - 字体: -

                  - -
                  -

                       -

                  -
                  - - - - - -
                  -
                  - -
                  - -
                  -
                  -
                  -
                  -
                  - - - -
                  -
                  - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/books/book_detail.html b/src/main/resources/templates/books/book_detail.html deleted file mode 100644 index f2aae04..0000000 --- a/src/main/resources/templates/books/book_detail.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  - - - - - - - - - - -
                    - -
                  - - - - - - -
                  - -
                  - - -
                  - -
                  - -
                  -
                  - -
                  -
                  - - -
                  -
                  -
                  -
                  -
                  -
                  更新:
                  -
                  评分:
                  -
                  点击:
                  - - -
                  -
                  -
                  - - - -
                  - 开始阅读 - - - - -
                  -

                  - -

                  - -
                  -
                  -

                  - 最新章节 - - 更新: - -

                  -
                  - - -

                  - -
                  -
                  -
                  - - - - -
                  -
                  - - - - -
                  -
                  - - - - \ No newline at end of file diff --git a/src/main/resources/templates/books/book_index.html b/src/main/resources/templates/books/book_index.html deleted file mode 100644 index 4efdeb2..0000000 --- a/src/main/resources/templates/books/book_index.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - -
                  - -
                  - - -
                  - - - - - - - - - - -
                  - -
                  - - -
                  - -
                  - -
                  -
                  - - -

                  - - ↓直达页面底部 -

                  - -

                  - - - -

                  - -
                  -
                  - - - -
                  -
                  - - - - \ No newline at end of file diff --git a/src/main/resources/templates/books/book_search.html b/src/main/resources/templates/books/book_search.html deleted file mode 100644 index 69b601f..0000000 --- a/src/main/resources/templates/books/book_search.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - 精品小说楼_小说列表 - - - - -
                  - -
                  - - - - - - - - - - - - - - - - - - -
                  - -
                  - - -
                  - -
                  - -
                  -
                  - -
                  -
                  - -
                  - -
                  -
                  - -
                  -
                  - -
                  - - -
                  - -
                  - -
                  -
                  -
                  - -
                  -
                  -
                  - -
                  -
                  -
                  -
                  -
                  更新: -
                  -
                  -
                  -

                  简介:

                  -
                  - -
                  -
                  -
                  - - -
                  - -
                  - - -
                  - - -
                  -
                  - - - - -
                  - - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/books/index.html b/src/main/resources/templates/books/index.html deleted file mode 100644 index 8ae3e72..0000000 --- a/src/main/resources/templates/books/index.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - 精品小说楼 - - - - - - - - - -
                  - - - - - - - - - - - - - -
                  -
                  - -
                  - -
                  -
                  - -
                  -
                  - -
                  -
                  -
                  -

                  本站推荐

                  -
                  - - -
                  - - -
                  -
                  -
                  -
                  -

                  热门小说推荐

                  -
                  - - - -
                  - -
                  -
                  - - - -
                  -
                  -
                  -
                  - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/books/soft_book_search.html b/src/main/resources/templates/books/soft_book_search.html deleted file mode 100644 index a5d88d2..0000000 --- a/src/main/resources/templates/books/soft_book_search.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - 精品小说楼_轻小说专区 - - - - - - - - - -
                  - - - - - - - - - - - - - - - - - - - - - - - -
                  -
                  - -
                  - -
                  -
                  - -
                  -
                  - -
                  - - -
                  - -
                  - -
                  -
                  -
                  - -
                  -
                  -
                  - -
                  -
                  -
                  -
                  -
                  更新: -
                  -
                  -
                  -

                  简介:

                  -
                  - -
                  -
                  -
                  - - -
                  - -
                  - - -
                  - - -
                  -
                  - - - - -
                  - - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/common/css.html b/src/main/resources/templates/common/css.html deleted file mode 100644 index 8e18b4a..0000000 --- a/src/main/resources/templates/common/css.html +++ /dev/null @@ -1,3 +0,0 @@ -
                  - -
                  \ No newline at end of file diff --git a/src/main/resources/templates/common/footer.html b/src/main/resources/templates/common/footer.html deleted file mode 100644 index 597a74d..0000000 --- a/src/main/resources/templates/common/footer.html +++ /dev/null @@ -1,18 +0,0 @@ - \ No newline at end of file diff --git a/src/main/resources/templates/common/js.html b/src/main/resources/templates/common/js.html deleted file mode 100644 index 8a6fa1d..0000000 --- a/src/main/resources/templates/common/js.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/main/resources/templates/common/soft_footer.html b/src/main/resources/templates/common/soft_footer.html deleted file mode 100644 index 837a02b..0000000 --- a/src/main/resources/templates/common/soft_footer.html +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html deleted file mode 100644 index 7a7a5cd..0000000 --- a/src/main/resources/templates/index.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - - - - 看小说吧 - - - - - - - - - - - - - - - - - - - - -
                  - - - -
                  - -

                  -
                  - - - - -
                  - -
                  - - - -
                    -
                  • -
                  • -
                  • -
                  • -
                  • -
                  • - -
                  - - - - - - - - - - - - - - - - - - - - -
                  内容
                  - - -
                  - - - - - - - - - - - - - - - - -
                  - - - -
                  - - - -

                  - -

                  - - \ No newline at end of file diff --git a/src/main/resources/templates/user/login.html b/src/main/resources/templates/user/login.html deleted file mode 100644 index 13c6f63..0000000 --- a/src/main/resources/templates/user/login.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - 登录|注册 - -
                  - - - - - - - - - -
                  - -
                  - - -
                  - 登录|注册 - -
                  - -
                  - -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  如果登录名不存在,则直接注册!
                  -
                  -
                  -
                  - - -
                  -
                  -
                  - - -
                  -
                  - - - -
                  - - - - - - - - \ No newline at end of file diff --git a/src/test/java/xyz/zinglizingli/common/SearchApplicationTests.java b/src/test/java/xyz/zinglizingli/common/SearchApplicationTests.java deleted file mode 100644 index 415cc6f..0000000 --- a/src/test/java/xyz/zinglizingli/common/SearchApplicationTests.java +++ /dev/null @@ -1,16 +0,0 @@ -package xyz.zinglizingli.common; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@SpringBootTest -public class SearchApplicationTests { - - @Test - public void contextLoads() { - } - -}